Find and Draw Contours - OpenCV 3.4 with python 3 Tutorial 19

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ธ.ค. 2024

ความคิดเห็น • 94

  • @pysource-com
    @pysource-com  2 ปีที่แล้ว +1

    🔥Learn how to build your own AI vision solutions: pysource.com/community

  • @sercanalnca1962
    @sercanalnca1962 2 ปีที่แล้ว

    Meeeeen , i don’t know how many time say to thank you soo muuucchh. I am beginner for computer vision in Python. In this tutorial you teach me too much think. I am very very happy because i have some project idea in my mind.

  • @inigoelias5690
    @inigoelias5690 2 ปีที่แล้ว

    Excellent brother, this is so useful and fascinating. Greetings from Mexico.

  • @aqibkhan5091
    @aqibkhan5091 5 ปีที่แล้ว +1

    Lots of love from India ..your channel made things much easier for me..please add some more advance projects on open CV

  • @apachon
    @apachon 6 ปีที่แล้ว +1

    Thanks for this video.i just started learning open cv , and this is helping a lot to understand how it works .

  • @yangyong6245
    @yangyong6245 4 ปีที่แล้ว +1

    Good video!!, I learned a lot of knowledge about Contour detect.

  • @4bart4ley4
    @4bart4ley4 5 ปีที่แล้ว

    Thank you man! your so helpful! hope your channel continue to grow! subscribed and liked!

  • @peenchinggyu6024
    @peenchinggyu6024 6 ปีที่แล้ว

    thank you.. ive tried it at opencv2 and python2.7 and it works too

  • @bhimsendabby
    @bhimsendabby 6 ปีที่แล้ว

    Firstly I totally confused about contour but sir you really helped me so thanku sir

  • @dasamantharaorohit2866
    @dasamantharaorohit2866 6 ปีที่แล้ว +1

    awesome one bro looking for the tutorial for box shaped detection which you talked at last :) (Nice Work)

  • @saeedAhmed-ck3ot
    @saeedAhmed-ck3ot 6 ปีที่แล้ว +1

    You really helped me, I learned a lot,
    thank you.

  • @solehahnur1823
    @solehahnur1823 5 ปีที่แล้ว +1

    Sir,can you help me on how to get the centre coordinate of the contour

  • @chetancc
    @chetancc 4 ปีที่แล้ว

    Hi Sergio, thanks for sharing in depth knowledge. I have been following your videos since long time. Can you please let me know how can we blur this object in such way that its not clearly visible after detecting in video?

  • @venkatasubramaniamr6982
    @venkatasubramaniamr6982 3 ปีที่แล้ว

    Hi How to identify the lower and upper value for specific color... is there any logic

  • @PranavArrora
    @PranavArrora 5 ปีที่แล้ว

    Hi , Thanks for such lucid explanation . I have a question , if we can find a center(centroid) using Moments in an image , how can we calculate the end points (width and height) in the direction of the centroid WITHOUT using minboundRect

  • @juandavidbarrerol1510
    @juandavidbarrerol1510 5 ปีที่แล้ว

    Great video, I have a question, is there a way to count how many objects are a in the video ?

  • @ertancakr9432
    @ertancakr9432 6 ปีที่แล้ว

    Thank you, This video helped me so much for my project.

  • @cloudart16
    @cloudart16 4 ปีที่แล้ว +2

    hi i have a problem in cv2.drawContours(frame, contours, -1, (0, 255, 0), 3)
    problem: error: (-215:Assertion failed) npoints > 0 in function 'drawContours'
    Can someone help me

    • @Fashionistanono
      @Fashionistanono 2 หลายเดือนก่อน

      hey i think because somewhere along your code you convert contours into a single number when it should be in array of x and y points

  • @arzooranipa1807
    @arzooranipa1807 5 ปีที่แล้ว +2

    _ , cnts , _ = cv2.findContours(mask, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)
    ValueError: not enough values to unpack (expected 3, got 2)
    please help me to solve this error

    • @ismet1574
      @ismet1574 5 ปีที่แล้ว

      Could you find that error's solution?

    • @bassambenidir1729
      @bassambenidir1729 5 ปีที่แล้ว +1

      by doing this it should work
      contours, hierarchy = cv2.findContours(mask, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)

    • @RafiKhalil
      @RafiKhalil 4 ปีที่แล้ว

      @@bassambenidir1729 Thanks brother.

  • @PFstoker
    @PFstoker 4 ปีที่แล้ว

    Thank you very much ! Simple and clear 😁

  • @CarstenMeyer
    @CarstenMeyer 6 ปีที่แล้ว

    Is there an easy way to compare shapes with matchShapes() but scale variant? To distinguish between objects with the same shape but different size.

  • @mahmou6
    @mahmou6 4 ปีที่แล้ว

    12:00 draw contour's if-statement if area is larger or smaller a certain value. (self-note)

  • @luqmansen
    @luqmansen 5 ปีที่แล้ว

    Great explanation, great video, thanks a lot !

  • @Siqiuuu
    @Siqiuuu ปีที่แล้ว

    great video!😁😁😁

  • @matheobermudez7847
    @matheobermudez7847 4 ปีที่แล้ว

    good video! thanks. I got a question, how did you calculate the upper and lower blue values, because you said it just worked for you? thank you again.

    • @pysource-com
      @pysource-com  4 ปีที่แล้ว

      Hi Matheo, I have another video tutorial where I explain that.
      Look on my channel for "HSV colorspaces"

    • @matheobermudez7847
      @matheobermudez7847 4 ปีที่แล้ว

      @@pysource-com ok thank you!

  • @yangyong6245
    @yangyong6245 4 ปีที่แล้ว

    Dear, I have one question. Please tell me about the way to set lower and Upper value.

  • @jorgeivanavaloslopez2206
    @jorgeivanavaloslopez2206 3 ปีที่แล้ว

    it is more efficient to take the perimeter than the area.
    code:
    for contour in contours:
    perimeter = contour.shape[0] # We get the perimeter of each contour
    if perimeter > 100:
    cv2.drawContours(frame, contour, -1, (0,255,0), 3)

  • @zahrahaghgu6115
    @zahrahaghgu6115 5 ปีที่แล้ว

    Thank you so much for this practical video

  • @soufien7354
    @soufien7354 3 ปีที่แล้ว

    why this error
    TypeError: Expected Ptr for argument 'contours'
    how i solve it ?

  • @subhranilagasti6604
    @subhranilagasti6604 4 ปีที่แล้ว

    I want to find the following features -(area, centroid, orientation)of an object using open cv . Please help

  • @harshiths4270
    @harshiths4270 5 ปีที่แล้ว

    Could you elaborate on what are lower and upper blue?

  • @abdulkerimshobbytips6817
    @abdulkerimshobbytips6817 3 ปีที่แล้ว

    hello sir while i try to generate a controur i get this error "_, contours, _ = cv2.findContours(red_mask, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
    ValueError: not enough values to unpack (expected 3, got 2)" can you help me please ?

  • @avachavoshi574
    @avachavoshi574 4 ปีที่แล้ว

    Very helpful, Thank you very much!

  • @AriBernsteinM
    @AriBernsteinM 6 ปีที่แล้ว

    Thanks, this was super helpful but why use HSV? I had trouble making my contours work using HSV but no trouble just using RGB

  • @brunofranco3421
    @brunofranco3421 3 ปีที่แล้ว

    Great work!

  • @aimanfariz7642
    @aimanfariz7642 2 ปีที่แล้ว

    I followed exactly this video, and I got an error:
    not enough values to unpack (expected 3, got 2), can you help?

    • @pysource-com
      @pysource-com  2 ปีที่แล้ว

      you need to change the in the line where there is:
      _, contours, _ = ...
      with:
      contours, _ = ...
      as with newste version of Opencv 4.x it extracts only two values instead of three.

  • @beastmonster1141
    @beastmonster1141 6 ปีที่แล้ว

    Great video! How can I localize contours for only rectangular shaped objects (license plate)?

    • @pysource-com
      @pysource-com  6 ปีที่แล้ว

      check one of my latest video is about shape detection, you'll find the answer you're looking for.

  • @seyedalihejazi4926
    @seyedalihejazi4926 5 ปีที่แล้ว

    hi can you do a video about noise reduction and its technniches.

  • @erfanebrahimi9748
    @erfanebrahimi9748 4 ปีที่แล้ว

    Does anyone how to apply a trained classifier to detected objects with active contour? Like a applying a classifier to detect the color of detected object.

  • @erfanebrahimi9748
    @erfanebrahimi9748 4 ปีที่แล้ว

    great tutorial, thank you.

  • @SAMETELMACI
    @SAMETELMACI 3 ปีที่แล้ว

    ı want a draw rectangle of detected object how can ı

  • @minhtiennguyen4870
    @minhtiennguyen4870 6 ปีที่แล้ว

    your video is great, thank you so much ...

  • @huracan311
    @huracan311 4 ปีที่แล้ว

    many thanks i'ts perfect for my project

  • @TalesCembraneliDantas
    @TalesCembraneliDantas 6 ปีที่แล้ว

    Tks again for the class...

  • @ujwalkaka
    @ujwalkaka 6 ปีที่แล้ว

    great work. Could u make a tutorial on how to find the tail length of vehicles in a video? really been struggling with this problem

    • @ujwalkaka
      @ujwalkaka 6 ปีที่แล้ว

      *length from a starting point

    • @pysource-com
      @pysource-com  6 ปีที่แล้ว

      I might do that in the future, but still I have a lot of other material to release before that :)

  • @bru6626
    @bru6626 6 ปีที่แล้ว +1

    why cv2.findcontours is not working for me
    man Im stressing now

  • @karimkohel3240
    @karimkohel3240 5 ปีที่แล้ว

    dude you're awesome

  • @MrDiegoaz3
    @MrDiegoaz3 6 ปีที่แล้ว

    Hello! Good tutorial! How can I track X and Y in order to determinate the direction?

    • @pysource-com
      @pysource-com  6 ปีที่แล้ว

      Hi Diego,
      still it's not possible to determinate direction of the object from just this source code.
      Be aware that we're only working frame by frame, with images, there is no connection between them.
      what you asked it's a bit more advanced, please wait a bit and I'm going to do a video about that as well.

  • @Nico9538
    @Nico9538 6 ปีที่แล้ว

    this video really helped

  • @kirangouds
    @kirangouds 6 ปีที่แล้ว

    this is really great video thank you, make more videos

  • @HenriqueKomoto
    @HenriqueKomoto 6 ปีที่แล้ว

    Thank you! Nice video.

  • @jeevanshrestha8888
    @jeevanshrestha8888 5 ปีที่แล้ว

    i want to know the position of that object.......any video.....

  • @firefoxyouth
    @firefoxyouth 5 ปีที่แล้ว

    je suis le 3700 abonnement.. You should have more :)

  • @mahmouds12
    @mahmouds12 3 ปีที่แล้ว

    Thank you

  • @aniketninawe1228
    @aniketninawe1228 3 ปีที่แล้ว

    awesome

  • @maumunguia6384
    @maumunguia6384 6 ปีที่แล้ว

    How I can do this with images instead of video?
    I need to get the countors of an image and then get all the points of the countors
    BTW excellent video

  • @nlimbu2520
    @nlimbu2520 6 ปีที่แล้ว

    Thank you.

  • @AmitKumar-yq3lx
    @AmitKumar-yq3lx 6 ปีที่แล้ว

    you are awesome

  • @boringwebdev
    @boringwebdev 5 ปีที่แล้ว

    hank you soooo much

  • @brunofranco3421
    @brunofranco3421 ปีที่แล้ว

    2023 update:
    you should change it to:
    contours,hierachy=cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)

  • @rz1359
    @rz1359 6 ปีที่แล้ว

    Thanks

  • @ivancol5576
    @ivancol5576 6 ปีที่แล้ว

    How can I do this on Android ?

    • @pysource-com
      @pysource-com  6 ปีที่แล้ว

      unfortunately I can't help you as I'm not familiar with Opencv for android.
      you can check docs here opencv.org/platforms/android/

  • @username_6948
    @username_6948 5 ปีที่แล้ว

    tysm

  • @silaskierstein4411
    @silaskierstein4411 2 ปีที่แล้ว

    So fucking cool brah

  • @matters8535
    @matters8535 3 ปีที่แล้ว +1

    I love you

  • @rusich.450
    @rusich.450 5 ปีที่แล้ว

    zero dislikes lol

  • @hamidrezashokoohi
    @hamidrezashokoohi ปีที่แล้ว

    thank you