how can i compare the colors and then perform action OR is there any other way to do the comparison and then perform desired action
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
ia=imread('redline.tif');
image=im2bw(ia);
%imshow(j);
[row,column]=size(image);
grid = zeros(rows,column);
for i=1:rows
for j=1:column
if(image(i,j)==1)
grid(i,j)=1;
end
end
end
display(grid);
3 Kommentare
harjeet singh
am 18 Dez. 2015
your question is not yet cleared, and kindly upload the image which you are taking.
Geoff Hayes
am 18 Dez. 2015
Mukul - what are you trying to compare the colours to? Are you looking for those pixels that are white (==1)?
Walter Roberson
am 18 Dez. 2015
Please do not use "image" as a variable name, as that interferes with using image() as a basic MATLAB function, and confuses other people who read the code.
Antworten (1)
Walter Roberson
am 18 Dez. 2015
grid = double(image==1);
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!