an image is captured containing a grid of 6*6 with different colors in it that is yellow,red, white and blue ,so to differentiate the colours from the grid and store in an array and to process them for real time working in MATLAB??

to process the captured image containing a 6*6 grid of four different colours and to differentiate the colours from 36 blocks and differentiate the colours and store in a matrix of 6*6 for real time processing further

 Accepted Answer

hi, you have to specify what type of differentiation you mean :
r=round(10*rand(6)); % 6x6 colors
dr=gradient(r); % differentiate to get 6x6 colours
imagesc(dr);

4 Comments

thanku sir sir , i am snapping a picture from web cam and then in the picture a grid comes of 6*6 containing different colours in the grid , so how can i can get that grid only from the picture and then store the colours in the matrix ON DIFFERENTIATION ,ACTUALLY sir i am making it for a tic tac toe where robot works by image processing so when the colours are differentiated ,my robot moves like wise to the correspondent colour in which two colour arena is made and two colours forms the arena when the bot makes the move.
hi, so the "gradient" operator works well for you case ?
The grid is inside the Snapshot i mean inside the picture? is it stable during the whole process ?
waiting for you answer..
I guess it worked - he accepted your answer. An image to see would have been helpful though.
maybe, it depends on his system, he still has to get the grid from the picture ....

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!