Please enable JavaScript to view this site.

IDS peak 2.10.0 / uEye+ firmware 3.34

IDS Peak comfortSDK, genericSDK, IPL, and AFL developer manuals are external documents. Please contact us if you need them.

The adaptive hot pixel correction can detect and correct hot pixels dynamically while the application is running. The method is "adaptive" because the pixel values are effectively adjusted to match surrounding pixels in terms of direction and intensity.

hint_info

Note the following hints for adaptive hot pixel correction:

The adaptive hot pixel correction is performed on the host.

The adaptive hot pixel correction can only be used with RAW pixel formats.

Image pre-processing steps in the camera have an effect on hot pixel correction.

Subsequent image processing steps on the host, e.g. debayering, color correction, etc., do not have an effect on hot pixel correction.

For example, if you flip the image in the camera (ReverseX/ReverseY) , you must redetect the hot pixel list afterwards.

Creating an object for hot pixel correction

genericC++

peak::ipl::HotpixelCorrection m_hotpixelCorrection;

Querying or setting the sensitivity

The sensitivity can be set in 5 levels (SensitivityLevel1 ... SensitivityLevel5), where 1 is the least sensitive and 5 is the most sensitive to search for hot pixels in the image.

genericC++

// Get current sensitivity level
auto currentSensitivity = m_hotpixelCorrection.Sensitivity();
 
// Set level to "1"
m_hotpixelCorrection.SetSensitivity(peak::ipl::HotpixelCorrection::SensitivityLevel::SensitivityLevel1);

Querying or setting the gain factor

The currently set gain must be passed to the hot pixel correction so that this value is taken into account by the correction. The analog master gain is used here.

genericC++

// Get current gain factor
auto currentGainFactor = m_hotpixelCorrection.GainFactorPercent();
 
m_nodemapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("GainSelector")->SetCurrentEntry("AnalogAll");
auto gain = m_nodemapRemoteDevice->FindNode<peak::core::nodes::FloatNode>("Gain")->Value();
auto gain_percent = static_cast<uint32_t>(gain * 100);
m_hotpixelCorrection.SetGainFactorPercent(gain_percent);

Detecting hot pixels in an image

The "Detect()" function dynamically finds hot pixels in the specified peak::ipl::Image and returns them in a vector. You do not have to perform the detection on every image. It makes sense to proceed as follows:

1.Set the camera parameters for the desired environmental scenario.

2.Determine the hot pixel vector once using a homogeneous surface.

3.Hot pixel correction is applied to each newly received image.

genericC++

auto hotpixelVector = m_hotpixelCorrection.Detect(image);

Correcting the hot pixels in an image

genericC++

// Correct image and return new image
auto imageCorrected = m_hotpixelCorrection.Correct(image, hotpixelVector);
 
// Alternative: Correct into the same image
image = m_hotpixelCorrection.Correct(image, hotpixelVector);

Complete example: image acquisition with hot pixel detection and correction

© 2024 IDS Imaging Development Systems GmbH