Files
MainCarRemoteControl/app/src/main/cpp/traffic_sign.h
T
UnknownObject f9bb7d9487 1. add ocr license
2. add hyper-lpr function
3. add text filter
4. add commits
2022-11-13 23:41:47 +08:00

41 lines
1.0 KiB
C++

//
// Created by UnknownObject on 2022/10/7.
// Copyright (c) 2022 UnknownNetworkService. All rights reserved.
//
#ifndef MAINCAR_TRAFFIC_SIGN_H
#define MAINCAR_TRAFFIC_SIGN_H
//交通标志识别
#define TRAFFIC_SIGN_RECO_VERSION "1.0.0"
#include <map>
#include <jni.h>
#include <string>
#include "image_processor.h"
#include "opencv_support.h"
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
namespace uns
{
class TrafficSign
{
private:
std::string external_image_storage = "";
std::string img_str[6] = { "tf-0.jpg", "tf-1.jpg", "tf-2.jpg", "tf-3.jpg", "tf-4.jpg", "tf-5.jpg" };
private:
int PixCount(cv::Mat image);
bool GetImageROI(const cv::Mat& src, cv::Mat& roi_image);
bool Read_Data(std::string filename, std::vector<cv::Mat>& dataset);
int SignRecognition(const cv::Mat& roi_image, const std::vector<cv::Mat>& dataset);
public:
void SetExternalImagePath(std::string path);
int RecognitionSign(const cv::Mat& source);
};
};
#endif //MAINCAR_TRAFFIC_SIGN_H