A method, device, and electronic device for vehicle body type differentiation based on a smart camera

By acquiring vehicle body images from multiple cameras on the automobile production line, segmenting and extracting features, establishing multi-dimensional feature vectors, and comparing their similarity with an image feature database, the problem of low accuracy in vehicle body type recognition is solved, achieving accurate identification of vehicle body type and derived categories, and dynamic optimization of production parameters.

CN120298757BActive Publication Date: 2025-11-14BEIJING HINSONGYICHANG MACHINERY & ELECTRIC ENG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510319549.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-11-14
Estimated Expiration
2045-03-18

AI Technical Summary

Technical Problem

Existing technologies have low accuracy in vehicle body type recognition, and are particularly difficult to handle highly similar models or different derivative models of the same model.

Method used

By acquiring images of the car body to be identified from multiple cameras on the automobile production line, segmentation and feature extraction are performed to establish a multi-dimensional feature vector. This vector is then compared with an image feature database for similarity. Combined with image feature subset matching, accurate identification of car body type and derived category is achieved.

Benefits of technology

It improves the accuracy and granularity of vehicle body recognition, reduces human error, realizes intelligent and automated adjustment and optimization of the production process, and improves production efficiency and product quality consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120298757B_ABST
    Figure CN120298757B_ABST
Patent Text Reader

Abstract

A method, apparatus, and electronic device for vehicle body type differentiation based on a smart camera, relating to the field of data processing, are disclosed. The method involves: acquiring vehicle body images; segmenting the vehicle body regions in each image to obtain vehicle body features and establishing multi-dimensional feature vectors; determining the target vehicle body type as the type corresponding to the target image features if the similarity between the multi-dimensional feature vector and the target image features is greater than a preset similarity threshold; identifying multiple derived types and corresponding image feature subsets corresponding to the target vehicle body type; performing secondary segmentation on the vehicle body images based on the image feature subsets to obtain corresponding local features; matching the local features with each image feature subset to obtain the target derived category; and adjusting the production parameters corresponding to the vehicle body to be identified based on the target vehicle body type and the target derived type. Implementing the technical solution provided in this application improves the accuracy of vehicle body type identification on the production line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, specifically to a method, device, and electronic device for distinguishing vehicle body types based on a smart camera. Background Technology

[0002] With the rapid development of the global automotive industry and the diversification of consumer demands, the models on automotive production lines are becoming increasingly diverse and complex. This diversity in body types and their derivatives places higher demands on production line management and automated assembly technologies. Vehicle type and configuration directly impact material selection, assembly methods, and quality control during the manufacturing process. Therefore, the ability to quickly and accurately identify different body types and their derivatives is crucial for improving production efficiency and ensuring product quality.

[0003] Currently, vehicle body type identification mainly relies on manual visual inspection or automatic identification systems based on simple rules. These methods have many limitations: manual inspection is inefficient and easily affected by subjective factors, resulting in a high error rate, while rule-based automatic identification systems struggle to handle subtle differences between vehicle models, especially when dealing with highly similar models or different derivatives of the same model. Therefore, existing technologies suffer from low accuracy when identifying vehicle body types on production lines.

[0004] Therefore, there is an urgent need for a method, device, and electronic device for distinguishing vehicle body types based on smart cameras. Summary of the Invention

[0005] This application provides a method, device, and electronic device for distinguishing vehicle body types based on a smart camera, which improves the accuracy of vehicle body type identification on the production line.

[0006] A first aspect of this application provides a method for distinguishing vehicle body types based on a smart camera. The method includes: acquiring vehicle body images of a vehicle body to be identified from multiple cameras captured on an automobile production line; segmenting the vehicle body regions in each of the vehicle body images to obtain vehicle body features, and establishing a multi-dimensional feature vector based on the vehicle body features; acquiring an image feature database, the image feature database including multiple vehicle body types and image features corresponding to each vehicle body type; comparing the similarity of the multi-dimensional feature vector with each image feature in the image feature database; if the similarity between the multi-dimensional feature vector and the target image feature is determined to be greater than a preset similarity threshold, then determining the target vehicle body type corresponding to the vehicle body to be identified as the vehicle body type corresponding to the target image feature; determining multiple derived types corresponding to the target vehicle body type and image feature subsets corresponding to each derived type in the image feature dataset; performing secondary segmentation on the vehicle body images based on the image feature subsets to obtain corresponding local features; matching the local features with each of the image feature subsets to obtain the target derived type corresponding to the vehicle body to be identified; and adjusting the production parameters corresponding to the vehicle body to be identified based on the target vehicle body type and the target derived type.

[0007] By employing the aforementioned technical solution, images of the vehicle body to be identified are acquired from multiple cameras on the automotive production line. These images are then segmented and feature extracted to establish a multi-dimensional feature vector. This vector is then compared with image features in an image feature database to accurately identify the target vehicle body type. After determining the target vehicle body type, the corresponding derived types and image feature subsets are further identified in the image feature dataset. Local features are obtained through secondary segmentation of the vehicle body image and matched with the image feature subsets, allowing for fine-grained identification of the specific derived category of the vehicle body. Finally, based on the identified target vehicle body type and derived types, the production parameters of the vehicle body can be adjusted in a targeted manner, achieving intelligent and automated optimization of the production process. This solution, through multi-step, multi-granularity vehicle body feature extraction and comparison, combined with adaptive adjustment of production parameters, achieves accurate identification of vehicle body types and derived categories and dynamic optimization of production parameters. This not only improves the accuracy and granularity of vehicle body recognition, reducing errors and inefficiencies in manual judgment, but also allows for intelligent adjustment of production parameters based on the recognition results, improving production efficiency and product quality consistency, and reducing production costs.

[0008] Optionally, the step of performing secondary segmentation on the vehicle body image based on the image feature subset to obtain corresponding local features specifically includes: determining the distinguishing regions of each of the derived types in a preset vehicle body image according to the target vehicle body type; mapping the distinguishing regions onto the vehicle body image to obtain the target regions corresponding to each of the derived types in the vehicle body image; performing image segmentation on each of the target regions to obtain local images within each target region; and extracting local features from each of the local images, wherein the local features include local texture features, local color features, and local shape features.

[0009] By employing the aforementioned technical solution, distinguishing regions for each derived type are identified within a pre-defined vehicle body image. These regions are then mapped onto the vehicle body image to be identified, yielding the target region. Image segmentation and local feature extraction are performed on the target region. This approach fully leverages prior knowledge to selectively extract distinguishable feature information from key areas of the vehicle body image. The identification and mapping of distinguishing regions eliminates irrelevant background and interference areas in the vehicle body image, focusing on the target region that contributes most to derived type recognition. This improves recognition efficiency while maintaining accuracy. This technical solution further enhances the performance of vehicle body derived type recognition, achieving more accurate and comprehensive feature extraction and comparison in key areas. This lays a solid feature foundation for subsequent derived type matching, improving the intelligence level and practical effectiveness of the entire vehicle body type recognition process.

