How To Detect Objects Using Image Segmentation OpenCV Python

Published: 14 November 2022
on channel: Pyresearch
2k
19

Image Segmentation


This code helps you to understand and draw boundaries on objects of a particular image.



Description

Here is the approach that I used to detect the blocks:

1) Converted the image to grayscale
2) Applied threshold (simple binary threshold, with a handpicked value of 150 as the threshold value)
3) Applied dilation to thicken lines in the image, leading to more compact objects and fewer white space fragments. Used a high value for a number of iterations, so dilation is very heavy (13 iterations, also handpicked for optimal results).
4) Identified contours of objects in a resulting image using the OpenCV find contours function.
5) Drew a bounding box (rectangle) circumscribing each contoured object - each frames a block of text.


Please let me know your valuable feedback on the video by means of comments. Please like and share the video. Do not forget to subscribe to my channel for more educational videos.


Any problem you can comment down.

Want more education? Connect with me here:
Twitter:
Github:
Subscribe:
Organizations:
Youtube:





Related searches
object detection using OpenCV source code python
object detection using image processing python
real-time object detection OpenCV python code
object detection OpenCV-python GitHub
object detection code in python
OpenCV detects an object in the image
OpenCV object-detection GitHub
how to train OpenCV to detect an object


Watch video How To Detect Objects Using Image Segmentation OpenCV Python online without registration, duration 03 minute 54 second in high hd quality. This video was added by user Pyresearch 14 November 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2 thousand once and liked it 19 people.