Transperancy for Point Clouds

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Transperancy for Point Clouds

arb93
I currently have a 3D point cloud in XYZRGB format. Unfortunately, most XYZ
points are "black" with a grayscale value of zero. As a result, the interior
points become invisible. Is there a way to make it so that all points within
the volume are visible? Thank you.



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Transperancy for Point Clouds

Dominique Vaufreydaz
Hello,

> I currently have a 3D point cloud in XYZRGB format. Unfortunately, most XYZ
> points are "black" with a grayscale value of zero. As a result, the interior
> points become invisible. Is there a way to make it so that all points within
> the volume are visible? Thank you.

        By changing their color?

        Best regards. Dominique.
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Transperancy for Point Clouds

arb93
Could you please clarify?

I currently encode the RGBA values into a single uint32 as follows:

def rgb2float(r, g, b, a):
    return (a <<24) + (r<<16) + (g<<8) + b



Is this the way to incorporate transparency?



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Transperancy for Point Clouds

Pooky
Is it invisible to you because the background colour is also black? Are you
using PCLVisualizer?

If so, you could simply change the background colour (its the
"setBackgroundColor" function)

From point_types.hpp:

struct EIGEN_ALIGN16 PointXYZRGB : public _PointXYZRGB
  {
    inline PointXYZRGB (const _PointXYZRGB &p)
    {
      x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
      rgb = p.rgb;
    }

    inline PointXYZRGB ()
    {
      x = y = z = 0.0f;
      data[3] = 1.0f;
      r = g = b = 0;
      a = 255;
    }
    inline PointXYZRGB (uint8_t _r, uint8_t _g, uint8_t _b)
    {
      x = y = z = 0.0f;
      data[3] = 1.0f;
      r = _r;
      g = _g;
      b = _b;
      a = 255;
    }

    friend std::ostream& operator << (std::ostream& os, const PointXYZRGB&
p);
    EIGEN_MAKE_ALIGNED_OPERATOR_NEW
  };

"a" is fixed to 255 so you don't need to worry about transparency.




--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Transperancy for Point Clouds

Pooky
Also forgot to add that if you are using PCLVisualizer, you can use the
following command to set the point colours:

setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_COLOR,
...)





--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Transperancy for Point Clouds

arb93
Thank you for your reply.

I am currently creating a .pcd file and using the default pcl_viewer to view
it.





--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users