Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k4a_image_get_size() returns unexpected values #1976

Open
denniskb opened this issue Apr 19, 2024 · 0 comments
Open

k4a_image_get_size() returns unexpected values #1976

denniskb opened this issue Apr 19, 2024 · 0 comments
Labels
Bug Something isn't working Triage Needed The Issue still needs to be reviewed by Azure Kinect team members.

Comments

@denniskb
Copy link

Expected behavior

k4a_image_get_size() should return:

  • The size in bytes of the JPEG-encoded image, (format==MJPG)
  • k4a_image_get_width_pixels() * k4a_image_get_height_pixels() * 4, (format==BGRA)
  • k4a_image_get_width_pixels() * k4a_image_get_height_pixels() * 2, (format==YUY2)
  • k4a_image_get_width_pixels() * k4a_image_get_height_pixels() * 1.5, (format==NV12)

Observation

Most of the time, the above is true. However, sporadically, k4a_image_get_size() returns a size that is less than the expected quantity for formats YUY2 and NV12. For example, I observed these values for a resolution of 720p and the YUY2 format (every few seconds/every few hundred frames):

cannot reshape array of size 1705140 into shape (720,1280,newaxis)
cannot reshape array of size 1695936 into shape (720,1280,newaxis)
cannot reshape array of size 1815588 into shape (720,1280,newaxis)
cannot reshape array of size 1815588 into shape (720,1280,newaxis)
cannot reshape array of size 1815588 into shape (720,1280,newaxis)
cannot reshape array of size 1705140 into shape (720,1280,newaxis)
cannot reshape array of size 1815588 into shape (720,1280,newaxis)
cannot reshape array of size 1668324 into shape (720,1280,newaxis)
cannot reshape array of size 1815588 into shape (720,1280,newaxis)
cannot reshape array of size 1815588 into shape (720,1280,newaxis)
cannot reshape array of size 1705140 into shape (720,1280,newaxis)
cannot reshape array of size 1815588 into shape (720,1280,newaxis)
cannot reshape array of size 1815588 into shape (720,1280,newaxis)
cannot reshape array of size 1815588 into shape (720,1280,newaxis)
cannot reshape array of size 1705140 into shape (720,1280,newaxis)
cannot reshape array of size 1815588 into shape (720,1280,newaxis)
@denniskb denniskb added Bug Something isn't working Triage Needed The Issue still needs to be reviewed by Azure Kinect team members. labels Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Triage Needed The Issue still needs to be reviewed by Azure Kinect team members.
Projects
None yet
Development

No branches or pull requests

1 participant