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

fix alpha channel #1090

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions io/src/openni_grabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ pcl::OpenNIGrabber::convertToXYZRGBPointCloud (const boost::shared_ptr<openni_wr
PointT pt;
pt.x = pt.y = pt.z = bad_point;
pt.b = pt.g = pt.r = 0;
pt.a = 255; // point has no color info -> alpha = max => transparent
pt.a = 0; // point has no color info -> alpha = min => transparent
cloud->points.assign (cloud->points.size (), pt);
}

Expand Down Expand Up @@ -723,7 +723,7 @@ pcl::OpenNIGrabber::convertToXYZRGBPointCloud (const boost::shared_ptr<openni_wr
value_idx = 0;
point_idx = 0;
RGBValue color;
color.Alpha = 0;
color.Alpha = 255;

for (unsigned yIdx = 0; yIdx < image_height_; ++yIdx, point_idx += skip)
{
Expand Down