[Digital image processing] horizontal and vertical projection image

 

Horizontal and vertical image projection

Action: binary images or gray scale or positioning the foreground and background segmentation obvious features, projection method is often used.
The horizontal projection of the image array column summation;
vertical direction of the projection, the image array row summation;
The positioning license plate: the first image binarization car, then the horizontal projection, identify the vertical position and height of the plate , and then the license plate image positioned last vertical projection, identify the total width of the digital licenses are part of the cut out. Then projection, cutting the bounding rectangle for each character found, each character is cut out to extract features, such as the percentage of black pixels copies 5X5 grid, and the number of each template library to match. Refined, the amount of data more standardized and more unified, standardized and licenses.

Horizontal projection implementation steps:
1. binary image, black object, the background is white
2. each row cycle, sequentially determines whether the pixel values in each column is black, all of the row count the number of black pixels. Provided that there are M row of black pixels, put the first row from the first row to the M columns is set to black.

Vertical projection implementation steps:
1. binary image, black object, the background is white
2. each column cycle, sequentially determines whether the pixel values for each row of black, black pixel count of the number of all columns. Provided that there are M columns of black pixels, put the first row to row is set to black.

 

Guess you like

Origin www.cnblogs.com/-wenli/p/11723185.html