- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use R200 camera with librealsense and PCL 1.8.0 on UP Board with Lubuntu 16.04.3 LTS. I fill the point cloud with points from the camera with following code (how do I do code formatting here?):
int main() {
pcl::PointCloud::Ptr cloud(new pcl::PointCloud(DEPTH_IMG_WIDTH, DEPTH_IMG_HEIGHT));
//RealSense init
rs::log_to_console(rs::log_severity::warn);
//rs::log_to_file(rs::log_severity::debug, "librealsense.log");
// Create a context object. This object owns the handles to all connected realsense devices.
rs::context ctx;
printf("There are %d connected RealSense devices.\n", ctx.get_device_count());
if (ctx.get_device_count() == 0) return EXIT_FAILURE;
rs::device *dev = ctx.get_device(0);
printf("\nUsing device 0, an %s\n", dev->get_name());
printf(" Serial number: %s\n", dev->get_serial());
printf(" Firmware version: %s\n", dev->get_firmware_version());
dev->enable_stream(rs::stream::depth, DEPTH_IMG_WIDTH, DEPTH_IMG_HEIGHT, rs::format::z16, 60);
dev->start();
while (true) {
dev->wait_for_frames();
const uint16_t *depthImage = (const uint16_t *) dev->get_frame_data(rs::stream::depth);
rs::intrinsics depthIntrin = dev->get_stream_intrinsics(rs::stream::depth);
float scale = dev->get_depth_scale();
int dw = depthIntrin.width;
int dh = depthIntrin.height;
int dwh = dw * dh;
// Set up the clouds to be used
cloud->clear();
cloud->width = DEPTH_IMG_WIDTH;
cloud->height = DEPTH_IMG_HEIGHT;
cloud->resize(dwh);
cloud->is_dense = false;
for (int dy = 0; dy < dh; dy++) {
for (int dx = 0; dx < dw; dx++) {
uint16_t depthValue = depthImage[dy * depthIntrin.width + dx];
float depth_in_meters = depthValue * scale;
if (depthValue == 0) continue;
rs::float2 depthPixel = {(float) dx, (float) dy};
rs::float3 depthPoint = depthIntrin.deproject(depthPixel, depth_in_meters);
cloud->points[dy * dw + dx] = pcl::PointXYZ(depthPoint.x, depthPoint.y,
depthPoint.z);
}
}
//Visualization and PCL processing...
}
}
Flat surfaces on the point cloud I get are "wavy":
When I try to run camera calibrator on windows, I get "INVALID_DS_ARG" error, even windows reinstall doesn't help.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello GreFtoD,
Thanks for contacting Intel customer support. We are investigating on your issue. As soon as we have anew update we will let you know.
Best Regards,
Juan N.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you! Contact me if you need any further information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello GreFtoD,
I apologize for the delay in this issue, we were reproducing your issue to find if there was a problem directly with the camera.
In this case the noise comes from the code you posted, not directly from your camera been not calibrated.
To be sure, can you please tell me what version of calibrator app you installed?
Also please provide me the Version for your DCM and Windows 10 version and build number.
This will helps us confirm the root cause of the issue.
Best regards,
Juan N.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello GreFtoD,
I have been discussing your case with engineering.
After a long discussion there is a probability that your camera is uncalibrated. If you calibrate your camera the wavy noise might go away.
What calibration app are you using?
Do you have a screenshot of the calibrator error?
I will be waiting for your feedback to continue to investigate your issue.
Best Regards,
Juan N.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I installed older version of Windows 10 (1607, I think) and the calibrator worked. Although it said that my camera 'is perfect fit' but I calibrated it anyway and it didn't help. What do you mean? Is it actually from my code or because of the camera?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That calibrator error is a very rare one that usually occurs with exotic Windows hardware such as tablets with a pen touch interface. The unusual hardware was incompatible with the calibrator app.
In those cases, it turned out that calibration was unnecessary because the R200 camera in those tablets was already well calibrated. For those who wanted to be able to run the calibrator app, the fix was to uninstall the R200 DCM, which was the main cause of the incompatibility with the tablet hardware. It doesn't sound like you need to do that though as you got the app to work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello GreFtoD,
Have you tried other examples in librealsense that use depth to see how your R200 performs? Please try cpp-tutorial-3-pointcloud.cpp, cpp-config-ui.cpp, cpp-tutorial-1-depth.cpp, etc to see if you get similar results. If these examples show similar results then your camera needs calibration.
If the problem is not fixed with the Camera Calibrator 1.0.8 then the camera is faulty.
This paper may be of interest to you, https://arxiv.org/pdf/1705.05548. It discusses algorithm performance and noise in the R200 camera.
Regards,
Jesus
Intel Customer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I calibrated the camera with the Camera Calibrator 1.0.8, but both cpp-tutorial-3-pointcloud and my own program still show noisy point cloud.
Here is the output when I run the pointcloud tutorial in terminal:
There are 1 connected RealSense devices.
Using device 0, an Intel RealSense R200
Serial number: 2511009058
Firmware version: 1.0.72.10
rs.warn: Subdevice 1 bad magic number 0x0
rs.warn: Subdevice 1 bad magic number 0x0
rs.warn: Subdevice 1 bad magic number 0x0
rs.warn: Subdevice 1 bad magic number 0x0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello GreFtoD,
You may have an unpatched uvcvideo driver. Please follow the instructions at https://github.com/IntelRealSense/librealsense/blob/legacy/doc/installation.md.
Regards,
Jesus G.
Intel Customer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried reinstalling the uvcvideo driver using the script provided in librealsense, although it didn't solve the problem with noise and the warnings did disappear. Additionall I compiled librealsense on my windows laptop (that one that I calibrated the camera on) and the point cloud is also noisy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello GreFtoD,
Please give us more environment details. How far away from the surface is the camera? What is the surface material? Can you attach an RGB pic of the surface? How much lighting is there?
Do you get this noise with other surfaces? Non-flat?
Regards,
Jesus
Intel Customer Support
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page