Denoising Comet Assay

I have been trying to reduce the noise in the attached image. Basically, I want to remove the background dust from the image. Currently, I have tried looking for small points throughout the image(anything that fits within a 10 by 10 grid with low Green pixel intensity) and then blacked out the 10 by 10 region. However, I was hoping to remove more noise from the image. Is there a possibly way to run some filters in OpenCv to do so.

Add Comment
1 Answer(s)

A simple approach can be: Convert the image to grayscale, threshold it, and the apply morphological opening in it to get estimate results.

img = cv2.imread("commitdust.png") gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)  ret, th = cv2.threshold(gray, 80, 255, cv2.THRESH_BINARY)  k = np.array([[0, 0, 1, 0, 0],               [0, 1, 1, 1, 0],               [1, 1, 1, 1, 1],               [0, 1, 1, 1, 0],               [0, 0, 1, 0, 0]], dtype=np.uint8) th = cv2.morphologyEx(th, cv2.MORPH_OPEN, k)  cv2.imshow("th", th) cv2.waitKey(0) cv2.destroyAllWindows() 
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.