Questions tagged [houghlinesp]

This tag should be used only for concerns related to finding lines using Probabilistic Hough Transform. Not to be used for queries regarding Hough Transform alone

In comparison to Hough Transform, the Probabilistic Hough Transform is rather simple and less computation intensive. Hough Transform takes all the points into consideration while finding lines. On the other hand, Probabilistic Hough Transform takes only a random subset of points that is sufficient for line detection

For detailed information, read [THE OPENCV DOC]

64 questions
2
votes
0 answers

How to merge nearby lines resulting from HoughLinesP in OpenCV Android?

I am making an Android app for detecting a sudoku puzzle and finding the answer for the same. In the first part I need to extract the sudoku from a given image. I was successfully able to use HoughLinesP to find the containing box(of sudoku) but…
tarohtTimus
  • 33
  • 1
  • 4
2
votes
0 answers

HoughLinesP combining very similar lines into one

I have an image that is a simple picture and I want to extract the end points of the lines. However, there are other lines that do overlap, so, my lines have 'gaps' in them. I am trying to use HoughLinesP to extract the parameterization of these…
Joseph
  • 301
  • 3
  • 13
2
votes
0 answers

Finding Coordinates of Line in HoughLineP() in OpenCV using Python

I'm working on a edge-detection/line-drawing vision project (using OpenCV and Python). I'm able to find the edges I want in an image, using cv2.Canny(), and draw lines on those edges, using HoughLinesP(). I'm trying to figure out how to find the…
slow_one
  • 113
  • 1
  • 4
  • 13
2
votes
1 answer

Python and OpenCV - Dominant Line in Hough Line transform

For my program, using OpenCV and Python, I'm trying to detect road lanes. In order to accomplish this, I used Hough Line Transform to detect lines. However, it finds many lines right next to each other and I'm trying to find a way to make an average…
Andy M
  • 97
  • 1
  • 9
2
votes
1 answer

Remove duplicate lines after HoughLinesP on Android + OpenCV

I'm trying to detect a white rectangle in a black image. I've used HoughLinesP after Canny, and the detection is accurate. The probleme is that, some lines are very similar and define the same edge almost. So in the matrix that HgouhLinesP returns,…
user3855955
  • 87
  • 10
1
vote
0 answers

Recognize horizontal and vertical lines for Braille characters segmentation

I am currently writing an OpenCV program to recognize and translate Braille characters into Spanish. For the time being, I can recognize the Braille points and retrieve their centroids successfully. In order to divide the points into characters, I…
1
vote
1 answer

How to make cv2.HoughLinesP detect only vertical lines?

I'm trying to make it so my programme only detects an overhead wire on a train/tram but when the wire holders come into frame it detects the horizontal line of them which I don't want. I didn't know if anyone knew how to make it so it will only…
Isaac_E
  • 21
  • 5
1
vote
0 answers

Best method or algorithm to retrive the straight lines edges of an image mask

I am trying to retrive the edges of an basket ball court. I was successful in creating a mask by using the histogram of the image. I would like to know what is the best approach to extract the straight lines from the image mask. I would like to…
Bow
  • 445
  • 1
  • 6
  • 17
1
vote
1 answer

Is there a robust way to cleanly detect lines in Dots And Boxes game with opencv?

I'm currently developing an OpenCV method that can extract the last placed moves on a game of Dots And Boxes. The most straight forward method in my eyes was to detect the lines normally and make sure it doesn't have excess lines. For this I have…
1
vote
0 answers

How to optimize parameters for HoughLinesP to avoid ghost line in a turn

I am currently working on a project of an automated car and I have an issue with HoughLinesP function. When the car is turnning, it detects a "ghost line". Bellow is the code of my function and these are the parameters: edges: Output of the edge…
Bob
  • 11
  • 1
1
vote
1 answer

OpenCv HoughLinesP bad lines

I'm a beginner and I'm trying to do some line detection in-game. This is the photo in which I'm trying to detect lanes This is the result The HoughLinesP code: ``` lines = cv2.HoughLinesP(cropped_image, 2, np.pi / 180, 100, np.array([]),…
JakuGi
  • 11
  • 1
1
vote
0 answers

How to identify multiple lines and words using opencv in python?

I am brazilian student and in pt-stackoverflow didn't find nothing about this. I'm a newbie in python and opencv, it's being hard to study about. I'm trying to do an OCR program in python that can identify multiple lines and words with webcam…
1
vote
1 answer

Understanding Hough-Transformation

I want to understand the Hough Transformation for school. I know that we can not represent vertical lines which are parallel to the Y-axis (with the y = m*x+b). But we can do this with the polar coordinates r and theta with (y= -…
1
vote
2 answers

line detection using HoughLines in opencv

I want to detect lines in a picture like this: And my code is like this: import numpy as np import cv2 import math # prepare the image image = cv2.imread("image") gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) blurred = cv2.GaussianBlur(gray,…
captainst
  • 617
  • 1
  • 7
  • 20
1
vote
0 answers

Remove lines detected by HoughLinesP

Im using the following code to detect lines in my image. import numpy as np import cv2 gray = cv2.imread('img.png') kernel_size = 5 blur_gray = cv2.GaussianBlur(gray,(kernel_size, kernel_size),0) edges = cv2.Canny(blur_gray,50,150,apertureSize =…
user6092898