Vehicle body type distinguishing method and device based on intelligent camera and electronic equipment
By using multi-dimensional feature extraction and similarity comparison methods on the automobile production line, the accurate identification of body type and derived categories is achieved, and the problem of low accuracy of body type recognition in the prior art is solved, and the production efficiency and product quality are improved.
Patent Information
- Application Number
- CN202510319549.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-03-18
AI Technical Summary
The prior art has low accuracy in body type identification, and it is particularly difficult to deal with highly similar models or different derivative models of the same vehicle model.
By obtaining the body images taken by multiple cameras, segmenting and feature extraction, multi-dimensional feature vectors are established, and similarity comparison is made with the image feature database, and combining image feature subset matching, accurate recognition of body types and derived categories is achieved.
It improves the accuracy and fine-grainedness of body recognition, reduces manual judgment errors, improves the consistency of production efficiency and product quality, and reduces production costs.
Smart Images

Figure CN120298757A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and particularly to a method, apparatus, and electronic device for distinguishing body types based on an intelligent camera. Background Art
[0002] With the rapid development of the global automotive industry and the diversification of consumer demands, the vehicle models on the automotive production line are becoming more and more diverse and complex. The diversity of body types and their derivative versions poses higher requirements for the management of the production line and the automated assembly technology. The type and configuration of a vehicle directly affect the material selection, assembly method, and quality control during the manufacturing process. Therefore, being able to quickly and accurately identify different body types and their derivative categories is crucial for improving production efficiency and ensuring product quality.
[0003] Currently, the identification of body types mainly relies on manual visual inspection or an automatic recognition system based on simple rules. These methods have many limitations: manual inspection is inefficient and easily affected by subjective factors, with a relatively high error rate, while the rule-based automatic recognition system is difficult to handle the subtle differences between vehicle models, especially when dealing with highly similar vehicle models or different derivative models of the same vehicle model. Therefore, the related prior art has the problem of low accuracy in identifying body types on the vehicle production line.
[0004] Therefore, there is an urgent need for a method, apparatus, and electronic device for distinguishing body types based on an intelligent camera. Summary of the Invention
[0005] The present application provides a method, apparatus, and electronic device for distinguishing body types based on an intelligent camera, which improves the accuracy of identifying body types on the production line.
[0006] In a first aspect of the present application, a method for distinguishing vehicle body types based on an intelligent camera is provided, the method comprising: obtaining vehicle body images of a vehicle body to be identified from multiple cameras on a vehicle production line; segmenting the vehicle body area 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; obtaining an image feature database, the image feature database comprising multiple vehicle body types and image features corresponding to each of the vehicle body types; performing similarity comparison between the multi-dimensional feature vector and each image feature in the image feature database; if it is determined that the similarity between the multi-dimensional feature vector and the target image feature is greater than a preset similarity threshold, determining that the target vehicle body type corresponding to the vehicle body to be identified is the vehicle body type corresponding to the target image feature; determining in the image feature data set multiple derived types corresponding to the target vehicle body type and image feature subsets corresponding to each of the derived categories; performing secondary segmentation on the vehicle body image 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 category 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 adopting the above technical scheme, by acquiring the body images to be identified taken by multiple cameras on the automobile production line, segmenting and extracting the body images, establishing a multi-dimensional feature vector, and comparing the similarity with the image features in the image feature database, the target body type of the body to be identified can be accurately identified. After determining the target body type, the derived type and image feature subset corresponding to the body type are further determined in the image feature data set, and the local features are obtained by secondary segmentation of the body image, and matched with the image feature subset, the specific derived category of the body to be identified can be identified in a fine-grained manner. Finally, according to the identified target body type and derived type, the production parameters of the body to be identified can be adjusted in a targeted manner to realize the intelligent and automated adjustment and optimization of the production process. This scheme realizes the accurate identification of body types and derived categories and the dynamic optimization of production parameters through multi-step and multi-granular body feature extraction and comparison, combined with the adaptive adjustment of production parameters. This not only improves the accuracy and granularity of body recognition, reduces the errors and inefficiency of manual judgment, but also can intelligently adjust production parameters according to the recognition results, improve production efficiency and consistency of product quality, and reduce production costs.
[0008] Optionally, performing secondary segmentation on the vehicle body image according to the subset of image features to obtain corresponding local features, specifically including: 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 to 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, where the local features include local texture features, local color features, and local shape features.
[0009] By adopting the above technical solution, by determining the distinguishing regions of each derived type in a preset vehicle body image, mapping the distinguishing regions to the vehicle body image to be recognized to obtain target regions, and performing image segmentation and local feature extraction on the target regions, prior knowledge can be fully utilized to specifically extract feature information that can distinguish different derived types in the key regions of the vehicle body image. The determination and mapping of the distinguishing regions can exclude irrelevant backgrounds and interference regions in the vehicle body image, focus on the target regions that contribute the most to the recognition of the derived types, and ensure the accuracy of recognition while improving the recognition efficiency. This technical solution further improves the recognition performance of vehicle body derived types, realizes more accurate and comprehensive feature extraction and comparison in key regions, lays a solid feature foundation for subsequent derived type matching, and improves the intelligent level and practical effect of the entire vehicle body type recognition process.
[0010] Optionally, matching the local features with each of the subsets of image features to obtain the target derived category corresponding to the vehicle body to be recognized, specifically including: calculating the Euclidean distance between the local features and the image features in each of the subsets of image features to obtain a distance vector between the local features and each of the subsets of image features; performing weighted summation on each of the distance values in the distance vector to obtain a weighted distance score between the local features and each of the subsets of image features, where the weight of each distance value is determined by a preset weight model; sorting each of the weighted distance scores from largest to smallest to obtain the smallest weighted distance score; and determining the derived category corresponding to the smallest subset of image features as the target derived category corresponding to the vehicle body to be recognized, where the smallest subset of image features is the subset of image features corresponding to the smallest weighted distance score.
[0011] By adopting the above technical solution, by calculating the Euclidean distance between the local feature and the image features in the image feature subsets, the distance vectors between the local feature and each image feature subset can be obtained, and the similarity degree between the local feature and the features of different derived types can be quantitatively evaluated. The Euclidean distance can effectively measure the closeness of feature vectors in the feature space. The smaller the distance, the more similar the features, and the more likely the local feature matches the derived type corresponding to the image feature subset. After obtaining the distance vectors, by performing weighted summation on the distance values, the weighted distance scores between the local feature and each image feature subset can be obtained, and the importance and contribution degrees of different features can be comprehensively considered. By introducing a preset weight model, the weights of different features can be reasonably set and adjusted according to prior knowledge and experience, highlighting the influence of key features and suppressing the interference of secondary features, so that the weighted distance scores can more accurately reflect the overall matching degree between the local feature and the image feature subsets. By sorting the weighted distance scores from small to large, the image feature subset corresponding to the minimum weighted distance score is obtained, and the corresponding derived category is determined as the target derived category of the vehicle body to be recognized, and the derived type that best matches and is most similar to the local feature can be found.
[0012] Optionally, the obtaining of the image feature database specifically includes: obtaining standard vehicle body images of multiple different vehicle body types; preprocessing each of the standard vehicle body images, where the preprocessing includes image enhancement, noise removal, and image normalization; extracting features from the preprocessed standard vehicle body images to obtain the standard image features corresponding to each vehicle body type; and establishing the image feature database according to the names of each vehicle body type and the corresponding standard image features.
[0013] By adopting the above technical solution, by obtaining standard vehicle body images of multiple different vehicle body types and performing image preprocessing on them, including image enhancement, noise removal, and image normalization, standard vehicle body images with higher quality and more obvious features can be obtained. Image preprocessing can remove noise interference in the images, improve the contrast and clarity of the images, and make the feature information of the vehicle body more prominent and stable. At the same time, through image normalization, vehicle body images of different sizes and resolutions can be unified to the same scale and size, facilitating subsequent feature extraction and comparison. By extracting features from the preprocessed standard vehicle body images to obtain the standard image features corresponding to each vehicle body type, high-quality and highly discriminative vehicle body feature representations can be obtained.
[0014] Optionally, establishing a multi-dimensional feature vector according to 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 of the vehicle body image; and establishing the multi-dimensional feature vector according to the vehicle body contour features, texture features, color features, and shape features, where each dimension corresponds to one of the vehicle body features.
[0015] By adopting the above technical solution, by performing grayscale processing on the vehicle body image to obtain a grayscale image, the color information of the image can be simplified, and the light and dark changes and structural contours of the vehicle body can be highlighted. Grayscale processing can remove redundant color interference in the image and focus on key features such as the shape, edges, and texture of the vehicle body, providing a clearer and more stable basis for subsequent feature extraction.
[0016] Optionally, after the step of obtaining vehicle body images of the vehicle to be recognized taken by multiple cameras on the automobile production line, the method further includes: determining whether the imaging quality of each of the vehicle body images meets a preset clarity requirement; if there is a vehicle body image whose imaging quality does not meet the preset clarity requirement, sending an imaging quality adjustment instruction to the corresponding camera, and obtaining the adjusted vehicle body image until the imaging quality of each of the vehicle body images meets the preset clarity requirement.
[0017] By adopting the above technical solution, by introducing an image quality evaluation and feedback adjustment mechanism, a closed-loop image quality control process is constructed. It strictly checks and dynamically optimizes the image quality at the input end of vehicle body type recognition, ensuring the clarity and stability of the input images, reducing the impact of low-quality images on the recognition accuracy. At the same time, real-time adjustment of camera parameters also improves the adaptability to environmental changes and external interferences, enabling vehicle body type recognition to operate stably in a complex and changeable production line environment. 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 devices and shooting conditions.
[0018] Optionally, determining whether the imaging quality of each of the vehicle body images meets a preset clarity requirement specifically includes: calculating the clarity score of each of the vehicle body images, where the calculation method of the clarity score includes a method based on the grayscale gradient method or a method based on the frequency domain analysis method; comparing the clarity scores of each of the vehicle body images with a preset clarity threshold; if the clarity scores of each of the vehicle body images are all greater than the preset clarity threshold, determining that the imaging quality of each of the vehicle body images meets the preset clarity requirement; if there is any vehicle body image whose clarity score is less than or equal to the preset clarity threshold, determining that there is a vehicle body image whose imaging quality does not meet the preset clarity requirement.
[0019] By adopting the above technical solution, quantitative evaluation and automatic judgment of the imaging quality of the vehicle body image are realized. By using an objective sharpness evaluation algorithm, the image quality is converted into measurable and comparable numerical indicators, avoiding the subjectivity and inconsistency of manual evaluation. At the same time, the setting of the preset sharpness threshold also provides a clear standard and reference for image quality control, making the quality judgment more standardized and operable. By comparing the sharpness score with the preset sharpness threshold in real time, unqualified vehicle body images can be quickly and accurately screened out, triggering corresponding image quality adjustment processes, and realizing automatic 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, and improves the intelligence level and efficiency of the entire recognition process.
[0020] In a second aspect of the present application, a vehicle body type distinguishing device based on an intelligent camera is provided. The device includes: an acquisition module and a processing module, wherein: the acquisition module is used to acquire vehicle body images of the vehicle body to be recognized taken by a plurality of cameras on an automobile production line; the processing module is used to segment the vehicle body area in each of the vehicle body images to obtain vehicle body features, and establish a multi-dimensional feature vector according to the vehicle body features; the acquisition module is further used to acquire an image feature database, and the image feature database includes a plurality of vehicle body types and image features corresponding to each of the vehicle body types; the processing module is further used to compare the similarity between the multi-dimensional feature vector and each image feature in the image feature database; the processing module is further used to determine that if the similarity between the multi-dimensional feature vector and the target image feature is greater than a preset similarity threshold, the target vehicle body type corresponding to the vehicle body to be recognized is the vehicle body type corresponding to the target image feature; the processing module is further used to determine a plurality of derivative types corresponding to the target vehicle body type and image feature subsets corresponding to each of the derivative categories in the image feature dataset; the processing module is further used to perform secondary segmentation on the vehicle body image according to the image feature subset to obtain corresponding local features; the processing module is further used to match the local features with each of the image feature subsets to obtain the target derivative category corresponding to the vehicle body to be recognized; the processing module is further used to adjust the production parameters corresponding to the vehicle body to be recognized according to the target vehicle body type and the target derivative type.
[0021] In a third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface, and a network interface. 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 so that the electronic device executes the method described in any one of the above.
[0022] In the fourth aspect of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions that, when executed, perform the method described in any one of the above.
[0023] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. By acquiring the body images to be recognized captured by multiple cameras on the automobile production line, segmenting and extracting features from the body images, establishing a multi-dimensional feature vector, and comparing the similarity with the image features in the image feature database, the target body type of the body to be recognized can be accurately identified. After determining the target body type, further determine the derived type and the image feature subset corresponding to this body type in the image feature dataset. By performing secondary segmentation on the body image to obtain local features and matching them with the image feature subset, the specific derived category of the body to be recognized can be identified in a fine-grained manner. Finally, according to the recognized target body type and derived type, the production parameters of the body to be recognized can be adjusted specifically, realizing the intelligent and automated adjustment and optimization of the production process. This solution realizes the accurate recognition of the body type and derived category and the dynamic optimization of the production parameters through multi-step and multi-grained body feature extraction and comparison, combined with the adaptive adjustment of production parameters. This not only improves the accuracy and fine-grainedness of body recognition, reduces the errors and inefficiencies of manual discrimination, but also can intelligently adjust the production parameters according to the recognition results, improve the production efficiency and the consistency of product quality, and reduce the production cost. Description of the Drawings
[0024] Figure 1 is a flowchart of a method for distinguishing body types based on an intelligent camera disclosed in an embodiment of the present application; Figure 2 is a module diagram of a device for distinguishing body types based on an intelligent camera disclosed in an embodiment of the present application; Figure 3 is a structural diagram of an electronic device disclosed in an embodiment of the present application.
[0025] Description of the reference numerals: 201, acquisition module; 202, processing module; 300, electronic device; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. Detailed Embodiments
[0026] In order 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 in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments.
[0027] In the description of the embodiments of the present application, words such as "for example" or "for instance" are used to give examples, illustrations or explanations. Any embodiment or design solution described as "for example" or "for instance" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "for example" or "for instance" is intended to present the relevant concepts in a specific manner.
[0028] In the description of the embodiments of the present application, the term "plurality" means two or more. For example, a plurality of systems means two or more systems, and a plurality of screen terminals means two or more screen terminals. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly indicating the technical features indicated. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. The terms "include", "comprise", "have" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0029] The present application provides a method for differentiating vehicle body types based on an intelligent camera, with reference to Figure 1 , Figure 1 is a schematic flow chart of a method for differentiating vehicle body types based on an intelligent camera provided by an embodiment of the present application. This method is applied to a server, which is a server for executing a vehicle body type differentiation program based on an intelligent camera and is used to provide background services for user equipment. The server can be a single server, a server cluster composed of multiple servers, or a cloud computing service center. The server can communicate with the user equipment through a wired or wireless network. This method includes steps S101 to S109, and the above steps are as follows: Step S101: Obtain body images of the body to be recognized taken by multiple cameras on an automobile production line.
[0030] In step S101, the server establishes a communication link with the control system of the automobile production line. The control system is responsible for managing and coordinating the work of various devices on the production line, including multiple intelligent cameras. The communication link can be a wired connection, such as Ethernet, industrial Ethernet, etc., or a wireless connection, such as Wi-Fi, 5G network, etc. After establishing the communication link, the server can exchange data and instructions with the control system. Secondly, the server sends a request to the control system to obtain the body image. After receiving the request, the control system forwards it to the corresponding camera. Then, according to the parameters in the request, the camera takes an image of the body to be recognized on the automobile production line. In order to comprehensively capture all parts of the body, multiple cameras are usually installed on the production line, distributed at different angles and positions of the body. For example, a camera can be installed in the front, back, left, and right of the body to take images of the front, back, left side, and right side of the body. The images taken by the camera are generated in a specified resolution and format, such as JPG format with 1920×1080 pixels. Finally, the camera uploads the taken body image to the control system, and the control system forwards the image to the server. After receiving the body image, the server stores it in the memory or hard disk for subsequent processing and analysis. The whole process can be real-time or timed. In the real-time mode, the camera uploads the body image to the server immediately after taking it; in the timed mode, the camera uploads the image at a set time interval (such as every 5 seconds). The server can select a suitable acquisition method according to the requirements.
[0031] For example, 4 high-definition cameras are installed on a certain automobile production line, located in the front, back, left, and right directions of the body respectively. The resolution of each camera is 2560×1440 pixels, and the output format is PNG. The server sends a acquisition request to the control system every 10 seconds, asking the 4 cameras to take images and upload them simultaneously. After receiving the request, the control system immediately triggers the 4 cameras to take images and upload them to the server. The server receives 4 body images in PNG format, saves them as front.png, back.png, left.png, and right.png respectively, and then starts subsequent analysis and recognition of these images.
[0032] In a possible implementation manner, after step S101, the method further includes: judging whether the imaging quality of each body image meets the preset clarity requirement; if there is a body image whose imaging quality does not meet the preset clarity requirement, sending an imaging quality adjustment instruction to the corresponding camera, and obtaining the adjusted body image until the imaging quality of each body image meets the preset clarity requirement.
[0033] Specifically, after obtaining the vehicle body image, the server will evaluate the quality of the vehicle body image to ensure that reliable results can be obtained in subsequent analysis and processing. The image quality here mainly refers to the clarity of the image, which can be measured by some common clarity evaluation indicators, such as image gradient, contrast, entropy, etc.
[0034] The server will compare the clarity score of each received vehicle body image with the preset clarity requirement, which is a preset threshold. If the clarity score of a certain image is lower than this threshold, it is considered that the imaging quality of this image does not meet the requirements and may affect the subsequent analysis results. At this time, the server will send an imaging quality adjustment instruction to the camera that captured this image, requesting the camera to adjust imaging parameters, such as focusing, exposure, etc., to obtain a clearer image. After sending the adjustment instruction, the server will wait for a period of time for the camera to complete the parameter adjustment, and then obtain the adjusted image again. After receiving the new image, the server will re-evaluate its clarity and compare it with the previous scoring result to check whether the image quality has been improved. If the quality of the adjusted image still does not meet the preset clarity requirement, the server will send the adjustment instruction again and repeat the above process until the imaging quality of all cameras meets the preset clarity requirement.
[0035] For example, through clarity evaluation, the server finds that a certain vehicle body image captured by Camera 2 is blurred, and the corresponding clarity score is 0.6, which is lower than the preset threshold of 0.8. So the server sends an adjustment instruction to Camera 2, instructing it to shorten the lens focus distance by 0.5 millimeters. After Camera 2 completes the adjustment, it captures the vehicle body again and sends the new vehicle body image to the server. The server evaluates the clarity of the new vehicle body image and obtains a score of 0.85, which meets the preset clarity requirement. Therefore, it is considered that the image quality has been improved and can enter the subsequent analysis and processing link. Repeat this process until the image quality of all cameras meets the requirements.
[0036] In a possible implementation manner, determining whether the imaging quality of each vehicle body image meets the preset clarity requirement specifically includes: calculating the clarity score of each vehicle body image, and the calculation method of the clarity score includes the gray gradient method or the frequency domain analysis method; comparing the clarity scores of each vehicle body image with the preset clarity threshold; if the clarity scores of each vehicle body image are all greater than the preset clarity threshold, it is determined that the imaging quality of each vehicle body image meets the preset clarity requirement; if there is any vehicle body image whose clarity score is less than or equal to the preset clarity threshold, it is determined that there is a vehicle body image whose imaging quality does not meet the preset clarity requirement.
[0037] Specifically, the server determines whether the imaging quality of the vehicle body image meets the preset clarity requirement by calculating the clarity score of the vehicle body image. The clarity score can be used to quantify the clarity of the image. The higher the value, the clearer the image and the richer the details. The server can choose the gray gradient method or the frequency domain analysis method to calculate the clarity score. In the embodiment of the present application, the gray gradient method can be understood as a method based on the spatial domain. Its basic idea is to use the change of the gray values of adjacent pixels in the image to reflect the clarity of the image. Specifically, the server first converts the vehicle body image into a grayscale image, and then calculates the gray difference, that is, the gradient value, between each pixel and its surrounding pixels. The larger the gradient value, the higher the contrast between the pixels, and the clearer the image. By averaging the gradient values of all pixels, the clarity score of the entire image is obtained.
[0038] The frequency domain analysis method uses the frequency characteristics of the image to evaluate the clarity. The server converts the vehicle body image from the spatial domain to the frequency domain through mathematical tools such as Fourier transform to obtain the spectral information of the image. In the spectrogram, the high-frequency components correspond to the detail and texture information in the image, and the low-frequency components correspond to the basic contour and background of the image. Generally speaking, a clear image has rich high-frequency components in the frequency domain, while a blurred image has fewer high-frequency components. Therefore, the server can obtain the clarity score by calculating the energy proportion of the high-frequency components in the image spectrum.
[0039] Regardless of which method is used, the server will finally obtain a quantified clarity score value. Next, the server will compare this score value with the preset clarity threshold. The preset clarity threshold can be set according to actual application requirements and experience, representing the minimum requirement for imaging quality. The specific value of the preset clarity threshold is not limited in this application. If the clarity score of the vehicle body image is higher than the preset clarity threshold, it is considered that the imaging quality of the image is qualified and meets the preset clarity requirement; otherwise, if the score is lower than or equal to the preset clarity threshold, it is considered that the image is not clear enough and the imaging quality needs to be improved.
[0040] The server will perform clarity evaluation and threshold comparison on each received vehicle body image one by one. If the clarity scores of all images exceed the preset clarity threshold, the server considers that the imaging quality of each current camera meets the requirements and can directly enter the subsequent recognition and analysis process. However, if the clarity score of any one image does not reach the preset clarity threshold, the server will make a mark, record the source of the image with unqualified imaging quality, and trigger the corresponding adjustment instruction to notify the problematic camera to optimize the imaging parameters.
[0041] Step S102: Segment the vehicle body area in each vehicle body image to obtain vehicle body features, and establish a multi-dimensional feature vector based on the vehicle body features.
[0042] In step S102, according to the vehicle body characteristics, a multi-dimensional feature vector is established, specifically including: graying the vehicle body image 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 vehicle body feature respectively.
[0043] Specifically, the server performs feature extraction and vector representation on the obtained vehicle body image to prepare for subsequent type recognition. Specifically, the server first preprocesses the original color vehicle body image and converts it into a grayscale image. The graying process can eliminate color interference in the image, highlight the structure and shape features of the vehicle body, and also reduce the complexity of subsequent calculations. Next, the server performs edge detection on the grayscale vehicle body image to extract the contour features of the vehicle body. Edge detection algorithms can be the Canny algorithm, Sobel algorithm, etc. They calculate the gradient and direction of pixel points in the image to find regions with large gray value changes, thereby outlining the external contour of the vehicle body. Through edge detection, the server can obtain the overall shape information of the vehicle body, such as the aspect ratio of the vehicle body and the concavity and convexity of the contour.
[0044] In addition to the contour features, the server will further extract the texture features of the vehicle body image. Texture reflects the visual characteristics of the vehicle body surface material, such as smoothness and regularity. The server can use some classic texture description operators, such as LBP (Local Binary Pattern), HOG (Histogram of Oriented Gradients), etc., to divide the vehicle body image into multiple small regions, count the gradient information of pixel points in each region, and generate the corresponding texture feature vector.
[0045] The color of the vehicle body is also an important recognition clue. Although the image was grayed out previously, 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 in different color channels. By quantifying and encoding these color features, the server can obtain a compact color feature vector.
[0046] Finally, the server will also extract some features reflecting the shape of the vehicle body, such as the area, perimeter, rectangularity, etc. of the vehicle body. These features can be obtained by geometric measurement of the vehicle body contour, such as approximating the vehicle body contour as a minimum bounding rectangle and calculating the aspect ratio and area of the rectangle, etc. Shape features can help distinguish the overall appearance differences of different types of vehicle bodies.
[0047] After extracting the above-mentioned various vehicle body features, the server will combine them into a multi-dimensional feature vector. Each dimension in this vector corresponds to a specific vehicle body feature, such as contour feature, texture feature, color feature, and shape feature, etc. By integrating different types of features into a vector, the server can comprehensively describe and characterize the vehicle body from multiple perspectives.
[0048] Step S103: Obtain an image feature database, which includes multiple vehicle body types and the corresponding image features for each vehicle body type.
[0049] In step S103, obtaining the image feature database specifically includes: obtaining standard vehicle body images of multiple different vehicle body types; performing preprocessing on each standard vehicle body image, and the preprocessing includes image enhancement, noise removal, and image normalization; extracting features from the preprocessed standard vehicle body images to obtain the standard image features corresponding to each vehicle body type; establishing an image feature database according to the names of each vehicle body type and the corresponding standard image features.
[0050] Specifically, the server obtains standard vehicle body images of multiple different vehicle body types. These images can be from the design drawings provided by vehicle manufacturers or real vehicle photos taken under ideal conditions. The standard images need to cover all vehicle body types to be recognized by the server, such as sedans, SUVs, pickups, etc. At the same time, to improve the reliability of feature extraction, multiple different standard images at different angles and under different lighting conditions can be prepared for each type. After obtaining the standard vehicle body images, the server performs a series of preprocessing operations on them. First is image enhancement, by adjusting parameters such as the brightness, contrast, and sharpness of the image, making the visual features of the vehicle body more obvious and prominent. Then is noise removal, using methods such as median filtering and Gaussian filtering to eliminate random noise points and interference factors in the image and improve the image quality. Finally is image normalization, unifying images of different sizes and resolutions to a fixed size and ratio, facilitating subsequent feature extraction and comparison.
[0051] After the preprocessing is completed, the server extracts features from each standard vehicle body image. The types of features extracted are similar to the vehicle body features in step S102, including contour features, texture features, color features, and shape features, etc. The server uses the same feature extraction algorithm and parameter settings as in step S102 to ensure the consistency of the extracted standard features with the actual vehicle body features in format and semantics.
[0052] By integrating and averaging the features of multiple standard images of the same type, the server can obtain a standard feature template for each vehicle body type. These templates represent the typical features of this type of vehicle body and are instructive for recognition. For example, if the server extracts from multiple standard car images features such as an average length-to-width ratio of 3:1, mainly black and white colors, and a streamlined contour, these features can be used as the standard features for the car type.
[0053] 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 the form of key-value pairs, with the vehicle body type name as the key and the standard features of this type as the value. Each entry in the image feature database represents a known vehicle body type and its recognition reference standard.
[0054] For example, the image feature database constructed by the server contains the following entries: "Sedan": [Contour feature vector A, Texture feature vector B, Color feature vector C, Shape feature vector D]; "SUV": [Contour feature vector E, Texture feature vector F, Color feature vector G, Shape feature vector H]; "Pickup truck": [Contour feature vector I, Texture feature vector J, Color feature vector K, Shape feature vector L]; Among them, the letters A - L represent different feature vectors. These feature vectors are extracted and fused from multiple standard images of the corresponding vehicle body type and represent the typical features of this type.
[0055] Step S104: Compare the multi-dimensional feature vector with each image feature in the image feature database for similarity.
[0056] In step S104, the server compares the multi-dimensional feature vector extracted from the vehicle body image to be recognized with the standard features in the image feature database to determine the type of the vehicle body to be recognized. First, the server reads the standard feature vectors of each known vehicle body type from the image feature database. These standard feature vectors have the same dimension and feature arrangement order as the feature vectors of the vehicle body to be recognized, ensuring their comparability.
[0057] Next, the server selects a similarity measurement method to calculate the similarity between two feature vectors. Similarity measurement methods include Euclidean distance, cosine similarity, Jaccard similarity, etc. Among them, Euclidean distance measures the straight-line distance between two vectors in space, and the smaller the distance, the more similar; cosine similarity measures the angle between two vectors, and the smaller the angle, the more similar; Jaccard similarity measures the overlapping degree of two vectors, and the more overlapping parts, the more similar. The server can flexibly select a suitable similarity measurement method.
[0058] After selecting the similarity measurement method, the server begins to traverse each standard feature vector in the image feature database and calculates the similarity with the feature vector of the vehicle body to be recognized. Taking Euclidean distance as an example, the server subtracts the feature values of the corresponding dimensions in the two vectors, squares the results, then sums them for all dimensions, and finally takes the square root to obtain the straight-line distance between the two vectors in the feature space. Repeating this process, the server can obtain the similarity scores between the vehicle body to be recognized and each known vehicle body type.
[0059] To intuitively understand the process of similarity comparison, for example, assume that the feature vector of the vehicle body to be recognized is [0.2, 0.5, 0.8], and there are three types of standard feature vectors in the image feature database: sedan: [0.1, 0.4, 0.9]; SUV: [0.3, 0.6, 0.7]; pickup: [0.4, 0.3, 0.6]; Using Euclidean distance for similarity calculation, the following results are obtained: Distance from sedan: sqrt((0.2 - 0.1) 2 + (0.5 - 0.4) 2 + (0.8 - 0.9) 2 ) = 0.173 Distance from SUV: sqrt((0.2 - 0.3) 2 + (0.5 - 0.6) 2 + (0.8 - 0.7) 2 ) = 0.173 Distance from pickup: sqrt((0.2 - 0.4) 2 + (0.5 - 0.3) 2 + (0.8 - 0.6) 2 ) = 0.374 From the calculation results, it can be seen that the distances between the vehicle body to be recognized and the feature vectors of the sedan and SUV are equal, and both are smaller than the distance from the pickup. Therefore, from the perspective of feature similarity, the vehicle body to be recognized is more likely to belong to the sedan or SUV type.
[0060] In actual vehicle body recognition tasks, the dimension of the feature vector is much higher than that in the example, and there are also more types. The server needs to perform efficient similarity calculation and sorting in a large amount of feature data. To improve the comparison efficiency, the server can also adopt some optimization strategies, such as using data structures like KD - tree and hash table to accelerate the nearest neighbor search, or using dimensionality reduction algorithms like PCA to compress the dimension of the feature vector.
[0061] Step S105: If it is determined that the similarity between the multi - dimensional feature vector and the target image feature is greater than the preset similarity threshold, then determine that the target vehicle body type corresponding to the vehicle body to be recognized is the vehicle body type corresponding to the target image feature.
[0062] In step S105, the server needs to set a preset similarity threshold. This threshold indicates to what extent the similarity between the feature vector of the vehicle body to be recognized and the standard feature vector should reach to be considered as belonging to the same type. The size of the preset similarity threshold can be determined according to the actual recognition requirements and data characteristics, ensuring both sufficient discrimination and avoiding being too strict, which may lead to a decrease in the recognition rate. Usually, by testing a set of verification samples and statistically analyzing the recognition accuracy under different thresholds, a suitable threshold can be selected. This application does not limit the specific numerical value of the preset similarity threshold.
[0063] After determining the preset similarity threshold, the server will compare the similarity scores between the feature vector of the vehicle body to be recognized and each standard feature vector with this threshold. If the similarity score of a certain standard feature vector is greater than or equal to the preset similarity threshold, it is considered that the vehicle body to be recognized matches the vehicle body type corresponding to this standard feature vector, that is, the vehicle body to be recognized belongs to this vehicle body type.
[0064] For example, the preset similarity threshold set by the server is 0.8, that is, a similarity score of 0.8 or above is considered a match. In step S104, the similarity scores between the vehicle body to be recognized and the three types of sedan, SUV, and pickup are 0.9, 0.7, and 0.6 respectively. Since the similarity score of 0.9 with the sedan is greater than the threshold of 0.8, and the similarity scores with other types are less than the threshold, the server determines that the vehicle body to be recognized belongs to the sedan type.
[0065] If there are multiple standard feature vectors whose similarity scores are greater than or equal to the preset similarity threshold, the server can select the one with the highest similarity as the recognition result. For example, if the similarity scores between the vehicle body to be recognized and the sedan and SUV both reach 0.85, while the similarity with the pickup is 0.75, the server will still recognize it as the sedan type.
[0066] In some cases, it may happen that the similarity between the vehicle body to be recognized and all standard feature vectors is lower than the preset similarity threshold. This means that the features of this vehicle body do not match well with known types and may belong to a new unknown type. In response to this situation, the server can mark it as "unknown type", or classify it into the known type that is relatively closest according to the similarity ranking.
[0067] 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.
[0068] In step S106, after the server identifies the basic type of the vehicle body to be recognized (such as a sedan), it further determines the specific derived types it belongs to (such as a coupe, a three-box sedan, a two-box sedan, etc.). The purpose of this step is to achieve more refined vehicle body recognition and provide richer and more accurate vehicle type information.
[0069] 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 the features of multiple derived types under each basic type. These derived types are subcategories divided based on differences in aspects such as the appearance, structure, and function of the vehicle body. For example, for the basic type "sedan", the following derived types can be: coupe, three-box sedan, and two-box sedan.
[0070] The server finds all the derived types (such as "coupe", "three-box sedan", "two-box sedan") corresponding to the target vehicle body type (such as "sedan") by querying the type relationship table in the image feature dataset. Next, the server extracts the image feature subset of each derived type from the image feature dataset. The image feature subset contains some unique appearance and structure features of this derived type in addition to the basic features. These features are usually reflected in the local details of the vehicle body, such as the arc of the roof, the shape of the tail, the number of doors, etc. Through the combination of these features, vehicle bodies belonging to the same basic type but different derived types can be distinguished.
[0071] For example, for the derived type "coupe", its feature subset may include: Roof curve: A smooth, flowing, and backward-sinking arc. Tail shape: A short and high tail, sometimes with a small spoiler. Number of doors: Usually two or four. The server associates the image feature subset of each derived type with its type name to form a derived type feature dictionary. Each entry in this dictionary represents a derived type and the features required for its recognition.
[0072] Step S107: Perform secondary segmentation on the vehicle body image according to the image feature subset to obtain the corresponding local features.
[0073] In step S107, the vehicle body image is secondarily segmented according to the image feature subset to obtain corresponding local features, specifically including: determining the distinguishing regions of each derivative type in the preset vehicle body image according to the target vehicle body type; mapping the distinguishing regions to the vehicle body image to obtain the target regions corresponding to each derivative type in the vehicle body image; performing image segmentation on each target region to obtain the local images within each target region; and extracting local features from each local image, where the local features include local texture features, local color features, and local shape features.
[0074] Specifically, the server secondarily segments the vehicle body image according to the image feature subset and extracts the local features related to derivative type recognition. First, the server determines the distinguishing regions of different derivative types in the vehicle body image. The distinguishing region refers to the local region on the vehicle body image where different derivative types show obvious differences, such as the streamlined roof of a coupe or the hatchback tailgate of a hatchback. These regions centrally reflect the unique appearance and structural characteristics of the derivative type and play a key role in the recognition of the derivative type. To determine the distinguishing regions, the server can use the preset vehicle body image. The preset vehicle body image is specially selected and labeled for each derivative type, highlighting the typical features and distinguishing regions of that type. The server extracts information such as the position, size, and shape of the distinguishing regions of each derivative type by analyzing the standard vehicle body image to form a distinguishing region template. Next, the server maps the distinguishing region template to the vehicle body image to be recognized. Since the shooting angles, sizes, and positions 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 the scaling, rotation, and translation of the distinguishing region template, it is made to coincide as much as possible with the corresponding region in the vehicle body image. After the mapping is completed, the server obtains the target regions of each derivative type in the vehicle body image to be recognized. These target regions are the parts of the vehicle body image that need to be analyzed and feature-extracted, and they correspond to the key regions in the distinguishing region template.
[0075] Then, the server performs image segmentation on each target area. Image segmentation is to separate the target area from the background of the vehicle body image to obtain independent local images. The image segmentation method can be 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 visual attributes such as texture, color, and shape of local images, which can characterize the uniqueness and distinctiveness of local images. Local features include: local texture features, used to describe the texture patterns and regularities of local images, such as LBP (Local Binary Pattern), HOG (Histogram of Oriented Gradients), etc.; local color features, used to describe the color distribution and statistical characteristics of local images, such as color histograms, color moments, etc.; local shape features, used to describe the geometric shapes and contour characteristics of local images, such as edge directions, curvatures, topological structures, etc. The server converts each local image into a set of numerical feature vectors through a feature extraction algorithm. These local feature vectors, together with the corresponding derived type labels, constitute the training dataset for derived type recognition.
[0076] For example, for a coupe vehicle body image, the server first locates the target areas of the roof and the rear in the vehicle compartment image according to the discrimination area template of the coupe. Then, the server uses an image segmentation algorithm to segment these two target areas to obtain separate local images of the roof and the rear. Next, the server extracts local texture features, local color features, and local shape features from these two local images respectively to obtain two sets of local feature vectors. These local feature vectors will be used for subsequent derived type recognition and comparison.
[0077] Step S108: Match the local features with each image feature subset to obtain the target derived category corresponding to the vehicle body to be recognized.
[0078] In step S108, matching the local features with each image feature subset to obtain the target derived category corresponding to the vehicle body to be recognized specifically includes: calculating the Euclidean distance between the local features and the image features in each image feature subset to obtain the distance vector between the local features and each image feature subset; performing weighted summation on each distance value in the distance vector to obtain the weighted distance score between the local features and each image feature subset, where the weight of each distance value is determined by a preset weight model; sorting each weighted distance score 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 recognized, and the minimum image feature subset is the image feature subset corresponding to the minimum weighted distance score.
[0079] Specifically, the server determines the target derived category to which the vehicle body to be recognized belongs by matching the extracted local features with the image feature subsets. First, the server calculates the Euclidean distance between the local features and the image features in each image feature subset. The 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 bodies belong to the same derived type. The server calculates the Euclidean distance between the local feature vector and all the feature vectors in each image feature subset in turn, obtaining a set of distance values, which forms the distance vector of the local feature and the image feature subset. Repeating this process, the server obtains the distance vectors of the local feature and all the image feature subsets. Next, the server performs a weighted sum of the distance values in each distance vector to obtain the weighted distance score of the local feature and each image feature subset. The weighted sum is a method that comprehensively considers multiple distance values. By assigning different weights to each distance value, the influence of some important features can be highlighted, improving the accuracy of recognition. The weight values are determined by a preset weight model. The preset weight model estimates and quantifies the importance of different features based on prior knowledge and experience. It comprehensively considers the contribution degree and discrimination degree of each feature in the recognition of the derived type, and assigns corresponding weight coefficients to each feature. The server can obtain a reasonable preset weight model through the analysis and optimization of a large number of training samples and apply it in the recognition process.
[0080] After calculating all the weighted distance scores, the server sorts these scores from smallest to largest. The smaller the score, the better the local feature matches the corresponding image feature subset, that is, the more similar the vehicle body to be recognized is to the derived type corresponding to the image feature subset. Finally, the server selects the image feature subset with the smallest weighted distance score and determines the corresponding derived type as the target derived category of the vehicle body to be recognized. This smallest score reflects the best matching degree between the local feature and an image feature subset, and the corresponding derived type is the specific type that the vehicle body to be recognized is most likely to belong to.
[0081] For example, for a coupe vehicle body to be recognized, the server extracts the local feature vectors of its roof and rear. Then, the server matches these two local feature vectors with the image feature subsets of derived types such as coupe, sedan, and hatchback respectively, calculates the Euclidean distance between them, and obtains multiple sets of distance vectors. Next, the server uses the preset weight model to perform a weighted sum on each set of distance vectors to obtain the weighted distance score of 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, so the vehicle body is recognized as a coupe.
[0082] Step S109: Adjust the production parameters corresponding to the vehicle body to be recognized according to the target vehicle body type and the target derivative type.
[0083] In step S109, the server adjusts the production parameters of the vehicle body to be recognized according to the identified target vehicle body type and target derivative type. The server establishes a production parameter database. Different standard production parameters corresponding to vehicle body types and derivative types are stored in this database. These parameters cover all aspects of vehicle body production, such as material selection, mold design, welding process, painting formula, etc. Each parameter has a recommended value range or setting to ensure that a vehicle body meeting the characteristics and performance requirements of the vehicle model is produced. After identifying the target vehicle body type and target derivative type of the vehicle body to be recognized, the server will search for the corresponding standard production parameters in the production parameter database. This process is equivalent to finding the "production guide" according to the "ID card" of the vehicle body.
[0084] Then, the server compares the standard production parameters with the current production parameters of the vehicle body to be recognized. By analyzing the differences between the two sets of parameters, the server can find the deviation between the current production settings and the optimal settings and determine the specific parameters 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 a bridge connecting the server and the production equipment. It is responsible for converting the instructions issued by the server into control codes executable by the equipment and supervising the equipment to produce according to the adjusted production parameters.
[0085] Refer to Figure 2, the present application further provides a vehicle body type discrimination device based on an intelligent camera. The device is a server, and the server includes an acquisition module 201 and a processing module 202, where: The acquisition module 201 is configured to acquire body images of a vehicle body to be recognized taken by multiple cameras on an automobile production line; The processing module 202 is configured to segment the body areas in each body image to obtain body features, and establish a multi-dimensional feature vector according to the body features; The acquisition module 201 is further configured to acquire an image feature database, and the image feature database includes multiple vehicle body types and image features corresponding to each vehicle body type; The processing module 202 is further configured 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, if it is determined that the similarity between the multi-dimensional feature vector and the target image feature is greater than a preset similarity threshold, determine that the target vehicle body type corresponding to the vehicle body to be recognized is the vehicle body type corresponding to the target image feature; 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 body image according to the image feature subset to obtain 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 recognized; The processing module 202 is further configured to adjust the production parameters corresponding to the vehicle body to be recognized according to the target vehicle body type and the target derived type.
[0086] In a possible implementation manner, the processing module 202 performs secondary segmentation on the body image according to the image feature subset to obtain corresponding local features, which specifically includes: The processing module 202 determines the discrimination areas of each derived type in a preset body image according to the target vehicle body type; The processing module 202 maps the discrimination areas to the body image to obtain the target areas corresponding to each derived type in the body image; The processing module 202 performs image segmentation on each target area to obtain local images within each target area; The processing module 202 extracts local features from each local image, and the local features include local texture features, local color features, and local shape features.
[0087] In a possible implementation, the processing module 202 matches the local features with each subset of image features to obtain the target derived category corresponding to the vehicle body to be recognized, specifically including: the processing module 202 calculates 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; the processing module 202 performs weighted summation on each distance value in the distance vector to obtain the weighted distance score between the local features and each subset of image features, where the weight of each distance value is determined by a preset weight model; the processing module 202 sorts each weighted distance score from largest to smallest to obtain the minimum weighted distance score; the processing module 202 determines the derived category corresponding to the minimum subset of image features as the target derived category corresponding to the vehicle body to be recognized, and the minimum subset of image features is the subset of image features corresponding to the minimum weighted distance score.
[0088] In a possible implementation, the acquisition module 201 acquires an image feature database, specifically including: the acquisition module 201 acquires standard vehicle body images of multiple different vehicle body types; the processing module 202 preprocesses each standard vehicle body image, and the preprocessing includes image enhancement, noise removal, and image normalization; the processing module 202 extracts features from the preprocessed standard vehicle body images to obtain the standard image features corresponding to each vehicle body type; the processing module 202 establishes an image feature database according to the name of each vehicle body type and the corresponding standard image features.
[0089] In a possible implementation, the processing module 202 establishes a multi-dimensional feature vector according to the vehicle body features, specifically including: the processing module 202 grayscales the vehicle body image to obtain a grayscale image; the processing module 202 performs edge detection on the grayscale image to obtain the vehicle body contour features; the processing module 202 extracts the texture features, color features, and shape features of the vehicle body image; the processing module 202 establishes a multi-dimensional feature vector according to the vehicle body contour features, texture features, color features, and shape features, where each dimension corresponds to a vehicle body feature respectively.
[0090] In a possible implementation, after the step where the acquisition module 201 acquires the vehicle body images of the vehicle body to be recognized taken by 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.
[0091] In a possible implementation, the processing module 202 determines whether the imaging quality of each vehicle body image meets a preset clarity requirement, which specifically includes: the processing module 202 calculates the clarity score of each vehicle body image, and the calculation method of the clarity score includes a method based on the gray gradient method or a method based on the frequency domain analysis method; the processing module 202 compares the clarity score of each vehicle body image with a preset clarity threshold; if the clarity scores of all vehicle body images are greater than the preset clarity threshold, the processing module 202 determines that the imaging quality of all vehicle body images meets the preset clarity requirement; if there is any vehicle body image whose clarity score is less than or equal to the preset clarity threshold, the processing module 202 determines that there is a vehicle body image whose imaging quality does not meet the preset clarity requirement.
[0092] It should be noted that: when the device provided in the above embodiment realizes its functions, only the above-mentioned division of each functional module is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be seen in the method embodiment, which will not be elaborated here.
[0093] This application also provides an electronic device. Refer to Figure 3 , Figure 3 FIG. is a schematic structural diagram 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.
[0094] Among them, the communication bus 302 is used to realize the connection and communication between these components.
[0095] Among them, the user interface 303 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 303 may further include a standard wired interface and a wireless interface.
[0096] Among them, the network interface 304 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface).
[0097] Among them, the processor 301 may include one or more processing cores. The processor 301 uses various interfaces and lines to connect various parts within the entire server. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and by calling the data stored in the memory 305, it performs various functions of the server and processes data. Optionally, the processor 301 may be implemented in 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 a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 301 and may be implemented separately by a single chip.
[0098] Among them, the memory 305 may include random access memory (RAM) and may also include read-only memory. Optionally, the memory 305 includes a non-transitory computer-readable storage medium. The memory 305 can 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. Among them, the program storage area may store instructions for implementing the operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store the data involved in the above-mentioned various method embodiments. Optionally, the memory 305 may also be at least one storage device located far from the aforementioned processor 301. Refer to Figure 3 , in the memory 305, as a computer storage medium, there may be included an operating system, a network communication module, a user interface module, and an application program for a method of distinguishing vehicle body types based on an intelligent camera.
[0099] In Figure 3In the electronic device 300 shown, the user interface 303 is mainly used to provide an interface for the user to input and obtain the data input by the user; while the processor 301 can be used to call an application program stored in the memory 305 for a method of distinguishing vehicle body types based on an intelligent camera. When executed by one or more processors 301, the electronic device 300 is caused to execute one or more of the methods as described in the above embodiments. It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described order of actions, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0100] This application also provides a computer-readable storage medium storing instructions. When executed by one or more processors 301, the electronic device 300 is caused to execute one or more of the methods as described in the above embodiments.
[0101] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0102] In several implementation manners provided by this application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some service interfaces. The indirect couplings or communication connections of the device or unit can be in electrical or other forms.
[0103] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0104] In addition, in each embodiment of this application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0105] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this 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 for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned memory includes: various media such as USB flash drives, mobile hard disks, magnetic disks, or optical discs that can store program codes.
[0106] The above are only exemplary embodiments of the present disclosure, and the scope of the present disclosure cannot be limited thereby. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure still fall within the scope covered by the present disclosure. After considering the specification and the disclosure of the practical truth, those skilled in the art will easily think of other implementation schemes of the present disclosure.
[0107] The present application aims to cover any variations, uses, or adaptation changes of the present disclosure. These variations, uses, or adaptation changes follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not recorded in the present disclosure. The specification and the embodiments are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for differentiating vehicle body types based on an intelligent camera, characterized in that, The method includes: Obtaining body images of a body to be recognized captured by multiple cameras on an automobile production line; Segmenting the body regions in each of the body images to obtain body features, and establishing a multi-dimensional feature vector according to the body features; Obtaining an image feature database, where the image feature database includes multiple body types and image features corresponding to each of the body types; Comparing the multi-dimensional feature vector with each image feature in the image feature database for similarity; If it is determined that the similarity between the multi-dimensional feature vector and a target image feature is greater than a preset similarity threshold, determining that the target body type corresponding to the body to be recognized is the body type corresponding to the target image feature; Determining multiple derived types corresponding to the target body type and image feature subsets corresponding to each of the derived categories in the image feature dataset; Performing secondary segmentation on the body image according to 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 category corresponding to the body to be recognized; Adjusting the production parameters corresponding to the body to be recognized according to the target body type and the target derived type.
2. The method according to claim 1, wherein The performing secondary segmentation on the body image according to the image feature subsets to obtain corresponding local features specifically includes: Determining the distinguishing regions of each of the derived types in a preset body image according to the target body type; Mapping the distinguishing regions to the body image to obtain target regions corresponding to each of the derived types in the body image; Performing image segmentation on each of the target regions to obtain local images within each target region; Extracting local features from each of the local images, where the local features include local texture features, local color features, and local shape features.
3. The method according to claim 1, wherein The matching the local features with each of the image feature subsets to obtain the target derived category corresponding to the body to be recognized 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 of the local features and each of the image feature subsets; Performing weighted summation on each distance value in the distance vector to obtain a weighted distance score of the local features and each of the image feature subsets, where the weights of each distance value are determined by a preset weight model; Sorting each of the weighted distance scores from largest to smallest to obtain the minimum weighted distance score; Determining the derived category corresponding to the minimum image feature subset as the target derived category corresponding to the body to be recognized, where 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 obtaining the image feature database specifically includes: Obtaining standard body images of multiple different body types; Performing preprocessing on each of the standard body images, where the preprocessing includes image enhancement, noise removal, and image normalization; Performing feature extraction on the preprocessed standard body images to obtain standard image features corresponding to each of the body types; Establish the image feature database according to the names of various vehicle body types and their corresponding standard image features.
5. The method according to claim 1, characterized in that, Establish a multi-dimensional feature vector according to the vehicle body features, specifically including: Perform grayscale processing on the vehicle body image to obtain a grayscale image; Perform edge detection on the grayscale image to obtain vehicle body contour features; Extract the texture features, color features, and shape features of the vehicle body image; Establish the multi-dimensional feature vector according to the vehicle body contour features, texture features, color features, and shape features, where each dimension corresponds to one of the vehicle body features.
6. The method according to claim 1, wherein After the step of obtaining vehicle body images of the vehicle to be recognized taken by multiple cameras on the automobile production line, the method further includes: Judge 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, send an imaging quality adjustment instruction to the corresponding camera, and obtain the adjusted vehicle body image until the imaging quality of each vehicle body image meets the preset clarity requirement.
7. The method according to claim 6, wherein The judgment of whether the imaging quality of each vehicle body image meets the preset clarity requirement specifically includes: Calculate the clarity score of each vehicle body image, and the calculation method of the clarity score includes the gray gradient method or the frequency domain analysis method; Compare the clarity scores of each vehicle body image with a preset clarity threshold; If the clarity scores of each vehicle body image are all greater than the preset clarity threshold, determine that the imaging quality of each vehicle body image meets the preset clarity requirement; If there is any vehicle body image whose clarity score is less than or equal to the preset clarity threshold, determine that there is a vehicle body image whose imaging quality does not meet the preset clarity requirement.
8. An apparatus for differentiating vehicle body types based on an intelligent camera, characterized in that, The device includes an acquisition module (201) and a processing module (202), where: The acquisition module (201) is used to acquire vehicle body images of the vehicle to be recognized taken by multiple cameras on the automobile production line; The processing module (202) is used to segment the vehicle body area in each vehicle body image to obtain vehicle body features, and establish a multi-dimensional feature vector according to the vehicle body features; The acquisition module (201) is further used to acquire an image feature database, and the image feature database includes multiple vehicle body types and the image features corresponding to each vehicle body type; The processing module (202) is further 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 used to, if it is determined that the similarity between the multi-dimensional feature vector and the target image feature is greater than the preset similarity threshold, determine that the target vehicle body type corresponding to the vehicle to be recognized is the vehicle body type corresponding to the target image feature; The processing module (202) is further used 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 subset of image features to obtain corresponding local features; The processing module (202) is further configured to match the local features with each of the subsets of image features to obtain the target derived category corresponding to the vehicle body to be recognized; The processing module (202) is further configured to adjust the production parameters corresponding to the vehicle body to be recognized according to the target vehicle body type and the target derived type.
9. An electronic device, characterized in that, It 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) so that the electronic device (300) executes the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions which, when executed, execute the method according to any one of claims 1-7.
Citation Information
Patent Citations
Vehicle model recognition method and terminal
CN112733723A
Vehicle type classification method and device
CN112861567A
Vehicle identification method, server and computer readable storage medium
CN113657180A
Vehicle re-identification method based on double sub-networks
CN114067143A
Localization using semantically segmented images
US20210182596A1
Cited By
Image-based high-altitude species identification method and system
CN121033514A
Flow controller intelligent control system and method based on edge calculation
CN122044058A