View my account

Depth maps

Comments

5 comments

  • MartyG

    Hi F Ricardo Auto  With RealSense cameras that have front glass, depth is measured from the glass and not at the lenses.  You can subtract 3.7 mm from the depth value to find the ground truth depth value if you wish to but it is usually not necessary to do so.

     

    The D405 camera model is already highly accurate, but if you wish to improve accuracy further then instead of using PNP, you could try setting the High Accuracy camera configuration preset using Python code at the link below.

    https://github.com/IntelRealSense/librealsense/issues/2577#issuecomment-432137634

    0
    Comment actions Permalink
  • F Ricardo Auto

    Hello MartyX Grover, thank you very much for the help...

    About the accuracy of the measurements, the problem was with the intrinsic matrix, I ran the Dynamic Calibrator twice, once on the mobile App pattern and once on a printed one, and the result was the same, but different from the one obtained from the camera using "get_intrinsics()" function. Once the matrix was changed, the results improved!!!

    The results were even better using the High Accuracy you suggested.

    But, we are still having some error at points away from the center of the image, and we would like to know if you think that introducing distortion in the calculations can help to smooth this error... We have the distortion parameters from the calibration:

     

    Thank you very much!!!

    0
    Comment actions Permalink
  • MartyG

    The RealSense depth stream already has a distortion model applied to it, so you should not need to add more distortion.  

     

    A RealSense user at the link below who was using a chessboard tried using OpenCV's cv::undistort function to remove the distortion that had been applied to the data.

    https://github.com/IntelRealSense/librealsense/issues/3880

     

    If you have error at coordinates away from the center of the image though then that sounds like what would happen if you were using depth-color alignment in combination with the GetDistance() command that retrieves the distance of a coordinate in meters.  Is that what your project is doing, please?  If it is then the error can be reduced either by using aligned intrinsics or by using the intrinsics of the stream that you are aligning to - for example, using color intrinsics if you are aligning depth to color.

    0
    Comment actions Permalink
  • F Ricardo Auto

    Hello MartyG

    We are not using alignment, after enable both streams, we take color frame and depth frame and does not apply alignment. Should we do it?? I read a previous post about this and understand that in D405 camera it is not neccesary, am I wrong??

    I select the point coordinates (x,y) from the color frame, and do the deprojection with the value of the depth frame at that point.

    0
    Comment actions Permalink
  • MartyG

    The phenomenon of depth values increasing in error as the coordinates move away from the center should not occur if depth-color alignment is not being performed.

     

    On the D405, depth and color do originate from the same sensor and so have the same field of view and should in theory be perfectly aligned to each other.  However, the RGB image then undergoes further processing in an Image Signal Processor (ISP) chip in the camera hardware to produce the final RGB image.  

     

    Instead of using the RGB image, you could try using the RGB From Left Infrared Sensor image instead.  This is retrieved by using the Infrared stream instead of the RGB stream, but setting its format to BGR8 in instead of infrared Y8.  The left infrared RGB stream will not have undergone processing in the ISP chip.

    0
    Comment actions Permalink

Please sign in to leave a comment.