Image processing with Python OpenCV

Hi guys,

I have this image

I tried this, but it does not work, how make this image better?

def Image_filter2d(Image):
    # Apply blurring kernel
    sharpen_filter = np.array([[0, -1, 0], [-1, 5, -1], [0, -1, 0]])
    #kernel2 = np.ones((5, 5), np.float32) / 25
    #Result = cv2.filter2D(src=Image, ddepth=-1, kernel=kernel2)
    sharped_img = cv2.filter2D(Image, -1, sharpen_filter)
    return sharped_img


def Image_edge_fix(Image):
    dst = cv2.edgePreservingFilter(Image, flags=1, sigma_s=60, sigma_r=0.4)
    return dst

Hi @ArakelTheDragon,
Welcome to the Forum! In which way do you want to improve the image? The resolution seems high to me and it does not seem very noisy. Maybe there is some motion blur.
Do you need to improve the image to run some other analysis?

To get rid of the motion blur you would need kernel-blind (and noise-blind) deconvolution. This is very hard to do and an active field of research. There are some forum posts in the image.sc forum about deconvolution: Topics tagged deconvolution.
If this is the only image you want to improve you could maybe get some improvement by sharpening and some other filters (I don’t have much experience with this). KNIME is not the right tool to do this. I would recommend an interactive tool like Fiji/ImageJ or GIMP.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.