I used a captured video of a labmate, Kirby Cheng, a 3rd year BS Applied Physics student, under various illuminations inside the Instrumentation Physics Laboratory and at the NIP corridor as shown in the figure below.
Figure 2. Images of Kirby under different illuminations: (a) - (b) with yellow lighting inside the Instrumentation Physics laboratory, (c) - (d) daylight at the National Institute of Physics (NIP) corridor and outside the NIP.
The Kirby video was first parsed into image frames. From one image frame, we cropped a sub-image of the region of interest (ROI), i.e. his skin, and computed its rg-histogram. The procedure was then repeated for frames where there were drastic changes in skin color. We estimated the color locus of that object using the computed rg-histograms and we performed histogram backprojection per frame.
As seen in Figure 3, the size of the bounding box varies under varying illumination. Note that a larger bounding box is observed for the images with yellow lighting given that the color of Kirby's skin blends with the surrounding, thanks to his Chinese genes, while a relatively smaller bounding box appears for the daylight illumination. The image frames exhibit an unbroken tracking of Kirby’s skin under different illuminations.
Tips:
1. Make sure to first convert the rgb images to black and white using the im2bw command in Matlab.
2. Apply morphological operations to binarize the image and remove non-ROI blobs.
3. Use bwlabel to label the index blobs and regionprops to find blob features.
4. To speed up processing for real-time applications, confine object segmentation in the next frame within a slightly larger bounding box than the blob bounding box.
I give myself a grade of 10 for this activity since I was able to satisfy the main objective, which is to track the skin color of the sample under varying illuminations. As a side note, I spent a greater time on this activity mainly because I needed more time in reviewing the syntax and commands available in Matlab.
Reference:
[1]M. Soriano, B. Martinkauppib, S. Huovinenb and M. Laaksonenc, "Adaptive skin color modeling using the skin locus for selecting training pixels" Pattern Recognition 36 (2003) 681 – 690
For teaching concerns please visit: https://sites.google.com/site/alongjas/
No comments:
Post a Comment