opencv/modules/objdetect/misc/python/pyopencv_objdetect.hpp
2025-06-02 18:27:53 +03:00

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