PointCloudLibrary / PointCloudLibrary/pcl

OniGrabber wrongly assumes image data is RGB

Open
#683 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue kind: todo module: io needs: author reply
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

In openni_device_oni.cpp:

boost::shared_ptr<openni_wrapper::Image> 
openni_wrapper::DeviceONI::getCurrentImage(boost::shared_ptr<xn::ImageMetaData> image_meta_data) const throw ()
{
  return (boost::shared_ptr<openni_wrapper::Image> (new openni_wrapper::ImageRGB24 (image_meta_data)));
}

This leads to weirdly corrupted images when .oni files that have a different encoding are played back in pcl_openni_viewer or when using the -oni switch in kinfu_app.

The openni_wrapper::DeviceONI::DeviceONI constructor should check the XnPixelFormat returned by image_generator_.GetPixelFormat() and pick the correct Image type, or at least throw an error if that's not RGB instead of wrongly interpreting the data.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in openni_device_oni.cpp, reviewing DeviceONI::DeviceONI, getCurrentImage, and the Image types used by the wrapper. Check the XnPixelFormat returned by image_generator_.GetPixelFormat() and trace playback through pcl_openni_viewer or the -oni path in kinfu_app. Done means non-RGB .oni data is handled with the correct Image type or rejected explicitly without corrupted images.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-vision
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.