Finding pixel coordinates from pixel value
Show older comments
I am using the code as shown below to accquire the pixel coodinates of an image whose pixel value is below 80.
clc
clear all
close all
X=imread('cameraman.tif');
Y=rgb2gray(X);
for i=1:3
for j=1:3
if Y(i,j) < 80
[y z]=find(Y(i,j));
end
disp([y z]);
end
end
But my code is not working, it is showing the result as
1 1
1 1
1 1
Please help me in fixing this
Accepted Answer
More Answers (0)
Categories
Find more on Animation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!