Algorithms for over-segmentation of images - image-segmentation

I want to over-segment an image as a first step to perform overall image segmentation. Could someone comment on the various algorithms that can be used for over-segmenting images?

The most well known segmentation algorithm that causes over-segmentation is WATERSHED TRANSFORM however my question to you is why do you want to do over-segmentation
Can be implemented as follows with MATLAB
L = watershed(A)
L = watershed(A, conn)
conn= gives the connected components

The scikit-image python library has over segmentation algorithms that you might find useful. SLIC, Quickshift and Felzenszwalb & Huttenlocher. Examples of their use here.

Related

Face detection (viola-jones) in matlab

So I found the cascade object detector in matlab that use the Viola-Jones algorithm to detect faces. Very easy to use, and works great!
But got a few questions.
The viola-jones method got four stages:
Haar Feature Selection
Creating an Integral Image
Adaboost Training
Cascading Classifiers
In matlab I can use FrontalFace(CART) and FrontalFace(LBP). These are Trained cascade classification model, so they will be part of stage 4 right?
But what is the difference between stage 1 and stage 4 if I use FrontalFace(CART)? Both use Haaar features it says.
Can we say that FrontalFace(CART) and FrontalFace(LBP) are two different ways of detecting faces? Can I compare those two against each other to see which one is better?
Or should I find another method to compare against the viola-jones?
Are there other face detection methods that are easy to implement in matlab?
Found some on the internet (using skin color etc), but Matlab is quite new to me. So I felt that those codes where abit to complicated for me.
The main difference is that FrontalFace(CART) and FrontalFace(LBP) have been trained on different data sets. Also, from the name, I am guessing that FrontalFace(LBP) uses LBP feaures instead of Haar.
The original Viola-Jones algorithm used the Haar features. However, it has later been extended to use other types of features. vision.CascadeObjectDetector supports Haar, LBP, and HOG features.
To compare which one is better, you would need some ground truth images, which are images with faces labeled by hand. I am sure you can find a benchmark data set on the web. Alternatively, you can label you own images using trainingImageLabeler app.
Also, if you are not happy with the accuracy of the classifiers that come with vision.CascadeObjectDetctor, you can train your own using the trainCascadeObjectDetector function.

Multiscale search for HOG+SVM in Matlab

first of all this is my first question here, so I hope I can explain it in a clear way.
My goal is to detect different classes of traffic signs in images. For that purpose I have trained binary SVMs following these steps:
First I got a database of cropped traffic signs like the one in the link. I considered different classes (prohibition, danger, etc), and negative images. All of them were scaled to 40x40 pixels.
http://i.imgur.com/Hm9YyZT.jpg
I trained linear-SVM models for each class (1-vs-all), using HOG as feature. Each image is described with a 1728-dimensional feature. (I append the three feature vectors for all three image planes). I did crossvalidation to set parameter C, and tested on previously unseen 40x40 images, and I got very accurate results (F1 score over 0.9 for all classes). I used libsvm for training and testing.
Now I'd want to detect signs in full road images, sliding a window in different image scales. The problem I'm facing is that I couldn't find any function that can do it for me (as DetectMultiScale in OpenCV), and my solution is very slow and rudimentary (I'm just doing a triple for loop, and for each scale I crop consecutive and overlapping 40x40 images, obtain HOG features and apply svmpredict for each one).
Can someone give me a clue to find a faster way to do it? I thought too about getting the HOG feature vector of the whole input image, and then reorder that vector to a matrix where each row will have the features corresponding to each 40x40 window, but I couldn't find a straightforward way of doing it.
Thanks,
I would suggest using SURF feature detection, however I don't know if this would also be too slow your needs.
See : http://morf.lv/modules.php?name=tutorials&lasit=2 for more information on how to implement and weather it is a viable solution for you.

Optical Character Recognition Development

I have been trying to develop an OCR engine by myself. After researching the topic a bit I have come to the conclusion that there are 4 major steps involved :
Pre-processing the image [de-skewing, image contrast, binarize, etc.]
Segment the image into the characters [to make it easier to process each character individually]
Identify the chracter through feature extraction / comparison and classification.
Post-processing the image [to increase the chances of getting an optimal solution.]
I am hopelessly lost after the 1st step! Can somebody please help me out by telling how to perform character segregation & feature extraction ? I'll be extremely grateful even if you can provide me a link which points me in the right direction.
Thanks in advance! :)
There is a paper called self-tuning spectral clustering by Zelnik-Manor and Perona. Here is the link to their page for paper and code written in Matlab:
Self-Tuning Spectral Clustering
This method can perform image segmentation. Another thing you may want to look into is topic-modeling on images for feature extraction. Anything by Blei will also be useful.
The Computer Vision System Toolbox now has the ocr function that can save you the trouble.

Estimating an image deblurring/denoising technique

I'm new to image processing and wanted to deblur/denoise some images using Matlab. Example:
Input
Output
I don't know the exact blurring/noising effects by which the second image came about. At first, I normally did so by trial and error of the Wiener deconvolution method, but not able to reach best results.
So my question is, is there a more clever method other than trial and error?
(Note: The output image was obtained from Robot36 radio transmission decoder.)
I'd suggest trying the Richardson-Lucy deblurring algorithm. It is available as a built-in function in the Image Processing Toolbox. It makes use of multiple iterations which you can set to control the degree to which you want the image deblurred. I've always found this a very useful method. Here's the doc link: deconvlucy

SIFT and SURF feature extraction Implementation using MATLAB

I am doing an ancient coins recognition system using matlab. What I have done so far is:
convert to grayscale
remove noise using Gaussian filter
contrast enhancement
edge detection using canny edge detector.
Now I want to extract feature for classification. Features I thought to select are roundness, area, colour, SIFT and SURF. My problem is how I can apply SIFT and SURF algorithms to my project. I couldn't find built-in functions for both.
You can find SIFT as a C implementation with MATLAB bindings at: http://www.vlfeat.org/index.html
For anyone else coming across this thread as I did, I noticed the implementation at http://www.vlfeat.org/index.html was far more than I required and also fairly hard to adjust to my code.
The following link; http://robwhess.github.io/opensift/, has an implementation of just the SIFT algorithm accompanied with an example executable, with the source code available (unlike http://www.cs.ubc.ca/~lowe/keypoints/ which only has the sift binary executable).
you can find a matlab implementation of SIFT features here: http://www.cs.ubc.ca/~lowe/keypoints/