Questions tagged [straight-line-detection]
67 questions
22
votes
4 answers
Is there any super fast algorithm for finding LINES on picture?
So I have Image like this
(source: de-viz.ru)
I want to get something like this (I hevent drawn all lines I want but I hope you can get my idea)
(source: narod.ru)
I need some super fast algorithm for finding all straight lines on it. I want to…

Rella
- 65,003
- 109
- 363
- 636
7
votes
2 answers
Extract vanishing point from lines with Open CV
I'm working on OpenCV based project in python, and I have to calculate/extract and show visually the vanishing point from existing lines.
My first task is to detect lines, that's very easy with Canny and HoughLinesP functions:
import cv2
import…

AlexAcc
- 601
- 2
- 10
- 28
7
votes
3 answers
How to use Haar wavelet to detect LINES on an image?
So I have an image like this:
I want to get something like this (I haven't drawn all lines I want but I hope you can get my idea):
I want to use SURF ( (Speeded Up Robust Features) is a robust image descriptor, first presented by Herbert Bay et…

Rella
- 65,003
- 109
- 363
- 636
5
votes
2 answers
In what order, OpenCV's HoughLines lists the detected lines in the [rho,theta] matrix?
When a given image with lines is passed to OpenCV's HoughLine transform, it returns a list of rho and theta pairs, each pair defining an individual line. What is the order in which lines are listed in this list of rho,theta pairs.
for eg, when this…

Pranjal Agarwal
- 313
- 2
- 8
5
votes
1 answer
Hough transform detect shorter lines
Im using opencv hough transform to attempt to detect shapes. The longer lines are all very nicely detected using the HoughLines method.but the shorter lines are completely ignored.
Is there any way to also detect the shorter lines?
the code I'm…

Pita
- 1,444
- 1
- 19
- 29
4
votes
1 answer
How to remove all the detected lines from the original image using Python?
I am trying to remove all the lines present in the image.
I am able to detect the lines but when I am trying to remove the lines, I am still getting few small lines in the final image. I have used cv2.getStructuringElement to get both the horizontal…

not_yet_a_fds
- 318
- 4
- 14
4
votes
0 answers
Opencv - python - Join line segments from Line Segment Detector (LSD) to form one line
I am working on this problem of finding popping crease of the cricket pitch and I have somewhat achieved what I wanted to do that is I can detect vertical line segments using LSD from opencv but what I dont seem to understand is how to join…

thisisbhavin
- 344
- 3
- 15
4
votes
3 answers
What is the difference between a Line and an Edge in image detection?
We have been learning about methods like Sobel and Roberts' convolution matrices to detect edges within images, extending to the Canny method to clear them up. But now, we are learning about 'Line' detection, as opposed to 'Edge' detection - with…

j panton
- 232
- 4
- 16
3
votes
1 answer
How to perform image segmentation on white lines in a green field/grassy field
As the title states I'm attempting to do image segmentation in hopes of doing 'lane' detection. Here is a sample image I want to test on.
Here's my first coding attempt for what I tried that I found online essentially.
from matplotlib import pyplot…

Bob Stoops
- 151
- 2
- 12
3
votes
0 answers
Probabilistic Hough Transform - Line Segment Connection
I have been learning Hough transforms recently and I believe that I have a good grasp on how they work, but I have run into an issue with the probabilistic Hough transform. I know that it is supposed to return segments, but my issue is that for the…

atjenk
- 65
- 7
3
votes
1 answer
simple straight lines detection algorithm
I'm looking for a simple algorithm for finding straight lines on the image. Not necessarily fast, just a working concept. I've done my homework and already found several approaches to the problem (e.g. combination of Canny and Hough transform or…

mariusz
- 645
- 6
- 10
2
votes
3 answers
Fitting a straight line on a part of a dataset
I am working on a problem that needs best fit line, though the best fit should be applied on initial part of the data and not the whole datapoints.
I know how to curve-fit a function on a dataset when I want to apply it to the whole dataset but…

Ali Wali
- 179
- 2
- 8
2
votes
1 answer
I have an issue while drawing the lines over an image using pair of coordinates using opencv python
I have a set of coordinates from an image. Using those coordinates I wanted to plot the lines over an image. While trying I ended up with an error. Please help me with this issue. Below is the code.
[((line[0, 0], line[0, 1]), (line[1, 0], line[1,…

Nandu
- 57
- 7
2
votes
1 answer
How to count lines in an image with python, openCV
I want to count paper, so I am thinking about using line detection. I have tried some methods like Canny, HoughLines, and FLD. But I only get the processed photo. I have no idea how to count it. There are some small line segments that are the lines…

ZZZZZBON
- 21
- 1
- 2
2
votes
1 answer
python function to find local maxima/peaks from array
i am trying to detect local maxima from a given array. The array is a sinusoidal curve obtained after calculating hough line transform. Here is the image
Here is the numpy file accumulator.npy. Clearly, there are two local maximas. I was wondering…

Anil Yadav
- 149
- 1
- 14