Initial setup for CLion
This commit is contained in:
34
ANSOCR/ANSOnnxOCR.h
Normal file
34
ANSOCR/ANSOnnxOCR.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef ANSOnnxOCR_H
|
||||
#define ANSOnnxOCR_H
|
||||
#pragma once
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/imgcodecs.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <mutex>
|
||||
#include "ANSOCRBase.h"
|
||||
#include "ANSONNXOCR/PaddleOCRV5Engine.h"
|
||||
|
||||
namespace ANSCENTER {
|
||||
|
||||
class ANSOCR_API ANSONNXOCR : public ANSOCRBase {
|
||||
public:
|
||||
virtual bool Initialize(const std::string& licenseKey, OCRModelConfig modelConfig,
|
||||
const std::string& modelZipFilePath, const std::string& modelZipPassword,
|
||||
int engineMode) override;
|
||||
|
||||
std::vector<ANSCENTER::OCRObject> RunInference(const cv::Mat& input) override;
|
||||
std::vector<ANSCENTER::OCRObject> RunInference(const cv::Mat& input, const std::string& cameraId) override;
|
||||
std::vector<ANSCENTER::OCRObject> RunInference(const cv::Mat& input, const std::vector<cv::Rect>& Bbox) override;
|
||||
std::vector<ANSCENTER::OCRObject> RunInference(const cv::Mat& input, const std::vector<cv::Rect>& Bbox, const std::string& cameraId) override;
|
||||
|
||||
~ANSONNXOCR();
|
||||
bool Destroy() override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<onnxocr::PaddleOCRV5Engine> _engine = std::make_unique<onnxocr::PaddleOCRV5Engine>();
|
||||
std::recursive_mutex _mutex;
|
||||
};
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user