Forums > Jitter

threshold chromakey?

Jan 03 2013 | 12:43 pm

Dear All,
I am working on a project. However, I converted the webcam to threshold (cv.jit.threshold) and I want to replace whites on the cam (threshold) with a video (jit.chromakey) but the chromakey did not recognize the whites. When I connect webcam to chromakey directly, it recognizes the colors and everything works fine, but in threshold not…
Note: I used Jitter Chromakey tutorial, but it did not work.
Thanks in Advance

Jan 03 2013 | 1:51 pm

Can you show your patch, please?

Jan 03 2013 | 2:12 pm

At the attachment…
Thank u

  1. kovalski01.maxpat
Jan 03 2013 | 6:00 pm

The problem is in the plane count. When you convert the input matrix with rgb2luma you get a single plane matrix, while outputs a four-plane matrix. You may convert the input matrix and get the jit.chromakey to work, like this:

-- Pasted Max Patch, click to expand. --

or you could use a simpler approach (since you just want to replace whites) and use jit.op instead of jit.chromakey:

-- Pasted Max Patch, click to expand. --

the purpose of thresholding a grayscale image is to generate a binary matrix (values can be only 0 or 1), then you get your mask by multiplying the matrices.

Jan 03 2013 | 6:19 pm

Dear LSka,
Thank you so much for your precious help. Now, I understand my problem. These 2 options have solved my problem. However, I will use the second one, jit.op is better, simple and easier solution.
Thank you so much again

Viewing 5 posts - 1 through 5 (of 5 total)

Forums > Jitter