• DepthAI
  • disparity_lr_check_iteration1/2 getData() format

Hi @erik
I tried to use -debug option to run stereo_depth_from_host.py and try to see the lrcheck=data.getData().
It seems that lrcheck has 2 elements for each pixel: for example if an image.shape = (h,w), then the lrcheck.shape = (h,w,2).
Could you provide definition for those 2 elements for each pixel in lrcheck?

For example: image.shape => (540,960)
after line #707 data = q.get()

lrcheck = data.getData()
lrcheck.shape = (1036800,)
lrcheck=lrcheck.reshape((540,960,2))
print(lrcheck[145,119])

then I will get:

array([154,   1], dtype=uint8)

Thank you for your help.

    ynjiun

    If you have subpixel mode enables then each pixel is 2 bytes. (Uint16). If subpixel is disabled then it's uint8. You can check the image frame metadata which carries these information. (Width, height, bytes per pixel, data format etc)