Info

此问题已关闭。 请重新打开它进行编辑或回答。

How can I determine some pixels in an Image?

1 次查看(过去 30 天)
bkshn
bkshn 2015-8-14
关闭: MATLAB Answer Bot 2021-8-20
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?

回答(0 个)

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by