CVB++ 15.0
decl_metric_segmentor_range_map_aqs12.hpp
1#pragma once
2
3#include "decl_metric_segmentor_range_map.hpp"
4
5namespace Cvb
6{
7 CVB_BEGIN_INLINE_NS
8
9 namespace Foundation
10 {
11 namespace Metric
12 {
18 class AQS12RangeMapSegmentor final : public RangeMapSegmentor
19 {
20 friend class RangeMapSegmentor;
21
22 public:
23 explicit AQS12RangeMapSegmentor(HandleGuard<RangeMapSegmentor> &&guard, PrivateTag) noexcept
24 : RangeMapSegmentor(std::move(guard))
25 {
26 }
27
29
35 {
37 Internal::DoResCallShareOut<RangeMapSegmentor>([&](void *&handle) {
38 return CVB_CALL_CAPI(CVMAQS12CreateSegmentorForRangeMap(
39 *reinterpret_cast<const CExports::CVMAQS12SegmentationMethod *>(&method), handle));
40 }));
41 }
42
44
52 {
53 return Internal::DoResCallObjectOut<Image>([&](void *&handle) {
54 return CVB_CALL_CAPI(
55 CVMAQS12CreateFaceSegmentationImageFromRangeMap(imagePlane.Handle(), 0, Handle(), handle));
56 });
57 }
58
61
70 {
71 return Internal::DoResCallObjectOut<Image>([&](void *&handle) {
72 return CVB_CALL_CAPI(CVMAQS12CreateFaceSegmentationImageFromRangeMapRect(
73 imagePlane.Handle(), 0, aoi.Left(), aoi.Top(), aoi.Right(), aoi.Bottom(), Handle(), handle));
74 });
75 }
76
78
86 {
88 CVB_CALL_CAPI(CVMAQS12ExtractProjectedPointsFromRangeMap(
89 imagePlane.Handle(), 0, Handle(), reinterpret_cast<Cvb::CExports::CVC3DPointD *>(points.data())));
90
91 return points;
92 }
93
96
105 Rect<int> aoi) override
106 {
107 std::vector<Point3D<double>> points(12);
108 CVB_CALL_CAPI(CVMAQS12ExtractProjectedPointsFromRangeMapRect(
109 imagePlane.Handle(), 0, aoi.Left(), aoi.Top(), aoi.Right(), aoi.Bottom(), Handle(),
110 reinterpret_cast<Cvb::CExports::CVC3DPointD *>(points.data())));
111
112 return points;
113 }
114 };
115
116 } // namespace Metric
117 } // namespace Foundation
118
119 CVB_END_INLINE_NS
120} // namespace Cvb
static std::shared_ptr< AQS12RangeMapSegmentor > Create(const SegmentationMethod method)
Creates a AQS12 segmentor for range maps based on given segmentation method.
Definition decl_metric_segmentor_range_map_aqs12.hpp:34
std::vector< Point3D< double > > ExtractProjectedPointsFromPiece(const ImagePlane &imagePlane) override
Extracts 12 intersection points of the AQS12 calibration piece from the given range map.
Definition decl_metric_segmentor_range_map_aqs12.hpp:85
std::vector< Point3D< double > > ExtractProjectedPointsFromPiece(const ImagePlane &imagePlane, Rect< int > aoi) override
Extracts 12 intersection points of the AQS12 calibration piece from the range map on the given area o...
Definition decl_metric_segmentor_range_map_aqs12.hpp:104
std::unique_ptr< Image > FaceSegmentationFromPiece(const ImagePlane &imagePlane) override
Segments the AQS12 calibration piece from the given range map.
Definition decl_metric_segmentor_range_map_aqs12.hpp:51
std::unique_ptr< Image > FaceSegmentationFromPiece(const ImagePlane &imagePlane, Rect< int > aoi) override
Segments the AQS12 calibration piece from the range map on the given area of interest.
Definition decl_metric_segmentor_range_map_aqs12.hpp:69
void * Handle() const noexcept
Returns C-API style handle to Node Object.
Definition decl_metric_segmentor_range_map.hpp:133
Image plane information container.
Definition decl_image_plane.hpp:29
void * Handle() const noexcept override
Classic API image handle.
Definition detail_image_plane.hpp:35
Rectangle object.
Definition rect.hpp:24
T move(T... args)
Namespace for metric calibration.
Definition decl_metric_aqs12_calibration_piece.hpp:13
SegmentationMethod
Defines the segmentation method for labeling the faces of the calibration piece.
Definition metric.hpp:31
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
T dynamic_pointer_cast(T... args)