CVB++ 15.0
scale.hpp
1#pragma once
2
3#if defined _WIN32
4
5# include "../_cexports/c_foundation.h"
6
7# include "../global.hpp"
8# include "../image.hpp"
9# include "../exception.hpp"
10
11# include <memory>
12
13namespace Cvb
14{
15 CVB_BEGIN_INLINE_NS
16
17 namespace Foundation
18 {
19
21
25 namespace Scale
26 {
27
29
39 {
40 return Internal::DoResCallObjectOut<Image>(
41 [&](void *&resimg) { return CVB_CALL_CAPI(ScaleTo8BPPUnsigned(image.Handle(), resimg)); });
42 }
43
45
55 {
56 return Internal::DoResCallObjectOut<Image>(
57 [&](void *&resimg) { return CVB_CALL_CAPI(ScaleTo16BPPUnsigned(image.Handle(), resimg)); });
58 }
59
61
71 {
72 return Internal::DoResCallObjectOut<Image>(
73 [&](void *&resimg) { return CVB_CALL_CAPI(ScaleTo16BPPSigned(image.Handle(), resimg)); });
74 }
75
77
87 {
88 return Internal::DoResCallObjectOut<Image>(
89 [&](void *&resimg) { return CVB_CALL_CAPI(ScaleTo32BPPSigned(image.Handle(), resimg)); });
90 }
91
93
104 inline std::unique_ptr<Image> ScaleTo32BppFloat(const Image &image, double minVal, double maxVal)
105 {
106 return Internal::DoResCallObjectOut<Image>(
107 [&](void *&resimg) { return CVB_CALL_CAPI(ScaleTo32BPPFloat(image.Handle(), resimg, minVal, maxVal)); });
108 }
109
110 } /* namespace Scale */
111
117
118 } /* namespace Foundation */
119 CVB_END_INLINE_NS
120} /* namespace Cvb */
121
122#endif
The Common Vision Blox image.
Definition decl_image.hpp:50
void * Handle() const noexcept
Classic API image handle.
Definition decl_image.hpp:237
cvbres_t ScaleTo16BPPUnsigned(IMG ImgIn, IMG &ImgOut)
cvbres_t ScaleTo16BPPSigned(IMG ImgIn, IMG &ImgOut)
cvbres_t ScaleTo8BPPUnsigned(IMG ImgIn, IMG &ImgOut)
cvbres_t ScaleTo32BPPFloat(IMG ImgIn, IMG &ImgOut, double MinVal, double MaxVal)
cvbres_t ScaleTo32BPPSigned(IMG ImgIn, IMG &ImgOut)
Various image scaling functions.
Definition scale.hpp:26
std::unique_ptr< Image > ScaleTo32BppFloat(const Image &image, double minVal, double maxVal)
Convert the input image to an image with 32 bits per pixel float data.
Definition scale.hpp:104
std::unique_ptr< Image > ScaleTo32BppSigned(const Image &image)
Convert the input image to an image with 32 bits per pixel signed data.
Definition scale.hpp:86
std::unique_ptr< Image > ScaleTo16BppUnsigned(const Image &image)
Convert the input image to an image with 16 bits per pixel unsigned data.
Definition scale.hpp:54
std::unique_ptr< Image > ScaleTo16BppSigned(const Image &image)
Convert the input image to an image with 16 bits per pixel signed data.
Definition scale.hpp:70
std::unique_ptr< Image > ScaleTo8BppUnsigned(const Image &image)
Convert the input image to an image with 8 bits per pixel unsigned data.
Definition scale.hpp:38
Namespace for the Foundation package.
Definition decl_metric_aqs12_calibration_piece.hpp:11
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17