hyperlpr self-test questions

What 1.hyperlpr identification process?

1) PlateDetection :: plateDetectionRough: cascade.detectMultiScale, coarse position detection plate number (expanded outwardly and part 0.3w, 2h), i.e. the shear plate image

2) resize to 140x60, converted to gray, using different thresholds cv :: adaptiveThreshold, with a license plate images to obtain multiple thresholds pictures for an area roughly in line with the license plate characters contour, satisfy: if ((lwRatio> 0.7 && bdbox.width * bdbox.height> 100 && bdboxAera <300) || (lwRatio> 3.0 && bdboxAera <100 && bdboxAera> 10)), upper left and lower right corner record

3) For many upper left point obtained using cv :: fitLine, fitting a straight line to give (vx, vy, x0, y0), wherein (vx, vy) is the linear direction is a vector mode 1, (x0, y0 ) of points on the line

int lefty = static_cast<int>((-x * vy / vx) + y);//求图片上左边的y
int righty = static_cast<int>(((136- x) * vy / vx) + y);//求与图片右边相交的y
res.first = lefty+PADDING_UP_DOWN+zeroadd;
res.second = righty+PADDING_UP_DOWN+zeroadd;

4) the angle correction: there may be errors due fitLine resulting text inclined, so by fastdeskew, corrected, using:

 The following x2, y2, corresponding to a radius of the ellipse is understood to obtain the BLOCKSIZE, textures angle

cv::Mat eigen;
cv::cornerEigenValsAndVecs(skewImage,eigen,blockSize,5);
//eigen:lambda1, lambda2, x0,y0, x1,y1
for( int j = 0; j < skewImage.rows; j+=blockSize )
{ for( int i = 0; i < skewImage.cols; i+=blockSize )
    {
        float x2 = eigen.at<cv::Vec6f>(j, i)[4];
        float y2 = eigen.at<cv::Vec6f>(j, i)[5];
        int angle_cell = angle(x2,y2);//感觉这里,x,y顺序写反了。其实没有写反,后面求了余角
        angle_list[(angle_cell + 180)%180]+=1.0;

    }
}

5) and then use a simple network model, the output of two decimals, multiplied by width, is in fact the left and right x, cut off the excess portion of the left and right

6) Finally, the model identification into the identification

2.opencv mat clone and copyTo What is the difference?

clone call copyTo, like

How 3.bitwise_not operation of the image

 

How 4.cmake make the project binary output file in the specified directory

   set(CMAKE_RUNTIME_OUTPUT_DIRECTORY, $(CMAKE_CURRENT_DIRECTORY))

 

5. CMakeLists.txt set the SET (CMAKE_C_FLAGS_DEBUG "-g -DDEBUG")
the SET (CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG"), can not debug, suggesting gdb xx prompt can not load symbol how to deal with?

  Setting set (CMAKE_BUILD_TYPE, DEBUG), so it

What is the role 6.cornerEigenValsAndVecs (skewImage, eigen, blockSize, sobel_window_size) is?

    Seeking one image, each blockSize, eigenvectors and eigenvalues ​​of the gradient matrix inside, one root of the two eigenvalues, respectively, of the two radii of the ellipse:

  1/\sqrt\lambda

Reference: https://www.cnblogs.com/ronny/p/4009425.html

7.Harris corner detection, its matrix, eigenvalues, eigenvectors are representative of what is the point?

 Representative matrix, a window, to each point, seeking gradient configuration

\begin{bmatrix} I_x^2 & I_xI_y \\ I_yI_x & I_y^2 \end{bmatrix}

, Then gradient matrix window summing all points.

 Characteristic value that represents the two radii of the ellipse, the two eigenvalues ​​are large, then a corner point is expressed.

8.hyperlpr license plate detection algorithm use what?

   Using a cascade forest haar feature detection algorithm

9. What is the algorithm used to identify?

  conv, resumed maxpool

   conv, resumed maxpool

   conv, resume

   dense, reread

    dense, reread

10. Effect Found:

Some complex cases, can not be detected, it is recommended to use dnn way to detect license plates, crnn detect text

 

    

 

 

Published 159 original articles · won praise 55 · views 360 000 +

Guess you like

Origin blog.csdn.net/northeastsqure/article/details/103833669