Can anyone suggest good illumination normalization algos for face authentication. I have tried basic algos like DoG, LBP, ..? - matlab

As part of my project, I want to build an illumination invariant face authentication system. The constraint is I have only 1 enrollment image, but I have the option of adding authentication images to enrollment folder adaptively. The face images are almost frontal. Can anyone suggest an algo or combination of 2-3 algos to make my face auth system robust to illumination.
I have tried LBP and variants of it with DoG, and also a tool box from MATLAB INface toolbox which has some 20 odd illumination normalization algos.
-Chaitanya

The illumination can be corrected (there are algorithms such as Gray-World, Retinex...) => try to preprocess an image with them.
By using different color-spaces such as Lab and HSV you will obtain illumination invariant components (H and S in HSV, a,b in Lab) BUT only for WHITE light (it is good for sun light also). If you have blue lamp (for example) those color spaces would not be appropriate.
My suggestion is to use invariant features such as orientation of gradients, LBP features, SIFT and SURF features and then training a classifier with them.
Most common approach for a face recognition is to use PCA (or kernel PCA) with a SVM classifier.
You will probably have to use more than one image because person will not be in the same environment with the same head orientation.

Have you tried converting to Lab color space? http://en.wikipedia.org/wiki/Lab_color_space
Code:
http://robotics.stanford.edu/~ruzon/software/rgblab.html

Related

ideas on quadrangle/rectangle detection using convolutional neural networks

I'v been trying to do quadrangle detection and localization for weeks, my goal is to have a robust way of getting the 4 points of an quadrangle(rectangle), so I can apply projective transform to an Image then attach it to the source image. I have try the classic opencv contour method, and also using hough transform to find lines then calculate intersections, those two methods is unusable when apply it to real life images.
So I turn to CNN for help, but currently i haven't find any one try to use CNN to solve this simple problem.
My first attempt is to use state-of-art object detection and localization methods to get quadrangle's bounding box so i can narrow the search of 4 points, then use image processing & computer vision methods to further the search for 4 points. but after trying YOLOv2 and Faster-RCNN, the prediction accuracy is not ideal.
So I'm wondering if there is any idea i can do this end to end, training and feedforward all using a single neural network. it also must be able to deal with occlusion reasonably well.
Currently my idea is to remove the fc-layers and make a huge activation map that has the same width and height as the first input layer(eg. 448x448) then optimize the 4 most highly activated areas, using argmax to get the position. but this method only works for one quadrangle it doesn't work well with corner occlusions as well.
I'll be appreciated if anyone can provide any suggestions. Thanks a lot!
You are absolutely right about the first methods you mentioned. Hough transform like methods are old and not useful for images in the wild. And of course, computer vision field turned its face to object detection and recognition with rise of deep learning.
However, there is a very nice discussion came up recently.
Have we forgotten about Geometry in Computer Vision?
My suggestion would be contour detection and then apply Hough transform(use state of the art) methods to detect rectangles you want, about the occlusion, you can set parameters for Hough transform to be more forgiving for missing edge pixels with parameters.
You can for example check most recent contour detection methods as in recent CVPR paper.

Bald detection using image processing

I was wondering if someone can provide me a guideline to detect if a person in a picture is bald or not, or even better, how much hair s\he has.
So far I tried to detect the face and the eyes position. From that information, I roughly estimate the forehead and bald area by cutting the area above the eyes as high as some portion of the face.
Then I extract HOG features and train the system with bald and not-bald images using SVM.
Now when I'm looking at the test results, I see some pictures classified as bald but some of them actually have blonde hair or long forehead that hair is not visible after the cutting process. I'm using MATLAB for these operations.
So I know the method seems to be a bit naive, but can you suggest a way of finding out the bald area or extracting the hair, if exists. What method would be the most appropriate for that kind of problem?
very general, so answer is general unless further info provided
Use Computer Vision (e.g MATLAB Computer Vision toolkit) to detect face/head
head has analogies (for human faces), using these one can get the area of the head where hair or baldness is (it seems you already have these)
Calculate the (probabilistic color space model) range where the skin of the person lies (most peorple have similar skin collor space range)
Calculate percentage of skin versus other color (meaning hair) in that area
You have it!
To estimate a skin color model check following papers:
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.56.8637&rep=rep1&type=pdf
http://infoscience.epfl.ch/record/135966
http://www.eurasip.org/Proceedings/Eusipco/Eusipco2010/Contents/papers/1569293757.pdf
Link
If an area does not fit well with skin model it can be taken as non-skin (meaning hair, assuming no hats etc are present in samples)
Head region is very small, hence, using HOG for classification doesn't make much sense.
You can use prior information - like detect faces; baldness/hair is certain to be found on the area above the face. Also, use some denser feature descriptors.
You are probably ending up with very sparse representation or equivalently less information because of which your classifier is not able to classify correctly.

CBIR project suggestions

