A method and system for locating and cropping a car badge from a series of pictures
By employing image preprocessing, color mask filtering, region segmentation, and morphological feature analysis, combined with OpenCV and SciPy tools, this method automatically locates and crops car nameplates, solving the problems of low efficiency and recognition errors in traditional methods, and achieving fast and accurate nameplate recognition and cropping.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING ZHICHE RUIKONG INFORMATION TECH CO LTD
- Filing Date
- 2024-12-07
- Publication Date
- 2026-06-09
AI Technical Summary
Traditional methods for vehicle nameplate recognition rely on manual labor, which is inefficient and prone to errors. Existing deep learning-based methods have not yet been able to effectively solve the problems of automatic localization and cropping.
A combination of image preprocessing, color mask filtering, region segmentation, blurring, and morphological feature analysis, along with OpenCV and SciPy tools, is used to automatically locate and crop car nameplates.
It enables the rapid and accurate location and cropping of car nameplates from a series of images, improving recognition accuracy and robustness while reducing labor costs.
Smart Images

Figure FT_1
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and image processing, specifically a technology for automatically locating and cropping car nameplates. Background Technology
[0002] With the rapid development of the automotive industry, vehicle nameplates, as important identification markers, carry a wealth of information (such as vehicle model and production date). Identification and processing of vehicle nameplates are frequently required in the production, sales, and after-sales service stages of automobiles. Traditional methods typically rely on manual identification, which is inefficient and prone to errors. In recent years, deep learning-based image processing technology has emerged, effectively improving the accuracy and efficiency of image recognition. Therefore, developing an automated method capable of quickly and accurately locating and cropping vehicle nameplates from a series of images has significant practical implications. Summary of the Invention
[0003] This invention provides a method and system for locating and cropping vehicle nameplates from a series of images, aiming to improve the accuracy and robustness of nameplate recognition from a series of images. By combining recognition, localization, and cropping algorithm models, this method can automatically locate and crop vehicle nameplates from a series of images, thereby improving work efficiency and reducing labor costs. Attached Figure Description
[0004] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the embodiments will be briefly described below. Figure 1 This is an overall system block diagram of a method and system for identifying vehicle nameplates from a series of images, provided by an embodiment of the present invention. Figure 1 The right side describes the identification steps and methods used. Figure 1 The left side shows the system modules developed according to each step and method. Detailed Implementation
[0005] I. Based on the acquired images, the vehicle nameplate positioning and cropping method of the present invention includes the following steps, the specific framework of which can be found in the attached drawings of the specification. Figure 1 : 1. Image pre-cropping Pre-cropping the characters on the car nameplate image improves the accuracy of subsequent recognition. This step involves using preset parameters to uniformly crop areas with significant image interference to achieve optimal recognition results. The specific steps are as follows: The color image is converted to grayscale to reduce information content and computational complexity. Median filtering is used to remove noise from the image, smooth the image, and enhance features. The Otsu method is used to convert the image into a binary image. Then, the Canny edge detection algorithm is used to extract useful edge information in the image to facilitate the identification of the nameplate boundary. 2. Use a mask to filter out alternative locations. A color mask is created using preset parameters to filter out the locations of specific colors in the preprocessed image. First, the image is converted from the BGR (Blue, Green, Red) color space to the HSV (Hue, Saturation, Lightness) color space for better color processing and recognition. Based on the nameplate color to be recognized, a suitable HSV color range is determined experimentally, and the created mask is used to filter the original image, preserving regions of specific colors. Post-processing is performed on the mask and the filtered image to improve detection performance. Finally, the mask and the filtered image are visualized to check the results. Depending on the specific situation and recognition performance, parameters such as the color range and the size of the structural elements in morphological operations are adjusted to achieve optimal results. 3. Select the area with the highest density of candidate locations. The preprocessed image is divided into several regions, and the number of candidate locations within each region is counted. The region with the most candidate locations is selected as one of the localization criteria. The image is further divided into multiple smaller regions using a fixed-size grid. Each grid is traversed, and the number of pixels meeting the criteria in each grid is counted. Based on the statistical results, the region with the most candidate locations is selected. The coordinate range of the selected densest region in the original image is determined for subsequent operations. 4. Blur the area selected in step 2 The selected area in step 2 is blurred. This step reduces the number of candidate locations for subsequent processing and makes the features of the candidate locations more stable. The previously found contours are traversed, and OpenCV's Gaussian Blur is used to blur the region selected by the color mask for each contour. 5. Select the area that is optimally located from the other locations. Calculate the distance between each candidate position and other candidate positions. Then, based on the pre-defined positional features of the car nameplate, select the optimal candidate position from the blurred positions as one of the localization criteria. Use OpenCV to extract the center point of the candidate region, then use SciPy to calculate the distance between each candidate position, calculate the sum of the distances of each candidate position, find the minimum index, and finally define a feature verification function to check the optimal position. 6. Select the region with the best morphological characteristics. Based on the pre-defined shape characteristics of the car nameplate, including its size, the color characteristics of the content it contains, and its aspect ratio, the optimal one is selected from the blurred candidate positions as one of the positioning criteria. 7. Result Output Based on the positioning criteria obtained above, the location of the car nameplate is determined and then cut.
[0006] II. Identification System The vehicle nameplate recognition system of the present invention includes the following modules: 1. Image preprocessing module: This module is responsible for cropping images to reduce interference on the localization function in order to achieve the best recognition effect; 2. Identification and Localization Module: This module is responsible for identifying areas containing car nameplate features using methods such as color masking and blurring, as a localization reference; 3. Cropping Output Module: This module selects an appropriate range to crop the image based on the positioning reference.
Claims
1. A method for locating and cropping a car nameplate from a series of images, characterized in that, Includes the following steps: (1) Image pre-cropping; (2) Use a mask to filter out candidate locations; (3) Select the area with the highest density of candidate locations; (4) Blur the area selected in step 2; (5) Select the region that is optimally located from other locations; (6) Select the region with the best morphological characteristics; (7) Output the results.
2. The step (1) according to claim 1, characterized in that, The image pre-cropping method is as follows: The color image is converted to grayscale to reduce information content and computational complexity. Median filtering is used to remove noise from the image, smooth the image, and enhance features. The Otsu method is used to convert the image into a binary image. Then, the Canny edge detection algorithm is used to extract useful edge information from the image to facilitate the identification of the nameplate's boundaries.
3. Step (2) according to claim 1, characterized in that, The image analysis technique includes: creating a color mask using preset parameters to filter out the positions of specific colors in the preprocessed image.
4. Step (5) according to claim 1, characterized in that, The image analysis technique includes: using OpenCV to extract the center point of the candidate region, then using SciPy to calculate the distance between each candidate position, calculating the sum of the distances between each candidate position, finding the minimum index, and finally defining a feature verification function and checking the optimal position.
5. A system for implementing the method of claim 1, characterized in that, It includes the following three modules: (1) Image pre-cropping module, which is responsible for cropping the image to reduce the impact of interference on the positioning function in order to achieve the best recognition effect; (2) Identification and positioning module, which is responsible for identifying areas containing car nameplate features by using color masking, blurring and other methods as positioning reference; (3) Cropping module: This module selects a suitable range to crop the image based on the positioning reference.