[0010] Optionally, matching the local features with each of the image feature subsets to obtain the target derived category corresponding to the vehicle body to be identified specifically includes: calculating the Euclidean distance between the local features and the image features in each of the image feature subsets to obtain a distance vector between the local features and each of the image feature subsets; performing a weighted summation on each distance value in the distance vector to obtain a weighted distance score between the local features and each of the image feature subsets, wherein the weight of each distance value is determined by a preset weighting model; sorting the weighted distance scores from largest to smallest to obtain the minimum weighted distance score; determining the derived category corresponding to the local features and the minimum image feature subset as the target derived category corresponding to the vehicle body to be identified, wherein the minimum image feature subset is the image feature subset corresponding to the minimum weighted distance score.

[0011] By employing the above technical solution, the distance vector between local features and image features in the image feature subsets is obtained by calculating the Euclidean distance between the local features and each image feature subset. This allows for a quantitative assessment of the similarity between local features and features of different derived types. Euclidean distance effectively measures the proximity of feature vectors in the feature space; a smaller distance indicates greater feature similarity, and a higher probability that the local feature matches the derived type corresponding to that image feature subset. After obtaining the distance vectors, a weighted sum of the distance values ​​is obtained to achieve a weighted distance score between the local features and each image feature subset, comprehensively considering the importance and contribution of different features. By introducing a pre-defined weight model, the weights of different features can be reasonably set and adjusted based on prior knowledge and experience, highlighting the influence of key features and suppressing the interference of secondary features, enabling the weighted distance score to more accurately reflect the overall matching degree between the local features and the image feature subsets. By sorting the weighted distance scores from smallest to largest, the image feature subset corresponding to the smallest weighted distance score is obtained, and its corresponding derived category is determined as the target derived category of the vehicle body to be identified. This allows for the identification of the derived type that best matches and is most similar to the local features.

[0012] Optionally, the acquisition of the image feature database specifically includes: acquiring multiple standard vehicle body images of different vehicle body types; preprocessing each of the standard vehicle body images, the preprocessing including image enhancement, noise removal, and image normalization; extracting features from the preprocessed standard vehicle body images to obtain standard image features corresponding to each vehicle body type; and establishing the image feature database based on the name of each vehicle body type and its corresponding standard image features.

[0013] By employing the aforementioned technical solution, and acquiring standard vehicle body images of multiple different vehicle body types, followed by image preprocessing including image enhancement, noise removal, and image normalization, higher-quality standard vehicle body images with more distinct features can be obtained. Image preprocessing removes noise interference from the images, improves image contrast and clarity, and makes the vehicle body feature information more prominent and stable. Simultaneously, image normalization unifies vehicle body images of different sizes and resolutions to the same scale and size, facilitating subsequent feature extraction and comparison. Feature extraction is then performed on the preprocessed standard vehicle body images to obtain standard image features corresponding to each vehicle body type, resulting in high-quality, highly discriminative vehicle body feature representations.

[0014] Optionally, establishing a multi-dimensional feature vector based on the vehicle body features specifically includes: performing grayscale processing on the vehicle body image to obtain a grayscale image; performing edge detection on the grayscale image to obtain vehicle body contour features; extracting texture features, color features, and shape features from the vehicle body image; and establishing the multi-dimensional feature vector based on the vehicle body contour features, texture features, color features, and shape features, wherein each dimension corresponds to one of the vehicle body features.

[0015] By employing the above technical solution, grayscale processing of the vehicle image simplifies the color information and highlights the light and shadow variations and structural contours of the vehicle body. Grayscale processing removes redundant color interference from the image, focusing on key features such as the shape, edges, and texture of the vehicle body, providing a clearer and more stable foundation for subsequent feature extraction.

[0016] Optionally, after the step of acquiring vehicle images of the vehicle body to be identified from multiple cameras on the automobile production line, the method further includes: determining whether the imaging quality of each of the vehicle images meets the preset clarity requirement; if there is a vehicle image whose imaging quality does not meet the preset clarity requirement, then sending an imaging quality adjustment instruction to the corresponding camera and acquiring the adjusted vehicle image, until the imaging quality of each of the vehicle images meets the preset clarity requirement.

[0017] By adopting the above technical solution and introducing an image quality assessment and feedback adjustment mechanism, a closed-loop image quality control process is constructed. It rigorously controls and dynamically optimizes image quality at the input end of vehicle body type recognition, ensuring the clarity and stability of the input image and reducing the impact of low-quality images on recognition accuracy. Simultaneously, real-time camera parameter adjustment improves adaptability to environmental changes and external interference, enabling vehicle body type recognition to operate stably in complex and ever-changing production line environments. This adaptive optimization mechanism based on image quality feedback not only improves the reliability and robustness of recognition but also reduces the requirements for hardware equipment and shooting conditions.

[0018] Optionally, determining whether the imaging quality of each of the vehicle body images meets the preset sharpness requirement specifically includes: calculating the sharpness score of each of the vehicle body images, wherein the sharpness score calculation method includes a gray-level gradient method or a frequency domain analysis method; comparing the sharpness score of each of the vehicle body images with a preset sharpness threshold; if the sharpness score of each of the vehicle body images is greater than the preset sharpness threshold, then it is determined that the imaging quality of each of the vehicle body images meets the preset sharpness requirement; if there is any vehicle body image whose sharpness score is less than or equal to the preset sharpness threshold, then it is determined that there is a vehicle body image whose imaging quality does not meet the preset sharpness requirement.

[0019] By adopting the above technical solution, quantitative assessment and automatic judgment of vehicle body image quality are achieved. Using an objective sharpness evaluation algorithm, image quality is transformed into measurable and comparable numerical indicators, avoiding the subjectivity and inconsistency of manual evaluation. Simultaneously, the setting of preset sharpness thresholds provides clear standards and references for image quality control, making quality judgment more standardized and operable. Through real-time comparison of sharpness scores with preset sharpness thresholds, unqualified vehicle body images can be quickly and accurately filtered out, triggering corresponding image quality adjustment processes, thus achieving automated quality monitoring and optimization of the image acquisition process. This not only improves the reliability and stability of vehicle body type recognition but also reduces the burden of manual quality inspection, enhancing the intelligence and efficiency of the entire recognition process.

[0020] A second aspect of this application provides a vehicle body type differentiation device based on a smart camera. The device includes an acquisition module and a processing module, wherein: the acquisition module is used to acquire vehicle body images of a vehicle body to be identified captured by multiple cameras on an automobile production line; the processing module is used to segment the vehicle body regions in each of the vehicle body images to obtain vehicle body features, and to establish a multi-dimensional feature vector based on the vehicle body features; the acquisition module is further used to acquire an image feature database, the image feature database including multiple vehicle body types and image features corresponding to each vehicle body type; the processing module is further used to compare the similarity of the multi-dimensional feature vector with each image feature in the image feature database; the processing module is further used to determine the similarity of the multi-dimensional feature vector if... If the similarity between the feature vector and the target image feature is greater than a preset similarity threshold, then the target vehicle type corresponding to the vehicle body to be identified is determined to be the vehicle type corresponding to the target image feature. The processing module is further configured to determine multiple derived types corresponding to the target vehicle type and image feature subsets corresponding to each derived type in the image feature dataset. The processing module is further configured to perform secondary segmentation on the vehicle image based on the image feature subsets to obtain corresponding local features. The processing module is further configured to match the local features with each image feature subset to obtain the target derived type corresponding to the vehicle body to be identified. The processing module is further configured to adjust the production parameters corresponding to the vehicle body to be identified based on the target vehicle type and the target derived type.

