I am new to Mathematica and I would like to use it to postprocess some of the experimental data I measure. I would like to visualize voltage measurements over a non-uniformly segmented plate. I would like to read in the segmentation in terms of a colored scheme. The color scheme would define the segmentation in geometrical shapes. For instance, I would have a red rectangle, an orange triangle, a blue triangle and a green square.
From what I know, I can represent the colors in terms of a
Matrix using the
ImageData command. However, with this, I obtain a
3X1 matrix for each color. I would like to know if there is a way to represent each color by one number. I ask this since I would like to take the
Matrix I obtain and correlate it to the matrix which identifies the segment numbers according to the segmentation as follows:
Red --> Segment 1 (Rectangle) Orange --> Segment 2 (Triangle) Blue --> Segment 3 (Triangle) Green --> Segment 4 (Square)