C57 Series - Colored Texture

General Information

  • Product: e.g. C57-6-M
  • Serial Number: 232206
  • Ensenso SDK Version: 4.0.1502
  • Operating System: Windows

Problem / Question

I used this code to get the texture to my PointMap.
With the new B Series, i get the pointcloud with color informations.
With the C Series, i only get the gray scal texture. I noticed, that there are 2 cameras, the C57 without color and a color one.
I managed to get the rectifiedTexture from the color camera.
The problem now is the different size:
PointMap: 2472x2064
Color Texture: 1920x1200

How can i overlay those both images? Is there any transformation for that?

Best regards,
Markus

For texture images from a separate camera (as it is the case for the C-series) you can use the RenderPointMap command to transform the point cloud to the point of view of the color camera.

There are two separate guides on the topic:

Ok, but if i use the RenderPointMap command, my pointcloud size will be lower and i did not have the whole field off view.

In the documentation at the bottom " For more advanced usages, you can project 3D positions (e.g. from a stereo camera’s pointmap to the (undistorted) mono camera image.
Is there any example code for that in C++?

Thanks!

Yes, RenderPointMap will reduce the number of points to the resolution of the color camera and only includes the points which are visible from the color camera. The latter shouldn’t be a problem for your case, since the color sensor of the C-series has a larger field of view than the stereo sensors.

If you want to process the original point cloud and then map resulting 3D features onto the color texture you can use the ProjectPoints command. The guide should probably be updated here, since this command is much easier than the manual matrix multiplications mentioned there. Note that this does not take into account cases where the point cloud could shadow itself from the perspective of the color camera.

Ok thanks, so i will use the RenderPointMap.

If i set my camera as parameter i will get a “ExecutionFailed” exception.
If i call the command without a camera parameter, it only generates a 1024.768 pixel size pirture.

Is there any parameter or a call before that i am missing?

You want to specify Camera as described in the guide. Without Camera, RenderPointMap does a telecentric rendering where the resolution is specified as a parameter.

Before RenderPointMap you have to run ComputeDisparityMap for the stereo camera and RectifyImages for the color camera. See the overview on the different types of data and the commands computing them.

For ExecutionFailed error codes from the C API you have to read the actual error message from the JSON tree. See the example in the guide on error handling.

Ok thank you for your quick support, its working now!