[0021] A third aspect of this application provides an electronic device including a processor, a memory, a user interface, and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any of the foregoing.

[0022] A fourth aspect of this application provides a computer-readable storage medium storing instructions that, when executed, perform the method described in any of the preceding descriptions.

[0023] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:

[0024] 1. By acquiring images of the vehicle body to be identified from multiple cameras on the automobile production line, the images are segmented and features extracted to establish a multi-dimensional feature vector. This vector is then compared with image features in an image feature database to accurately identify the target vehicle body type. After determining the target vehicle body type, the corresponding derived types and image feature subsets are further identified in the image feature dataset. Local features are obtained through secondary segmentation of the vehicle body image and matched with the image feature subsets to finely identify the specific derived category of the vehicle body. Finally, based on the identified target vehicle body type and derived type, the production parameters of the vehicle body can be adjusted accordingly, achieving intelligent and automated optimization of the production process. This solution, through multi-step, multi-granularity vehicle body feature extraction and comparison, combined with adaptive adjustment of production parameters, achieves accurate identification of vehicle body type and derived categories and dynamic optimization of production parameters. This not only improves the accuracy and granularity of vehicle body recognition, reducing errors and inefficiencies in manual judgment, but also intelligently adjusts production parameters based on the recognition results, improving production efficiency and product quality consistency, and reducing production costs. Attached Figure Description

[0025] Figure 1 This is a flowchart illustrating a method for distinguishing vehicle body types based on a smart camera, as disclosed in an embodiment of this application.

[0026] Figure 2 This is a schematic diagram of a vehicle body type differentiation device based on a smart camera disclosed in an embodiment of this application;

[0027] Figure 3 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application.

[0028] Explanation of reference numerals in the attached drawings: 201, acquisition module; 202, processing module; 300, electronic device; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. Detailed Implementation

[0029] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0030] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.

[0031] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0032] This application provides a method for distinguishing vehicle body types based on a smart camera, referring to... Figure 1 , Figure 1 This is a flowchart illustrating a vehicle body type differentiation method based on a smart camera, provided in an embodiment of this application. The method is applied to a server, which executes the vehicle body type differentiation program based on the smart camera and provides background services to user devices. The server can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center. The server can communicate with the user device via a wired or wireless network. The method includes steps S101 to S109, as follows:

[0033] Step S101: Obtain vehicle body images of the vehicle body to be identified from multiple cameras on the automobile production line.

[0034] In step S101, the server establishes a communication link with the control system of the automotive production line. The control system is responsible for managing and coordinating the operation of various devices on the production line, including multiple smart cameras. The communication link can be a wired connection, such as Ethernet or Industrial Ethernet, or a wireless connection, such as Wi-Fi or 5G network. After establishing the communication link, the server can exchange data and instructions with the control system. Next, the server sends a request to the control system to acquire images of the vehicle body. Upon receiving the request, the control system forwards it to the corresponding camera. Then, the camera captures images of the vehicle body to be identified on the automotive production line according to the parameters in the request. To comprehensively capture all parts of the vehicle body, multiple cameras are usually installed on the production line, distributed at different angles and positions on the vehicle body. For example, one camera can be installed at the front, rear, left, and right sides of the vehicle body to capture images of the front, back, left side, and right side of the vehicle body. The images captured by the cameras are generated at a specified resolution and format, such as 1920×1080 pixel JPG format. Finally, the camera uploads the captured images of the vehicle body to the control system, which then forwards the images to the server. After receiving the vehicle image, the server stores it in memory or on hard drive for subsequent processing and analysis. The entire process can be real-time or timed. In real-time mode, the camera uploads the image to the server immediately after capturing it; in timed mode, the camera uploads images at set time intervals (e.g., every 5 seconds). The server can choose the appropriate acquisition method based on its needs.

[0035] For example, a car production line is equipped with four high-definition cameras, positioned at the front, rear, left, and right of the car body. Each camera has a resolution of 2560×1440 pixels and outputs images in PNG format. Every 10 seconds, the server sends a request to the control system, requesting that all four cameras simultaneously capture and upload images. Upon receiving the request, the control system immediately triggers the four cameras to capture images and upload them to the server. The server receives four PNG images of the car body, saves them as front.png, back.png, left.png, and right.png respectively, and then begins subsequent analysis and recognition of these images.

[0036] In one possible implementation, after step S101, the method further includes: determining whether the imaging quality of each vehicle body image meets the preset clarity requirement; if there is a vehicle body image whose imaging quality does not meet the preset clarity requirement, then sending an imaging quality adjustment instruction to the corresponding camera and acquiring the adjusted vehicle body image, until the imaging quality of each vehicle body image meets the preset clarity requirement.

[0037] Specifically, after acquiring the vehicle image, the server evaluates its quality to ensure reliable results in subsequent analysis and processing. Image quality here primarily refers to image sharpness, which can be measured using common sharpness metrics such as image gradient, contrast, and entropy.

[0038] The server compares the sharpness score of each received vehicle image with a preset sharpness requirement, which is a pre-defined threshold. If an image's sharpness score is below this threshold, its image quality is considered unsatisfactory and may affect subsequent analysis results. In this case, the server sends an image quality adjustment command to the camera that captured the image, requesting it to adjust imaging parameters such as focus and exposure to obtain a sharper image. After issuing the adjustment command, the server waits for a period of time for the camera to complete the parameter adjustments before acquiring the adjusted image again. Upon receiving the new image, the server re-evaluates its sharpness and compares it with the previous score to check if the image quality has improved. If the adjusted image quality still does not meet the preset sharpness requirement, the server sends the adjustment command again, repeating the above process until the image quality from all cameras meets the preset sharpness requirement.

[0039] For example, the server detects a blurry image of a car body taken by camera 2 through a sharpness assessment, with a sharpness score of 0.6, below the preset threshold of 0.8. The server then sends an adjustment command to camera 2, instructing it to shorten its lens focusing distance by 0.5 millimeters. After making the adjustment, camera 2 takes another picture of the car body and sends the new image to the server. The server assesses the sharpness of the new image, obtaining a score of 0.85, which meets the preset sharpness requirement. Therefore, the server considers the image quality improved and can proceed to the next analysis and processing stage. This process is repeated until the image quality from all cameras meets the requirements.

[0040] In one possible implementation, determining whether the imaging quality of each vehicle body image meets the preset sharpness requirement specifically includes: calculating the sharpness score of each vehicle body image, wherein the sharpness score calculation method includes a gray-level gradient method or a frequency domain analysis method; comparing the sharpness score of each vehicle body image with a preset sharpness threshold; if the sharpness score of each vehicle body image is greater than the preset sharpness threshold, then it is determined that the imaging quality of each vehicle body image meets the preset sharpness requirement; if there is any vehicle body image whose sharpness score is less than or equal to the preset sharpness threshold, then it is determined that there is a vehicle body image whose imaging quality does not meet the preset sharpness requirement.

