CVB++ 15.0
add_noise.hpp
1#pragma once
2#if defined _WIN32
3
4# include "../_cexports/c_foundation.h"
5
6# include "../global.hpp"
7# include "../image.hpp"
8# include "../exception.hpp"
9
10# include <memory>
11
12namespace Cvb
13{
14 CVB_BEGIN_INLINE_NS
15
16 namespace Foundation
17 {
18
20
24 namespace AddNoise
25 {
26
28
40 inline std::unique_ptr<Image> AddUniformNoise(const Image &image, double lowest, double highest, int seed)
41 {
42 return Internal::DoResCallObjectOut<Image>([&](void *&resimg) {
43 return CVB_CALL_CAPI(AddUniformNoise(image.Handle(), lowest, highest, seed, resimg));
44 });
45 }
46
48
60 inline std::unique_ptr<Image> AddGaussNoise(const Image &image, double mean, double stdDev, int seed)
61 {
62 return Internal::DoResCallObjectOut<Image>(
63 [&](void *&resimg) { return CVB_CALL_CAPI(AddGaussNoise(image.Handle(), mean, stdDev, seed, resimg)); });
64 }
65
66 } /* namespace AddNoise */
67
70
71 } /* namespace Foundation */
72 CVB_END_INLINE_NS
73} /* namespace Cvb */
74
75#endif
The Common Vision Blox image.
Definition decl_image.hpp:50
void * Handle() const noexcept
Classic API image handle.
Definition decl_image.hpp:237
Namespace for collection of noise-generating functions from the Foundation package.
Definition add_noise.hpp:25
std::unique_ptr< Image > AddGaussNoise(const Image &image, double mean, double stdDev, int seed)
Add noise with Gaussian distribution to an image.
Definition add_noise.hpp:60
std::unique_ptr< Image > AddUniformNoise(const Image &image, double lowest, double highest, int seed)
Add noise with uniform distribution to an image.
Definition add_noise.hpp:40
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