Simple shape detection – Opencv with Python 3

preview_player
Показать описание

We’ll se in this video how to perform a simple shape detection.
Starting from an image with a few shapes, we’ll be able to detect exactly each shape (rectangle, circle, pentagon, etc.) and the position.

➤ Full Videocourses:

➤ Follow me on:

➤ For business inquiries:
Рекомендации по теме
Комментарии
Автор

Thanks!! Your video really helped me in kicking off my assignment. :)

hkshetty
Автор

Really like your videos, you explain clearly and know what you are doing and it is so easy to learn from them. I feel if you rehearsed maybe once or twice before recording that you would come up with a smoother more professional product and bring up your videos a level.

nodrug
Автор

I really like your channel, I learn a lot for my projects :) Keep going

rodolfocruz
Автор

how do we avoid the entire image being recognized as a rectangle?

dishikapoddar
Автор

I want the name of the detected shapes to be written in output section....how to do that??

anuragsuryawanshi
Автор

hello.. love your videos. could you please show us/me how to find center coordinates of these objects in pyhton?

KKMaity
Автор

Hi im trying to do an aplication similar to yours but I have a question, what happens if u have the shapes conected, does OpenCv detect it correctly?

chema
Автор

Is it possible to track a moving object and measure its angle using Opencv with python? For example, if I would like to measure the angle of my knee bending when I am running. How could I do? Thank you very much!

anthonyhuang
Автор

@pysource, can you explain how to create layout of different shapes of RGB images in Python.

informeta
Автор

Awesome tutorials! May I ask if you have one on detecting numbers? Aka using a template number (eg 4) and checking on a larger image for all appearances of 4, regardless of orientation, scale etc?

carbonatepump
Автор

Could you do a video or explain me how can you do this but in real time? I'd appreciate it so much

angeloespinoza
Автор

how to eliminate the contour drawn for the window.?

bharathur
Автор

What version of python and opencv u are using and on which operating sys?

sheharyarkhan
Автор

the name of the program you are writing

delgermaasergelentugs
Автор

@7:06
error: OpenCV(4.2.0) error: (-215:Assertion failed) npoints > 0 in function 'drawContours'

ojhamanvi
Автор

Thanks for the code. And what if we want to find numbers of the objects detected ie finally it should show:
Triangle = 3
Ellipse = 2
circle(s) = 1
etc..
Your help will be very much appreciated XD

sanatmohrir
Автор

approx is giving me the wrong # of sides: 4, 10, 16, 5. code is: for cnt in contours:
approx = cv2.approxPolyDP(cnt, 0.01*cv2.arcLength(cnt, True), True)
cv2.drawContours(img, [approx], 0, (0), 5)
print(len(approx))

LunarPSD
Автор

help me .code error _, contours, _ = cv2.findContours(threshold, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
ValueError: not enough values to unpack (expected 3, got 2)

Yourself
Автор

in line 5 is that
_, threshold - cv2
or
_, threshold = cv2
, sorry :D

wllsk
Автор

I see an oval on a red object and I see it

onandonandomnom