15#include <peak_icv_c/algorithms/hdr/peak_icv_hdr.h>
126 void Calibrate(
const std::vector<Image>& images)
const;
151 PEAK_COMMON_NO_DISCARD
Image Process(
const std::vector<Image>& image)
const;
154 friend peak::common::detail::BackendAccessor<HDR>;
158 peak_icv_hdr_handle m_handle{};
164 return PEAK_ICV_C_ABI_PREFIX peak_icv_HDR_Create(&m_handle);
170 if (m_handle !=
nullptr)
172 std::ignore = PEAK_ICV_C_ABI_PREFIX peak_icv_HDR_Destroy(m_handle);
178 peak_icv_hdr_algorithm algorithm;
181 return PEAK_ICV_C_ABI_PREFIX peak_icv_HDR_GetAlgorithm(m_handle, &algorithm);
194 if (images.size() == 0)
199 std::vector<peak_icv_image_handle> imageHandles;
200 imageHandles.reserve(images.size());
201 std::transform(images.begin(), images.end(), std::back_inserter(imageHandles), [](
const auto& image) {
202 return peak::common::detail::BackendAccessor<Image>::BackendHandle(image);
205 return PEAK_ICV_C_ABI_PREFIX peak_icv_HDR_Calibrate(m_handle, imageHandles.data(), imageHandles.size());
211 std::vector<peak_icv_image_handle> imageHandles;
212 std::transform(images.begin(), images.end(), std::back_inserter(imageHandles), [](
const peak::icv::Image& image) {
213 return peak::common::detail::BackendAccessor<Image>::BackendHandle(image);
215 peak_common_pixel_format outputPixelFormat;
217 return PEAK_ICV_C_ABI_PREFIX peak_icv_HDR_Process_GetOutputPixelFormat(
222 auto*
const outputImageHandle = peak::common::detail::BackendAccessor<Image>::BackendHandle(outputImage);
225 return PEAK_ICV_C_ABI_PREFIX peak_icv_HDR_Process(m_handle, imageHandles.data(), imageHandles.size(), outputImageHandle);
For detailed information about the use of ids_peak_icv Image refer to the Image Guide.
Thrown when an operation cannot be performed due to logical constraints.
Performs High Dynamic Range (HDR) image reconstruction.
HDR()
Constructs an HDR processing object.
HDRAlgorithm GetAlgorithm() const
Returns the HDR algorithm used by this object.
Image Process(const std::vector< Image > &image) const
Generates an HDR image from the specified input images.
void Calibrate(const std::vector< Image > &images) const
Calibrates the HDR processing using a set of input images.
HDRAlgorithm
Specifies the HDR reconstruction algorithm.
@ Debevec
Debevec HDR reconstruction algorithm.
constexpr peak_common_pixel_format CppPixelFormatToCPixelFormat(PixelFormat pixelFormat) noexcept
constexpr PixelFormat CPixelFormatToCppPixelFormat(peak_common_pixel_format pixelFormat) noexcept
void ExecuteAndMapReturnCodes(const CallableType &callableObject)
peak::common::detail::c_type_of_t< Type > * handle_of_t