[0041] Specifically, the server determines whether the image quality of the vehicle body image meets the preset sharpness requirements by calculating a sharpness score. The sharpness score quantifies the sharpness of the image; a higher score indicates a sharper image with richer details. The server can use either the grayscale gradient method or frequency domain analysis to calculate the sharpness score. In this embodiment, the grayscale gradient method can be understood as a spatial domain-based method, the basic idea of ​​which is to use the changes in grayscale values ​​of adjacent pixels in the image to reflect the image's sharpness. Specifically, the server first converts the vehicle body image into a grayscale image, and then calculates the grayscale difference between each pixel and its surrounding pixels, i.e., the gradient value. The larger the gradient value, the higher the contrast between pixels, and the sharper the image. Averaging the gradient values ​​of all pixels yields the sharpness score for the entire image.

[0042] Frequency domain analysis uses the frequency characteristics of an image to evaluate its sharpness. The server uses mathematical tools such as Fourier transform to convert the vehicle image from the spatial domain to the frequency domain, obtaining the image's spectral information. In the spectrogram, high-frequency components correspond to details and texture information in the image, while low-frequency components correspond to the basic outline and background. Generally, sharp images have richer high-frequency components in the frequency domain, while blurry images have fewer. Therefore, the server can obtain a sharpness score by calculating the energy proportion of high-frequency components in the image's spectrum.

[0043] Regardless of the method used, the server will ultimately obtain a quantified sharpness score. Next, the server will compare this score with a preset sharpness threshold. The preset sharpness threshold can be set based on actual application needs and experience, representing the minimum requirement for image quality; this application does not limit the specific value of the preset sharpness threshold. If the sharpness score of the vehicle image is higher than the preset sharpness threshold, the image quality is considered acceptable and meets the preset sharpness requirement; conversely, if the score is lower than or equal to the preset sharpness threshold, the image is considered insufficiently sharp, and the image quality needs improvement.

[0044] The server evaluates the sharpness of each received vehicle image and compares it against a threshold. If the sharpness score of all images exceeds the preset sharpness threshold, the server considers the imaging quality of each camera to meet the requirements and can proceed directly to the subsequent recognition and analysis process. However, if the sharpness score of any image fails to meet the preset sharpness threshold, the server will mark the source of the image with substandard imaging quality and trigger a corresponding adjustment command to notify the problematic camera to optimize its imaging parameters.

[0045] Step S102: Segment the vehicle body region in each vehicle body image to obtain vehicle body features, and establish a multi-dimensional feature vector based on the vehicle body features.

[0046] In step S102, a multi-dimensional feature vector is established based on the vehicle body features. Specifically, this includes: converting the vehicle body image to grayscale to obtain a grayscale image; performing edge detection on the grayscale image to obtain the vehicle body contour features; extracting the texture features, color features, and shape features of the vehicle body image; and establishing a multi-dimensional feature vector based on the vehicle body contour features, texture features, color features, and shape features, where each dimension corresponds to a different vehicle body feature.

[0047] Specifically, the server performs feature extraction and vector representation on the acquired vehicle body image to prepare for subsequent type recognition. First, the server preprocesses the original color vehicle body image, converting it to a grayscale image. Grayscale conversion eliminates color interference in the image, highlights the structural and shape features of the vehicle body, and reduces the complexity of subsequent calculations. Next, the server performs edge detection on the grayscale image to extract the vehicle body's contour features. Edge detection algorithms can include Canny and Sobel algorithms, which calculate the gradient and direction of pixels in the image to find areas with significant grayscale value changes, thus outlining the vehicle body's external contour. Through edge detection, the server can obtain overall shape information of the vehicle body, such as its aspect ratio and the concavity / convexity of the contour.

[0048] In addition to contour features, the server further extracts texture features from the vehicle image. Texture reflects the visual characteristics of the vehicle's surface material, such as smoothness and regularity. The server can use some classic texture descriptors, such as LBP (Local Binary Pattern) and HOG (Histogram of Gradient Orientation), to divide the vehicle image into multiple small regions, count the gradient information of pixels in each region, and generate corresponding texture feature vectors.

[0049] The color of the vehicle body is also an important identification clue. Although the image has been converted to grayscale, the server can still extract color features from the original color image. Color features include color histograms, color moments, etc., which describe the pixel distribution of the vehicle body image across different color channels. By quantizing and encoding these color features, the server can obtain a compact color feature vector.

[0050] Finally, the server also extracts features reflecting the vehicle's shape, such as its area, perimeter, and rectangularity. These features can be obtained through geometric measurements of the vehicle's outline, such as approximating the outline as a minimum bounding rectangle and calculating the rectangle's aspect ratio and area. Shape features can help distinguish the overall appearance differences between different types of vehicle bodies.

[0051] After extracting the various vehicle body features mentioned above, the server combines them into a multi-dimensional feature vector. Each dimension of this vector corresponds to a specific vehicle body feature, such as contour features, texture features, color features, and shape features. By integrating different types of features into a single vector, the server can comprehensively describe and characterize the vehicle body from multiple perspectives.

[0052] Step S103: Obtain the image feature database, which includes multiple vehicle body types and the image features corresponding to each vehicle body type.

[0053] In step S103, the image feature database is obtained, which specifically includes: obtaining standard body images of multiple different body types; preprocessing each standard body image, including image enhancement, noise removal and image normalization; extracting features from the preprocessed standard body images to obtain standard image features corresponding to each body type; and establishing an image feature database based on the name of each body type and the corresponding standard image features.

[0054] Specifically, the server acquires multiple standard vehicle body images of different body types. These images can come from design drawings provided by vehicle manufacturers or from real-vehicle photographs taken under ideal conditions. The standard images need to cover all body types the server needs to identify, such as sedans, SUVs, and pickup trucks. Simultaneously, to improve the reliability of feature extraction, multiple standard images of each type can be prepared at different angles and under different lighting conditions. After acquiring the standard body images, the server performs a series of preprocessing operations on them. First, image enhancement is performed by adjusting parameters such as brightness, contrast, and sharpness to make the visual features of the vehicle body more obvious and prominent. Next, noise removal is performed using methods such as median filtering and Gaussian filtering to eliminate random noise and interference factors in the image, improving image quality. Finally, image normalization is performed, unifying images of different sizes and resolutions to a fixed size and proportion to facilitate subsequent feature extraction and comparison.

[0055] After preprocessing, the server extracts features from each standard vehicle body image. The extracted feature types are similar to those in step S102, including contour features, texture features, color features, and shape features. The server uses the same feature extraction algorithm and parameter settings as in step S102 to ensure that the extracted standard features are consistent with the actual vehicle body features in terms of format and semantics.

