jit.pix: 1 plane input 4 plane output

Jan 6, 2013 at 4:37pm

jit.pix: 1 plane input 4 plane output

Hello everybody,

I was trying to make some simple “flipping” on images with jit.pix, when I found this little issue that goes beyond my ability to understand it.
Have a look at this patch:

– Pasted Max Patch, click to expand. –

There’s a webcam input, I convert it to a single plane matrix with uyvy2luma and then a jit.pix object flips the x coords.
What happens is that, while the input is a single plane, the output of jit.pix is a 4-plane matrix.
I need a single plane matrix for further use with cv.jit objects and I thought that processing only one plane would be less CPU-expensive, hence the position of jit.pix. So, what am I doing wrong with the jit.pix object? Is there a way to output the correct plane number?
Second question: does this make sense? or elaborating the 4-plane matrix does not make difference in terms of CPU load?

Thank you

#65918
Jan 6, 2013 at 11:18pm

Update: works correctly with jit.gen

– Pasted Max Patch, click to expand. –

So, I’d like to understand: is this a jit.pix bug or a feature? I am a bit confused about that.

#237399
Jan 7, 2013 at 2:27am

jit.pix always outputs a 4 plane matrix since internally it converts input matrices into an RGBA format. For non-4-plane matrix processing, you’ll want to use jit.gen, which seems like what you’ll want in this case.

#237400
Jan 7, 2013 at 8:35am

Thanks for the explanation. Now I am a happy and aware jit.gen user!

#237401

You must be logged in to reply to this topic.