# Tag Info

## Hot answers tagged image-segmentation

13

I suggest the following steps: Find a threshold to separate the foreground from the background. For each blob in the binary image (one zebra stripe), for each x, find the weighted center (by pixel intensity) in y direction. Possibly, smooth the y values, to remove noise. Connect the (x,y) points by fitting some kind of curve. This article might help you. ...

8

Following on from the above excellent answer, here is how to do it in python using scikit funcitons. from skimage.feature import hessian_matrix, hessian_matrix_eigvals #assume you have an image img hxx, hxy, hyy = hessian_matrix(img, sigma=3) i1, i2 = hessian_matrix_eigvals(hxx, hxy, hyy) #i2 is the variable you want. #Visualise the result import ...

8

This is what your code produces (using colormap(hot) with white boundaries that are obtained from IM2): I think the shadows are nicely treated, why are you thinking that your code doesn't notice between shadow to grapes? This is the code used for producing this image bw=IM2<1; [B,L] = bwboundaries(bw,'noholes'); % fill any holes, so that regionprops ...

7

YUV (or YCbCr) is like HSV, but in different coordinates. (The difference between YUV and YCbCr is marginal - mostly related to exact formulas). The $V$ component is the same. $(S,H)$ can be thought of as polar coordinates, and $(U,V)$ as cartesian. $H$ is the angle and $S$ is the radius. A rough conversion would be: $U = S \cdot \cos(H)$ $V = S \cdot \... 7 Here is the link to a research paper that tries to do the same thing as you wanted. It might help you.using image features Also a cool video on the youtube 7 I do not know about many segmentation techniques, but I have been dealing with structures that offer a "choice" of segmentation pieces that can be further examined to produce a satisfying segmentation. Hopefully somebody else can write about some different state-of-the-art segmentation method that I don't know much about. A small introduction as to why it ... 7 Be careful, a median filter cannot be expressed as a convolution, and thus is not considered a kernel in this respect. This is because the median filter is based on order statistics of an image patch, and the resulting pixel at the output of a median filter is not a linear combination of other pixels within a patch. Otherwise, you are right, kernels are ... 7 It can be a little confusing at times, and the terms are not completely independent. Detection: In detection, you are simply detection the presence of something. For example, you might design an algorithm to detect beach-balls from pictures of a beach. You would feed an image into your algorithm, and it will spit out an answer 'yes', if there was a beach ... 7 So one good step to enhance the vein-like structures is coherence enhancing diffusion: Weickert, Joachim. "Coherence-enhancing diffusion filtering." International Journal of Computer Vision 31.2-3 (1999): 111-127. So I first apply this algorithm to your image, aggressively. The next step is to identify the curvilinear structures, which would in this case ... 6 As an addendum to Penelope's answer, two popular families (and trendy) of algorithms. Superpixels A very popular family of algorithms called Superpixels is very trendy right now (there are even some Superpixel sessions in CV conferences). Superpixels are a lot like over-segmentation (like what watershed gives you), so some post-processing is required. ... 6 Alas, optical flow is a difficult problem too ;-) Well, to be more constructive, here are a few algorithms that should be worth trying (or have been tried on this particular sequence) : re-train your bags of features on a databse of vehicles more representative (in size and orientation) to your actual problem in order to obtain better results use the fact ... 6 1st Approach: Use the haartraining methods of opencv according to this tutorial http://note.sonots.com/SciSoftware/haartraining.html -- this should give the best results, but I haven't worked with haartraining myself so far... 2nd Approach: I would suggest to use methods of "markerless tracking" of the individual tiles of the board. You can implement this ... 6 You need to work with different color space. Try YCbCr for instance oimg = imread('http://i.stack.imgur.com/aYhrS.png'); img = rgb2ycbcr(oimg); % conver RGB to YCbCr color space msk = img(:,:,3)>130; % apply threshold on Cr channel to get segmentation mask I picked up 130 as arbitrary threshold, you might need to adjust it a bit. Showing the input ... 5 I asked Google again for you, but I did manage to find some hits in the end. There is already a very good question on stackoverflow concerning the exact same thing you are interested in. There is a very nice explanation of split-and-merge provided in one of the answers, as well as simplified pseudocode. The other answer provides a link to the ... 5 Other than commercial barcode reading algorithms (many of which fail to read challenging codes), I would like to direct you to this paper which is one of the best academic works in that field in my opinion: Gallo, Manduchi: Reading Challenging Barcodes with Cameras. Here is a more recent version: Gallo, Manduchi: Reading 1D Barcodes with Mobile Phones ... 5 This code work fine for me. You try RGB = imread('Image/input.png'); GRAY = rgb2gray(RGB); threshold = graythresh(GRAY); originalImage = im2bw(GRAY, threshold); originalImage = bwareaopen(originalImage,250); se = strel('disk', 10); %# structuring element closeBW = imclose(originalImage,se); imshow(closeBW); 5 It can be done very easily with the scikit-learn. Examples are easy to find on their website, i.e. here. In my opinion it is the best way to go. Modified code example from the above link: import numpy as np import matplotlib.pyplot as plt from sklearn.cluster import KMeans from sklearn.datasets.samples_generator import make_blobs ########################... 5 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 watersheds segmentation. If I apply this procedure, here is what I get: Not perfect, but maybe a good start. The result looks similar to performing a Voronoi ... 4 I am currently working on CBIR using Component Trees, which should be a relatively new idea. Some expected advantages of using Component Trees to describe images would be: The Component Tree representation of an image would not depend so much on the deformations (even projective) to the image Examining different levels of the tree would allow comparisons ... 4 MSER (Maximally stable extremal regions) are regions, not points. And they're invariant to affine transformation. But it's not a segmentation method, strictly speaking Informally speaking, the idea is to find blobs at various thresholds, then select the blobs that have the least change in shape/area over a range of thresholds. These regions should be stable ... 4 Which method are you using to detect the lines? Have you tried experimenting with LSD? Here are the results of a quick test I did using LSD: In this first image I have displayed only the vertical line segments with an angle between 75 and 105 degrees and the length greater than$0.1 * height\$ of the image: The second image are the results with the same ...

