I have a image where I want to detect a rectangle in red color in iPhone. It could be image or it could be anything that we captures from iPhone camera. Can some one please direct me to correct path?
Thanks
Pankaj
I have a image where I want to detect a rectangle in red color in iPhone. It could be image or it could be anything that we captures from iPhone camera. Can some one please direct me to correct path?
Thanks
Pankaj
You can now try to lean opencv
http://opencv.willowgarage.com/wiki/
http://computer-vision-talks.com/2011/02/building-opencv-for-iphone-in-one-click/
for iphone's camera capture: import CoreVideo framework
I think you'd like to use templete matching instead of trainning(this is a very hard way).
One approach would be to have a function that takes a pixel and decides if it's the right color, and run the whole image through it to separate out interesting-colored pixels from non-interesting-colored pixels. Grab the edges of this (either using a Canny edge detector or perhaps OpenCV's contour-finding functions), and you'll get all the pixels separating the interesting parts from the non-interesting parts. Then run those edges through a Hough transform to look for straight lines. You should get two sets of parallel lines, forming a rectangle. Now do some sanity-checking to make sure that the interesting pixels from the image are mostly within that rectangle, and you should be good to go.