5# include "../_cexports/c_foundation.h"
7# include "../global.hpp"
8# include "../image.hpp"
9# include "../exception.hpp"
10# include "../analyze.hpp"
11# include "../rect.hpp"
12# include "../_detail/detail_pixel_list.hpp"
80 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
86 templatePlane.
Plane(), aoi.Left(), aoi.Top(), aoi.Right(), aoi.Bottom(), resimg));
90 templatePlane.
Plane(), aoi.Left(), aoi.Top(), aoi.Right(), aoi.Bottom(), resimg));
94 templatePlane.
Plane(), aoi.Left(), aoi.Top(), aoi.Right(), aoi.Bottom(), resimg));
198 double threshold,
int locality,
Rect<int> aoi,
202 auto pixelList = Internal::DoResCallObjectOut<Internal::PixelList>([&](
void *&resobj) {
203 return CVB_CALL_CAPI(FindCorrelationMatches(
205 aoi.Left(), aoi.Top(), aoi.Right(), aoi.Bottom(), threshold, locality,
206 static_cast<CExports::TSubPixelMode
>(subPixMode),
static_cast<CExports::cvbdim_t
>(subPixRadius), resobj));
208 return pixelList->ToLocalMaximum();
231 double threshold,
int locality,
Rect< int > Bounds() const noexcept
Bounding rectangle of the image in pixels.
Definition decl_image.hpp:438
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
Rectangle object.
Definition rect.hpp:24
cvbres_t CalculateSumOfSquareDistances(IMG ImgIn, long IndexIn, IMG Template, long IndexTemplate, long left, long top, long right, long bottom, IMG &Accumulator)
cvbres_t CalculateCrossCorrelations(IMG ImgIn, long IndexIn, IMG Template, long IndexTemplate, long left, long top, long right, long bottom, IMG &Accumulator)
cvbres_t CalculateCorrelationCoefficients(IMG ImgIn, long IndexIn, IMG Template, long IndexTemplate, long left, long top, long right, long bottom, IMG &Accumulator)
Namespace for collection of functions that calculate different kinds of correlation values.
Definition correlation.hpp:30
std::vector< LocalMaximum > FindMatches(const ImagePlane &imagePlane, const ImagePlane &templatePlane, double threshold, int locality, Rect< int > aoi, SubPixelMode subPixMode=SubPixelMode::ParabolicFast, Neighborhood subPixRadius=Neighborhood::Use3x3)
Use the correlation coefficient calculation method to find locations in the input image plane that ma...
Definition correlation.hpp:197
CorrelationMethod
Correlation calculation methods.
Definition correlation.hpp:34
@ SumOfSquareDistances
Normalized sum of square distances.
Definition correlation.hpp:43
@ CrossCorrelation
Calculate the cross correlations between image and template.
Definition correlation.hpp:53
@ CorrelationCoefficients
Calculate the normalized correlation coefficients between image and template.
Definition correlation.hpp:51
std::unique_ptr< Image > Correlate(const ImagePlane &imagePlane, const ImagePlane &templatePlane, Rect< int > aoi, CorrelationMethod method)
Calculate the correlation between a plane and a template using a selectable calculation method.
Definition correlation.hpp:77
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
SubPixelMode
Method for determining sub pixel accuracy when working with the FindLocalMaxima functions.
Definition global.hpp:312
@ ParabolicFast
Definition global.hpp:318
Neighborhood
Neighborhood to use in sub pixel calculation of local maxima.
Definition global.hpp:337
@ Use3x3
Definition global.hpp:341