Pure contrast inversion
I have taken the image feed from the camera and turned it black and white using jit.rgb2luma and jit.op @op > @val 30.
However, I now need to use the opposite values, so I need to flip the black and white around. What is easiest and most efficient way of doing this?
I have tried jit.brcosa and looked at couple other methods, but the inverted image isn’t perfect >> the white isn’t as white..it is grainy with bits of black mixed, which wasnt present before the inversion. My entire patch depends on this being pure.
Can anyone suggest a better way of achieving this?
you’ll want to keep playing with the jit.op operations..think of your values as being 0 to 255 but you need a math operation or two to make that go the other way
you can also play with jit.scalebias and using negative numbers to get the inverse
Is there no object that just flips exactly what is shown?
----------begin_max5_patcher---------- 498.3oc0VF0SCBCDG+Y3SQsOOMzNJv7Ay7ygwXJPcqFnk.E2Tie2ss.yM0M6 z4x7A3Rud25+6201wK9dvT4RVCDbI3Ffm2K9ddVWFGd8i8fkzkYEzFaXvG3p KpVvE4xEvQcyKZK4hBlxF.5cmxV0fWbu2NWpmpXcqIDNR+.tse5pZVCSnnJt TbWMKS0EEBgtHXD.ESLlf9WumEUkMmKlsVF3fjtLhLlDaJQqmCO2VMxzGNeB z35UeeyqQNhAAagN2ABnXKUqnirBLU+b14foORK.XB4KA0.RtWJTBZoEHvqq 4zB39gP8ZdWIUUyWtILM+vM7msggvZB7szhfslwVbg2BtR9I35ucWymqHDB6 b+O9uo+eUW6ebvod2efU3fNy3c08iNvvpdVJtnsjtycEmNPZhc+T7NQD4mfn zVkRJ1iyFnsUqoTwLWNaDlLTDauTBOfc6BIM2psCQm1wpeu6u3vgaJ1NTvG3 i.BIugABAYyo0.TjVn+SNLD2euAZWzBsNsrA.K3hO9MG1Ew3eSD1HaqyFzc2 0O5+5e0xjyZTbg8qEVKljMhYNOOmYmdnfJ44URtP0KAi9I5xHjXLXT7pQfa+ xFsqZMwAsNY+z5uTQtPu3iphBcPQniphPNnHxQUQDGTTzQUQXGTT3uPQ5Au5 +FPhcj98 -----------end_max5_patcher-----------
Awesome cheers Christopher!