-
Notifications
You must be signed in to change notification settings - Fork 6
How SCC Works
Chris Reeves edited this page Nov 9, 2022
·
1 revision
SCC uses OpenCV (Open Source Computer Vision Library) to generate contours from images and filters those contours by size and circularity.
Stages of processing and filtering
After loading the image, it is converted to grayscale with cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
If Fluorescent is checked, the image is also inverted with cv2.bitwise_not(image)
The mode pixel value is used to truncate the image with cv2.threshold(image, mode, 255, cv2.THRESH_TRUNC)[1]
- Pixels brighter than the mode, which approximately equals the middle of the background brightness, are not candidates for cell expression. Truncating them removes noise from the image.
The resulting image is also blurred with cv2.GaussianBlur(image, (cell_size,cell_size), 0)
to remove more noise.