In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
C++ how to use OpenCV to get the card number, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
Using Canny edge extraction, turning grayscale image-- Gaussian blur-- morphological closed operation-- Canny edge extraction
Display effect
The red box is the result of processing.
Look for the outline and draw all the contours in the picture. let's take a look.
Then run it to see the effect.
You can see that all the found outlines are drawn on the right. How do we locate the area with the blue line? through the analysis, we can see that there are several characteristics:
The length of the area is more than half the length of the card number.
The rotation value of the rectangle formed by the region is very low and can be ignored.
Modify the setting of the search area if the length of the rectangle is half the length of the picture and the degree of rotation is less than 3
Then we'll run it again and have a look.
As you can see, we located directly to the area we were looking for.
Migration and interception according to fixed area
After reading the above, have you mastered how to use OpenCV to get the card number in C++? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.