[0056] By integrating and averaging the features of multiple standard images of the same type, the server can obtain standard feature templates for each car body type. These templates represent the typical characteristics of that type of car body and are instructive for identification. For example, the server can extract features such as an average aspect ratio of 3:1, predominantly black and white colors, and streamlined outlines from multiple standard car images, and use these features as standard features for car types.

[0057] Finally, the server associates the extracted standard features with the corresponding vehicle body type names to construct an image feature database. This database can be in key-value pair format, with the vehicle body type name as the key and the standard features of that type as the value. Each entry in the image feature database represents a known vehicle body type and its recognition reference standard.

[0058] For example, the image feature database built by the server contains the following entries:

[0059] "Sedan": [Contour feature vector A, Texture feature vector B, Color feature vector C, Shape feature vector D];

[0060] "SUV": [Contour feature vector E, texture feature vector F, color feature vector G, shape feature vector H];

[0061] "Pikachu": [Contour feature vector I, texture feature vector J, color feature vector K, shape feature vector L];

[0062] Here, letters A through L represent different feature vectors. These feature vectors are extracted and fused from multiple standard images of the corresponding vehicle body type, representing the typical characteristics of that type.

[0063] Step S104: Compare the similarity between the multi-dimensional feature vector and each image feature in the image feature database.

[0064] In step S104, the server compares the multi-dimensional feature vector extracted from the image of the vehicle to be identified with the standard features in the image feature database to determine the type of vehicle. First, the server reads the standard feature vector for each known vehicle type from the image feature database. These standard feature vectors have the same dimensions and feature order as the feature vector of the vehicle to be identified, ensuring their comparability.

[0065] Next, the server selects a similarity metric to calculate the similarity between two feature vectors. Similarity metrics include Euclidean distance, cosine similarity, and Jaccard similarity. Euclidean distance measures the straight-line distance between two vectors in space; a smaller distance indicates greater similarity. Cosine similarity measures the angle between two vectors; a smaller angle indicates greater similarity. Jaccard similarity measures the degree of overlap between two vectors; more overlap indicates greater similarity. The server can flexibly choose an appropriate similarity metric.

[0066] After selecting a similarity measurement method, the server begins to traverse each standard feature vector in the image feature database, calculating its similarity with the feature vector of the vehicle body to be identified. Taking Euclidean distance as an example, the server subtracts the feature values ​​of corresponding dimensions in the two vectors, squares the result, sums the sums over all dimensions, and finally takes the square root to obtain the straight-line distance between the two vectors in the feature space. By repeating this process, the server can obtain the similarity score between the vehicle body to be identified and each known vehicle body type.

[0067] To intuitively understand the similarity comparison process, let's take an example: Suppose the feature vector of the vehicle to be identified is [0.2, 0.5, 0.8]. The image feature database contains three types of standard feature vectors: sedan: [0.1, 0.4, 0.9]; SUV: [0.3, 0.6, 0.7]; pickup truck: [0.4, 0.3, 0.6]. Using Euclidean distance to calculate similarity yields the following results:

[0068] Distance to the car: sqrt((0.2-0.1) 2 + (0.5-0.4) 2 + (0.8-0.9) 2 ) = 0.173

[0069] Distance to SUV: sqrt((0.2-0.3) 2 + (0.5-0.6) 2 + (0.8-0.7) 2 ) = 0.173

[0070] Distance to the pickup truck: sqrt((0.2-0.4) 2 + (0.5-0.3) 2 + (0.8-0.6) 2 ) = 0.374

[0071] The calculation results show that the feature vector distances between the vehicle body to be identified and sedans and SUVs are equal, and smaller than the distances between them and pickup trucks. Therefore, from the perspective of feature similarity, the vehicle body to be identified is more likely to belong to the sedan or SUV type.

[0072] In real-world vehicle recognition tasks, feature vectors have a much higher dimensionality than examples and are more diverse. Servers need to perform efficient similarity calculations and sorting within massive amounts of feature data. To improve comparison efficiency, servers can employ optimization strategies such as using data structures like KD-trees and hash tables to accelerate nearest neighbor search, or using dimensionality reduction algorithms like PCA to compress the feature vector's dimensionality.

[0073] Step S105: If the similarity between the multi-dimensional feature vector and the target image feature is greater than the preset similarity threshold, then the target body type corresponding to the body to be identified is determined to be the body type corresponding to the target image feature.

[0074] In step S105, the server needs to set a preset similarity threshold. This threshold indicates the degree of similarity between the feature vector of the vehicle body to be identified and the standard feature vector before they are considered to belong to the same type. The size of the preset similarity threshold can be determined according to the actual recognition needs and data characteristics, ensuring sufficient discriminability while avoiding excessive strictness that could lead to a decrease in the recognition rate. Typically, a suitable threshold can be selected by testing a set of validation samples and statistically analyzing the recognition accuracy under different thresholds. This application does not limit the specific value of the preset similarity threshold.

[0075] After determining the preset similarity threshold, the server compares the similarity score of the feature vector of the vehicle body to be identified with that of each standard feature vector. If the similarity score of a standard feature vector is greater than or equal to the preset similarity threshold, the vehicle body to be identified is considered to match the vehicle body type corresponding to that standard feature vector, meaning the vehicle body to be identified belongs to that vehicle body type.

[0076] For example, the server sets a preset similarity threshold of 0.8, meaning that a similarity score of 0.8 or higher is considered a match. In step S104, the similarity scores of the vehicle body to be identified with sedans, SUVs, and pickup trucks are 0.9, 0.7, and 0.6, respectively. Since the similarity score with sedans (0.9) is greater than the threshold of 0.8, while the similarity scores with other types are all less than the threshold, the server determines that the vehicle body to be identified belongs to the sedan type.

[0077] If multiple standard feature vectors have similarity scores greater than or equal to a preset similarity threshold, the server can select the one with the highest similarity as the recognition result. For example, if the similarity score of the vehicle body to be identified reaches 0.85 with both sedans and SUVs, but the similarity score with a pickup truck is 0.75, the server will still identify it as a sedan.

[0078] In some cases, the similarity between the vehicle body to be identified and all standard feature vectors may be lower than a preset similarity threshold. This means that the features of the vehicle body do not match the known types and may belong to a new, unknown type. In this case, the server can either mark it as an "unknown type" or, based on similarity ranking, classify it into the closest known type.

[0079] Step S106: Determine multiple derived types corresponding to the target vehicle body type and the image feature subsets corresponding to each derived category in the image feature dataset.

[0080] In step S106, after identifying the basic type of the vehicle body to be identified (such as a sedan), the server further determines its specific derived type (such as a coupe, three-box sedan, hatchback, etc.). The purpose of this step is to achieve more refined vehicle body recognition and provide richer and more accurate vehicle model information.

[0081] First, the server finds the set of derived types corresponding to the target vehicle body type in the image feature dataset. The image feature dataset not only contains the standard image features of each vehicle body type, but also features of multiple derived types under each basic type. These derived types are subclasses based on differences in appearance, structure, function, etc., of the basic type. For example, for the basic type "sedan," there can be the following derived types: coupe, sedan, and hatchback.