I'm trying to build an CBIR (content based image retrieval) project and for the first step I'm looking at a good feature.
This should be invariant on several cues: scale rotation illumination and device, and I've not any database or previous knowledge of the scene. Up to now I've read several papers and it seems a very difficult goal.
In general, the common feature is based on colors, but these algorithms has the prior that all scenes are taken with same device models, or has an heavy training step.. or other simplifications. In my case I have different devices so that these devices uses different color representation (due to different acquisition, quantization etc..).
After color histograms i've tried with SIFT but the matching of these fails even in the easiest cases (also this due to different devices..) Just read the abstract of this paper daunted me a bit :)
It is clear that these images need some "normalization" preprocessing... first of all i put all images in the same dimensions (according to the littlest)... then i need something that make colours appear similar.. according to this paper (the link shows a file with slides of the project) i should just equalize the three channels obtaining some illuminant and device color invariant, but SIFT still fails!

remove the background of an object in image using matlab

I have a image with noise. i want to remove all background variation from an image and want a plain image .My image is a retinal image and i want only the blood vessel and the retinal ring to remain how do i do it? 1 image is my original image and 2 image is how i want it to be.
this is my convoluted image with noise
There are multiple approaches for blood vessel extraction in retina images.
You can find a thorough overview of different approaches in Review of Blood Vessel Extraction Techniques and Algorithms. It covers prominent works of many approache.
As Martin mentioned, we have the Hessian-based Multiscale Vessel Enhancement Filtering by Frangi et al. which has been shown to work well for many vessel-like structures both in 2D and 3D. There is a Matlab implementation, FrangiFilter2D, that works on 2D vessel images. The overview fails to mention Frangi but cover other works that use Hessian-based methods. I would still recommend trying Frangi's vesselness approach since it is both powerful and simple.
Aside from the Hesisan-based methods, I would recommend looking into morphology-based methods since Matlab provides a good base for morphological operations. One such method is presented in An Automatic Hybrid Method for Retinal Blood Vessel Extraction. It uses a morphological approach with openings/closings together with the top-hat transform. It then complements the morphological approach with fuzzy clustering and some post processing. I haven't tried to reproduce their method, but the results look solid and the paper is freely available online.
This is not an easy task.
Detecting boundary of blood vessals - try edge( I, 'canny' ) and play with the threshold parameters to see what you can get.
A more advanced option is to use this method for detecting faint curves in noisy images.
Once you have reasonably good edges of the blood vessals you can do the segmentation using watershed / NCuts or boundary-sensitive version of meanshift.
Some pointers:
- the blood vessals seems to have relatively the same thickness, much like text strokes. Would you consider using Stroke Width Transform (SWT) to identify them? A mex implementation of SWT can be found here.
- If you have reasonably good boundaries, you can consider this approach for segmentation.
Good luck.
I think you'll be more served using a filter based on tubes. There is a filter available which is based on the work done by a man called Frangi, and the filter is often dubbed the Frangi filter. This can help you with identifying the vasculature in the retina. The filter is already written for Matlab and a public version is available here. If you would like to read about the underlying research search for: 'Multiscale vessel enhancement', by Frangi (1998). Another group who's done work in the same field are Sato et.al.
Sorry for the lack of a link in the last one, I could only find payed sites for looking at the research paper on this computer.
Hope this helps
Here is what I will do. Basically traditional image arithmetic to extract background and them subtract it from input image. This will give you the desired result without background. Below are the steps:
Use a median filter with large kernel as the first step. This will estimate the background.
Divide the input image with the output of step 1 [You may have to shift the denominator a little (+1) ] to avoid divide by 0.
Do the quantization to 8 or n bit integer based on what bit the original image is.
The output of step 3 above is the background. Subtract it from original image, to get the desired result. This clips all the negative values as well.

Detecting shape from the predefined shape and cropping the background

I have several images of the pugmark with lots of irrevelant background region. I cannot do intensity based algorithms to seperate background from the foreground.
I have tried several methods. one of them is detecting object in Homogeneous Intensity image
but this is not working with rough texture images like
http://img803.imageshack.us/img803/4654/p1030076b.jpg
http://imageshack.us/a/img802/5982/cub1.jpg
http://imageshack.us/a/img42/6530/cub2.jpg
Their could be three possible methods :
1) if i can reduce the roughness factor of the image and obtain the more smoother texture i.e more flat surface.
2) if i could detect the pugmark like shape in these images by defining rough pugmark shape in the database and then removing the background to obtain image like http://i.imgur.com/W0MFYmQ.png
3) if i could detect the regions with depth and separating them from the background based on difference in their depths.
please tell if any of these methods would work and if yes then how to implement them.
I have a hunch that this problem could benefit from using polynomial texture maps.
See here: http://www.hpl.hp.com/research/ptm/
You might want to consider top-down information in the process. See, for example, this work.
Looks like you're close enough from the pugmark, so I think that you should be able to detect pugmarks using Viola Jones algorithm. Maybe a PCA-like algorithm such as Eigenface would work too, even if you're not trying to recognize a particular pugmark it still can be used to tell whether or not there is a pugmark in the image.
Have you tried edge detection on your image ? I guess it should be possible to finetune Canny edge detector thresholds in order to get rid of the noise (if it's not good enough, low pass filter your image first), then do shape recognition on what remains (you would then be in the field of geometric feature learning and structural matching) Viola Jones and possibly PCA-like algorithm would be my first try though.