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