Page 1 of 1
Gray anaglyph
Posted: 2016-07-02T05:06:34-07:00
by tksharpless
I want to convert RGB stereo pairs to gray anaglyph.
composite -stereo needs rgb images, so I need to convert color RGB to gray RGB. How?
Re: Gray anaglyph
Posted: 2016-07-02T10:54:31-07:00
by fmw42
In IM 6, grayscale images should still work, since IM replicates the gray image 3 times. Internally to IM, grayscale images have 3 channels. But I do not know if -stereo will work properly on 3 equal grayscale channels, since I have not tested that. So go ahead and try it.
Re: Gray anaglyph
Posted: 2016-07-02T13:42:28-07:00
by tksharpless
Thanks much. Yes,
composite -stereo 0 rgt.jpg -colorspace gray lft.jpg -colorspace gray anagg.jpg
works "like Magick".
Re: Gray anaglyph
Posted: 2016-07-02T14:34:21-07:00
by fmw42
If the images are already grayscale, then you do not need -colorspace gray. This should work in IM 6. It won't work in IM 7, since in IM 7 grayscale images are single channel. So you would have to -combine 3 copies of the grayscale image to format as RGB.
Code: Select all
composite -stereo 0 rgt.jpg lft.jpg anagg.jpg
Re: Gray anaglyph
Posted: 2016-07-03T19:58:13-07:00
by tksharpless
The images are rgb to begin with. But gray anaglyph is usually better for checking stereo alignment.
Re: Gray anaglyph
Posted: 2016-07-03T20:03:08-07:00
by tksharpless
Ideally, the -stereo operator should automatically convert a single channel image to 3 channel.