How to remove noise from a histogram-aligned image?

I have an image that I align and then use the clahe histogram, for example:

self.equ = cv2.equalizeHist(self.result_array) clahe = cv2.createCLAHE(clipLimit=100.0, tileGridSize=(8,8)) self.cl1 = clahe.apply(self.equ) 

As a result, I get:

enter image description here

I want to get rid of all the black dots that are noise. Ultimately, I try to extract blood vessels that are black in the image above, trying to do this, the noise makes the removal inaccurate.

+8
python image image-processing opencv
source share
1 answer

Most of my dissertation was devoted to reducing noise in images, and I used a technique that reduced noise in images, while preserving the sharp edges of the information in the image. I quote myself here:

An effective technique for removing noise from the bands is to filter the image using sine-cosine filtering [link] . The low-pass filter is collapsed with two images obtained by obtaining the sine and cosine of the strip pattern image, which are then divided to obtain a tangent, restoring the phase pattern, but with reduced noise. The advantage of this method is that the process can be repeated several times to reduce noise while maintaining the clear details of the phase transitions.

And here is the code I used:

 import numpy as np from scipy import ndimage def scfilter(image, iterations, kernel): """ Sineโ€cosine filter. kernel can be tuple or single value. Returns filtered image. """ for n in range(iterations): image = np.arctan2( ndimage.filters.uniform_filter(np.sin(image), size=kernel), ndimage.filters.uniform_filter(np.cos(image), size=kernel)) return image 

There, image was an array representing the image linearly resized to put black at 0 and white at 2 * pi , and kernel is the size in pixels of the image of a uniform filter applied to the data. It doesn't take too many iterations to see a positive result, possibly in the range of 5 to 20.

Hope this helps :)

+2
source share

All Articles