As of May 31, 2023, we have updated our Code of Conduct.
10 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. ...
Eric Leschinski's user avatar
9 votes
Accepted

How Come the Low Pass Filter in Sobel Operator Isn't Normalized?

The answer is simple, the Sobel Filter is a composition of Lows Pass Filter (LPF) and High Pass Filter (HPF). The composition is done by convolution. Now, indeed the LPF presented above $ {\left[ 1, 2,...
Royi's user avatar
  • 50.4k
8 votes

Are 2nd Order Edge Detectors More Susceptible to Noise?

If you assume the Edge Detection is SNR driven operation, one could find a Mathematical justification for this. First, the variance of Additive White Noise with Variance $ {\sigma}_{n}^{2} $ at the ...
Royi's user avatar
  • 50.4k
8 votes
Accepted

What's Logic Behind the Construction of Sobel's Filter in Image Processing?

A first rationale is to be very short, as there was a time when computing on images was expensive. Then, a contour or an edge often present a fast variation in image intensities, that can be enhanced ...
Laurent Duval's user avatar
8 votes
Accepted

What Is an Oriented Gaussian Second Derivative Filter

Unless mentioned otherwise withing the context the classic interpretation of Second Derivative Gaussian Filter is indeed (a) in your question: $$ L \left( x, y, \theta \right) = \cos \left( \theta \...
Royi's user avatar
  • 50.4k
8 votes
Accepted

Should Edge Detection Be Applied in Spatial or in Frequency Domain?

We need to separate the concept of edge detection from the tools we use to apply the procedure. Edges are local property of the image. Being so local means we don't analyze the image in frequency ...
Royi's user avatar
  • 50.4k
7 votes
Accepted

Reversing the Order of Operators for Edge Detection?

In the classic framework both the Smoothing and the Difference Filter are applied using Convolution. Since it is done using convolution it implies the operation is Linear Spatially Invariant (LSI). ...
Royi's user avatar
  • 50.4k
6 votes

Why Is Zero padding Required for Sobel Edge Detection?

The Sobel Filter is a $ 3 \times 3 $ matrix (it is separable, but let's ignore that). The anchor pixel is the middle one hence to evaluate the operator on pixels on the upper row the operator needs ...
Royi's user avatar
  • 50.4k
6 votes

detect to rising, stable and falling point in non-smooth rectangular wave

The usual approach to change detection is the CUSUM algorithm. I've done an implementation that just addresses the level (mean) change issue. It's included (in R) below. The black line is the noise-...
Peter K.'s user avatar
  • 24.3k
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 ...
Simon B's user avatar
  • 517
6 votes
Accepted

How Last Edge Image Can Be Achieved from Law Masks

If I understand correctly, the question is, given many images which are result of different Edge Filter applied on the same image, how to actually mark edges. Well, you basically created 25 tests for ...
Royi's user avatar
  • 50.4k
6 votes
Accepted

Is HSV Color Space Sufficient for Rudimentary Color ID and Edge Detection

The approach seems reasonable. Indeed doing edge detection in weighted RGB channel is the classic approach (Though you could also employ more advance methods, See Edge Detection on a Color Image). I ...
Royi's user avatar
  • 50.4k
6 votes
Accepted

Edge Detection vs. Contour Detection?

Contour is the edge closing an object. So you can think as higher level of edge detection. So if an edge define an object it becomes a contour.
Royi's user avatar
  • 50.4k
6 votes
Accepted

How to Remove Double Lines Detected Along the Edges by Edge Detector?

I ran the following code: ...
Royi's user avatar
  • 50.4k
5 votes

How Does a Convolution of an Image Can Be Expressed as a Matrix Multiplication (Matrix Form)?

I wrote a function which solves this in my StackOverflow Q2080835 GitHub Repository (Have a look at CreateImageConvMtx()). Actually the function can support any ...
Royi's user avatar
  • 50.4k
5 votes

How to Find Performance Ratio (PR)?

When you segment an image you have boundaries between segments. Those boundary pixels (Just between 2 different segments) are the edge pixels above.
Royi's user avatar
  • 50.4k
5 votes

Is the Sobel filter a high pass filter, and if not, what is the difference between them?

They are both highpass type filters, but used with very different intentions. One should immediately observe the fundamental difference that the output of unsharp masking filter is an enhanced image ...
Fat32's user avatar
  • 27.6k
5 votes
Accepted

Separating dominoes pieces from one another and counting them

I successfully solved the problem. for those who are curious: I used histogram equalization to improve shaded edges used a slight gaussian blur and applied thresholding to remove most of the noise ...
Sohaib Segueni's user avatar
4 votes
Accepted

Are 2nd Order Edge Detectors More Susceptible to Noise?

Suppose that the noise is a random vector $X$ with normal zero-mean components of variance $\sigma_i$, mutually independent, then for the linear combination (the $g_i$ being for instance coefficients ...
Laurent Duval's user avatar
4 votes

Image Edge Preserving Smoothing

If you can use the Bilateral Filter then you can use the Guided Filter. The nice property of the Guided Filter is its low complexity. There is a simple and efficient implementation with with linear ...
Royi's user avatar
  • 50.4k
4 votes

why do directional derivatives work better with a gaussian filter?

Well, look at your original picture: it's constant for all points but the edges, which means your derivative is zero for all points but these edges. By applying a "rounding, smoothing" filter to it, ...
Marcus Müller's user avatar
4 votes
Accepted

Intuition behind image derivative using Fourier Transform for edges detection

In general, the time derivative property of the Fourier Transform is given as $$\mathscr{F}[\frac{d}{dt}x(t)] = j\omega X(j\omega) $$ Notice that we can simply multiply by the frequency index in the ...
Dan Boschen's user avatar
  • 45.9k
4 votes

Edge Detection vs. Contour Detection?

I would consider the notion of edge, with respect to that of contour, in the same relation as words to a sentence. An edge is a distinctive element of an image (a color change, a border cut, a shadow, ...
Laurent Duval's user avatar
4 votes
Accepted

How many directions are there in the Non Maximum Suppression part of the Canny Edge Detector

There are 8 directions to be considered in non-maximum suppression as used in the Canny edge detector. But each pair of opposite directions can be handled with the same code.
Cris Luengo's user avatar
  • 1,633
3 votes

Difference of Gaussian filter but using Gaussian CDFs not PDFs

You need to ask yourself why do we use the difference of Gaussians from the first place? The reason is because the difference will give us a measurement for the change in value around the point we ...
Amitay Nachmani's user avatar
3 votes
Accepted

Is it appropriate to use Sobel operators to find the derivatives of an image?

Indeed, it adds smoothing in the $y$ direction. The Sobel filter is the separable combination of the centered derivative $[−1,\;0,\;1]$ along $x$, and the $3$-point binomial smoother $[1,\;2,\;1]$ ...
Laurent Duval's user avatar
3 votes

Are 2nd Order Edge Detectors More Susceptible to Noise?

Let's assume that the signal has a white (flat) power spectrum $|X(\omega)|^2$ of unity power $P_0$: $$|X(\omega)|^2 = c$$ $$P_0 = \int_{-\pi}^\pi |X(\omega)|^2 d\omega = 1$$ $$\Rightarrow c = \frac{...
Olli Niemitalo's user avatar
3 votes

Why edge sharpening produces high frequency?

Edges are not the best defined features in images. However, they can be associated, locally, at a certain scale, with relative variations in intensity along a first direction, combined with a ...
Laurent Duval's user avatar
3 votes
Accepted

Designing an efficient curve-matching algorithm

The two most obvious things you can try are: Fitting a Gaussian to your data and then clustering their parameters Estimate the similarity of waveforms directly and then try to cluster that Since you ...
A_A's user avatar
  • 10.4k
3 votes
Accepted

How to detach overlapping contours but not to remove small ones. Alternative to erosion-dilation cycle

I don't know if this is a corner case or the norm in your dataset but it is a relatively easy situation to deal with. It would be much more difficult to detect trees in an urban environment, for ...
A_A's user avatar
  • 10.4k

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