On Wed, 24 Mar 2004, Mathieu Bouchard wrote:
On Wed, 24 Mar 2004, B. Bogart wrote:
I took a look at pix_compare and its close to what pix_mask did but the issue is the threshold. With pix_mask you have 8 bits worth of transparency data, where chroma-key and compare seem to only give you two choices per pixel, image1 or image2. This makes things like video noise really obvious and ugly. It would be great to have pix_mask functionality in*some* form.
I don't understand: why can't you just multiply your image by the (greyscale) matte ?
woops, in case the problem is actually the creation of the matte: the technique I use is that (essentially) I substract a desired colour, I square it and sum, and then the result is the (square of the) distance between the desired colour and the actual colour. Then I substract a threshold, and apply something like tanh() to do a fuzzy comparison, and I renormalise the -1..+1 range to 0..255 range. It gives me nice results.
________________________________________________________________ Mathieu Bouchard http://artengine.ca/matju