# Tag Info

11

As suggested above, the Matlab Canny edge detector calculates the gradient using a "derivative of a Gaussian filter" (as stated in the documentation). In other words, Matlab does a Gaussian blur of the image and then finds the gradient of that smoothed image... all using a single fancy filter. [If you want to know the details, just type in edit edge as ...

10

You're probably looking for the Hough transform or one of it's extensions. The simplest version of this transform is linear and appropriate for detecting straight lines. In the transformed space (Hough space), angles and distances are found as points where curves intersect. Libraries for calculating the Hough transform exist in C++ - OpenCV (Has ...

6

Since convolution in spatial domain is multiplication in the Fourier (frequency) domain, you can perform edge detection in Fourier domain by multiplying the spectra of image and the edge detection kernel and then perform IFFT on the result. I think the high-pass filter alone is not appropriate for edge detection since it keeps all high-frequency features (e....

6

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-free data, the red line is the noisy data and the blue bars are the detected breaks (for this realization). This just addresses the level change; to address ...

6

Non-linearity A linear filter is mathematically described by the convolution sum (for discrete signals) and the convolution integral for continuous signals. The median cannot be found using a linear function except in the trivial case where you have a discrete filter of size 1, which is why the median filter is non-linear. Edge Preserving Properties. ...

5

Usually the edge detection is done by a convolution of a 2-D filter/kernel like Roberts Cross or a Sobel formulation. Since those are convolutions, LTI rules apply, like being able to equivalently apply them in the frequency domain. That is, take both the kernel and the image into the frequency domain via DFT, multiply them together, and then IDFT the result ...

5

That depends on the definition of high-pass filter. If you define a high-pass filter as a filter that has high response in the high frequencies in frequency domain, then the easiest way is to take a look at the magnitude of Fourier transform, (by definition). Applying Fourier transform (in Matlab) A = fftshift(abs(fft2(padarray([-1 -1 -1; 0 0 0; 1 1 1],[...

5

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. Currently, the only implemented method is cv2.HOUGH_GRADIENT, which corresponds to the Yuen et al. paper. dp: Resolution of the accumulator array. Votes cast are ...

5

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 by derivatives. Sobel filters emulate such derivatives in one direction, and slightly average pixels in the complementary direction, to smooth small variations ...

5

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 to be viewed by humans, whereas the output of the Sobel (edge detector) filter is not an image to be viewed by humans, but rather a description of the edges to ...

4

Remove things you don't want Since the camera is static, you might want to use a background remover first. I found that the standard one provided with OpenCV works pretty well. I create it like this in the Android OpenCV SDK (you can play with the parameters) : backgroundSubtractor = new BackgroundSubtractorMOG(3, 4, 0.8); Then, apply it to each image in ...

4

The dilation operator with a structuring element is not the way to go. "Stroking" the contour is not the way to go. The distance transform, on the other hand, is exactly the method used by Photoshop. A thresholded distance transform is the equivalent of dilation of a binary image. But how do we dilate a grayscale image? This is how Photoshop does it: ...

4

The Euclidean Distance Transform can produce dilations and erosions with suitable parameters and filtering. The algorithm that Photoshop uses, and the one that is best suited for stroking, is to calculate the Euclidean Distance Transform in integers and without taking the square root (i.e. calculate distance squared). This can be made extremely fast using ...

4

That's not going to be straightforward indeed... You could try working entirely with a Graph structure. First extract all the connected pixels from the image and insert them in a Graph where neighboring nodes are connected with an edge. You could discard Graphs that are smaller than some M number of nodes (to exclude little spots that are not relevant to ...

4

This might not be complete solution, but will give you good direction. Basically, what is the key criteria of to say that edges match? That "locally" the gradient of the edge matches and to some extent the distances are reasonable against how long the edge is continuous. If you have geometric edges, like long straight lines, Hough will do very seamless ...

4

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 output of a Linear System given by $g$ is ${\sigma}_{n}^{2} {\left\| g \right\|}_{2}^{2}$. Let's look on an Image filtered by a derivative approximating ...

4

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 Fourier Transform result. For the 2D FT result: $$\mathscr{F}[f(x,y)]= F(u,v)$$ Using the same property results in: $$\mathscr{F}[\frac{d}{dx}f(x,y)]= uF(u,... 3 The point descriptor usually requires samples at some specific locations from around the detected point. If you have point location refined and orientation assigned, you just shift and rotate the locations before computing point descriptor. Some simple descriptors require samples at discrete locations (e.g. 15x15 pixel image patch) and applying shift+... 3 For this operation to work, you need to imagine that your image is reshaped as a vector. Then, this vector is multiplied on its left by the convolution matrix in order to obtain the blurred image. Note that the result is also a vector the same size as the input, i.e., an image of the same size. Each row of the convolution matrix corresponds to one pixel in ... 3 The \sigma decides the scale of objects being simplified. This is explained here: The size of the Gaussian filter: the smoothing filter used in the first stage directly affects the results of the Canny algorithm. Smaller filters cause less blurring, and allow detection of small, sharp lines. A larger filter causes more blurring, smearing out the value ... 3 Note that once you obtain the skeleton, it is very hard to reverse back to separate the connected components that should not be connected. The problem is that your original image contrast is too low. I would operate an open morphological operation on your raw image to remove the background, hence increase the contrast of hair. Your raw image (reverse each ... 3 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 components in a joint model. Luckily, there is a better way to do this, which is the structure tensor representation. The color structure tensor describes the ... 3 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 edges that are often overly represented by other filters. It lacks the simplicity of, say, the Boolean Edge Detection, included in the paper, "Edge Detection ... 3 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 in by Fourier transforming your image and using the known function for a rectange in 2D Fourier space (its two sinc functions, multiplied). 3 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 of a FIR filter):$$ Y = \sum_i g_i X_i\,,$$the variance of Y will be:$$ V(Y) =\sum_i g_i^2 \sigma_i^2\,, $$which boils down to$$\|g\|_2^2 \sigma_2^2\, ...

3

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]$ along $y$.

3

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 apply it to as a function of the variances of the Gaussians. If we have a big change the difference between the Gaussians it means that we have some frequencies ...

3

A median filter changes the value of one given pixel by the median value of a patch of pixels (most often around the given pixel). Generally, the patch contains an odd number of pixels. I will details three basic scenarii: clean edge (1D vision): suppose that the image is all black on the left ($0$ value), white on the right ($255$ value), a clear vertical ...

3

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 relative smoothness in a complementary (for instance orthogonal) second direction. When looking along the first direction, the 1D intensity profile exhibit variations,...

3

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 know that the return waveform conforms to a Gaussian, it is better to use a method that takes this into account. So, basically, for every pixel time course, ...

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