Can you spot the difference? Clue: RGB. nyargh! hehe the left pic is the Red Channel of the original image(see below for the orig true color pic), and the right pic is the Green Channel. What about the Blue Channel? sorry, i'm from U.P., blue=ateneo:) haha joke.:)
and there you have it!:) haha, read on so that you get why this post is entitled as such.
We were given an activity that would enable us to do some tracking from images. The end-goal: object tracking in videos using chromaticity as main feature. Why chromaticity? Well, it's because our skin (everybody's) only falls within a small locus of the chromaticity region (whoa! that's how i understand it) and that the difference in skin "color" is actually just a function of brightness/intensity.
Face detection is one cool application (for webcams, videocams, digicams, cellphone cams, etc...) that should use this "chromaticity-as-skin-info" concept.:)
As an exercise, last friday (Nov 20, 2009), we had an image segmentation lab activity:
- Select an Image where you have an object you wish to detect/identify (and eventually segment from the rest of the image). Note: better start with objects that are easily identifiable:)
For my selection: Davao Eden Nature Park Jump Shot with Friends!:)
- Crop a Sample of the Region of Interest (ROI) from the image(say, for my selected image, i wanted to segment the shirt of Kim GuanHing)
So i got a kim shirt sample:
- Get the Histogram of the Sample. Now, we have the representative feature that we want to detect in the original image and in future images (with the sample being kim's shirt - which is the object that we will detect and later on "track")
- Load the Image that you want to segment/detect/identify IF the sample(object to be tracked) exists in the image(and where in the image it is).
- Run the the Histogram Backprojection code which does this: for each pixel in the loaded image, get the chromaticity value (red and green channels) and look-up the new_value of the pixel using the Sample's(Kim's shirt) histogram as your "re-mapper" (i.e. for a given r and g, you can get the new_value) Note that the values in the histogram of kim's shirt will be high for those pixels that are "like" kim's shirt and low for those un-like kim's shirt:)
Segmented Kim Shirt (creepy?):)
side comment: interesting app for baduy-colored shirts worn in malls?:) hehe i actually want to run this algorithm for cars in the carpark of malls and integrate with the parking payment system:) suuuuuuppppppppppeeeeeeeeeeeeer cheap sol'n to an intelligent car park system:)
to do: try other kim shirt pics and see if the algo can detec kim's shirt in those pics!:)
hopya-layk-eat!:)
-------
Self Grade: Uno:) or from 0-10: 10!:) kasi naman from zero scilab experience ito:) and then ang laki ng learning leap sa chromaticity plus the backprojection implementation (Apir!):)
-------
lochinvar's note to self: must try python implementation (use your openCV webcam, for face detection!)