You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Cigarette/230627-许昌ZB28小盒-2相机拍一次-1280.../Cigarette/alg_jd.h

27 lines
788 B
C++

#ifndef _CIGARETTE_JD
#define _CIGARETTE_JD
#include <opencv2/opencv.hpp>
#include <opencv2/dnn.hpp>
#include <opencv2/dnn/shape_utils.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/highgui/highgui_c.h>
#include <iostream>
#include <fstream>
class AlgJd
{
public:
bool init();
bool test_detect();
bool test_detect_batcht(int shoot);
int detect(cv::Mat& in, cv::Mat &out, std::vector<std::pair<int, cv::Rect> > &results);
void detect_batch(std::vector<cv::Mat>& vec_in, std::vector<cv::Mat> &vec_out, std::vector<std::vector<std::pair<int, cv::Rect> > > &vec_results);
void detect_Rect(cv::Mat& in, cv::Mat &out, std::vector<cv::Point2f> &Rect_points, bool &isok);
private:
cv::dnn::Net net;
};
#endif //end of _CIGARETTE_JD