mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 22:44:02 +08:00
Merge pull request #12306 from berak:python_nmsboxes
This commit is contained in:
commit
6477262e63
@ -900,7 +900,7 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
|
||||
CV_OUT std::vector<int>& indices,
|
||||
const float eta = 1.f, const int top_k = 0);
|
||||
|
||||
CV_EXPORTS void NMSBoxes(const std::vector<RotatedRect>& bboxes, const std::vector<float>& scores,
|
||||
CV_EXPORTS_AS(NMSBoxesRotated) void NMSBoxes(const std::vector<RotatedRect>& bboxes, const std::vector<float>& scores,
|
||||
const float score_threshold, const float nms_threshold,
|
||||
CV_OUT std::vector<int>& indices,
|
||||
const float eta = 1.f, const int top_k = 0);
|
||||
|
@ -119,6 +119,7 @@ typedef std::vector<Vec6f> vector_Vec6f;
|
||||
typedef std::vector<Vec4i> vector_Vec4i;
|
||||
typedef std::vector<Rect> vector_Rect;
|
||||
typedef std::vector<Rect2d> vector_Rect2d;
|
||||
typedef std::vector<RotatedRect> vector_RotatedRect;
|
||||
typedef std::vector<KeyPoint> vector_KeyPoint;
|
||||
typedef std::vector<Mat> vector_Mat;
|
||||
typedef std::vector<std::vector<Mat> > vector_vector_Mat;
|
||||
@ -1520,6 +1521,18 @@ template<> struct pyopencvVecConverter<String>
|
||||
}
|
||||
};
|
||||
|
||||
template<> struct pyopencvVecConverter<RotatedRect>
|
||||
{
|
||||
static bool to(PyObject* obj, std::vector<RotatedRect>& value, const ArgInfo info)
|
||||
{
|
||||
return pyopencv_to_generic_vec(obj, value, info);
|
||||
}
|
||||
static PyObject* from(const std::vector<RotatedRect>& value)
|
||||
{
|
||||
return pyopencv_from_generic_vec(value);
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
bool pyopencv_to(PyObject *obj, TermCriteria& dst, const char *name)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user