Faster alternative to FX with color channels?
Posted: 2019-09-20T14:42:16-07:00
Hi All: a quick and maybe somewhat newbie question (if so, sorry) for you: I'm trying to implement the Dubois method of making color anaglyphs. I've been able to do it using multiple FX commands as follows:
I know it's possible to do this in a single command, but I wanted the intermediate files to gauge progress, because this is *very* slow for any decent-sized image. I see the faster 'evaluate' option, but I don't think I can use it here, unless I do each operation separately, for 18 commands, right? Is there another method that could do this faster than pixel-by-pixel FX? Thanks for any help!
P.S. This is IM 7.0.8-3.
Code: Select all
convert right.jpg left.jpg -channel r -fx '+u.r*.456 + u.g*.5 + u.b*.176 - v.r*.043 - v.g*.088 - v.b*.002' -separate i-r.jpg
convert right.jpg left.jpg -channel g -fx '-u.r*.04 - u.g*.038 - u.b*.016 + v.r*.378 + v.g*.734 - v.b*.018' -separate i-g.jpg
convert right.jpg left.jpg -channel b -fx '-u.r*.015 - u.g*.021 - u.b*.005 - v.r*.072 - v.g*.113 + v.b*1.226' -separate i-b.jpg
convert i-r.jpg i-g.jpg i-b.jpg -gamma 1.5 -channel rgb -combine $1-anad.jpg
P.S. This is IM 7.0.8-3.