how can i perform operations on the basis of image location?
Mostra commenti meno recenti
I have 2 vectors containing x and y location of a point of an image. My actual image size is 1024*1024 and i have extracted nearly 660 points. these points having x and y location of my image. how can i create a new image in which, value 0 occurs at extracted points and 1 at other locations.
Risposta accettata
Più risposte (1)
imene mannou
il 12 Giu 2014
Modificato: Image Analyst
il 12 Giu 2014
result=I;
result(:,:)=1;
for i=1:length(x)
result(x(i),y(i))=0;
end
2 Commenti
Image Analyst
il 12 Giu 2014
imene made a common mistake of thinking that array indices are (x,y). They are not, they are (y,x) because the first index is the row, which is the y value.
Categorie
Scopri di più su Image Arithmetic in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!