Separating, then conversion to matrix
Posted: 2015-04-06T03:39:47-07:00
Hi folks
I want to make a matrix of ones and zeros out of some red bits of an image, so:
Which give me a file containing lines like this:
This looks promising and I'm ready to do some scripting, but:
a. I'm unsure whether this is a useful format
b. How to interpret the line detail
I'm not used to graphics formats, so this may be a fairly silly question?
Best regards Hugh
I want to make a matrix of ones and zeros out of some red bits of an image, so:
Code: Select all
convert 5446.png -separate -channel Red out.txt
Code: Select all
146,255: (152,152,152) #989898 rgb(152,152,152)
147,255: (210,210,210) #D2D2D2 rgb(210,210,210)
148,255: (175,175,175) #AFAFAF rgb(175,175,175)
149,255: (175,175,175) #AFAFAF rgb(175,175,175)
150,255: (175,175,175) #AFAFAF rgb(175,175,175)
151,255: (175,175,175) #AFAFAF rgb(175,175,175)
152,255: (175,175,175) #AFAFAF rgb(175,175,175)
a. I'm unsure whether this is a useful format
b. How to interpret the line detail
I'm not used to graphics formats, so this may be a fairly silly question?
Best regards Hugh