Skip to content

Commit 62b60b1

Browse files
committed
Merge pull request opencv#19344 from VadimLevin:dev/vlevin/generic-sequence-conversion
2 parents fb0abde + 1d3207d commit 62b60b1

File tree

3 files changed

+326
-137
lines changed

3 files changed

+326
-137
lines changed

modules/core/include/opencv2/core/bindings_utils.hpp

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,41 @@ String testOverloadResolution(const Rect& rect)
7878
rect.width, rect.height);
7979
}
8080

81+
CV_WRAP static inline
82+
String dumpRect(const Rect& argument)
83+
{
84+
return format("rect: (x=%d, y=%d, w=%d, h=%d)", argument.x, argument.y,
85+
argument.width, argument.height);
86+
}
87+
88+
CV_WRAP static inline
89+
String dumpTermCriteria(const TermCriteria& argument)
90+
{
91+
return format("term_criteria: (type=%d, max_count=%d, epsilon=%lf",
92+
argument.type, argument.maxCount, argument.epsilon);
93+
}
94+
95+
CV_WRAP static inline
96+
String dumpRotatedRect(const RotatedRect& argument)
97+
{
98+
return format("rotated_rect: (c_x=%f, c_y=%f, w=%f, h=%f, a=%f)",
99+
argument.center.x, argument.center.y, argument.size.width,
100+
argument.size.height, argument.angle);
101+
}
102+
103+
CV_WRAP static inline
104+
String dumpRange(const Range& argument)
105+
{
106+
if (argument == Range::all())
107+
{
108+
return "range: all";
109+
}
110+
else
111+
{
112+
return format("range: (s=%d, e=%d)", argument.start, argument.end);
113+
}
114+
}
115+
81116
CV_WRAP static inline
82117
AsyncArray testAsyncArray(InputArray argument)
83118
{

0 commit comments

Comments
 (0)