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

Поделиться
HTML-код
  • Опубликовано: 26 окт 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 2 месяца назад

    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.

  • @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

  • @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!

  • @salmamoora6048
    @salmamoora6048 4 года назад

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

  • @amanrawat1856
    @amanrawat1856 4 года назад +2

    It shows error 'object is not iterable' ??

    • @sahithreddy136
      @sahithreddy136 2 года назад

      Try decreasing number of objects in lines

  • @bingsheridan1101
    @bingsheridan1101 4 года назад +6

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

    • @creamylulu3427
      @creamylulu3427 4 года назад

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

  • @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 года назад

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

  • @muhammadwajid3867
    @muhammadwajid3867 5 лет назад +3

    Great job .pls make video about handwriting recognition in image

  • @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??

  • @shashanksharmadon4295
    @shashanksharmadon4295 4 года назад

    thanks bro........

  • @lutfianovitasari5001
    @lutfianovitasari5001 3 года назад

    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?

  • @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.

  • @HtopSkills
    @HtopSkills 5 лет назад +3

    First one here

  • @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...

  • @anoopjacob9905
    @anoopjacob9905 5 лет назад +1

    Hi Friend
    I am also a RUclipsr. 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

  • @Must23
    @Must23 4 года назад +7

    this is bad explanation

  • @anki_yt
    @anki_yt Год назад

    you just read this

  • @jordiwang
    @jordiwang Год назад

    you actually explained NOTHING about the code