5# include "../_cexports/c_foundation.h"
7# include "../global.hpp"
8# include "../image.hpp"
9# include "../exception.hpp"
10# include "../point_2d.hpp"
11# include "../size_2d.hpp"
68 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
69 return CVB_CALL_CAPI(
ErodeImage(image.
Handle(),
static_cast<CExports::TMorphologyMask
>(maskType),
70 maskSize.
Width(), maskSize.
Height(), maskOffset.
X(), maskOffset.
Y(),
nullptr,
105 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
107 maskOffset.
X(), maskOffset.
Y(), mask.
Handle(), resimg));
142 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
143 return CVB_CALL_CAPI(
DilateImage(image.
Handle(),
static_cast<CExports::TMorphologyMask
>(maskType),
144 maskSize.
Width(), maskSize.
Height(), maskOffset.
X(), maskOffset.
Y(),
nullptr,
179 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
181 maskOffset.
X(), maskOffset.
Y(), mask.
Handle(), resimg));
216 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
217 return CVB_CALL_CAPI(
OpeningImage(image.
Handle(),
static_cast<CExports::TMorphologyMask
>(maskType),
218 maskSize.
Width(), maskSize.
Height(), maskOffset.
X(), maskOffset.
Y(),
253 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
255 maskOffset.
X(), maskOffset.
Y(), mask.
Handle(), resimg));
290 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
291 return CVB_CALL_CAPI(
ClosingImage(image.
Handle(),
static_cast<CExports::TMorphologyMask
>(maskType),
292 maskSize.
Width(), maskSize.
Height(), maskOffset.
X(), maskOffset.
Y(),
327 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
329 maskOffset.
X(), maskOffset.
Y(), mask.
Handle(), resimg));
367 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
369 static_cast<CExports::TFilterMask
>(maskSize),
370 static_cast<CExports::TDistanceNorm
>(norm), resimg));
The Common Vision Blox image.
Definition decl_image.hpp:50
int Width() const noexcept
Width of the image in pixels.
Definition decl_image.hpp:309
int Height() const noexcept
Height of the image in pixels.
Definition decl_image.hpp:299
void * Handle() const noexcept
Classic API image handle.
Definition decl_image.hpp:237
Image plane information container.
Definition decl_image_plane.hpp:29
int Plane() const noexcept
Plane index in the image, to which this plane refers to.
Definition decl_image_plane.hpp:147
const Image & Parent() const noexcept
Image to which this plane descriptor refers to.
Definition detail_image_plane.hpp:87
Multi-purpose 2D vector class.
Definition point_2d.hpp:20
T X() const noexcept
Gets the x-component of the point.
Definition point_2d.hpp:84
T Y() const noexcept
Gets the y-component of the point.
Definition point_2d.hpp:104
Stores a pair of numbers that represents the width and the height of a subject, typically a rectangle...
Definition size_2d.hpp:20
T Height() const noexcept
Gets the vertical component of the size.
Definition size_2d.hpp:77
T Width() const noexcept
Gets the horizontal component of the size.
Definition size_2d.hpp:57
cvbres_t ClosingImage(IMG ImgIn, TMorphologyMask MaskType, long MaskWidth, long MaskHeight, long MaskOffsetX, long MaskOffsetY, IMG CustomMask, IMG &ImgOut)
cvbres_t DilateImage(IMG ImgIn, TMorphologyMask MaskType, long MaskWidth, long MaskHeight, long MaskOffsetX, long MaskOffsetY, IMG CustomMask, IMG &ImgOut)
cvbres_t ErodeImage(IMG ImgIn, TMorphologyMask MaskType, long MaskWidth, long MaskHeight, long MaskOffsetX, long MaskOffsetY, IMG CustomMask, IMG &ImgOut)
cvbres_t OpeningImage(IMG ImgIn, TMorphologyMask MaskType, long MaskWidth, long MaskHeight, long MaskOffsetX, long MaskOffsetY, IMG CustomMask, IMG &ImgOut)
cvbres_t DistanceTransformation(IMG ImgIn, long Index, TFilterMask MaskSize, TDistanceNorm Norm, IMG &ImgOut)
FixedFilterSize
Filter size values for filters using a fixed or discrete sized kernel.
Definition filter.hpp:43
Namespace for morphological filter operations available from the Common Vision Blox Foundation packag...
Definition morphology.hpp:30
std::unique_ptr< Image > Close(const Image &image, MorphologyMask maskType, Size2D< int > maskSize, Point2D< int > maskOffset)
Perform a close operation with a selectable filter mask.
Definition morphology.hpp:287
std::unique_ptr< Image > DistanceTransform(const ImagePlane &plane, Filter::FixedFilterSize maskSize, DistanceNorm norm)
This function calculates (and writes into the output image) the distance to the closest pixel in the ...
Definition morphology.hpp:364
std::unique_ptr< Image > Dilate(const Image &image, MorphologyMask maskType, Size2D< int > maskSize, Point2D< int > maskOffset)
Perform a dilation operation with a selectable filter mask.
Definition morphology.hpp:139
MorphologyMask
Available morphology masks.
Definition morphology.hpp:34
@ Rectangular
Rectangular morphology mask.
Definition morphology.hpp:36
@ Elliptic
Elliptic morphology mask.
Definition morphology.hpp:40
@ Cross
Cross-shaped morphology mask.
Definition morphology.hpp:38
std::unique_ptr< Image > Erode(const Image &image, MorphologyMask maskType, Size2D< int > maskSize, Point2D< int > maskOffset)
Perform an erosion operation with a selectable filter mask.
Definition morphology.hpp:65
std::unique_ptr< Image > Open(const Image &image, MorphologyMask maskType, Size2D< int > maskSize, Point2D< int > maskOffset)
Perform an open operation with a selectable filter mask.
Definition morphology.hpp:213
DistanceNorm
Norm for calculating distances.
Definition morphology.hpp:45
@ LInfinity
Infinity norm (a.k.a maximum norm).
Definition morphology.hpp:47
@ L2
L2 norm (a.k.a. euclidean norm).
Definition morphology.hpp:51
@ L1
L1 norm (a.k.a. absolute norm).
Definition morphology.hpp:49
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