How to mark the (last row,this column) of finding the highest white pixels through each column.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/149732/image.png)
the code for find the white pixels through each column,and mark into the point.
true
BWImage=imread('BWImage.png');
>> row=find(sum(BWImage,2)==0,1,'last')+1;
col=find(BWImage(row,:)~=0);
row=row*ones(size(col));
Points=[row(:) col(:)];
imshow(BWImage)
hold on
plot(Points(:,2),Points(:,1),'rs','MarkerSize',10)
how to mark both point of the row found and lastRow,this Column?(both red and green mark)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/149733/image.png)
2 Kommentare
Image Analyst
am 3 Mai 2015
Where are the green marks? If they're not at the very last row, then where are they?
Antworten (1)
Image Analyst
am 3 Mai 2015
First get the size of your binary image:
[rows, columns] = size(binaryImage);
The last row is the value in "rows".
8 Kommentare
Siehe auch
Kategorien
Mehr zu Get Started with Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!