3#include "../_cexports/c_minos.h"
5#include "search_result.hpp"
7#include "../global.hpp"
9#include "../string.hpp"
10#include "../area_2d.hpp"
25 const int CorrelationMaxSearch = 32767;
27 const Cvb::Char *
const CorrelationResultId = CVB_LIT(
"[correlation]");
46 const ImagePlane &templatePlane,
double threshold,
47 int radius,
Area2D aoi,
double density = 1.0)
49 CExports::RESULTS hSearchResults =
nullptr;
52 reinterpret_cast<CExports::TArea &
>(aoi), threshold, radius,
53 Private::CorrelationMaxSearch,
nullptr,
nullptr, hSearchResults));
54 ReleaseObjectGuard hSearchResHolder(hSearchResults);
55 auto results = Private::SearchResultsToArray(hSearchResults);
56 for (
auto &&result : results)
59 SearchResult(Private::CorrelationResultId, result.Quality(), result.Position(), result.AdvanceVector());
78 const ImagePlane &templatePlane,
double threshold,
79 int radius,
double density = 1.0)
103 reinterpret_cast<CExports::TArea &
>(aoi),
true, correlation, posX, posY));
104 if (correlation == 0.0)
126 double density = 1.0)
Structure that represents an area of interest in the image.
Definition area_2d.hpp:21
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
Search result returned by Minos.
Definition search_result.hpp:25
Multi-purpose 2D vector class.
Definition point_2d.hpp:20
Rectangle object.
Definition rect.hpp:24
Namespace for the Minos package.
Definition classifier.hpp:29
SearchResult SearchCorrelation(const ImagePlane &imagePlane, const ImagePlane &templatePlane, Area2D aoi, double density=1.0)
Find the best correlation match of the templatePlane in the imagePlane aoi with sub-pixel accuracy.
Definition minos_correlation.hpp:96
std::vector< SearchResult > SearchAllCorrelations(const ImagePlane &imagePlane, const ImagePlane &templatePlane, double threshold, int radius, Area2D aoi, double density=1.0)
Find all correlation matches of the templatePlane in the imagePlane aoi.
Definition minos_correlation.hpp:45
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
char Char
Character type for wide characters or unicode characters.
Definition string.hpp:63