Effacer les filtres
Effacer les filtres

Splitting an image into matrix based on color?

1 vue (au cours des 30 derniers jours)
Delvin
Delvin le 22 Avr 2013
Hi i have an low res image and i want to extract the color information from this into a cell-matrix.
I already know the 8 colours contained in this image. It is stored in an 8x3 array,
0 0 0; //black
255 0 0; //red
240 220 0; 50 0 255; etc
now all i want to do is search the image for these colours (including small variations), and if a match is found put this region in a matching cell array.
So if in the image 0,0 to 10,25 consists of colour black then in the matrix the first element will be a cell with dimension {10 x 25 x 1} where 10 and 25 are the dimensions and the 1 dimension holds the colour information.
The value of this cell will be 1 since black is uindex 1 in the predefined colour array.
How do i convert this logic into code? Thanks for helping,

Réponses (0)

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by