17 votes
Accepted

Why Is the Canny Edge Detection Used Instead of Sobel / Prewitt Edge Detection Before Hough Transformation?

Canny Edge Detection is considered to be a better (In False Alarm sense) edge detection than those you mentioned. This is, mainly, due to 2 steps: Non Maximum Suppression - Edges candidates which are ...
user avatar
  • 40.4k
9 votes
Accepted

How to calculate particles sizes for spheric particles with overlapping and superposition? (Example image included)

Here is what I experimented with: Use ELSD to generate elliptic contours. You could basically use any edge detector, but since in the following stages I will benefit from circle detectors, it is good ...
user avatar
  • 5,207
9 votes

In opecv function Hough circles how does parameter 1 and 2 affect circle detection and how can I adjust them to increase accuracy?

Intuition for parameters of HoughCircles: image: 8-bit, single channel image. If working with a color image, convert to grayscale first. method: Defines the method to detect circles in images. ...
user avatar
6 votes

Why Is the Canny Edge Detection Used Instead of Sobel / Prewitt Edge Detection Before Hough Transformation?

Your statement that the Hough transform (HT) needs to be applied on a binary image is not true. The original HT indeed was formulated that way, though in the meanwhile different authors extended the ...
user avatar
6 votes
Accepted

In opecv function Hough circles how does parameter 1 and 2 affect circle detection and how can I adjust them to increase accuracy?

If you have an idea what size circles you are looking for, then it would be best to set min_radius and max_radius accordingly. Otherwise, it will return anything circular of any size. Parameters 1 ...
user avatar
  • 507
6 votes
Accepted

Given a set of lines, find only those who are parallel (perspective)

Parallel lines in the image do intersect at a vanishing point. Therefore simply hypothesizing lines (a gradient direction at a point suffices to describe it) and voting (see Hough voting) would ...
user avatar
  • 5,207
5 votes
Accepted

Detect circles in image

1) Normalize your image to range $[0,255]$. 2) Select a threshold and threshold the image. For your image, what worked is: $\tau=[140-150]$. 3) Compute a Euclidean distance transform. 4) Apply ...
user avatar
  • 5,207
3 votes
Accepted

Fitting a grid to points in a 2d space

You could represent the grid with 5 parameters: (x0, y0) to represent the offset from your image origin to the grid origin (xs, ys) to represent a multiplication factor from your image plane to your ...
user avatar
3 votes
Accepted

How can I isolate a Hough circle that I perceive to be the best fit, but is ranked much lower?

The Hough Transform is "right". Because it searches for the most consistent "shape" given the accumulated values. If all you would like to do is to find the center of the spot, there are other ...
user avatar
  • 10.1k
3 votes

How to set threshold value for Hough Transform

Well, it really depends on what you expect to find in the image. The matlab function uses an example threshold of half the largest peak. What sort of images are you using this on? So, based on just ...
user avatar
  • 22.4k
3 votes
Accepted

Algo Name: Detecting Elongated Shape in 2D Image by Convolution with Directed Lines

What you are essentially doing is a matched filter. However, thanks to Hough transform, your filter (line) is oriented and therefore I would call it an oriented matched filter. For generating the ...
user avatar
  • 5,207
2 votes

how to detect two parallel lines in a binary image with MATLAB

this is John BG jgb2012@sky.com 1.- Avoid doubling segments If you carry on with the code you have used in your approach: ...
user avatar
2 votes

how to detect two parallel lines in a binary image with MATLAB

You mentioned the Hough transform, but your code doesn't use it. However, it can help you to find out the orientations of lines. The maximum values of the Hough transform correspond to probable lines....
user avatar
  • 121
2 votes
Accepted

Difference between Generalized Hough Transform and Cross-correlation Feature Matching

There is a big difference: The Hough Transform maps the input space to a parameter space, where the search takes place. This way, the run-time of the algorithm is independent of the degree of the ...
user avatar
  • 5,207
2 votes

Can you detect circles only using the hough line transform?