[0082] The server queries the type relationship table in the image feature dataset to find all derived types (such as "coupe," "sedan," and "hatchback") corresponding to the target car body type (e.g., "sedan"). Next, the server extracts a subset of image features for each derived type from the image feature dataset. This subset contains unique appearance and structural features of that derived type beyond the basic features. These features are typically reflected in local details of the car body, such as the roofline, rear styling, and the number of doors. By combining these features, car bodies belonging to the same basic type but with different derived types can be distinguished.

[0083] For example, for the "coupe" derivative type, its feature subset might include: Roofline: a smooth, flowing, sloping arc; Rear styling: a short, high rear, sometimes with a small spoiler; Number of doors: typically two or four doors. The server associates the image feature subset for each derivative type with its type name, forming a derivative type feature dictionary. Each entry in this dictionary represents a derivative type and the features required for its identification.

[0084] Step S107: Perform secondary segmentation on the vehicle body image based on the image feature subset to obtain the corresponding local features.

[0085] In step S107, the vehicle body image is segmented a second time based on the image feature subset to obtain the corresponding local features. Specifically, this includes: determining the distinguishing regions of each derived type in the preset vehicle body image according to the target vehicle body type; mapping the distinguishing regions onto the vehicle body image to obtain the target regions corresponding to each derived type in the vehicle body image; performing image segmentation on each target region to obtain local images within each target region; and extracting local features from each local image, including local texture features, local color features, and local shape features.

[0086] Specifically, the server performs secondary segmentation on the vehicle body image based on a subset of image features, extracting local features relevant to derived type recognition. First, the server determines the distinguishing regions in the vehicle body image for different derived types. Distinguishing regions refer to local areas on the vehicle body image where different derived types exhibit significant differences, such as the streamlined roof of a coupe or the hatchback tailgate of a hatchback. These regions embody the unique appearance and structural characteristics of the derived type and play a crucial role in its recognition. To determine these distinguishing regions, the server can utilize preset vehicle body images. These preset images are specifically selected and labeled for each derived type, highlighting its typical features and distinguishing regions. The server analyzes standard vehicle body images to extract information such as the location, size, and shape of the distinguishing regions for each derived type, forming a distinguishing region template. Next, the server maps the distinguishing region template onto the vehicle body image to be recognized. Since the shooting angle, size, and position of different vehicle body images may vary, the server uses image registration technology to align and match the distinguishing region template with the vehicle body image. By adjusting parameters such as scaling, rotation, and translation of the region discrimination template, it is made to overlap as closely as possible with the corresponding region in the vehicle body image. After mapping, the server obtains the target region in the vehicle body image for each derived type. These target regions are the parts of the vehicle body image that require key analysis and feature extraction; they correspond to the key regions in the region discrimination template.

[0087] Then, the server performs image segmentation on each target region. Image segmentation separates the target region from the background of the vehicle image, obtaining independent local images. Image segmentation methods can include threshold-based segmentation, edge-based segmentation, region-based segmentation, etc. Finally, the server extracts local features from the segmented local images. Local features are quantitative descriptions of the visual attributes of local images, such as texture, color, and shape, and they can characterize the uniqueness and discriminability of local images. Local features include: local texture features, used to describe the texture patterns and regularity of local images, such as LBP (Local Binary Pattern) and HOG (Histogram of Oriented Gradients); local color features, used to describe the color distribution and statistical characteristics of local images, such as color histograms and color moments; and local shape features, used to describe the geometric shape and contour characteristics of local images, such as edge direction, curvature, and topological structure. The server uses feature extraction algorithms to transform each local image into a set of numerical feature vectors. These local feature vectors, together with the corresponding derived type labels, constitute the training dataset for derived type recognition.

[0088] For example, given an image of a sports car, the server first locates the target regions of the roof and rear in the car's interior image based on a sports car's region discrimination template. Then, the server uses an image segmentation algorithm to segment these two target regions, obtaining separate partial images of the roof and rear. Next, the server extracts local texture features, local color features, and local shape features from these two partial images, respectively, resulting in two sets of local feature vectors. These local feature vectors will be used for subsequent derived type recognition and comparison.

[0089] Step S108: Match the local features with each subset of image features to obtain the target derived category corresponding to the vehicle body to be identified.

[0090] In step S108, the local features are matched with each subset of image features to obtain the target derived category corresponding to the vehicle body to be identified. Specifically, this includes: calculating the Euclidean distance between the local features and the image features in each subset of image features to obtain the distance vector between the local features and each subset of image features; performing a weighted summation of each distance value in the distance vector to obtain the weighted distance score between the local features and each subset of image features, wherein the weight of each distance value is determined by a preset weighting model; sorting the weighted distance scores from largest to smallest to obtain the minimum weighted distance score; and determining the derived category corresponding to the local features and the minimum image feature subset as the target derived category corresponding to the vehicle body to be identified, wherein the minimum image feature subset is the image feature subset corresponding to the minimum weighted distance score.

[0091] Specifically, the server determines the target derived category of the vehicle body to be identified by matching the extracted local features with subsets of image features. First, the server calculates the Euclidean distance between the local features and the image features in each subset of image features. Euclidean distance is a commonly used similarity metric that measures the straight-line distance between two feature vectors in the feature space. The smaller the distance, the more similar the two features are, and the more likely the corresponding vehicle body belongs to the same derived type. The server calculates the Euclidean distance between the local feature vector and all feature vectors in each subset of image features sequentially, obtaining a set of distance values ​​that form the distance vector between the local feature and the subset of image features. This process is repeated until the server obtains the distance vectors between the local feature and all subsets of image features. Next, the server performs a weighted summation of the distance values ​​in each distance vector to obtain a weighted distance score between the local feature and each subset of image features. Weighted summation is a method that comprehensively considers multiple distance values. By assigning different weights to each distance value, the influence of certain important features can be highlighted, improving the accuracy of recognition. The weight values ​​are determined by a preset weight model. The pre-defined weight model is derived by estimating and quantifying the importance of different features based on prior knowledge and experience. It comprehensively considers the contribution and discriminative power of each feature in derived type recognition, assigning a corresponding weight coefficient to each feature. The server can obtain a reasonable pre-defined weight model through analysis and optimization of a large number of training samples, and then apply it during the recognition process.

[0092] After calculating all weighted distance scores, the server sorts these scores from smallest to largest. The smaller the score, the better the local feature matches the corresponding subset of image features; in other words, the more similar the vehicle body to be identified is to the derived type corresponding to that subset of image features. Finally, the server selects the subset of image features with the smallest weighted distance score and determines its corresponding derived type as the target derived category of the vehicle body to be identified. This smallest score reflects the best matching degree between the local feature and a certain subset of image features, and the corresponding derived type is the specific type to which the vehicle body to be identified most likely belongs.

[0093] For example, for a coupe body to be identified, the server extracts local feature vectors from its roof and rear. Then, the server matches these two local feature vectors with image feature subsets derived from coupe, sedan, and hatchback types, calculating the Euclidean distance between them to obtain multiple sets of distance vectors. Next, the server uses a pre-defined weighted model to perform a weighted sum of each set of distance vectors, obtaining a weighted distance score between the local feature and each derived type. Finally, the server compares these scores and finds that the score corresponding to the coupe type is the smallest, thus identifying the body as a coupe.

