Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to removes Ir pattern from left imager #6248

Closed
robertxwu opened this issue Apr 16, 2020 · 10 comments
Closed

Unable to removes Ir pattern from left imager #6248

robertxwu opened this issue Apr 16, 2020 · 10 comments

Comments

@robertxwu
Copy link

robertxwu commented Apr 16, 2020

Required Info
Camera Model D415 (sn: 950122060579)
Firmware Version 05.12.03.00
Operating System & Version Windows 10
Kernel Version (Linux Only) N/A
Platform PC
SDK Version v2.33.1
Language N/A
Segment Robot

Issue Description

With RealSense viewer, selecting Remove Ir Pattern had no effect: failed to remove IR patterns from left RGB8 images, as shown below:
RemoveIRPattern

Basically, there was no difference between Default and Remove Ir Pattern presets for the left color infrared images.

All your assistance will be greatly appreciated!

Thanks, Robert

@MartyG-RealSense
Copy link
Collaborator

I ran extensive tests with a D415 using the same settings as you. I tested with both SDK version 2.33.1 and 2.34.0 and confirmed that the IR pattern was not removed when the pattern removal preset was used.

You can though turn the pattern off by selecting the 'Laser' drop down menu option and choosing 'Laser Auto' from the menu.

image

LASER

image

LASER AUTO

image

@robertxwu
Copy link
Author

@MartyG-RealSense thank you for the confirmation and the workaround.
Regarding the Laser Auto option, would you please tell me under what circumstance the laser will be turned on?
Can I do the IR pattern removal on acquired images by myself (i.e. apply some sort of filtering to the acquired images on my PC)? If so, how can I do it?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Apr 16, 2020

The laser will be on if the "Laser Power" setting is '1' or greater. Setting Laser Power to '0' turns it off.

IR pattern removal without the filter is possible on D415 but complicated, involving a 'Color Correction Matrix'. Section 10c of Intel's camera tuning guide (on pages 7 and 8) covers the subject.

https://www.intel.com/content/www/us/en/support/articles/000027833/emerging-technologies/intel-realsense-technology.html

@robertxwu
Copy link
Author

@MartyG-RealSense, I used the following code, it didn't help:
rs2::pipeline pipe;
rs2::config cfg;
cfg.enable_stream(RS2_STREAM_INFRARED, RS2_FORMAT_RGB8, 30);
cfg.enable_stream(RS2_STREAM_DEPTH, 1280, 720, RS2_FORMAT_Z16, 30);

rs2::pipeline_profile profile = pipe.start(cfg);

... // other configurations

rs400::advanced_mode advance(profile.get_device());
STColorCorrection colorCorrect = { 0.520508, 1.99023, 1.50684, -2, -2, -0.0820312, 1.12305, 1.01367, 1.69824, -2, 0.575195, -0.411133 };
advance.set_color_correction(colorCorrect);

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Apr 16, 2020

I believe that color correction changes are done in a visual preset file ('json') and not a program script, as they are Advanced Mode settings.

https://github.com/IntelRealSense/librealsense/wiki/D400-Series-Visual-Presets

An easy way to create a json file is to define settings in the RealSense Viewer and then use the json export button on the toolbar at the top of the Viewer's options side-panel.

@robertxwu
Copy link
Author

@MartyG-RealSense that won't fly, as I described in the issue description.

@MartyG-RealSense
Copy link
Collaborator

If a JSON file does not contain definitions for color correction then the color correction settings will not be changed from the default settings when the JSON is applied.

@agrunnet
Copy link
Contributor

This is indeed a new bug. Thanks for alerting us to this regression in the FW. We will try to fix it.
In the mean time please try this JSON
RemoveIR_For_FW5_12_3_100.zip
It DOES make the RGB image darker. This can be compensated for in SW by multiplying all RGB values by a constant. Alternatively you can manually increase the imager gain (although this may also affect the depth a bit).

@MartyG-RealSense
Copy link
Collaborator

@agrunnet Thanks so much for the information and the JSON!

@MartyG-RealSense
Copy link
Collaborator

Case closed due to no further comments received.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants