converting image to zeros and ones

14 次查看(过去 30 天)
Tarik Razak
Tarik Razak 2012-2-3
Hi I have an image 32x32 pixels want to convert it to zeros and ones like the following ...any idea how it can be done easily thanks (Note: I dont know how these binary numbers will show up after posting but it is just a 32x32 matrix of 0s and 1s )
00000000000000000000011100000000
00000000000011111111111111000000
00000000001111111111111111100000
00000000111111111111111111000000
00000000111111111111111111000000
00000000111111111111111111000000
00000000011111111111111111100000
00000000011111100000111111000000
00000000000000000000111111000000
00000000000000000000111111000000
00000000000000000000111111000000
00000000000000000000111111000000
00000000000000000001111100000000
00000000000000000001111100000000
00000000000000000111111000000000
00000000000100011111111000000000
00000000011111111111111100000000
00000000111111111111111100000000
00000001111111111111111110000000
00000011111111111111111110000000
00000011111111111111111100000000
00000001111111111111100000000000
00000000000001111111000000000000
00000000000001111111000000000000
00000000000011111100000000000000
00000000000111111100000000000000
00000000000111111100000000000000
00000000000111111100000000000000
00000000000111111100000000000000
00000000001111111100000000000000
00000000011111111000000000000000
00000000000111100000000000000000

回答(1 个)

Walter Roberson
Walter Roberson 2012-2-3
rgb2gray() and then greythresh()

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by