threshold chromakey?

Jan 3, 2013 at 12:43pm

threshold chromakey?

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
Best

#65895
Jan 3, 2013 at 1:51pm

Can you show your patch, please?

#237314
Jan 3, 2013 at 2:12pm

At the attachment…
Thank u

Attachments:
  1. kovalski01.maxpat
#237315
Jan 3, 2013 at 6:00pm

The problem is in the plane count. When you convert the input matrix with rgb2luma you get a single plane matrix, while jit.qt.movie 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.

#237316
Jan 3, 2013 at 6:19pm

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
Best

#237317

You must be logged in to reply to this topic.