Prev: Plot
Next: compile lap.cpp
From: nasim on 28 May 2010 01:06 hi; i want find the top most pixel of binary image and then colorful it. if the coordinate of this pixel be [i j] then the plot of this point is differnt of top pixel i use this code I=imread(path); image = im2bw(I,1); left=[0 0]; top=[0 0]; right=[0 0]; bottom=[0 0]; [row col]=size(image); for i=1:row for j=1:col if( image(i,j)==0 ) left=[i j]; break; end end if( top ~= [0 0]) break; end end imshow(image); hold on; plot( top(1),top(2) ,'r*');
|
Pages: 1 Prev: Plot Next: compile lap.cpp |