IntelRealSense / librealsense

Intel® RealSense™ SDK
https://www.intelrealsense.com/
Apache License 2.0
7.63k stars 4.83k forks source link

Can I use official tools to align an infrared camera and an RGB camera under Windows? #13448

Closed yywjacson closed 1 week ago

yywjacson commented 1 month ago

Can I use official tools to align an infrared camera and an RGB camera under Windows?


Required Info
Camera Model { R200 / F200 / SR300 / ZR300 / D400 }
Firmware Version (Open RealSense Viewer --> Click info)
Operating System & Version {Win (8.1/10) / Linux (Ubuntu 14/16/17) / MacOS
Kernel Version (Linux Only) (e.g. 4.14.13)
Platform PC/Raspberry Pi/ NVIDIA Jetson / etc..
SDK Version { legacy / 2.<?>.<?> }
Language {C/C#/labview/nodejs/opencv/pcl/python/unity }
Segment {Robot/Smartphone/VR/AR/others }

Issue Description

<Describe your issue / question / feature request / etc..>

MartyG-RealSense commented 1 month ago

Hi @yywjacson When aligning, one of the two streams must be depth, such as depth-RGB or depth-infrared.

https://github.com/IntelRealSense/librealsense/issues/5093 has an example of a Python script that works around this problem by aligning all three streams.

Another RealSense user did a similar workaround in C++ at https://github.com/IntelRealSense/librealsense/issues/5963#issuecomment-638403524

yywjacson commented 1 month ago

I understand what you mean. If we align depth and RGB, can we only open one infrared camera and one RGB camera, and these two cameras are aligned? I need two aligned cameras for multimodal tasks. ---- Replied Message ---- From @.> Date 10/22/2024 00:35 To @.> Cc @.>@.> Subject Re: [IntelRealSense/librealsense] Can I use official tools to align an infrared camera and an RGB camera under Windows? (Issue #13448) Hi @yywjacson When aligning, one of the two streams must be depth, such as depth-RGB or depth-infrared.

5093 has an example of a Python script that works around this problem by aligning all three streams.

Another RealSense user did a similar workaround in C++ at #5963 (comment) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

yywjacson commented 1 month ago

May I ask if this method is possible? Thank you very much for your answer! ---- Replied Message ---- From @.> Date 10/22/2024 00:35 To @.> Cc @.>@.> Subject Re: [IntelRealSense/librealsense] Can I use official tools to align an infrared camera and an RGB camera under Windows? (Issue #13448) Hi @yywjacson When aligning, one of the two streams must be depth, such as depth-RGB or depth-infrared.

5093 has an example of a Python script that works around this problem by aligning all three streams.

Another RealSense user did a similar workaround in C++ at #5963 (comment) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

MartyG-RealSense commented 1 month ago

On the D405 camera model, infrared and RGB originate from the same sensor, which greatly aids alignment of them (D405 does not have a separate RGB sensor and provides RGB from the left infrared sensor instead).

image

If you do not have a D405 camera and are unable to change your camera to that model then You would have to use one of the 'three streams enabled' methods above to align infrared and RGB, or follow an additional suggestion at https://github.com/IntelRealSense/librealsense/issues/1556#issuecomment-389061477

yywjacson commented 1 month ago

On the D405 camera model, infrared and RGB originate from the same sensor, which greatly aids alignment of them (D405 does not have a separate RGB sensor and provides RGB from the left infrared sensor instead).

image

If you do not have a D405 camera and are unable to change your camera to that model then You would have to use one of the 'three streams enabled' methods above to align infrared and RGB, or follow an additional suggestion at #1556 (comment)

Thanks for the advice! I refer to the manual of the D405. If it can be aligned, the D405 should be usable! But I still have a question. My tasks may involve infrared and RGB shooting at longer distances. The D405 official document gives the optimal working distance of the depth camera as 7-50cm. If this distance is exceeded, the depth camera will Accuracy will decrease. But if I only use infrared photography and RGB camera to take pictures, I just need to ensure that the two cameras are calibrated and their fields of view are the same, can the working distance be longer?

MartyG-RealSense commented 1 month ago

Range related accuracy restrictions only apply to the depth image. RGB and infrared can see much further without problems.

To demonstrate this, I captured an RGB and infrared image of a view down the street outside of my window with a D405. You can see that the viewpoint of the two images matches.

image

yywjacson commented 4 weeks ago

Range related accuracy restrictions only apply to the depth image. RGB and infrared can see much further without problems.

To demonstrate this, I captured an RGB and infrared image of a view down the street outside of my window with a D405. You can see that the viewpoint of the two images matches.

image

Thinks!

MartyG-RealSense commented 3 weeks ago

Hi @yywjacson Do you require further assistance with this case, please? Thanks!

MartyG-RealSense commented 1 week ago

Case closed due to no further comments received.