Tone Mapping
The tone mapping setting controls when tone mapping of colors is performed. Tone mapping normalizes the captured color image to the full available output range by applying a gain factor to the colors. Tone mapping setting has two possible values:
HdrOnly
Always
HdrOnly performs tone mapping for multi-acquisition HDR captures but not for single acquisition captures. Always performs tone mapping for all captures.
Note
It is not possible to disable tone mapping for HDR.
For single acquisition captures tone mapping can be used to brighten dark images.
Single capture with Tone Mapping set to HdrOnly |
Single capture with Tone Mapping set to Always |
For multi-acquisition HDR tone mapping is required to map high-dynamic-range colors to the more limited dynamic range output.
HDR with three acquisitions with Tone Mapping set to HdrOnly |
||
First of three HDR acquisitions with Tone Mapping set to HdrOnly |
Second of three HDR acquisitions with Tone Mapping set to HdrOnly |
Third of three HDR acquisitions with Tone Mapping set to HdrOnly |
Check out how to set processing settings with Zivid SDK, including tone mapping:
std::cout << "Configuring processing settings for capture:" << std::endl;
Zivid::Settings settings{
Zivid::Settings::Experimental::Engine::phase,
Zivid::Settings::Processing::Filters::Smoothing::Gaussian::Enabled::yes,
Zivid::Settings::Processing::Filters::Smoothing::Gaussian::Sigma{ 1.5 },
Zivid::Settings::Processing::Filters::Noise::Removal::Enabled::yes,
Zivid::Settings::Processing::Filters::Noise::Removal::Threshold{ 7.0 },
Zivid::Settings::Processing::Filters::Outlier::Removal::Enabled::yes,
Zivid::Settings::Processing::Filters::Outlier::Removal::Threshold{ 5.0 },
Zivid::Settings::Processing::Filters::Reflection::Removal::Enabled::yes,
Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled::yes,
Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength{ 0.4 },
Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled::no,
Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold{ 0.5 },
Zivid::Settings::Processing::Color::Balance::Red{ 1.0 },
Zivid::Settings::Processing::Color::Balance::Green{ 1.0 },
Zivid::Settings::Processing::Color::Balance::Blue{ 1.0 },
Zivid::Settings::Processing::Color::Gamma{ 1.0 },
Zivid::Settings::Processing::Color::Experimental::ToneMapping::Enabled::hdrOnly
};
std::cout << settings.processing() << std::endl;
Console.WriteLine("Configuring processing settings for capture:");
var settings = new Zivid.NET.Settings() {
Experimental = { Engine = Zivid.NET.Settings.ExperimentalGroup.EngineOption.Phase },
Processing = { Filters = { Smoothing = { Gaussian = { Enabled = true, Sigma = 1.5 } },
Noise = { Removal = { Enabled = true, Threshold = 7.0 } },
Outlier = { Removal = { Enabled = true, Threshold = 5.0 } },
Reflection = { Removal = { Enabled = true } },
Experimental = { ContrastDistortion = { Correction = { Enabled = true,
Strength = 0.4 },
Removal = { Enabled = true,
Threshold = 0.5 } } } },
Color = { Balance = { Red = 1.0, Green = 1.0, Blue = 1.0 },
Gamma = 1.0,
Experimental = { ToneMapping = { Enabled =
ToneMappingEnabledOption.HdrOnly } } } }
};
Console.WriteLine(settings.Processing);
print("Configuring processing settings for capture:")
settings = zivid.Settings()
settings.experimental.engine = "phase"
filters = settings.processing.filters
filters.smoothing.gaussian.enabled = True
filters.smoothing.gaussian.sigma = 1.5
filters.noise.removal.enabled = True
filters.noise.removal.threshold = 7.0
filters.outlier.removal.enabled = True
filters.outlier.removal.threshold = 5.0
filters.reflection.removal.enabled = True
filters.experimental.contrast_distortion.correction.enabled = True
filters.experimental.contrast_distortion.correction.strength = 0.4
filters.experimental.contrast_distortion.removal.enabled = False
filters.experimental.contrast_distortion.removal.threshold = 0.5
color = settings.processing.color
color.balance.red = 1.0
color.balance.blue = 1.0
color.balance.green = 1.0
color.gamma = 1.0
settings.processing.color.experimental.tone_mapping.enabled = "hdrOnly"
print(settings.processing)
Version History
SDK |
Changes |
---|---|
2.3.0 |
Tone mapping API is added. |