[0094] Step S109: Adjust the production parameters corresponding to the vehicle body to be identified based on the target vehicle body type and the target derived type.

[0095] In step S109, the server adjusts the production parameters of the vehicle body to be identified according to the identified target body type and target derivative type. The server establishes a production parameter database. This database stores standard production parameters corresponding to different body types and derivative types. These parameters cover various aspects of body production, such as material selection, mold design, welding processes, and painting / assembly methods. Each parameter has a recommended value range or setting to ensure that the produced body meets the characteristics and performance requirements of the vehicle model. After identifying the target body type and target derivative type of the vehicle body to be identified, the server searches for the corresponding standard production parameters in the production parameter database. This process is equivalent to finding the "production guide" based on the vehicle body's "identity card."

[0096] Then, the server compares the standard production parameters with the current production parameters of the vehicle body to be identified. By analyzing the differences between the two sets of parameters, the server can identify the deviation between the current production settings and the optimal settings, and determine the specific parameters that need to be adjusted and the adjustment range. Next, the server sends the adjusted production parameters to the production control system. The production control system is the bridge connecting the server and the production equipment. It is responsible for translating the instructions issued by the server into control code that the equipment can execute, and supervising the equipment to produce according to the adjusted production parameters.

[0097] Reference Figure 2This application also provides a vehicle body type differentiation device based on a smart camera. This device is a server, comprising an acquisition module 201 and a processing module 202. The acquisition module 201 acquires vehicle body images of the vehicle body to be identified from multiple cameras captured on an automobile production line. The processing module 202 segments the vehicle body regions in each vehicle body image to obtain vehicle body features and establishes a multi-dimensional feature vector based on these features. The acquisition module 201 also acquires an image feature database, which includes multiple vehicle body types and corresponding image features for each type. The processing module 202 further compares the similarity between the multi-dimensional feature vector and the image features in the image feature database. The processing module 202 is further configured to determine the target vehicle type corresponding to the vehicle body to be identified as the vehicle body type corresponding to the target image features if the similarity between the multi-dimensional feature vector and the target image features is greater than a preset similarity threshold; the processing module 202 is further configured to determine multiple derived types corresponding to the target vehicle body type and image feature subsets corresponding to each derived category in the image feature dataset; the processing module 202 is further configured to perform secondary segmentation on the vehicle body image according to the image feature subsets to obtain the corresponding local features; the processing module 202 is further configured to match the local features with each image feature subset to obtain the target derived category corresponding to the vehicle body to be identified; the processing module 202 is further configured to adjust the production parameters corresponding to the vehicle body to be identified according to the target vehicle body type and the target derived type.

[0098] In one possible implementation, the processing module 202 performs secondary segmentation on the vehicle body image based on a subset of image features to obtain corresponding local features. Specifically, the processing module 202 determines the distinguishing regions of each derived type in a preset vehicle body image based on the target vehicle body type; the processing module 202 maps the distinguishing regions onto the vehicle body image to obtain the target regions corresponding to each derived type in the vehicle body image; the processing module 202 performs image segmentation on each target region to obtain local images within each target region; and the processing module 202 extracts local features from each local image, including local texture features, local color features, and local shape features.

[0099] In one possible implementation, the processing module 202 matches local features with each subset of image features to obtain the target derived category corresponding to the vehicle body to be identified. Specifically, the processing module 202 calculates the Euclidean distance between the local features and the image features in each subset of image features to obtain a distance vector between the local features and each subset of image features; the processing module 202 performs a weighted summation of each distance value in the distance vector to obtain a weighted distance score between the local features and each subset of image features, wherein the weight of each distance value is determined by a preset weighting model; the processing module 202 sorts the weighted distance scores from largest to smallest to obtain the minimum weighted distance score; the processing module 202 determines the derived category corresponding to the local features and the minimum subset of image features as the target derived category corresponding to the vehicle body to be identified, and the minimum subset of image features is the subset of image features corresponding to the minimum weighted distance score.

[0100] In one possible implementation, the acquisition module 201 acquires an image feature database, specifically including: the acquisition module 201 acquires multiple standard vehicle body images of different vehicle body types; the processing module 202 preprocesses each standard vehicle body image, including image enhancement, noise removal, and image normalization; the processing module 202 extracts features from the preprocessed standard vehicle body images to obtain standard image features corresponding to each vehicle body type; and the processing module 202 establishes an image feature database based on the name of each vehicle body type and its corresponding standard image features.

[0101] In one possible implementation, the processing module 202 establishes a multi-dimensional feature vector based on the vehicle body features, specifically including: the processing module 202 performing grayscale processing on the vehicle body image to obtain a grayscale image; the processing module 202 performing edge detection on the grayscale image to obtain the vehicle body contour features; the processing module 202 extracting the texture features, color features, and shape features of the vehicle body image; and the processing module 202 establishing a multi-dimensional feature vector based on the vehicle body contour features, texture features, color features, and shape features, wherein each dimension corresponds to a vehicle body feature.

[0102] In one possible implementation, after the acquisition module 201 acquires vehicle images of the vehicle body to be identified from multiple cameras on the automobile production line, the method further includes: the processing module 202 determines whether the imaging quality of each vehicle body image meets the preset clarity requirement; if there is a vehicle body image whose imaging quality does not meet the preset clarity requirement, the processing module 202 sends an imaging quality adjustment instruction to the corresponding camera and acquires the adjusted vehicle body image until the imaging quality of each vehicle body image meets the preset clarity requirement.

[0103] In one possible implementation, the processing module 202 determines whether the imaging quality of each vehicle body image meets the preset sharpness requirement. Specifically, this includes: the processing module 202 calculating the sharpness score of each vehicle body image, wherein the sharpness score calculation method includes a gray-level gradient method or a frequency domain analysis method; the processing module 202 comparing the sharpness score of each vehicle body image with a preset sharpness threshold; if the sharpness score of each vehicle body image is greater than the preset sharpness threshold, then the processing module 202 determines that the imaging quality of each vehicle body image meets the preset sharpness requirement; if the sharpness score of any vehicle body image is less than or equal to the preset sharpness threshold, then the processing module 202 determines that there is a vehicle body image whose imaging quality does not meet the preset sharpness requirement.

[0104] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0105] This application also provides an electronic device. (See reference...) Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 300 may include: at least one processor 301, at least one network interface 304, a user interface 303, a memory 305, and at least one communication bus 302.

[0106] The communication bus 302 is used to enable communication between these components.

[0107] The user interface 303 may include a display screen and a camera. Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.

[0108] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0109] The processor 301 may include one or more processing cores. The processor 301 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 305, and by calling data stored in memory 305. Optionally, the processor 301 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 301 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 301 and may be implemented as a separate chip.

[0110] The memory 305 may include random access memory (RAM) or read-only memory. Optionally, the memory 305 may include a non-transitory computer-readable storage medium. The memory 305 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 305 may also be at least one storage device located remotely from the aforementioned processor 301. (Refer to...) Figure 3 The memory 305, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for a vehicle body type differentiation method based on a smart camera.