4

Okay I found some ideas about using Fourier Transforms in Object Recognition. What I am unable to understand is however, its downsides. Why was the method discarded. For those who are interested in reading about how Fourier Transforms were applied in Object Recognition , look for Fourier Mellin Transforms. The Fourier-Mellin transform is a useful ...

4

I think the open-source command-line program potrace, might do what you want. It converts bitmaps to bezier curves and has a bunch of options allowing you to trade off smoothness and accuracy. The open-source Inkscape vector (svg) editor has potrace built in (under the Path->Trace Bitmap menu option.) The result of applying your example in Inkscape, (I ...

4

You could apply a 2d FFT. You will get a frequency spectrum as z values on a 2d plane: ← That's log(abs(fftshift(fft2(image))))) where image is from the question, but with white borders trimmed From the z values you can determine the highest peak and calculate its position on the 2d plane. With some geometric calculation, you can derive wavelength, ...

4

Although you did not spent even a minute in researching the question I will post an answer to it. There are multiple ways; I will try to demonstrate it using wavelets in Mathematica. So, first of all we need an image. img = ExampleData[{"TestImage", "Mandrill"}] Then we apply the DiscreteWaveletTransform using the HaarWavelet dwd = ...

4

It depends on how you define the noise and what kind of noise does your image have. Different filters work on different kinds of noise. Among those filters, Wiener filter is often used by tailoring itself to the local image variance. And a new method called block-matching and 3D ﬁltering (BM3D) in which the Weiner filter is used to optimize the parameters of ...

4

jpg is a compressed storage format and no matter how binary your image is, you will almost always end up with gray values in the resulting image (due to compression). Please save it as png and try again. (Also note that you still have 0s and 255s as the dominant bins, because jpg generally degrades around the edges, which constitute a small portion in the ...

4

A dynamic texture is a texture that is a function of space and time. In Image Synthesis papers, it is a term often used to designate things like: a flame, a waving flag, specular reflections on water. You can see some classic examples here.

4

Generally speaking, a change of color space is essentially a nonlinear transform that stretches and distorts the coordinates. The transform is also continuous, except maybe on a singularity line or half-plane. It does not preserve the distances, but preserves the neighborhoods. In the case of RGB > Lab, you can see it as a linear transform (change of basis, ...

4

I will try to give you some intuition into it by a different example. Think we have 3 machines which can generate the numbers 1, 2, 3. The first machine generates the number 1 with 80% and the numbers 2, 3 with 10% each. The second machine generates the number 2 with 80% and the numbers 1, 3 with 10% each. The third machine generates the number 3 with 80% ...

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