Hi,

So I saw the Depth Crop Control example and I was working on it to update it to crop control using the ISP image.

However I get the following output image

  1. I am getting that strange image area below the cropped region as you can see. Why is that happening any idea?
  2. I understand that ISP outputs YUV420 planar image. When I am printing the shape of the output cropped ISP image from the ImageManip node it says its (2736, 2434). Does this mean its a single channel image like a grayscale image? When I print the shape of an RGB frame I do see 3 channels in the shape as (3, W, H).

I look forward to hearing from you soon. Thanks in advance.

Thanks & Regards
Yishu

@yishu_corpex

  1. Can you add some minimal reproducible code? It's hard to say what is going on here.
  2. The YUV420 is stored as an array of first Y (luma) values and then subsampled U and V (chroma) values. It doesn't have channels. If you do a getData() on 1080p image you will see it has a size of 2,073,600 (1920*1080 Y) + 518,400 (540*960 U) + 518,400 (540*960 V) = 3,110,400 pixels. It's all in a single channel. The shape of that would be (1620, 1920).
    When converting to BGR via getCvFrame() the U and V layers are upsampled to Y dimensions and combined together to form BGR (3 channel data).

Thanks,
Jaka