Exploring!! cv2 Library…(findContours)

Shreyak
Shreyak
Nov 7 · 2 min read

#Hey Everyone!

From past two days I was working with Malaria Dataset for my Machine Learning project and came to a new thing “ Contours.”

I don't know you all have heard about this before or not!

Definition :- Contours are defined as the line joining all the points along the boundary of an image that are having the same intensity. Contours come handy in shape analysis, finding the size of the object of interest, and object detection

It is basically an outline representing a boundary of a cell. When I was observing the Malaria infected tissues-photo from the dataset. I found some spots and marks over the tissues. Which I later understand that it can be used to classify whether the tissue is affected or not.

Affected Tissue (Contours in Pink colour)
Heathy Tissue(No spot)

For this I need to count those spots as well as to know the area covered by those spots. So after many online searches I came with an idea to count and find the area of this spot using findContours() function. I used this function to find the area of these spots.

I am sharing few screen shots of my code

After completing the project successfully, I'll be uploading all the codes and results of this project in my GitHub repository github.com/Shreyakkk

Thanks for reading.!!!!!!!!

Shreyak

Written by

Shreyak

Machine Learning Intern at SlamTrade.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade