# Tag Info

19

From my experience, the following points are limitations: The result is binary. You sometimes need a measure of 'how much' the edge qualifies as an edge (e.g. intensity image coming from a Sobel amplitude edge detector) The amount of parameters leads to infinitely tweaking for getting just that little better result. You still need to connect the resulting ...

14

The best ideas that exactly tries to solve this problem is Hough Transform . Basically, the signal in hough space will be r, x, y co-ordinates. Here r stands for radius and x,y stands for center. Every points may belong to one or many circles. So in the Hough plane go through all possible circles where this point could belong to and just do a +1. This is ...

11

Detecting different components: If you're trying to detect the different components, there probably are other approaches to do them than detecting the contours. Here's an example in Mathematica. An erosion followed by dilation is used to close the gap in the second component before detection (if you don't do this, it won't detect it). img = Binarize@Import[...

11

What about putting the label at the innermost point of the segment? Let's define innermost by the maximum of the distance transform of the segment's mask. With software systems like Mathematica and the sort, it is straightforward to achieve. The mask for one segment, and its distance transform: After repeating for each segment and positioning labels where ...

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 ...

10

Robert's Cross is a little tricky because it's not an odd size (2x2 rather than 3x3 or 5x5). I've done it using numpy+scipy using a padded 3x3 convolution mask. import sys import numpy as np from scipy import ndimage import Image roberts_cross_v = np.array( [[ 0, 0, 0 ], [ 0, 1, 0 ], [ 0, 0,-1 ]] ) ...

9

OpenCV's MSER extractor (documented here) might be helpful — the bounding box of local MSER groups would pretty closely match the green rectangles in your mockup.

8

I submit that the ideal place to place the label should meet two objectives: proximity to the center, say $d$. legibility, say $l$. Ergo, we can determine the ideal point by minimizing a holistic metric such as $l \times d^\alpha$ or $l+\alpha d$, where $\alpha$ is the trade-off parameter. Determining $d$ is straightforward. $l$ can be set to the total ...

7

What I'm planning to do is to apply edge detection to obtain the locations/indices of the pixels and then get their corresponding DCT Coefficient As others stated in the comment - any pixel in the given block is related to all co-efficient in the block and vice-versa. However, understand that Edge detection is a process of finding the gradient. Linear ...

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

or are there areas of applications where Canny will not be best? I can think of a few: if you need closed curves, a detector that can guarantee those might be better (e.g. zero crossings of the laplacian or watershed segmentation) if you're trying to detect a homogeneous object that has low contrast in some areas, a segmentation method that uses global ...

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

Have you seen Robust Real-time Object Detection by Viola and Jones? This is probably the most widely used face detection algorithm, and also the most famous example of the use of the Haar wavelet-like features.

5

Following http://www.kerrywong.com/2009/05/07/canny-edge-detection-auto-thresholding/ is one of the few resources that shows how to choose thresholds Tlow and Thigh According to this, for a picture which is sufficiently spread in historgram, one can choose T_low = 0.66 * mean value of image and T_high = 1.33 * mean value. However, when the image is not ...

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],[...

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

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

One can get the presence of an edge in a given DCT block. It is easier to compute the First order and second order moments from the given DCT coefficients. Variance in a small region is an approximation of the gradient at the center (x0,y0) of the block. The Variance in a block can be estimated from the DCT coefficients as summation of squares of the AC ...

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

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 ...

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

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

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

I don't know if OpenCV has some implementation - but i can provide you with a pointer of algorithm for this. MPEG 7 provides a fairly well defined (and well thought out) edge histogram descriptor [EHD] which essentially serves your purpose. You can refer to this: Efficient Use of MPEG-7 Edge Histogram Descriptor which i think is an excellent paper on ...

3

Perhaps you can detect the presence of a sharp change in color/brightness by detecting high frequency components in the Y block. If there are non-zero coefficients in the high frequency end of the DCT block, that indicates a sharp edge. You won't know its exact position in the block without doing the transform, but you can know if there is a sharp line/dot.

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