How to create a 3d point with RGB color in OpenCV by using c++?

How to create a 3d point with RGB color in OpenCV by using c++?

or how to create a point cloud?

Just like pcl::PointXYZRGB in pcl library, and even for other kinds of 3d point types, like pcl::PointXYZI(I means intensity)

You use viz module in opencv_contrib. A sample histo3D.cpp

OK. Thanks very much