OpenCV Python Tutorial For Beginners 29 - Hough Line Transform using HoughLines method in OpenCV

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

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

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

    After looking, the best explanation I could find as to why it was necessary to add / subtract 1000 is to ensure that the line was drawn over the entire image. If the image was significantly larger the value would need to be increased proportionately.

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

      Yes! This is it. I didn't like this as I was dealing with larger images, so I did something like this:
      dim_x, dim_y = gray.shape
      x1 = int(x0 + dim_x * (-b))
      y1 = int(y0 + dim_y * (a))
      x2 = int(x0 - dim_x * (-b))
      y2 = int(y0 - dim_y * (a))
      This is only valid if your intended lines are horizontal and vertical only!

  • @tanmaybhayani
    @tanmaybhayani 3 ปีที่แล้ว +4

    Im sorry but the code is not well explained. Why are we doing what we are doing is not explained at all. Its just said what to code.

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

    Thank you very much for the video! It was well done and I liked the use of graphs :)

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

    How x1= int(x +1000 * -b) is giving the coordinates..? And why we are putting 1000 and -b...please help sir

  • @AdiVasuDevaRao
    @AdiVasuDevaRao 3 หลายเดือนก่อน

    what is x0 and y0 and how they are equal to a*rho and b*rho please explain

  • @talhatariq4069
    @talhatariq4069 4 ปีที่แล้ว +3

    why we need 1000 and can you make a video on small matrix for more clear explaination

    • @animeshkumar1201
      @animeshkumar1201 3 ปีที่แล้ว +2

      that's what, he didn't explain that thing. Also x0, y0 is not same as (0, 0). (x0, y0) is basically the foot of perpendicular(rho) on the line. He has ruined his own concepts in this video.

  • @muhammadwajid3867
    @muhammadwajid3867 5 ปีที่แล้ว +3

    Great job .pls make video about handwriting recognition in image

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

    It shows error 'object is not iterable' ??

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

      Try decreasing number of objects in lines

  • @HM-cw8im
    @HM-cw8im 4 ปีที่แล้ว

    I typed the same exact code, but I am not getting the desired output. The lines are randomly drawn over the image. Please tell me what to do.

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

      Bro did u get the code for this
      Can u help me plzz

  • @bingsheridan1101
    @bingsheridan1101 5 ปีที่แล้ว +6

    我也想知道这个数字1000是怎么来的?有点迷

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

      随意给的一个较长长度, 这个示例中假定线无限长

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

    My computer showing error
    For line in lines
    TypeError: nontype object is not iterable

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

      same here

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

      Hello Fariba Tasnia Khan. You need to decrease the minimum threshold value in the cv2.HoughLines function. Hope you find my answer helpful!

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

    Thanks for the great content. Please don't put advertisements in between the video it breaks the attention. If you need please add at starting or ending of the video.

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

      TH-cam defaults this on, they have to go in and disable it after upload. TH-cam is doin sneaky stuff with ads now

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

    Can you share the code to display the coordinates of the results of the Hough Transform Lines?

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

    thanks bro........

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

    tại sao lại chọn số 1000 vậy thầy?

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

    Can you send me the code for if i were to use this for a video??

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

    Why I got an error at the
    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
    Anyone can help? Please:(

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

      what is the error?

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

    did anyone get the same results by using the same algorithm?

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

      It depends on image, we should not directly use canny but if you want to detect something like only yellow or only green then we'll use inRange method to get mask and then we'll use canny to get better result maybe... As I've used the same image but image's quality was not good so my results were also not good as I expected, but when I used a 2D image produced using ms paint it worked like a charm...

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

    Hi Bro , Can You make one on attendence sheet for count total,
    E.g. 10Days attendence of 15 Students
    I tried But not all boxes are Detected.

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

    Hi Friend
    I am also a TH-camr. I like to know one thing.
    How did you monetized your blog. You monetized your Blog using Either the same adsense of youtube or its a different adsense account. Please reply me back

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

    you just read this

  • @HtopSkills
    @HtopSkills 5 ปีที่แล้ว +3

    First one here

  • @Must23
    @Must23 5 ปีที่แล้ว +7

    this is bad explanation

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

    you actually explained NOTHING about the code