Preprocessing of "OPENCV" images (grayscale, binary, character correction (rotation))

Source: Internet
Author: User

1, first load the original picture;

2, Cvcvtcolor (IMG, source, Cv_bgr2gray), convert to grayscale image;

3, Cvthreshold (source,source_gray,100,255,cv_thresh_binary), binary processing.

Since the original picture will have a certain angle, need to rotate, and the rotation can use the function provided by OPENCV, this article is written by itself, that is, by rotating 360, and record the rotation of an angle to maximize the projection in the x-axis direction.

, the processed picture effect is as follows:

The complete project has been uploaded to the CSDN, and the address of the project will be put up when it is passed.

Preprocessing of "OPENCV" images (grayscale, binary, character correction (rotation))

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.