how can I get a list of 1s from a binary image (2d array)

2 次查看(过去 30 天)
Hi, I am using nested for-loops to extract data, e.g. 1s from a binary image. It is really slow.
does anyone know a better way of doing this?
many thanks.

采纳的回答

Walter Roberson
Walter Roberson 2011-7-11
[r,c] = find(YourImage)

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by