Skip to content

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.

Image Processing

Stages of SCC Processing
Stages of processing and filtering


Grayscale

L U8 v_0

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)

Truncated

L U8 v_1

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.

Thresholded

L U8 v_2