CVB++ 15.0
Loading...
Searching...
No Matches
edge.hpp
1#pragma once
2
3#include "../_cexports/c_edge.h"
4
5#include "../global.hpp"
6#include "../image.hpp"
7#include "../exception.hpp"
8#include "../rect.hpp"
9#include "../area_2d.hpp"
10
11#include <vector>
12#include <string>
13#include <sstream>
14#include <memory>
15#include <utility>
16#include <algorithm>
17
18namespace Cvb
19{
20 CVB_BEGIN_INLINE_NS
21
22 namespace Foundation
23 {
24 namespace Edge
25 {
26 class Projection;
27 }
28 } // namespace Foundation
29
30 template <>
31 inline HandleGuard<Foundation::Edge::Projection>::HandleGuard(void *handle) noexcept
32 : HandleGuard<Foundation::Edge::Projection>(handle, [](void *h) { CVB_CALL_CAPI(ReleaseProjection(h)); })
33 {
34 }
35
36 namespace Foundation
37 {
38
40
49 namespace Edge
50 {
51
73
75 enum class EdgeType
76 {
78 Ignore = CExports::POLARITY_DONT_CARE,
80 Positive = CExports::POLARITY_POSITIVE,
82 Negative = CExports::POLARITY_NEGATIVE
83 };
84
86 enum class ProjectionMode
87 {
92 };
93
95
97 class EdgeResult
98 {
99 public:
100 EdgeResult() noexcept
101 : x_(0.0)
102 , y_(0.0)
103 , quality_(0.0)
104 , type_(EdgeType::Ignore)
105 {
106 }
107
108 EdgeResult(double x, double y, double quality, EdgeType type) noexcept
109 : x_(x)
110 , y_(y)
111 , quality_(quality)
112 , type_(type)
113 {
114 }
115
116 public:
118
122 static EdgeResult Nothing() noexcept
123 {
124 return EdgeResult();
125 }
126
128
132 double X() const noexcept
133 {
134 return x_;
135 }
136
138
142 double Y() const noexcept
143 {
144 return y_;
145 }
146
148
152 double Quality() const noexcept
153 {
154 return quality_;
155 }
156
158
162 EdgeType Type() const noexcept
163 {
164 return type_;
165 }
166
167 private:
168 double x_;
169 double y_;
170 double quality_;
171 EdgeType type_;
172 };
173
175
182 inline bool operator!=(const EdgeResult &lhs, const EdgeResult &rhs) noexcept
183 {
184 return (lhs.X() != rhs.X()) || (lhs.Y() != rhs.Y()) || (lhs.Quality() != rhs.Quality())
185 || (lhs.Type() != rhs.Type());
186 }
187
189
196 inline bool operator==(const EdgeResult &lhs, const EdgeResult &rhs) noexcept
197 {
198 return (!(lhs != rhs));
199 }
200
202
212
213 namespace Private
214 {
215 /* Convert an edge results collection to an edge vector. */
216 inline std::vector<EdgeResult> EdgeResultsToArray(CExports::EDGERESULTS hResults, EdgeType type)
217 {
219
220 size_t resultCount = CVB_CALL_CAPI(EdgeResultsCount(hResults));
221 for (size_t i = 0; i < resultCount; ++i)
222 {
225 CVB_CALL_CAPI_CHECKED(EdgeResult(hResults, i, x, y, q));
226 results.push_back(EdgeResult(x, y, q, type));
227 }
228
229 return results;
230 }
231
232 typedef HandleGuard<void, CVB_CALL_CAPI(ReleaseEdgeResultsVoid)> ReleaseEdgeResultsGuard;
233
234 } /* namespace Private */
235
237
248 inline EdgeResult FindFirstEdge(const ImagePlane &plane, EdgeSearchMode mode, EdgeType type, double threshold,
249 Area2D aoi, double density = 1.0)
250 {
252 {
253 throw std::invalid_argument("invalid combination of EdgeType and EdgeSearchMode requested");
254 }
255
256 CExports::TEdgeResult edgeRes = {0};
257 CExports::cvbbool_t success = false;
258 switch (mode)
259 {
261 success = CVB_CALL_CAPI(CFindFirstEdge(
262 plane.Parent().Handle(), plane.Plane(), static_cast<int>(density * 1000.0),
263 reinterpret_cast<CExports::TArea &>(aoi), threshold, type == EdgeType::Positive, edgeRes));
264 break;
266 success = CVB_CALL_CAPI(CSFindFirstEdge(
267 plane.Parent().Handle(), plane.Plane(), static_cast<int>(density * 1000.0),
268 reinterpret_cast<CExports::TArea &>(aoi), threshold, type == EdgeType::Positive, edgeRes));
269 break;
271 success = CVB_CALL_CAPI(TFindFirstEdge(
272 plane.Parent().Handle(), plane.Plane(), static_cast<int>(density * 1000.0),
273 reinterpret_cast<CExports::TArea &>(aoi), threshold, type == EdgeType::Positive, edgeRes));
274 break;
276 success = CVB_CALL_CAPI(TSFindFirstEdge(
277 plane.Parent().Handle(), plane.Plane(), static_cast<int>(density * 1000.0),
278 reinterpret_cast<CExports::TArea &>(aoi), threshold, type == EdgeType::Positive, edgeRes));
279 break;
281 success = CVB_CALL_CAPI(OSFindFirstEdge(plane.Parent().Handle(), plane.Plane(),
282 static_cast<int>(density * 1000.0),
283 reinterpret_cast<CExports::TArea &>(aoi), threshold,
284 static_cast<CExports::TEdgePolarity>(type), edgeRes));
285 break;
286 default:
287 throw std::invalid_argument("unknown edge search mode requested");
288 }
289
290 if (success)
291 {
292 return EdgeResult(edgeRes.x, edgeRes.y, edgeRes.Quality, type);
293 }
294 else
295 {
296 return EdgeResult::Nothing();
297 }
298 }
299
301
311 inline EdgeResult FindFirstEdge(const ImagePlane &plane, EdgeSearchMode mode, EdgeType type, double threshold,
312 double density = 1.0)
313 {
314 return FindFirstEdge(plane, mode, type, threshold, Area2D(static_cast<Rect<double>>(plane.Parent().Bounds())),
315 density);
316 }
317
319
333 double threshold1, EdgeType type2, double threshold2, Area2D aoi,
334 double density = 1.0)
335 {
337 {
338 throw std::invalid_argument("invalid combination of EdgeType and EdgeSearchMode requested");
339 }
341 {
342 throw std::invalid_argument("invalid combination of EdgeType and EdgeSearchMode requested");
343 }
344
345 CExports::TEdgeResult edgeRes1 = {0};
346 CExports::TEdgeResult edgeRes2 = {0};
347 CExports::cvbbool_t success = false;
348 switch (mode)
349 {
351 success = CVB_CALL_CAPI(
352 CFindEdgePair(plane.Parent().Handle(), plane.Plane(), static_cast<int>(density * 1000.0),
353 reinterpret_cast<CExports::TArea &>(aoi), threshold1, type1 == EdgeType::Positive,
354 edgeRes1, threshold2, type2 == EdgeType::Positive, edgeRes2));
355 break;
357 success = CVB_CALL_CAPI(
358 CSFindEdgePair(plane.Parent().Handle(), plane.Plane(), static_cast<int>(density * 1000.0),
359 reinterpret_cast<CExports::TArea &>(aoi), threshold1, type1 == EdgeType::Positive,
360 edgeRes1, threshold2, type2 == EdgeType::Positive, edgeRes2));
361 break;
363 success = CVB_CALL_CAPI(
364 TFindEdgePair(plane.Parent().Handle(), plane.Plane(), static_cast<int>(density * 1000.0),
365 reinterpret_cast<CExports::TArea &>(aoi), threshold1, type1 == EdgeType::Positive,
366 edgeRes1, threshold2, type2 == EdgeType::Positive, edgeRes2));
367 break;
369 success = CVB_CALL_CAPI(
370 TSFindEdgePair(plane.Parent().Handle(), plane.Plane(), static_cast<int>(density * 1000.0),
371 reinterpret_cast<CExports::TArea &>(aoi), threshold1, type1 == EdgeType::Positive,
372 edgeRes1, threshold2, type2 == EdgeType::Positive, edgeRes2));
373 break;
375 success = CVB_CALL_CAPI(OSFindEdgePair(
376 plane.Parent().Handle(), plane.Plane(), static_cast<int>(density * 1000.0),
377 reinterpret_cast<CExports::TArea &>(aoi), threshold1, static_cast<CExports::TEdgePolarity>(type1),
378 edgeRes1, threshold2, static_cast<CExports::TEdgePolarity>(type2), edgeRes2));
379 break;
380 default:
381 throw std::invalid_argument("unknown edge search mode requested");
382 }
383
384 if (success)
385 {
386 return EdgeResultPair{{edgeRes1.x, edgeRes1.y, edgeRes1.Quality, type1},
387 {edgeRes1.x, edgeRes1.y, edgeRes1.Quality, type1}};
388 }
389 else
390 {
392 }
393 }
394
396
409 double threshold1, EdgeType type2, double threshold2, double density = 1.0)
410 {
411 return FindEdgePair(plane, mode, type1, threshold1, type2, threshold2,
412 Area2D(static_cast<Rect<double>>(plane.Parent().Bounds())), density);
413 }
414
416
428 inline EdgeResultPair FindEdgePair(const ImagePlane &plane, EdgeSearchMode mode, EdgeType type1, EdgeType type2,
429 double threshold, Area2D aoi, double density = 1.0)
430 {
431 return FindEdgePair(plane, mode, type1, threshold, type2, threshold, aoi, density);
432 }
433
435
446 inline EdgeResultPair FindEdgePair(const ImagePlane &plane, EdgeSearchMode mode, EdgeType type1, EdgeType type2,
447 double threshold, double density = 1.0)
448 {
449 return FindEdgePair(plane, mode, type1, threshold, type2, threshold,
450 Area2D(static_cast<Rect<double>>(plane.Parent().Bounds())), density);
451 }
452
454
466 double threshold, Area2D aoi, double density = 1.0)
467 {
469 {
470 throw std::invalid_argument("invalid combination of EdgeType and EdgeSearchMode requested");
471 }
472
473 // second derivation is different to the rest...
475 {
476 CExports::EDGERESULTS hEdgeResults = nullptr;
477 CVB_CALL_CAPI(OSFindAllEdges(plane.Parent().Handle(), plane.Plane(), static_cast<int>(density * 1000.0),
478 reinterpret_cast<CExports::TArea &>(aoi), threshold,
479 static_cast<CExports::TEdgePolarity>(type), hEdgeResults));
480 Private::ReleaseEdgeResultsGuard hEdgeResHolder(hEdgeResults);
481 return Private::EdgeResultsToArray(hEdgeResults, type);
482 }
483
484 std::vector<CExports::TEdgeResult> rawResults(Round(aoi.Size()).Width());
485 size_t maxEdges = rawResults.size();
486 size_t edgeCount = 0;
487 switch (mode)
488 {
490 CVB_CALL_CAPI(CFindAllEdges(plane.Parent().Handle(), plane.Plane(), static_cast<int>(density * 1000.0),
491 reinterpret_cast<CExports::TArea &>(aoi), threshold, type == EdgeType::Positive,
492 maxEdges, rawResults.data(), edgeCount));
493 break;
495 CVB_CALL_CAPI(CSFindAllEdges(plane.Parent().Handle(), plane.Plane(), static_cast<int>(density * 1000.0),
496 reinterpret_cast<CExports::TArea &>(aoi), threshold,
497 type == EdgeType::Positive, maxEdges, rawResults.data(), edgeCount));
498 break;
500 CVB_CALL_CAPI(TFindAllEdges(plane.Parent().Handle(), plane.Plane(), static_cast<int>(density * 1000.0),
501 reinterpret_cast<CExports::TArea &>(aoi), threshold, type == EdgeType::Positive,
502 maxEdges, rawResults.data(), edgeCount));
503 break;
505 CVB_CALL_CAPI(TSFindAllEdges(plane.Parent().Handle(), plane.Plane(), static_cast<int>(density * 1000.0),
506 reinterpret_cast<CExports::TArea &>(aoi), threshold,
507 type == EdgeType::Positive, maxEdges, rawResults.data(), edgeCount));
508 break;
509 default:
510 throw std::invalid_argument("unknown edge search mode requested");
511 }
512
513 std::vector<EdgeResult> fullResults(edgeCount);
514 std::transform(rawResults.begin(), rawResults.begin() + edgeCount, fullResults.begin(), // NOLINT
515 [=](CExports::TEdgeResult raw) { return EdgeResult(raw.x, raw.y, raw.Quality, type); });
516 return fullResults;
517 }
518
520
531 double threshold, double density = 1.0)
532 {
533 return FindAllEdges(plane, mode, type, threshold, Area2D(static_cast<Rect<double>>(plane.Parent().Bounds())),
534 density);
535 }
536
538
548 inline EdgeResult FindBestEdge(const ImagePlane &plane, EdgeType type, Area2D aoi, double density = 1.0)
549 {
550 CExports::TEdgeResult edgeRes = {0};
551 auto success = CVB_CALL_CAPI(OSFindBestEdge(
552 plane.Parent().Handle(), plane.Plane(), static_cast<int>(density * 1000.0),
553 reinterpret_cast<CExports::TArea &>(aoi), static_cast<CExports::TEdgePolarity>(type), edgeRes));
554
555 if (success)
556 {
557 return EdgeResult(edgeRes.x, edgeRes.y, edgeRes.Quality, type);
558 }
559 else
560 {
561 return EdgeResult::Nothing();
562 }
563 }
564
566
575 inline EdgeResult FindBestEdge(const ImagePlane &plane, EdgeType type, double density = 1.0)
576 {
577 return FindBestEdge(plane, type, Area2D(static_cast<Rect<double>>(plane.Parent().Bounds())), density);
578 }
579
582
589 inline void WriteProjection(const ImagePlane &plane, Area2D aoi, double density = 1.0)
590 {
591 CVB_CALL_CAPI(WriteProjection(plane.Parent().Handle(), plane.Plane(), static_cast<int>(density * 1000.0),
592 reinterpret_cast<CExports::TArea &>(aoi)));
593 }
594
596
599 {
601
606
608 double Value = 0.0;
609 };
610
612
619 class Projection
620 {
621 private:
622 // Internal helper constructor version
623 Projection(HandleGuard<Projection> &&guard, ProjectionMode mode) noexcept
624 : handle_(std::move(guard))
625 , mode_(mode)
626 {
627 }
628
629 public:
631
639 Projection(const ImagePlane &plane, Area2D aoi, ProjectionMode mode = ProjectionMode::Sum, double density = 1.0)
640 : Projection(HandleGuard<Projection>(CreateProjectionHandle(plane, aoi, mode, density)), mode)
641 {
642 }
643
644 Projection(const Projection &other) = delete;
645 Projection &operator=(const Projection &other) = delete;
646 Projection(Projection &&other) noexcept = default;
647 Projection &operator=(Projection &&other) noexcept = default;
648 ~Projection() = default;
649
651
656 {
657 if (Length() != values_.size())
658 {
659 std::vector<ProjectionValue> values(Length());
660 Internal::DoBoolCall([&]() {
661 return CVB_CALL_CAPI(
662 CopyDoubleBuffer(Handle(), reinterpret_cast<CExports::pDoubleProjection>(values.data())));
663 });
664 values_.swap(values);
665 }
666 return values_;
667 }
668
669 private:
670 // Helper to create the projection handle.
671 static CExports::PROJECTIONEX CreateProjectionHandle(const ImagePlane &plane, Area2D aoi, ProjectionMode mode,
672 double density)
673 {
674 CExports::PROJECTIONEX projection = nullptr;
675 /* Note: the binary compatibility between Area2D and TArea is guaranteed, therefore the cast below is legal.
676 */
677 switch (mode)
678 {
680 CVB_CALL_CAPI_CHECKED(GetNormProjectionEx(plane.Parent().Handle(), plane.Plane(),
681 static_cast<CExports::cvbdensity_t>(density * 1000.0),
682 reinterpret_cast<CExports::TArea &>(aoi), projection));
683 break;
685 CVB_CALL_CAPI_CHECKED(GetProjectionEx(plane.Parent().Handle(), plane.Plane(),
686 static_cast<CExports::cvbdensity_t>(density * 1000.0),
687 reinterpret_cast<CExports::TArea &>(aoi), projection));
688 break;
689 default:
690 throw std::invalid_argument("unknown projection mode");
691 }
692 return projection;
693 }
694
695 public:
697
707 ProjectionMode mode = ProjectionMode::Sum, double density = 1.0)
708 {
709 return std::make_unique<Projection>(plane, aoi, mode, density);
710 }
711
713
719 void *Handle() const noexcept
720 {
721 return handle_.Handle();
722 }
723
725
733 static std::unique_ptr<Projection> FromHandle(HandleGuard<Projection> &&guard, ProjectionMode mode)
734 {
735 if (!guard.Handle())
736 {
737 throw std::invalid_argument("invalid projection native handle");
738 }
739 return std::unique_ptr<Projection>(new Projection(std::move(guard), mode));
740 }
741
743
749 {
750 CExports::EDGERESULTS hResults = nullptr;
751 CVB_CALL_CAPI_CHECKED(ZeroCrossings(Handle(), Length(), hResults));
752
753 Private::ReleaseEdgeResultsGuard hEdgeResHolder(hResults);
754
755 return Private::EdgeResultsToArray(hResults, EdgeType::Ignore);
756 }
757
759
765 {
766 return Internal::DoBoolCallObjectOut<Projection>(
767 [&](void *&resproj) { return CVB_CALL_CAPI(Derivation(Handle(), resproj)); }, ProjectionMode::Sum);
768 }
769
771
777 template <class RANGE>
778 inline typename TypedRange<std::unique_ptr<Projection>, int, RANGE>::type Filter(const RANGE &kernel)
779 {
780 auto kernelRange = MakeRangeAdapter<int>(kernel, 1);
781
782 return Internal::DoBoolCallObjectOut<Projection>(
783 [&](void *&resproj) {
784 return CVB_CALL_CAPI(Filter(Handle(), reinterpret_cast<CExports::cvbval_t *>(kernelRange.Data()),
785 kernelRange.Size(), resproj));
786 },
788 }
789
791
797 {
798 return Internal::DoBoolCallObjectOut<Projection>(
799 [&](void *&resproj) { return CVB_CALL_CAPI(Normalize(Handle(), resproj)); }, ProjectionMode::Average);
800 }
801
803
807 ProjectionMode Mode() const noexcept
808 {
809 return mode_;
810 }
811
812 private:
813 /* The length (= number of values) of the projection. */
814 size_t Length() const
815 {
816 size_t length = 0;
817 CVB_CALL_CAPI_CHECKED(GetLength(Handle(), length));
818 return length;
819 }
820
821 private:
822 HandleGuard<Projection> handle_;
823 ProjectionMode mode_;
824 mutable std::vector<ProjectionValue> values_;
825 }; /* class Projection */
826
829
830 } /* namespace Edge */
831
833 using Edge::EdgeType;
835
836 using Edge::EdgeResult;
838 using Edge::Projection;
841
842 using Edge::FindAllEdges;
843 using Edge::FindBestEdge;
844 using Edge::FindEdgePair;
847
848 using Edge::Projection;
850
851 } /* namespace Foundation */
852 CVB_END_INLINE_NS
853} /* namespace Cvb */
Structure that represents an area of interest in the image.
Definition area_2d.hpp:21
Size2D< double > Size() const noexcept
Size (width and height) of the area of interest.
Definition area_2d.hpp:182
Edge search result
Definition edge.hpp:98
EdgeType Type() const noexcept
Type of the edge.
Definition edge.hpp:162
double Quality() const noexcept
Quality of detection, depending on the method used.
Definition edge.hpp:152
double Y() const noexcept
Y-position relative to the last line processed.
Definition edge.hpp:142
double X() const noexcept
X-position relative to the last line processed.
Definition edge.hpp:132
static EdgeResult Nothing() noexcept
The edge result returned when nothing has been found.
Definition edge.hpp:122
Projection that the Edge analysis of Common Vision Blox is using.
Definition edge.hpp:620
Projection(const ImagePlane &plane, Area2D aoi, ProjectionMode mode=ProjectionMode::Sum, double density=1.0)
Create a projection object.
Definition edge.hpp:639
static std::unique_ptr< Projection > FromHandle(HandleGuard< Projection > &&guard, ProjectionMode mode)
Creates projection from a classic API handle.
Definition edge.hpp:733
TypedRange< std::unique_ptr< Projection >, int, RANGE >::type Filter(const RANGE &kernel)
Filter this projection using a 1D filter kernel.
Definition edge.hpp:778
std::vector< EdgeResult > CalculateZeroCrossings()
Get all the zero crossings, that are in the projection.
Definition edge.hpp:748
std::unique_ptr< Projection > Derive()
Create derivative of this projection.
Definition edge.hpp:764
ProjectionMode Mode() const noexcept
Gets the mode of the projection.
Definition edge.hpp:807
static std::unique_ptr< Projection > Create(const ImagePlane &plane, Area2D aoi, ProjectionMode mode=ProjectionMode::Sum, double density=1.0)
Create a projection object.
Definition edge.hpp:706
std::unique_ptr< Projection > ToAverageProjection()
Create a new averaged projection from this one.
Definition edge.hpp:796
std::vector< ProjectionValue > Values() const
Retrieve the values of the projection.
Definition edge.hpp:655
void * Handle() const noexcept
Classic API PROJECTIONEX handle.
Definition edge.hpp:719
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
Multi-purpose 2D vector class.
Definition point_2d.hpp:20
Rectangle object.
Definition rect.hpp:24
T move(T... args)
Collection of functions for edge detection.
Definition edge.hpp:25
std::vector< EdgeResult > FindAllEdges(const ImagePlane &plane, EdgeSearchMode mode, EdgeType type, double threshold, Area2D aoi, double density=1.0)
Find all edges inside the aoi.
Definition edge.hpp:465
EdgeResult FindBestEdge(const ImagePlane &plane, EdgeType type, Area2D aoi, double density=1.0)
Use the 2nd derivative method to find the edge with the highest intensity in the area of interest.
Definition edge.hpp:548
EdgeResultPair FindEdgePair(const ImagePlane &plane, EdgeSearchMode mode, EdgeType type1, double threshold1, EdgeType type2, double threshold2, Area2D aoi, double density=1.0)
Find an edge pair (as specified) in the aoi.
Definition edge.hpp:332
EdgeType
Type of the edges to be searched.
Definition edge.hpp:76
@ Positive
Intensities increase along the scan direction.
Definition edge.hpp:80
@ Ignore
Used for EdgeResult::Nothing and with the 2nd derivative edge detection functions.
Definition edge.hpp:78
@ Negative
Intensities decrease along the scan direction.
Definition edge.hpp:82
ProjectionMode
Options affecting the result of the projection.
Definition edge.hpp:87
@ Sum
Projection value is the sum of all gray values per projection line.
Definition edge.hpp:91
@ Average
Projection value is the average value per projection line.
Definition edge.hpp:89
std::shared_ptr< Projection > ProjectionPtr
Convenience shared pointer for Projection.
Definition edge.hpp:828
bool operator!=(const EdgeResult &lhs, const EdgeResult &rhs) noexcept
Comparison operator for EdgeResult objects.
Definition edge.hpp:182
void WriteProjection(const ImagePlane &plane, Area2D aoi, double density=1.0)
Write the projection that Edge is using internally as the basis for its calculations into an image pl...
Definition edge.hpp:589
bool operator==(const EdgeResult &lhs, const EdgeResult &rhs) noexcept
Comparison operator for EdgeResult objects.
Definition edge.hpp:196
EdgeResult FindFirstEdge(const ImagePlane &plane, EdgeSearchMode mode, EdgeType type, double threshold, Area2D aoi, double density=1.0)
Find the first edge (as specified) in the aoi.
Definition edge.hpp:248
EdgeSearchMode
Determines the algorithm for finding an edge.
Definition edge.hpp:54
@ SecondDerivativeSubPixel
Find edges based on the 2nd derivative of the intensities with sub pixel accuracy.
Definition edge.hpp:71
@ Intensity
Find edges based on absolute intensities in the image.
Definition edge.hpp:60
@ IntensitySubPixel
Like Intensity, but with sub pixel accuracy.
Definition edge.hpp:62
@ Contrast
Find edges based on the contrasts in the image (1st derivative of the gray values).
Definition edge.hpp:64
@ ContrastSubPixel
Like Contrast, but with sub pixel accuracy.
Definition edge.hpp:66
Namespace for the Foundation package.
Definition decl_metric_aqs12_calibration_piece.hpp:11
Root namespace for the Image Manager interface.
Definition version.hpp:11
Point2D< int > Round(const Point2D< T > &rhs) noexcept
Round to an integer point.
Definition point_2d.hpp:371
T quiet_NaN(T... args)
A pair of found edges.
Definition edge.hpp:205
EdgeResult Second
Second found edge.
Definition edge.hpp:210
EdgeResult First
First found edge.
Definition edge.hpp:207
Single projection value.
Definition edge.hpp:599
double Value
Projection value as determined by the ProjectionMode.
Definition edge.hpp:608
Point2D< double > Position
Coordinate of the projection.
Definition edge.hpp:605
T transform(T... args)