MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Asked by Zuraidasahana Zulkarnain
on 4 Feb 2013

I have done few process on my image and got stuck here. So far,this is the result that i got: http://s20.postimage.org/5dg34043h/Pra_processing.png. For now, all i need is to find the first white pixel in that image and do some mark on it. We'll start at the bottom right corner of the grid, scan each column of pixels from the bottom going upwards-starting from the rightmost column and proceeding to the left-until we encounter a first white pixel. We'll declare that pixel as our "start" pixel.

Answer by Image Analyst
on 4 Feb 2013

Edited by Image Analyst
on 4 Feb 2013

Accepted answer

[row, column] = find(yourImage, 1, 'last');

Answer by Ainul
on 4 Feb 2013

Hello guys..

I've got the same problem here and already use [row, column] = find(yourImage, 1, 'last'); but the result isn't show how it suppose to be..

Here is my code (from top left):

[row, column] = find(edge_s, 1, 'first'); hold on; plot(row,column,'r.', 'MarkerSize',5,'LineWidth',5);

**Result**: Its being marked with red dot but the position isn't right. <http://postimage.org/image/okchtrlb5/>
Do you have any idea?

## 0 Comments