| 71 | } // namespace |
| 72 | |
| 73 | void ExportOpMinAreaRect(py::module &m) |
| 74 | { |
| 75 | using namespace pybind11::literals; |
| 76 | |
| 77 | m.def("minarearect", &MinAreaRect, "src"_a, "numPointsInContour"_a, "totalContours"_a, py::kw_only(), |
| 78 | "stream"_a = nullptr, R"pbdoc( |
| 79 | |
| 80 | Executes the Min Area Rect operation on the given cuda stream. |
| 81 | |
| 82 | See also: |
| 83 | Refer to the CV-CUDA C API reference for the Min Area Rect operator |
| 84 | for more details and usage examples. |
| 85 | |
| 86 | Args: |
| 87 | src (cvcuda.Tensor): Input tensor containing one or more contours.src[i,j,k] is the set of contours |
| 88 | where i ranges from 0 to batch-1, j ranges from 0 to max number of points in cotours |
| 89 | k is the coordinate of each points which is in [0,1] |
| 90 | numPointsInContour (cvcuda.Tensor): Input tensor containing the number of points in each input contours. |
| 91 | totalContours (int): Number of input contours |
| 92 | stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation. |
| 93 | |
| 94 | Returns: |
| 95 | cvcuda.Tensor: The output tensor of rotated bounding boxes.The output will give 4 points' cooridinate(x,y) |
| 96 | of each contour's minimum rotated bounding boxes |
| 97 | |
| 98 | Caution: |
| 99 | Restrictions to several arguments may apply. Check the C |
| 100 | API references of the CV-CUDA operator. |
| 101 | )pbdoc"); |
| 102 | |
| 103 | m.def("minarearect_into", &MinAreaRectInto, "dst"_a, "src"_a, "numPointsInContour"_a, "totalContours"_a, |
| 104 | py::kw_only(), "stream"_a = nullptr, R"pbdoc( |
| 105 | |
| 106 | Executes the Min Area Rect operation on the given cuda stream. |
| 107 | |
| 108 | See also: |
| 109 | Refer to the CV-CUDA C API reference for the Min Area Rect operator |
| 110 | for more details and usage examples. |
| 111 | |
| 112 | Args: |
| 113 | dst (cvcuda.Tensor): Output tensor will give 4 points' cooridinate(x,y) |
| 114 | of each contour's minimum rotated bounding boxes |
| 115 | src (cvcuda.Tensor): Input tensor containing one or more contours. src[i,j,k] is the set of contours |
| 116 | where i ranges from 0 to batch-1, j ranges from 0 to max number of points in cotours |
| 117 | k is the coordinate of each points which is in [0,1] |
| 118 | numPointsInContour (cvcuda.Tensor): Input tensor containing the number of points in each input contours. |
| 119 | totalContours (int): Number of input contours |
| 120 | stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation. |
| 121 | stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation. |
| 122 | |
| 123 | Returns: |
| 124 | None |
| 125 | |
| 126 | Caution: |
| 127 | Restrictions to several arguments may apply. Check the C |
| 128 | API references of the CV-CUDA operator. |
| 129 | )pbdoc"); |
| 130 | } |