Inverse colour

Apr 21, 2006 at 7:04pm

Inverse colour

Hi all,

Just wondering the best way to inverse the colours of a webcam feed coming
out of jit.qt.grab.

Thanks
Jonathan

#25578
Apr 21, 2006 at 7:12pm

jit.op @op ~

~ is the bitwise complement operator meaning that it will take 255 and
make it 0 or for the 8-bit color value 00011100 it will produce
11100011.

best,
wes

#75436
Apr 21, 2006 at 7:25pm

> jit.op @op ~

Yes, that’s probably the fastest, but just for reference of other
ways to handle color processing check out the following.

or
jit.op @op !- @val 1.
or
jit.scalebias @bias 1. @scale -1.
or
jit.charmap

-Joshua

#75437
Apr 21, 2006 at 7:37pm

Thanks Wes for the quick reply, knew it would be something straight forward!

Cheers also Joshua for the pointers. I’ve got a deadline in a few weeks, and
am on a steep learning curve with this stuff…expect a few more newb
questions in the near future! ;-)

Jonathan

#75438

You must be logged in to reply to this topic.