Real time Shape Detection using Contours [9] | OpenCV Python Tutorials for Beginners 2020

preview_player
Показать описание
In this video, we will learn how to detect the shapes of objects by finding their contours. Contours are basically outlines that bound the shape or form of an object. So we will be detecting multiple shapes and how many corners points each shape has along with its area.

🚀🚀 My Urdu/Hindi AI YouTube Channel 🚀🚀

Code & Complete Course:
The stack image function can be found in Chapter 6.

Premium Courses:
✔️ Computer Vision Game Development Course:
✔️ Computer Vision with Arduino Course:
✔️ Advanced Drone Programming Course:
✔️ Learn to Build Computer Vision Mobile Apps:
✔️ Jetson Nano Premium Course:

⚙️⚙️⚙️—-My Gear — ⚙️⚙️⚙️

Follow Me:

#ComputerVision
#OpenCV
#CVZone
Рекомендации по теме
Комментарии
Автор

Heres some of the code that was totally 'linked in the description'
#im suffering
def stackImages(scale, imgArray):
rows = len(imgArray)
cols = len(imgArray[0])
rowsAvailable = isinstance(imgArray[0], list)
width =imgArray[0][0].shape[1]
height = imgArray[0][0].shape[0]
if rowsAvailable:
for x in range (0, rows):
for y in range(0, cols):
if imgArray[x][y].shape[:2] == imgArray[0][0].shape[:2]:
imgArray[x][y] = cv2.resize(imgArray[x][y], (0, 0), None, scale, scale)
else:
imgArray[x][y] = cv2.resize(imgArray[x][y], (imgArray[0][0].shape[1], imgArray[0][0].shape[0]), None, scale, scale)
if len(imgArray[x][y].shape) == 2: imgArray[x][y] = cv2.cvtColor(imgArray[x][y], cv2.COLOR_GRAY2BGR)
imageBlank = np.zeros((height, width, 3), np.uint8)
hor = [imageBlank]*rows
hor_con = [imageBlank] *rows
for x in range (0, rows):
hor[x] = np.hstack(imgArray[x])
ver = np.vstack(hor)
else:
for x in range(0, rows):
if imgArray[x].shape[:2] == imgArray[0].shape[:2]:
imgArray[x] = cv2.resize(imgArray[x], (0, 0), None, scale, scale)
else:
imgArray[x] = cv2.resize(imgArray[x], (imgArray[0].shape[1], imgArray[0]), None, scale, scale)
if len(imgArray[x].shape) ==2: imgArray[x] = cv2.cvtColor(imgArray[x], cv2.COLOR_GRAY2BGR)
hor = np.hstack(imgArray)
ver = hor
return ver

sammydarden
Автор

I appreciate the little adjustments before using the "main" feature detector more and more

SubaBlubba
Автор

Thank you so much for the clear explanation. I am currently working on a project, This will definitely help me.

ajaynair
Автор

i love you you are awesome, the best videos on youtube for computer vision!

amandanamikata
Автор

Моє шанування! Прекрасні уроки, дякую!

serjkp
Автор

I can't thank you enough for this!
Incredible and very well explained tutorial

renanstn
Автор

A most interesting OpenCV video. I have a new Orange Pi-5 SBC and would like to do some OpenCV Python examples on it. The Raspberry Pi-4 has a wealth of examples to practice with first. This wonderful Tutorial Shape Detection lesson [9] will be very helpful. 😎 Thank you.

qzorn
Автор

Thank you for explaining it in such an easy and simple way. A Must watch video for everyone. ❤️

ankitpandeynitdurgapur
Автор

Thank you my friend. It took an hour to translate from python to C++ but I made it

tomasaraujo
Автор

This Channel deserve more Subscribes than it has..!!

walidhassan
Автор

I am little confuse here? Is it calculating are of the bounding box around the object or area of the object itself?
I think it's calculating of bounding box?
Btw the tutorial is good ❤️💯

siddharthmodi
Автор

Thank you so much
You help me to start with my final year project idea
I just need to know how can I crop each rectangle and show it as many photos

pierrealmhanna
Автор

Can you give me the link for this course, the link in description just redirects me to the new website of yours. I cant find this particular project there. Thanks

arnezor
Автор

omg you do it with no model lol awesome <3

amandanamikata
Автор

What a great tutorial! You are really saving my grades right now! I've just gotta apply this to only the pip symbols on playing cards. Which of the links in the description leads to the imgStack function?

TehJellyLord
Автор

Anyone knows how to find out the coordinates of the shapes detected? Any help would be really appreciated. Also the tutorial's really really helpful. Thanks!

jayantagrawal
Автор

Thanks for the informative video, can u help me once...how could i label the individual objects? Actually i want to calculate how many objects and their total area.

sumanachakraborty
Автор

Great tutorial Thank you very much, Unfortunately, The reference code is not available in the links. So i had to type all from the beginning.

UddhikaIshara
Автор

exactly what i was looking for thank you a million! subbed

zakariaabderrahmanesadelao
Автор

I love your channel. Keep up the great projects!

tarektabba