MATLAB: Getiing roi of real time image through matlab and block processing.

roi and block processing

hi there, i am in great problem. can any one please tell me how to select ROI in any real time image through webcam. i am trying to get the real time image of face of the Rubik's cube. i want to select the Roi and then divide the image of the Rubik's face into nine blocks. then i want to take the mean of the pixels in the particular block,and thus identify the color in each block. please tell me how to get the boundary of the face of the Rubik on the webcam and then then divide it into blocks. it is really annoying me……please any one help me……..it will be really grateful………..please help……. hoping for the solution soon………….

Best Answer

If all your images will be so nicely illuminated with bright saturated colors and "face on" views of the cube, then it should be easy. Just look over some of the color segmentation tutorials in my File Exchange.