Thanks, there was some extra confusion, because I didn't realise that the image was 'small' [256x 256], so now I can read the first column as x,y [? I hope!] coordinates and the rest as 'colour'.
My ugly way of doing this is currently:
#!/usr/bin/perl -w
# convert separated channel into array ...
Search found 2 matches
- 2015-04-07T01:55:49-07:00
- Forum: Users
- Topic: Separating, then conversion to matrix
- Replies: 2
- Views: 1332
- 2015-04-06T03:39:47-07:00
- Forum: Users
- Topic: Separating, then conversion to matrix
- Replies: 2
- Views: 1332
Separating, then conversion to matrix
Hi folks
I want to make a matrix of ones and zeros out of some red bits of an image, so:
convert 5446.png -separate -channel Red out.txt
Which give me a file containing lines like this:
146,255: (152,152,152) #989898 rgb(152,152,152)
147,255: (210,210,210) #D2D2D2 rgb(210,210,210)
148,255 ...
I want to make a matrix of ones and zeros out of some red bits of an image, so:
convert 5446.png -separate -channel Red out.txt
Which give me a file containing lines like this:
146,255: (152,152,152) #989898 rgb(152,152,152)
147,255: (210,210,210) #D2D2D2 rgb(210,210,210)
148,255 ...