jit.pix: 1 plane input 4 plane output


    Jan 06 2013 | 4:37 pm
    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:
    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

    • Jan 06 2013 | 11:18 pm
      Update: works correctly with jit.gen
      So, I'd like to understand: is this a jit.pix bug or a feature? I am a bit confused about that.
    • Jan 07 2013 | 2:27 am
      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.
    • Jan 07 2013 | 8:35 am
      Thanks for the explanation. Now I am a happy and aware jit.gen user!