Info

This question is closed. Reopen it to edit or answer.

How can I determine some pixels in an Image?

1 view (last 30 days)
bkshn
bkshn on 14 Aug 2015
Closed: MATLAB Answer Bot on 20 Aug 2021
Hello I have code bellow to determine pixles' S on I.
but I have an image that this code didn't code on it and I can't see S in Image I .
I write code and attach image.
function J = seamOverlay(I,S)
J=I;
if (size(S,2)==1)
Y = (1:length(S))';
X = S;
else
[Y,X]=find(S~=0);
end
if ndims(J)==3
J(sub2ind(size(J),Y,X,ones(length(Y),1)*1)) = 255;
J(sub2ind(size(J),Y,X,ones(length(Y),1)*2)) = 0;
J(sub2ind(size(J),Y,X,ones(length(Y),1)*3)) = 0;
else
J(sub2ind(size(J),Y,X))= 1;
end
Could you help me?

Answers (0)

This question is closed.

Tags

Community Treasure Hunt

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

Start Hunting!