2022 Developer Survey is open! Take survey.
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
8 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,...
user avatar
  • 39.3k
7 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 ...
user avatar
  • 39.3k
7 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 ...
user avatar
  • 39.3k
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-...
user avatar
  • 21.7k
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

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 ...
user avatar
6 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 \...
user avatar
  • 39.3k
6 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). ...
user avatar
  • 39.3k
5 votes

Why Is Zero padding Required for Sobel Edge Eetection?

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 ...
user avatar
  • 39.3k
5 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 ...
user avatar
  • 39.3k
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 ...
user avatar
  • 26.6k
5 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 ...
user avatar
  • 39.3k
5 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.
user avatar
  • 39.3k
5 votes
Accepted

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

I ran the following code: ...
user avatar
  • 39.3k
4 votes

Laplacian Operator with and without Diagonal Direction Elements in the Kernel

All of those are Discrete Approximation of the operator - Laplace Operator. You can discretize it in any logical manner. In the cases above, Istotropic means if you rotate it it looks the same. The ...
user avatar
  • 39.3k
4 votes
Accepted

Edge Detection on a Color Image

Finding edges in a color image can be done by decomposing the image into its channels, finding the gradients separately and fusing them somehow. However, such approach doesn't incorporate the color ...
user avatar
  • 5,187
4 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.
user avatar
  • 39.3k
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 ...
user avatar
  • 36.1k
3 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 ...
user avatar
3 votes

How Does a Convolution 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 ...
user avatar
  • 39.3k
3 votes

Rectangle detection in "real life" images

I think you would use a 2D Matched Filter. You would convolve your image with a series of rectangles. The peaks in the resulting images would be the location of your books. You could do this quickly ...
user avatar
  • 131
3 votes

What's the state-of-the-art algorithms in image edge detection?

Despite its age, Canny Edge Detection is still a state of the art filter. The results produced by this algorithm make for it always being included in image editing software. Solid and descriptive ...
user avatar
3 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 ...
user avatar
  • 39.3k
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{...
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]$ ...
user avatar
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 ...
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 ...
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 ...
user avatar
  • 10k
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 ...
user avatar
  • 10k

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