How to store a color and location in a matrix?
조회 수: 7(최근 30일)
I am trying to locate the colors in this image and put them into a matrix. My thoughts were to somehow define the colors, then mark their location and put them into a 3x3 matrix. I also have a BW image of this. This is for a Rubiks cube, so all sides will have to be checked like this, then be compiled into a 3d model of the cube. From there I should be able to figure out a way to solve it.
KALYAN ACHARJYA 2021년 2월 5일
편집: KALYAN ACHARJYA 2021년 2월 5일
"How to store a color and location in a matrix?"
Lets say image is "imRGB"
Save the all Data in the Following Format
% [Row, Column, Red Comp,Green Comp, Blue Comp]
Next Save the Image data in csv or excel, as per requirement
Use writematrix or write table or see the other Matlab functions.