Color Inconsistency from HDR
Problem
The color image from the multi-acquisition HDR capture is a result of tone mapping if Color Mode is set to ToneMapping or Automatic (default). While tone mapping solves the challenging problem of optimizing the color for that particular capture, it has a downside. Since it is a function of the scene, the tone mapping technique introduces color inconsistency with changes in the scene. The following example explains this phenomenon.
상대적으로 어두운 장면(검은 표면에 배)이 있다고 가정해 보겠습니다. 충분히 넓은 다이내믹 레인지를 포괄하는 획득 설정을 찾고 다중 획득 HDR 캡처를 수행합니다(왼쪽 그림). 그런 다음 장면에 밝은 개체(바나나)를 추가하고 동일한 설정으로 다시 캡처합니다(오른쪽 그림).
HDR capture of a dark scene (Color Mode: Automatic or ToneMapping) |
HDR capture with the same settings of the same scene but with an additional bright object added |
캡처한 컬러 이미지(오른쪽 그림)에서 특히 처음에 장면의 어두운 개체(배 또는 검은색 표면)를 살펴보겠습니다. 장면에 밝은 개체(바나나)를 추가하기 전과 후를 비교할 때 개체의 RGB 값이 다릅니다.
RGB 값의 변경은 색상 정보를 기반으로 개체를 분류하는 알고리즘을 사용하는 응용 프로그램과 같은 일부 응용 프로그램에서 문제가 될 수 있습니다. 그 이유는 이러한 알고리즘이 반복된 캡처에 대해 RGB 값이 동일하게(일관적으로) 유지될 것으로 예상하기 때문입니다.
Solutions
Configure 2D capture settings independently
If you encounter issues with color inconsistency from HDR, it is likely because you have not configured Settings::Color
(added in SDK 2.14).
Under these conditions, the Zivid software generates both the point cloud and the color image from the same multi-acquisition HDR capture.
To resolve color inconsistencies from HDR, consider the following.
First, configure 2D acquisition settings using Settings::Color
.
We recommend starting with the 2D Presets.
If further adjustments are needed, check Optimizing Color Image.
팁
You can load your old YML file in Zivid Studio, configure 2D settings, and export the settings to a YML file.
- Separate 2D and 3D captures
Use
capture2D()
for 2D captures.Use
capture3D()
for 3D captures.팁
You can use the same YML file / settings object for these two capture APIs.
- Combined 2D and 3D capture
Use
capture2D3D()
to perform a single operation that combines 2D and 3D captures.
Independently configured 2D settings of a dark scene |
Same settings with an additional bright object added to the scene |
If you must use the deprecated camera.capture()
API, ensure that 2D acquisition settings are explicitly configured using Settings::Color
.
This ensures the color image is generated based on the specified 2D acquisition settings.
These solutions require Zivid SDK 2.14 or later. If you must use an older SDK version, check the next solution.
HDR capture with UseFirstAcquisition Color Mode
HDR의 색상 불일치를 극복하려면 HDR 캡처에서 얻은 획득 중 어떤 것이 가장 좋은 색상을 제공하는지 식별하십시오. saturation를 피하기 위해 장면에서 가장 밝은 물체에 최적화된 획득을 권장합니다. 그런 다음 해당 수집을 수집 설정에서 첫 번째로 설정합니다. 마지막으로 색상 모드를 UseFirstAcquisition으로 설정하여 HDR을 캡처합니다.
We will walk you through the process with an example. Let us assume that we have an HDR with two acquisitions. The first acquisition is optimized for dark objects (pears), and the second is optimized for bright objects (bananas). HDR capture with UseFirstAcquisition for Color Mode yields the following results.
HDR capture of a dark scene (Color Mode: UseFirstAcquisition) |
HDR capture with the same settings of the same scene but with an additional bright object added |
어두운 물체(배)의 색상은 두 이미지에서 동일합니다. 색상 일관성이 유지됩니다.
However, because the first acquisition is optimized for dark objects, the brightest object in the scene (the banana) is saturated. Saturation will likely cause issues if we want to classify objects based on color. To overcome this problem, we can rearrange the acquisition settings. For the first acquisition, we select the one optimized for the brightest object in the scene (banana). The second is optimized for the dark objects (pears). We see that the color consistency is preserved with bright and dark objects captured together and separately. In addition, the brightest object (banana) is not saturated.
HDR capture of a dark scene (Color Mode: UseFirstAcquisition) |
HDR capture with the same settings of the same scene but with an additional bright object added |
HDR capture with the same settings of the same scene but only with the bright object |
참고
The acquisition that provides the best color is an excellent acquisition. It is optimized for the brightest objects in the scene and thus also provides very good SNR for those objects. To deal with color inconsistency in HDR, an additional acquisition is not needed; that acquisition is likely already part of your HDR acquisition settings.
If the color image is too dark, it can be fixed with the Gamma setting.
조심
The first of the acquisitions the Capture Assistant returns is likely not the most suitable one for the color image. Therefore, you might need to rearrange your acquisitions if you use the Capture Assistant and UseFirstAcquisition for Color Mode.
힌트
지비드 스튜디오에서 … → Move to top 을 클릭하여 해당 획득을 시퀀스에서 맨 위로 옮깁니다.
Additional Capture
참고
This solution should be used only if you have to use Automatic or ToneMapping Color Mode for your HDR capture.
An alternative solution to overcome the color inconsistency from HDR is to take a separate capture in addition to the main capture. This approach assumes using the main capture to get the point cloud data and the additional capture to get the color image. The additional capture can be a 2D or 3D capture. If you use 3D capture, it must be without tone mapping (the Color Mode setting must be set to UseFirstAcquisition).
Single acquisition capture of a dark scene with Color Mode set to UseFirstAcquisition or Automatic |
Single acquisition capture with the same settings of the same scene but with an additional bright object added (Color Mode set to UseFirstAcquisition or Automatic) |