Skip to content

Easily count red blood cells in images using openCV with tkinter GUI.

Notifications You must be signed in to change notification settings

sklimasz/RedBloodCells-analyzer-app

Repository files navigation

Red blood cell analyzer app in Python

Estimate number of red blood cells in given image using openCV. Quickly go through the process using GUI tkinter app. Easily change estimation parameters in the app.

Requirements

  • openCV
  • numpy
  • tkinter
  • customtkinter
  • PIL

How to use

First Window

Click on the "choose an image to analyze" button

Then choose a file and open it and click on the "Proceed with chosen image" button

Second Window

In the next window you have to click and drag on the image
to create rectangle boxing background of the image
There should not be any cells in the rectangle
You should also try to create biggest rectangle possible

Incorrect rectangle

Correct rectangle

Final Window

Above the image you can see the estimation of the number of red blood cells

Sliders allow you to change the parameters of the estimation

Different contour colors indicate different number of cells in a cluster

You can see partial images by using buttons numbered 0-7
Counting algorithm and partial images explained in rbc_estimation.py
Partial image 1 ( white blood cells removed )

To choose correct parameters look at image 6
It is the last step and should give most insight

Incorrect parameters

Correct parameters

Area of one blood cell depends on the resolution of images
Change self.AreaOfOneBlood cell if things dont work right
You can also change the counting logic

rbc_estimation.py

About

Easily count red blood cells in images using openCV with tkinter GUI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages