小编Boi*_*dil的帖子

识别车牌的字符

我尝试使用OCR识别车牌的字符,但我的车牌质量较差. 在此输入图像描述

我试图以某种方式改进OCR的字符识别,但我最好的结果是:结果. 在此输入图像描述

甚至在这张照片上的tesseract也不承认任何角色.我的代码是:

#include <cv.h>         // open cv general include file
#include <highgui.h>    // open cv GUI include file
#include <iostream>     // standard C++ I/O
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <string>

using namespace cv;

int main( int argc, char** argv )
{
    Mat src;
    Mat dst;

    Mat const structure_elem = getStructuringElement(
                         MORPH_RECT, Size(2,2));

    src = imread(argv[1], CV_LOAD_IMAGE_COLOR);   // Read the file

    cvtColor(src,src,CV_BGR2GRAY);
    imshow( "plate", src );

    GaussianBlur(src, src, Size(1,1), 1.5, 1.5);
    imshow( "blur", src );

    equalizeHist(src, src);
    imshow( "equalize", src …
Run Code Online (Sandbox Code Playgroud)

c++ python opencv

14
推荐指数
1
解决办法
6572
查看次数

标签 统计

c++ ×1

opencv ×1

python ×1