[0111] exist Figure 3In the illustrated electronic device 300, the user interface 303 is mainly used to provide an input interface for the user and acquire user input data; while the processor 301 can be used to call an application program stored in the memory 305 for a vehicle body type differentiation method based on a smart camera. When executed by one or more processors 301, the electronic device 300 performs one or more of the methods described in the above embodiments. It should be noted that, for the foregoing method embodiments, for the sake of simplicity, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0112] This application also provides a computer-readable storage medium storing instructions. When executed by one or more processors 301, these instructions cause an electronic device 300 to perform one or more of the methods described in the above embodiments.

[0113] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0114] In the various embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.

[0115] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0116] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0117] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0118] The above description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the specification and the disclosure of practical truths.

[0119] This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.

Claims

1. A method for distinguishing vehicle body types based on a smart camera, characterized in that, The method includes: Acquire vehicle body images of the car body to be identified from multiple cameras on the automobile production line; The vehicle body regions in each of the vehicle body images are segmented to obtain vehicle body features, and a multi-dimensional feature vector is established based on the vehicle body features; Obtain an image feature database, which includes multiple vehicle body types and image features corresponding to each vehicle body type; The multi-dimensional feature vector is compared with the similarity of each image feature in the image feature database; If the similarity between the multi-dimensional feature vector and the target image feature is determined to be greater than a preset similarity threshold, then the target vehicle type corresponding to the vehicle body to be identified is determined to be the vehicle type corresponding to the target image feature. In the image feature dataset, determine multiple derived types corresponding to the target vehicle body type and image feature subsets corresponding to each derived category; The vehicle image is segmented a second time based on the image feature subset to obtain the corresponding local features; The local features are matched with each subset of the image features to obtain the target derived category corresponding to the vehicle body to be identified; Adjust the production parameters corresponding to the vehicle body to be identified based on the target vehicle body type and the target derived category.

2. The method according to claim 1, characterized in that, The step of performing secondary segmentation on the vehicle image based on the image feature subset to obtain corresponding local features specifically includes: Based on the target vehicle body type, determine the distinguishing regions of each of the derived types in the preset vehicle body image; The distinguishing regions are mapped onto the vehicle body image to obtain the target regions corresponding to each of the derived types in the vehicle body image. Image segmentation is performed on each of the target regions to obtain local images within each target region; Local features are extracted from each of the local images, including local texture features, local color features, and local shape features.

3. The method according to claim 1, characterized in that, The step of matching the local features with each subset of image features to obtain the target derived category corresponding to the vehicle body to be identified specifically includes: Calculate the Euclidean distance between the local feature and the image features in each subset of the image features to obtain the distance vector between the local feature and each subset of the image features; The weighted sum of each distance value in the distance vector is performed to obtain the weighted distance score between the local feature and each subset of the image features, wherein the weight of each distance value is determined by a preset weight model; Sort the weighted distance scores from largest to smallest to obtain the minimum weighted distance score; The derived category corresponding to the local features and the minimum image feature subset is determined as the target derived category corresponding to the vehicle body to be identified, and the minimum image feature subset is the image feature subset corresponding to the minimum weighted distance score.

4. The method according to claim 1, characterized in that, The acquisition of the image feature database specifically includes: Acquire standard vehicle body images of multiple different vehicle body types; Each of the standard vehicle body images is preprocessed, including image enhancement, noise removal, and image normalization. Feature extraction is performed on the preprocessed standard vehicle body image to obtain the standard image features corresponding to each of the vehicle body types; The image feature database is established based on the names of various vehicle body types and their corresponding standard image features.

5. The method according to claim 1, characterized in that, The step of establishing a multi-dimensional feature vector based on the vehicle body features specifically includes: The vehicle image is converted to grayscale to obtain a grayscale image; Edge detection is performed on the grayscale image to obtain the vehicle body contour features; Extract the texture features, color features, and shape features of the vehicle body image; Based on the vehicle body contour features, texture features, color features, and shape features, a multi-dimensional feature vector is established, where each dimension corresponds to one of the vehicle body features.

6. The method according to claim 1, characterized in that, Following the step of acquiring vehicle body images of the vehicle to be identified from multiple cameras on the automobile production line, the method further includes: Determine whether the imaging quality of each of the vehicle images meets the preset clarity requirements; If there is a vehicle body image whose imaging quality does not meet the preset clarity requirement, an imaging quality adjustment command is sent to the corresponding camera, and the adjusted vehicle body image is acquired, until the imaging quality of all the vehicle body images meets the preset clarity requirement.

7. The method according to claim 6, characterized in that, The determination of whether the imaging quality of each of the vehicle images meets the preset sharpness requirements specifically includes: Calculate the sharpness score of each of the vehicle images, wherein the sharpness score is calculated by a method based on gray-level gradient or frequency domain analysis. The sharpness score of each of the vehicle images is compared with a preset sharpness threshold; If the sharpness score of each of the vehicle body images is greater than the preset sharpness threshold, then it is determined that the imaging quality of each of the vehicle body images meets the preset sharpness requirement. If any vehicle body image has a sharpness score less than or equal to the preset sharpness threshold, then it is determined that there is a vehicle body image whose imaging quality does not meet the preset sharpness requirement.

8. A vehicle body type differentiation device based on a smart camera, characterized in that, The device includes an acquisition module (201) and a processing module (202), wherein: The acquisition module (201) is used to acquire images of the car body to be identified from multiple cameras on the automobile production line; The processing module (202) is used to segment the vehicle body region in each of the vehicle body images to obtain vehicle body features, and to establish a multi-dimensional feature vector based on the vehicle body features; The acquisition module (201) is also used to acquire an image feature database, which includes multiple vehicle body types and image features corresponding to each vehicle body type; The processing module (202) is also used to compare the similarity between the multi-dimensional feature vector and each image feature in the image feature database; The processing module (202) is further configured to determine the target vehicle type corresponding to the vehicle body to be identified as the vehicle body type corresponding to the target image feature if the similarity between the multi-dimensional feature vector and the target image feature is greater than a preset similarity threshold. The processing module (202) is further configured to determine, in the image feature dataset, multiple derived types corresponding to the target vehicle body type and image feature subsets corresponding to each derived category; The processing module (202) is further configured to perform secondary segmentation on the vehicle image based on the image feature subset to obtain corresponding local features; The processing module (202) is further configured to match the local features with each subset of the image features to obtain the target derived category corresponding to the vehicle body to be identified; The processing module (202) is also used to adjust the production parameters corresponding to the vehicle body to be identified according to the target vehicle body type and the target derived category.

9. An electronic device, characterized in that, The device includes a processor (301), a memory (305), a user interface (303), and a network interface (304). The memory (305) is used to store instructions. The user interface (303) and the network interface (304) are used to communicate with other devices. The processor (301) is used to execute the instructions stored in the memory (305) to cause the electronic device (300) to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Vehicle type classification method and device

    CN112861567A

  • Vehicle identification method, server and computer readable storage medium

    CN113657180A