mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
27 lines
597 B
C++
27 lines
597 B
C++
#ifdef HAVE_OPENCV_OBJDETECT
|
|
|
|
#include "opencv2/objdetect.hpp"
|
|
|
|
typedef QRCodeEncoder::Params QRCodeEncoder_Params;
|
|
|
|
typedef HOGDescriptor::HistogramNormType HOGDescriptor_HistogramNormType;
|
|
typedef HOGDescriptor::DescriptorStorageFormat HOGDescriptor_DescriptorStorageFormat;
|
|
|
|
class NativeByteArray
|
|
{
|
|
public:
|
|
inline NativeByteArray& operator=(const std::string& from) {
|
|
val = from;
|
|
return *this;
|
|
}
|
|
std::string val;
|
|
};
|
|
|
|
template<>
|
|
PyObject* pyopencv_from(const NativeByteArray& from)
|
|
{
|
|
return PyBytes_FromStringAndSize(from.val.c_str(), from.val.size());
|
|
}
|
|
|
|
#endif
|