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


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

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

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

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

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

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


6

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


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

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 filtering (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

Ok, First of all, pay attention it is a calculation per pixel using a sata from a blog. Basically summing the Gradient norm over a block / windows. To calculate what you submitted above do the following: 1.Define the Finite Differences filters to approximate the gradient. Moreover build the "Win Summation" kernel which sums all elements within a window. ...


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

You should use makecform to create a color transfer structure. You should use srgb2lab to create a structure which will convert you to LAB. To apply the color transformation use applycform. Then, as a result you'll have an image in the LAB domain. Then use kmeans to cluster the image colors on the AB channels. Good Luck...


4

There are many properties of inhomogeneity: Local Variance / STD. Local Histogram. The Gradient Function Histogram of the Gradient. Mean versus the Median / Mode.


4

You're trying to solve what's called Perona Malik Non Linear Diffusion Problem (Sometimes people call it, by mistake, Anisotropic Diffusion). Anyhow, the simplest code for that is Anisotropic Diffusion (Perona & Malik) on The MATLAB File Exchange. There is a more advanced (Anisotropic for real) algorithm in Fast Anisotropic Curvature Preserving ...


4

I think you have a matrix. Each Row / Column is a descriptor vector of a point in the image. Just like having features, let's say M features, and each point has M values corresponding to M features. So each element in the descriptor vector is a value of specific feature for this point. And yes, if you have M = 128 Features and 1000 points you'll get a ...


4

Thanks to Luminita Vese, who responded to this question via email. I will post the answer here. Let $\varphi_\epsilon(x) = \varphi(x) + \epsilon\eta(x)$ for some test function $\eta(x)$. \begin{eqnarray} \int_{\Omega} \frac{d}{d\epsilon} \left[ \delta(\varphi_\epsilon(x)) |\nabla (\varphi_\epsilon(x))|\right]dx &=& \int_{\Omega} \left[\frac d{d\...


4

These are two different concepts that you talk about. First, MRF gives you a framework to do discrete optimization of problems, which respect the Markovian property, that is a pixel is conditioned only on the neighboring ones (roughly stated). Typical applications include binary or multi-class labeling problems. Total variation on the other hand, is ...


3

I will describe my current approach, which is an combination of exploiting game rules, image processing and feature detection. Relevant game rules location tiles, castles and mountains can not be taken by game token (houses) in 7 out of 8 cases water can also not be taken there are 8 different (unique) kinds of sections, plus 8 through rotation by 180 ...


3

Thought I should post my answer as it is bit different from other approaches. I tried this in Matlab. sum all channels and create an image, so all channels are weighted equally perform morphological closing and Gaussian filtering on this image for each column of the resulting image, find the local maxima and construct an image find the connected components ...


3

Here is yet an alternative solution to your problem by modelling your question as a 'path optimization problem'. Though it is more complicated than the simple binarization-and-then-curvefitting solution, it is more robust in practice. From the very high level, we should consider this image as a graph, where each image pixel is a node on this graph each ...


3

This topic has always attracted a lot of interest, and yet no real consensus exists on the topic. Therefore I decided to drop a few words. My answers to previously asked similar questions on stackexchange (Q1 and Q2) involved a subpixel curvilinear structure extraction algorithm by Steger. This method performed reasonably well in many cases and luckily, ...


3

I guess for a global overview of the state of the art algorithms for segmentation one needs to look for the latest surveys. A good global overview with challenges are presented in Szeliski's Book.


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