No this won't work. Simply because we do not know the center of the circle in advance (no oracle telling us) and therefore we cannot find a voting space parameterization where $r$ is fixed and only $\...
user avatar
  • 5,207
2 votes

How to segment multiple overlapping coins (ellipses)

Segmentation is generally a process that is very susceptible to noise. I would better use a detector, especially for geometric shapes like coins. Remember, if you have a good detection, you also ease ...
user avatar
  • 5,207
2 votes

Selecting gradient orientation for Generalized Hough Transform while scaling and rotation is present

If the shape is rotated by $\theta$, then the gradient orientation ($\phi$) for a given edge point changes. So, shouldn't we do either one of the following: Rotate all the ϕ values in R table ...
user avatar
  • 10.1k
2 votes
Accepted

Image processing: How to find center of biggest blob in an image?

do a distance transform. you'll see why that's a good idea: for every pixel you get the shortest distance to a border. that's exactly the radius of an inscribed circle. from this, just find the pixel ...
user avatar
1 vote

Help or suggestions with Line detection in microscopy images

Instead of using a homegrown amalgamation of algorithms, I suggest you look in the scientific literature for existing solutions. People have solved the same problem over and over again, there exist ...
user avatar
1 vote

Help or suggestions with Line detection in microscopy images

I used Median Blur instead of Gaussian Blur, and used Sobel Filter to detect the edges, the ...
user avatar
  • 167
1 vote

Hough Transform not working to recognize a line

What you want is just to find the function $$y(x) = mx + q$$ that fits through the centroids you've found. You wouldn't do a Hough transform on that (since Hough transforms generally perform badly ...
user avatar
1 vote

Line Detection with OpenCV and Python

The performance of line detectors are image and application dependent in generally. Typically, people tune the parameters of the detectors to get the best possible result. When such a result cannot be ...
user avatar
  • 5,207
1 vote
Accepted

Computer Vision - Does implementation of Hough Transform for lines require a loop for angle parameter?

In real world implementations, is the line: for theta = [theta_min to theta_max ] required? . . . Since we apply Canny edge detector to an image, prior to Hough Transform, we can obtain angle of ...
user avatar
  • 10.1k
1 vote
Accepted

Selecting gradient orientation for Generalized Hough Transform while scaling and rotation is present

I was having the same issue as you had: most resources I found online seem to miss this issue about the rotating gradient orientation, as did A_A in their answer (which to be fair is very clear in the ...
user avatar
1 vote

Hough lines and Convex Hull methods give jagged lines

Let's go step by step. First of all you can remove perspective distortion without camera calibration. e.g. Robust Radial Distortion from a Single Image, Faisal Bukhari and Matthew N. Dailey ...
user avatar
  • 5,207
1 vote

Edge following using Hough transform

SLAM is Simultaneous Localization and Mapping. If you have maps already, I think your main challenge in line following is the localization part. For straight lines, Canny+Hough pipeline works ...
user avatar
  • 156
1 vote

How to extend hough lines over the image space

Fit a line through the end points using standard line model $ax+by+c=0$. Then draw them on the image from -10000, 10000. The points remaining on the image will give you what you are asking for.
user avatar
  • 5,207
1 vote

Circle detection opencv

I'll start with the Hough line transform. The hough transform works by creating a buffer (2 dimensional in our case) which represents all the possible lines in the image. Any possible line can be ...
user avatar
  • 415
1 vote

Hough Transform in Matlab without the built-in function

Check this out. It is an easy to follow implementation. You can compare your implementation against this. Here is a no loop version. Another advice is to add comments in the code above so that it ...
user avatar
  • 5,207
1 vote

Detecting text lines in image by means of Hough Transform

OpenCV now has a text detection module included. You might want to take a look at it: Detector: http://docs.opencv.org/master/modules/objdetect/doc/erfilter.html Recognizer: http://docs.opencv.org/...
user avatar
  • 5,207

Only top scored, non community-wiki answers of a minimum length are eligible