#msratanagarwal, #BlobDetectionOpenCV #OpenCVProject #ComputerVision
How Centroid Center of blob Detection In Python Project
click or miss
Project Prerequisites
1.you can install cv2 , numpy module
2.Some jpg pictures to manipulate
3. Methods
What about the video?
How Centroid Center of blob Detection In Python Project
what is Blob and how to detect it using Python OpenCV. A blob whose full form is a binary large object. Blobs are generally considered as images, audio, or video data. In computer, vision blob refers to a group of connected pixels or regions in a binary image that shares a common property. These regions are nothing but contours in OpenCV with some extra features like blob/contour orientation, centroid, color, Area, Mean, and standard deviation of the pixel values in the covered region, etc. The term "Large" in binary large objects indicates that only objects of a certain size are of interest and that the other "small" binary objects are usually noise.
Centroid (Center of blob) detection
To find the center of an image.
1.The first step is to convert the original image into grayscale.
We can use the cvtColor() method of cv2 as we did before.We read the image and convert it to a grayscale image.
2.The new image is stored in gray_img.
3.Now we have to calculate the moments of the image.
Use the moments() method of cv2. In the moments() method, the grayscale image will be passed as below:
moment = cv2.moments(gray_img)
4.Then we need to calculate the x and y coordinates of the center of the image by using the moments that we got above:
5.Finally, we have the center of the image.
6.To highlight this center position, we can use the circle method.which will create a circle in the given coordinates of the given radius.The circle() method takes the img, the x and y coordinates.
where the circle will be created, the size, the color that we want the circle to be and the thickness.syntax is as follows--
cv2.circle(img,center,radius,color,thikness,lineType,shift)
7.The circle is created on the image.
To Read & Display image use methods
Imread() – read image
Type (image) – show type
Imshow() –show image
Waitkey() -to halt
"Copyright Disclaimer under Section 107 of the copyright act 1976, allowance is made for fair use for purposes such as criticism, comment, news reporting, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing.”
Customize channel id - / ratanagarwalitinformer
short link of channel http://bit.ly/3eH6m5d
join on Telegram- https://t.me/techratanagarwal
OUR SOCIAL MEDIA Watch us on
Facebook page- / msratanagarwal write
Facebook group- / 229087104980049
Peep us on Instagram: / ratanagarwal67
Fly with us on Twitter: / msratanagarwal
SHARE this video with your friends
PLAYLIST-
Windows 10- / playlist,list=pluclt6s7bsrpnr8gso5e49godeh...
YouTube assets- • YouTube Tips
Python - • python
Animation in C - • animation in c
HTML • html and css
JavaScript • JAVASCRIPT
Quiz and story • quiz and story general topics
Message and blog https://www.youtube.com/playlist?list...
Latest technology • latest technology
app and security • apps and security
Network • network
access • ACCESS SERIES
excel • EXCEL SERIES
word • ms word
power point • power point
Skill education • skill education
Short video • shorts
daily use app- • daily use apps
Phone • PHONE
flash • flash
Quiz and story • quiz and story general topics
outlook • Playlist
information technology • INFORMATION TECHNOLOGY(backup)