Vehicle testing methods, devices, equipment and storage media
By collecting wheel and chassis image data after the vehicle is in place, and using machine vision algorithms and deep learning models to identify the identification code, the problem of photoelectric sensors being affected by the external environment is solved, and the accuracy and stability of vehicle detection are achieved.
Patent Information
- Application Number
- CN202311186263.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-13
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2043-09-13
AI Technical Summary
In existing technologies, photoelectric sensors are easily affected by the external environment, which can lead to misreading or misjudgment of vehicle identification codes, affecting the accuracy and stability of vehicle detection.
After receiving the vehicle arrival signal, the system collects image data of the wheels and vehicle chassis through cameras, determines whether the vehicle meets the preset arrival conditions, and obtains the identification code when the conditions are met. The system then uses machine vision algorithms and deep learning models for image processing and recognition.
This improves the accuracy and stability of vehicle detection, avoids misjudgments by photoelectric sensors during testing, and ensures the reliability of vehicle detection.
Smart Images

Figure CN117109944B_ABST
Abstract
Description
Technical Field
[0001] This application relates to vehicle inspection technology, and more particularly to a vehicle inspection method, apparatus, equipment, and storage medium. Background Technology
[0002] In the automotive manufacturing industry, tire and chassis inspection is crucial for ensuring vehicle performance, safety, and ride comfort. Currently, many tire and chassis inspections still rely on manual operations, a method that is time-consuming and prone to human error.
[0003] In recent years, with the development of technologies such as machine learning, image processing, and deep learning, machine vision systems have been applied to the inspection of vehicle tires and chassis. After a vehicle arrives at a designated location, its identification code is acquired. Information retrieved from this code is then used as a detection standard to inspect the acquired vehicle data and determine if there are any defects. Currently, the sensors providing the vehicle's arrival signal are photoelectric sensors. However, photoelectric sensors are easily affected by external environmental factors such as changes in light intensity, dust, and fog, which can lead to misreading or misjudgment, resulting in incorrect identification codes.
[0004] Therefore, accurately obtaining the identification code for each vehicle is an urgent problem to be solved. Summary of the Invention
[0005] This application provides a vehicle detection method, apparatus, equipment, and storage medium to improve the accuracy of identification codes during vehicle detection.
[0006] Firstly, this application provides a method for detecting a vehicle, the method comprising:
[0007] Upon receiving a vehicle arrival signal, the time interval between the time of receiving the vehicle arrival signal and the time of the last acquisition of the vehicle identification image is determined, wherein the vehicle identification image includes a unique identification code for the vehicle.
[0008] If the time interval exceeds a preset time interval, first image data and second image data are acquired. The first image data is acquired by a device set up to acquire images of the wheels after the vehicle has reached its position, and the second image data is acquired by a device set up to acquire images of the vehicle chassis after the vehicle has reached its position.
[0009] Based on the first image data and the second image data, it is determined whether the vehicle meets the preset positioning conditions. The preset positioning conditions include detecting the tires in the first image data and detecting the front of the vehicle in the second image data.
[0010] When the vehicle meets the arrival conditions, the vehicle's identification code is obtained.
[0011] Optionally, obtaining the vehicle's identification code includes:
[0012] Acquire the vehicle identification image of the vehicle and record the time when the vehicle identification image is acquired;
[0013] Extract the identification code from the vehicle identification image.
[0014] Optionally, the method further includes:
[0015] The vehicle configuration information is obtained from the vehicle's production system based on the identification code;
[0016] Acquire test images and identify test information from the test images using a pre-trained machine vision algorithm. The test information includes configuration information of vehicle tires and configuration information of vehicle chassis.
[0017] The test information and the configuration information are compared to determine the test result, which is used to indicate whether the vehicle is qualified.
[0018] Optionally, the method further includes:
[0019] If the time interval does not exceed the preset time interval, the current detection state is maintained, and the detection state includes the vehicle detection process.
[0020] Optionally, extracting the identification code from the vehicle identification image includes:
[0021] The vehicle identification image is preprocessed to obtain a preprocessed image, the preprocessing including histogram equalization and / or contrast stretching.
[0022] The text regions of the preprocessed image are determined using YOLO or Faster R-CNN object detection algorithms;
[0023] The identification code is obtained by identifying the identification code text in the text region using a pre-configured deep learning model for identifying the identification code.
[0024] Optionally, the identification code is a Vehicle Identification Number (VIN), and the method further includes:
[0025] Verify whether the number of bits and the value of the check bit in the VIN code are correct, and obtain the verification result;
[0026] If the verification result indicates that the VIN code has insufficient digits, determine whether the VIN code has three consecutive identical characters;
[0027] If three consecutive identical characters exist, add another identical character after the three identical characters to modify the VIN code and verify it again.
[0028] Optionally, the method further includes:
[0029] Retrieve the system identifier code from the queue in the vehicle production system;
[0030] Compare the identification code with the system identification code;
[0031] If the comparison results are consistent, the identification code is determined to be a usable identification code;
[0032] If the comparison results are inconsistent, the system identifier code will be determined as a usable identifier code.
[0033] Secondly, this application also provides a vehicle detection device, the device comprising:
[0034] The determination module is used to determine, upon receiving a vehicle arrival signal, the time interval between the time of receiving the vehicle arrival signal and the time of the last acquisition of the vehicle identification image, wherein the vehicle identification image includes a unique identification code for the vehicle.
[0035] The first acquisition module is used to acquire first image data and second image data if the time interval exceeds a preset time interval. The first image data is acquired by a device set to acquire images of the wheels after the vehicle has been positioned, and the second image data is acquired by a device set to acquire images of the chassis after the vehicle has been positioned.
[0036] The judgment module is used to determine whether the vehicle meets the preset positioning conditions based on the first image data and the second image data. The preset positioning conditions include detecting the tires in the first image data and detecting the front of the vehicle in the second image data.
[0037] The second acquisition module is used to acquire the vehicle's identification code when the vehicle meets the arrival conditions.
[0038] Thirdly, this application also provides an electronic device, the electronic device comprising:
[0039] The processor, the memory communicatively connected to the processor, and the communication interface for interacting with other devices;
[0040] The memory stores computer-executed instructions;
[0041] The processor executes computer execution instructions stored in the memory to implement the vehicle detection method as described in any of the first aspects.
[0042] Fourthly, this application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the vehicle detection method as described in any of the first aspects.
[0043] This application provides a vehicle detection method, apparatus, device, and storage medium. The method includes: upon receiving a vehicle arrival signal, determining the time interval between the reception time of the vehicle arrival signal and the last acquisition time of a vehicle identification image. If the time interval exceeds a preset time interval, acquiring first image data and second image data, and determining whether the vehicle meets preset arrival conditions based on the first and second image data. The preset arrival conditions include detecting tires in the first image data and detecting the front of the vehicle in the second image data. When the vehicle meets the arrival conditions, acquiring the vehicle's identification code. This method can avoid photoelectric sensors misinterpreting the test start signal during testing or before actual testing begins, thus improving test stability. Attached Figure Description
[0044] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0045] Figure 1 A schematic diagram illustrating the application scenario of the vehicle detection method provided in this application;
[0046] Figure 2 A schematic flowchart of an embodiment of the vehicle detection method provided in this application;
[0047] Figure 3 A schematic flowchart of Embodiment 2 of the vehicle detection method provided in this application;
[0048] Figure 4 A flowchart illustrating Embodiment 3 of the vehicle detection method provided in this application;
[0049] Figure 5 A schematic flowchart of Embodiment 4 of the vehicle detection method provided in this application;
[0050] Figure 6 A schematic diagram of the structure of an embodiment of the vehicle detection device provided in this application;
[0051] Figure 7 This is a schematic diagram of the structure of an electronic device provided in this application.
[0052] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0053] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0054] In the automotive manufacturing industry, tire and chassis inspection is crucial for ensuring vehicle performance, safety, and ride comfort. However, traditional tire and chassis inspection methods have limitations that restrict their accuracy, efficiency, and cost-effectiveness.
[0055] Traditional methods rely on manual operation, which is time-consuming and prone to human error. They require a significant workforce and are highly dependent on worker experience and skills. Furthermore, manual inspection has limited speed and cannot meet the requirements of efficient production lines.
[0056] Machine vision-based technologies offer a potential solution to improve the accuracy and efficiency of vehicle tire and chassis inspection. In recent years, with the development of technologies such as machine learning, image processing, and deep learning, many emerging applications have appeared in the field of automated inspection. These technologies can process large amounts of image and video data and extract useful features to achieve automated tire and chassis inspection. However, these systems are often affected by factors such as lighting conditions, camera angle, and complex backgrounds, leading to a decrease in inspection accuracy and consistency.
[0057] Figure 1 This diagram illustrates an application scenario for the vehicle inspection method provided in this application. In this scenario, an automated vehicle inspection system is used to inspect the chassis assembly information of a vehicle to ensure that the vehicle assembly is free of defects. The automated vehicle inspection system includes components such as a vehicle, camera, light source and controller, photoelectric sensors, and an industrial control computer. These components work together to achieve comprehensive inspection functions.
[0058] The automated vehicle inspection system includes several cameras. One camera is used to photograph the nameplate on the B-pillar of the car, two cameras are used to photograph the left and right tires of the car respectively, and several cameras are used to photograph the car chassis (for example, two cameras are used to photograph the chassis, but the actual number can be determined based on the camera's field of view and the size of the chassis). The chassis area is relatively large, so two cameras are used to take pictures, and the pictures are then stitched together.
[0059] Light source and light source controller: The system uses several light sources and a light source controller to provide appropriate illumination to the camera.
[0060] Photoelectric sensor: Used to detect whether the car is in position. When the photoelectric sensor detects the car's position, the system begins to perform the corresponding detection task.
[0061] Industrial control computer: Serves as the main control center of the system, responsible for receiving and processing image data acquired by the camera, performing image processing and machine vision algorithm calculations, and communicating with the production management system to obtain vehicle configuration information and upload detection results.
[0062] However, the key to the stable operation of the entire system lies in providing a stable arrival signal. Currently, the commonly used sensor for providing this signal is the photoelectric sensor. Photoelectric sensors are easily affected by external environmental factors, such as changes in light intensity, dust, and smog, which can lead to misreading or misjudgment. Misjudgment can be categorized into two types: one is when the vehicle has not yet reached the designated location, triggering a misjudgment; the other is when the vehicle is already in the detection process. Misjudgment will interrupt the automated testing process, affect generation efficiency, and lead to a decrease in the accuracy of the identified vehicle identification code.
[0063] In view of the above problems, the inventors discovered during their research in this field that performing a secondary judgment on the vehicle after it has arrived at its designated position, and only initiating vehicle detection when the image also indicates that the vehicle has reached the preset position, can avoid the first type of misjudgment. Regarding the second type of misjudgment, since the detection time for each vehicle is fixed, if multiple trigger signals are received within the preset time, all but the first arrival signal can be ignored, thus avoiding the second type of misjudgment. Based on this, this application proposes a vehicle detection method, apparatus, device, and storage medium.
[0064] The following describes the technical solution of this application and how it solves the aforementioned technical problems using specific embodiments, with an industrial control computer as the execution subject. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0065] Figure 2A schematic flowchart of an embodiment of the vehicle detection method provided in this application is shown below. Figure 2 As shown, it includes the following steps:
[0066] S101. Upon receiving a vehicle arrival signal, determine the time interval between the time of receiving the vehicle arrival signal and the time of the last acquisition of the vehicle identification image, wherein the vehicle identification image includes the vehicle's unique identification code.
[0067] In this step, the vehicle moves slowly along the production line. The testing time for each vehicle is basically fixed. A preset time interval is set based on the testing time of each vehicle, within which the vehicle can complete the test from start to finish. When a photoelectric sensor at a fixed position detects a vehicle arrival signal, it sends a signal to the industrial control computer. To distinguish whether the vehicle arrival signal is a false alarm, the industrial control computer obtains the timestamp of the last normal test when the vehicle identification image was acquired. It then calculates the time interval based on the timestamp of the currently received vehicle arrival signal and the timestamp of the last normal test when the vehicle identification image was acquired.
[0068] Optionally, if the time interval does not exceed the preset time interval, the vehicle arrival signal can be ignored.
[0069] S102. If the time interval exceeds the preset time interval, acquire the first image data and the second image data. The first image data is acquired by a device set up to acquire images of the wheels after the vehicle has reached its position, and the second image data is acquired by a device set up to acquire images of the chassis after the vehicle has reached its position.
[0070] In this step, if the time interval exceeds the preset time interval, it indicates that the photoelectric sensor has not generated any additional test start signals during the test, thus preventing false judgments. Therefore, the vehicle arrival signal indicates that the vehicle needs to begin testing. To prevent the vehicle test process from being triggered before the vehicle reaches the designated position or when there is no vehicle to test, the vehicle position also needs to be verified a second time using image data.
[0071] Specifically, upon receiving a vehicle arrival signal and within a preset time interval, a photo-taking command is sent to cameras at different locations within the automated testing system. These cameras, positioned at various locations, are used in the automated testing system to detect vehicle assembly defects, including cameras capturing images of the vehicle's tires and chassis. The camera capturing images of the tires and the camera capturing images of the chassis each capture first image data. This image data can be continuous photographs, single images, or video data, and is then sent to the industrial control computer.
[0072] S103. Determine whether the vehicle meets the preset positioning conditions based on the first image data and the second image data. The preset positioning conditions include detecting the tires in the first image data and detecting the front of the vehicle in the second image data.
[0073] In this step, to detect the actual preset position reached by the vehicle, the camera used in the testing system is used to acquire image data, and the vehicle is determined to have reached the preset position based on the image data.
[0074] In one implementation, first image data and second image data are input into a pre-trained first detection model, which detects and labels the tires and the front of the vehicle in the first and second image data. Detecting the tires and the front of the vehicle indicates that the vehicle meets preset positioning conditions.
[0075] Specifically, a dataset of images showing the front of a vehicle and its tires is pre-acquired for training and testing of the first detection model. These images should include the front of the vehicle and its tires from various angles and under different conditions. The positions of the front of the vehicle and its tires are labeled as bounding boxes or pixel-level masks, and a suitable first detection model is selected, such as YOLO, SSD, Faster R-CNN, Mask R-CNN, etc. The selected first detection model is trained using the labeled image dataset. Once the model is trained, it can be used for object detection in real images. For each image, the first detection model will generate a bounding box or mask identifying the position of the front of the vehicle and its tires. Once the position of the front of the vehicle and its tires is detected, it indicates that the vehicle meets the preset positioning conditions.
[0076] Optionally, after the first detection model marks the positions of the vehicle front and tires, it determines whether the positions of the vehicle front and tires in the image conform to preset positions. Only when the preset positions are reached is the vehicle identification code obtained. For example, it determines whether the marked vehicle front has reached half of the image area. If it has not reached half of the area, it means that the vehicle has not traveled far enough, affecting the subsequent capture and recognition of the identification code. If it has reached half of the area, the positioning condition is met, and step S104 is executed.
[0077] S104. When the vehicle meets the arrival conditions, obtain the vehicle's identification code.
[0078] In this step, when the vehicle meets the preset arrival conditions, it means that the vehicle can be tested. The vehicle identification code is then obtained and the time when the vehicle identification code is obtained is recorded.
[0079] In one implementation, a nameplate camera in an automated testing system captures an image of the identification code, and optical character recognition (OCR) technology is used to identify and extract the identification code from the image.
[0080] This embodiment provides a vehicle detection method. Upon receiving a vehicle arrival signal, the method determines the time interval between the reception time of the vehicle arrival signal and the last acquisition of a vehicle identification image. If the time interval exceeds a preset time interval, first image data and second image data are acquired. Based on the first and second image data, it is determined whether the vehicle meets preset arrival conditions. These preset arrival conditions include detecting tires in the first image data and detecting the front of the vehicle in the second image data. When the vehicle meets the arrival conditions, the vehicle identification code is acquired. This method can avoid photoelectric sensors misinterpreting the test start signal during testing or before actual testing begins, thus improving test stability.
[0081] During vehicle testing, it is necessary to obtain the vehicle's identification code. Based on the configuration information obtained from the identification code, the assembly defects of the vehicle can be detected. However, due to the significant changes in lighting conditions in the testing workshop at different times of day, the details of the identification code image may not be clear when the light is dim, while the strong midday light may cause overexposure, affecting the accuracy of the camera's recognition. Moreover, once an error is recognized, there is no way to self-check.
[0082] Based on this, and building upon the first embodiment described above, this article provides a detailed explanation of how to obtain a vehicle's VIN code, using the VIN code as an example. Figure 3 A schematic flowchart of Embodiment 2 of the vehicle detection method provided in this application is shown below. Figure 3 As shown, it includes the following steps:
[0083] S201. When the vehicle meets the arrival conditions, adjust the camera's exposure brightness according to the current system time.
[0084] In this step, since the brightness of the workshop varies at different times of day during the test, the camera brightness is adjusted according to a pre-set exposure brightness mapping table and the current time. This exposure brightness mapping table stores the camera exposure brightness values corresponding to different time periods. After each vehicle meets the arrival conditions, it is determined whether the exposure brightness corresponding to the current system time and the camera exposure brightness value are the same. If they are the same, no adjustment is needed; otherwise, the camera brightness value is adjusted.
[0085] S202. Obtain the vehicle VIN code image.
[0086] In this step, after the exposure brightness value is adjusted, a command is issued to control the camera to take a picture, and the camera is controlled to capture the vehicle's VIN image.
[0087] S203. Perform adaptive histogram equalization and / or contrast stretching on the vehicle VIN code image.
[0088] In one implementation, adaptive histogram equalization is performed, dividing the image into small local blocks (e.g., 16x16 pixel blocks). Histogram equalization is then applied to each local block. Histogram equalization is a method that expands the dynamic range of an image by redistributing pixel grayscale values, resulting in a more uniform distribution of pixel values and smoother transitions between local blocks. The equalized local blocks are then merged to form the enhanced image.
[0089] In one implementation, contrast stretching is performed by first traversing the entire image to find the minimum grayscale value (usually 0) and the maximum grayscale value (usually 255). These two values are used to determine the grayscale range of the original image. The target grayscale range for the enhanced image is then determined, typically from 0 to 255, representing a minimum grayscale value of 0 and a maximum grayscale value of 255. Grayscale mapping is then performed by calculating a mapping function for each pixel value, mapping each pixel value in the original image to the target grayscale range. This can be achieved using the following formula:
[0090] New pixel value = (Original pixel value – Original minimum grayscale value) * (Target maximum grayscale value – Target minimum grayscale value) / (Original maximum grayscale value – Original minimum grayscale value) + Target minimum grayscale value
[0091] Among them, the original pixel value is the current pixel value in the image (i.e., the gray value of the original image), the original minimum gray value and the original maximum gray value are the minimum and maximum gray values of the image, respectively, and the target minimum gray value and the target maximum gray value are the minimum and maximum values of the target gray range.
[0092] The mapping function is applied to the entire image, replacing each pixel value with the new mapped value, thus completing the contrast stretching process.
[0093] In one implementation, adaptive histogram equalization is performed first, followed by contrast stretching.
[0094] S204. Obtain the text region in the VIN code image.
[0095] In this step, object detection algorithms, such as YOLO or Faster R-CNN, are used to find text regions in the image and further segment the detected text regions into individual text lines or smaller text regions.
[0096] S205. Recognize the VIN code image to obtain the VIN code.
[0097] In this step, a sequence recognition model trained to perform character recognition, such as a recurrent neural network (RNN) model or an attention mechanism model, is used to perform character-level recognition of the VIN code.
[0098] This embodiment provides a vehicle detection method. After the vehicle arrives, the camera exposure is adjusted according to the system time; a vehicle identification image is acquired; the image is preprocessed using adaptive histogram equalization and / or contrast stretching; and the VIN code is identified from the processed image using a preset algorithm. This method avoids unclear VIN code recognition caused by varying brightness at different times in the test scenario, thus improving test accuracy.
[0099] After obtaining the VIN code, it is necessary to verify whether the VIN code conforms to the format and specifications. The following example will be used to explain this in detail.
[0100] Figure 4 A flowchart illustrating Embodiment 3 of the vehicle detection method provided in this application is shown below. Figure 4 As shown, it includes the following steps:
[0101] S301. Obtain the VIN image and calculate the number of characters in the VIN code based on the VIN image.
[0102] S302. Determine if the VIN code is 17 characters long.
[0103] If the number of characters is less than 17, proceed to step S303;
[0104] If the number of characters is equal to 17, proceed to step S305.
[0105] If the number of characters exceeds 17, repeat step S301 to re-obtain the number of characters for reading the VIN code from the image. If the number of characters still exceeds 17 after repeating the process three times, the VIN code verification fails, and a recognition error message is displayed.
[0106] S303. Determine if there are three consecutive identical characters in the VIN code.
[0107] If there are three consecutive identical characters, proceed to step S304;
[0108] If there are no three consecutive identical characters, an error message will be displayed.
[0109] S304. Add a new identical character between three consecutive identical characters.
[0110] In this step, because directly using the character recognition model on the market may result in only three out of four consecutive identical characters being recognized, to avoid this situation, when there are fewer than 17 characters, if three consecutive characters are detected, then one identical character is added to the three consecutive characters before continuing to step S302.
[0111] S305. Convert the letters in the VIN code to uppercase letters.
[0112] In this step, we check that all characters in the VIN code are valid. We verify that the VIN code contains only numbers and uppercase letters, and no lowercase letters or other special characters. If the VIN code contains illegal characters, it is invalid.
[0113] S306. Verify whether the check digit value of the VIN code is correct.
[0114] In this step, the characters in the VIN code are replaced according to their corresponding values. For example, A is replaced with 1, B with 2, and so on. After replacing all the characters in the VIN code with values, these values are added together to obtain a sum. The remainder is calculated. The sum is divided by 11 to obtain a remainder. The remainder is checked to see if it matches the value of the ninth character of the VIN code. If the remainder and the value of the ninth character are equal, the VIN code is valid; otherwise, the VIN code is invalid.
[0115] It should be noted that if the remainder obtained after calculation is 10, then the ninth character of the VIN code should be the letter X. Check if the ninth character is X; if it is, then the VIN code is valid; otherwise, the VIN code is invalid.
[0116] If this is ineffective, acquire new images and repeat the above process three times. If it still cannot be correctly identified, display a recognition error message.
[0117] If the check digit of the VIN code is correct and the VIN code is valid, then proceed to step S307.
[0118] S307. Acquire test images and perform vehicle assembly information detection.
[0119] In this step, the left and right tire cameras are controlled to capture tire images using tire light sources. Machine vision algorithms are then used to analyze parameters such as caliper color, rim type, tire cover type, weight distribution angle, and taper type. The chassis camera is controlled to continuously capture chassis images using chassis light sources. Machine vision algorithms are then used to identify the chassis model and detect any missing clips, bolts, and screws.
[0120] The configuration information is obtained from the production management system based on the VIN code. The identified information is compared with the obtained configuration information to obtain the final detection result.
[0121] Optionally, the test results for tires and chassis can be merged and uploaded to the production management system.
[0122] Optionally, images from the two chassis cameras can be stitched together into a single image, highlighting any areas where parts were missing.
[0123] This embodiment provides a vehicle detection method. After obtaining the VIN code, the VIN code is verified. If the number of verification bits is less than a preset number, it is determined whether there are three consecutive identical characters. If three consecutive identical characters exist, a matching character is added. The verification bits are then checked for VIN codes that meet the character count requirement. This method can avoid character omissions in the recognition algorithm when recognizing VINs, thus increasing recognition accuracy.
[0124] After successful VIN code verification, it indicates that the VIN code itself is correct. However, there is still a possibility that the recognized VIN code is not the current vehicle's VIN code. The following example provides a detailed explanation of how to verify the VIN code.
[0125] Figure 5 A flowchart illustrating Embodiment 4 of the vehicle detection method provided in this application is shown below. Figure 5 As shown, it includes the following steps:
[0126] Step 1: Initialize the queue.
[0127] The VIN code of the first identified vehicle is added to the queue, and the VIN code information of the next 10 vehicles is retrieved from the production management system and added to the queue.
[0128] Step 2: When a new vehicle arrives, the VIN code on the nameplate is extracted using OCR technology.
[0129] Step 3: The first VIN code in the queue is popped from the stack and compared with the VIN code of the next vehicle identified by OCR.
[0130] Step 4: Check if the OCR has successfully recognized the VIN code.
[0131] If OCR recognition fails: Use the VIN code popped from the queue as the actual VIN code of the current vehicle and continue the process.
[0132] If the OCR recognition is successful, proceed to step five.
[0133] Step 5: Compare the identified VIN code with the popped QR code to determine the vehicle VIN code:
[0134] If the VIN code recognized by the OCR does not match the VIN code popped from the queue: clear the queue, indicating an OCR recognition error. After an error occurs, there are two follow-up processing methods:
[0135] In one implementation, the VIN code recognized by OCR is used as the actual VIN code of the current vehicle, and the VIN code is used to query the production system for the VIN code information of the next 10 vehicles, and the queue is updated.
[0136] In another implementation, the VIN code popped from the queue is used as the actual VIN code of the current vehicle.
[0137] Optionally, a warning message can be issued and the test can be stopped if there is a discrepancy.
[0138] If the VIN code recognized by the OCR matches the VIN code popped from the queue, it means that the OCR recognition is correct, and the VIN code popped from the queue will be used as the actual VIN code of the current vehicle.
[0139] Step 6: Check if the queue is empty.
[0140] In this step, to ensure continuous detection, the queue needs to be updated after each vehicle VIN code is determined to prevent the queue from being empty of VIN code information.
[0141] If the queue is not empty: return to step 3, continue OCR to extract the VIN code of the next vehicle, and pop the next VIN code from the queue for comparison with the VIN code recognized by OCR.
[0142] If the queue is empty: query the VIN code information of the next 10 vehicles, put them into the queue, and return to step 3 to continue OCR to extract the VIN code of the next vehicle.
[0143] This embodiment provides a method for secondary verification of vehicle VIN codes. By interacting with the production system, if a VIN code recognition fails, the VIN codes in the queue can be used directly to ensure the continuity of the production sequence. Furthermore, the VIN codes obtained by OCR recognition may have omissions or errors, while the VIN code information maintained in the queue comes from the production system and can be used to fill in the missing information or correct errors.
[0144] Figure 6 A schematic diagram of the structure of an embodiment of the vehicle detection device provided in this application is shown below. Figure 6 As shown, the vehicle detection device 600 includes:
[0145] The determining module 611 is used to determine, upon receiving a vehicle arrival signal, the time interval between the time of receiving the vehicle arrival signal and the time of the last acquisition of the vehicle identification image, wherein the vehicle identification image includes a unique identification code for the vehicle.
[0146] The first acquisition module 612 is used to acquire first image data and second image data if the time interval exceeds a preset time interval. The first image data is acquired by a device set to acquire images of the wheels after the vehicle has been positioned, and the second image data is acquired by a device set to acquire images of the chassis after the vehicle has been positioned.
[0147] The judgment module 613 is used to determine whether the vehicle meets the preset positioning conditions based on the first image data and the second image data. The preset positioning conditions include detecting the tires in the first image data and detecting the front of the vehicle in the second image data.
[0148] The second acquisition module 614 is used to acquire the vehicle's identification code when the vehicle meets the arrival conditions.
[0149] Optionally, the second acquisition module 614 is specifically used for:
[0150] Acquire the vehicle identification image of the vehicle and record the time when the vehicle identification image is acquired;
[0151] Extract the identification code from the vehicle identification image.
[0152] Optionally, the device further includes an identification module 615:
[0153] The first acquisition module 612 is further configured to acquire vehicle configuration information from the vehicle production system based on the identification code;
[0154] The recognition module 615 is used to acquire a test image and recognize the test information of the test image through a pre-trained machine vision algorithm. The test information includes the configuration information of the vehicle tires and the configuration information of the vehicle chassis.
[0155] The judgment module 613 is further configured to compare the test information and the configuration information to determine the test result, which is used to indicate whether the vehicle is qualified.
[0156] Optionally, if the time interval does not exceed a preset time interval, the current detection state is maintained, and the detection state includes the vehicle detection process.
[0157] Optionally, the second acquisition module 614 is further configured to:
[0158] The vehicle identification image is preprocessed to obtain a preprocessed image, the preprocessing including histogram equalization and / or contrast stretching.
[0159] The text regions of the preprocessed image are determined using YOLO or Faster R-CNN object detection algorithms;
[0160] The identification code is obtained by identifying the identification code text in the text region using a pre-configured deep learning model for identifying the identification code.
[0161] Optionally, the identification code is a Vehicle Identification Number (VIN), and the equipment further includes a verification module 616, which is used for:
[0162] Verify whether the number of bits and the value of the check bit in the VIN code are correct, and obtain the verification result;
[0163] If the verification result indicates that the VIN code has insufficient digits, determine whether the VIN code has three consecutive identical characters;
[0164] If three consecutive identical characters exist, add another identical character after the three identical characters to modify the VIN code and verify it again.
[0165] Optionally, the verification module 616 is further configured to:
[0166] Retrieve the system identifier code from the queue in the vehicle production system;
[0167] Compare the identification code with the system identification code;
[0168] If the comparison results are consistent, the identification code is determined to be a usable identification code;
[0169] If the comparison results are inconsistent, the system identifier code will be determined as a usable identifier code.
[0170] The vehicle detection device provided in this application embodiment is used to implement the vehicle detection method described in any of the foregoing method embodiments. Its implementation principle and technical effects are similar, and will not be repeated here.
[0171] Figure 7 A schematic diagram of the structure of an electronic device provided in this application, such as... Figure 6 As shown, the electronic device 700 includes:
[0172] The processor 711, the memory 712 communicatively connected to the processor, and the communication interface 713 for interacting with other devices;
[0173] The memory 712 stores computer-executed instructions;
[0174] The processor 711 executes computer execution instructions stored in the memory to implement the vehicle detection method described in any of the above method embodiments.
[0175] Optionally, the various devices in the electronic device 700 can be connected to each other via a system bus.
[0176] The memory 712 can be a separate memory unit or a memory unit integrated into the processor 711. The number of processors 711 can be one or more.
[0177] It should be understood that the processor 711 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0178] The system bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. Memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0179] All or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.
[0180] The electronic device provided in this application embodiment is used to implement the vehicle detection method described in any of the foregoing method embodiments. Its implementation principle and technical effects are similar, and will not be repeated here.
[0181] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the vehicle detection method as described in any of the foregoing method embodiments.
[0182] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memories described above are intended to include, but are not limited to, these and any other suitable types of memory.
[0183] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, it can implement the vehicle detection method described in any of the foregoing method embodiments.
[0184] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0185] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for detecting a vehicle, characterized in that, The method includes: Upon receiving a vehicle arrival signal, the time interval between the time of receiving the vehicle arrival signal and the time of the last acquisition of the vehicle identification image is determined, wherein the vehicle identification image includes a unique identification code for the vehicle. If the time interval exceeds a preset time interval, first image data and second image data are acquired. The first image data is acquired by a device set up to acquire images of the wheels after the vehicle has reached its position, and the second image data is acquired by a device set up to acquire images of the vehicle chassis after the vehicle has reached its position. Based on the first image data and the second image data, it is determined whether the vehicle meets the preset positioning conditions. The preset positioning conditions include detecting the tires in the first image data and detecting the front of the vehicle in the second image data. When the vehicle meets the arrival conditions, the vehicle's identification code is obtained. The identification code is used to obtain the vehicle's configuration information to detect whether there are any defects in the vehicle's assembly.
2. The method according to claim 1, characterized in that, Obtaining the vehicle's identification code includes: Acquire the vehicle identification image of the vehicle and record the time when the vehicle identification image is acquired; Extract the identification code from the vehicle identification image.
3. The method according to claim 1, characterized in that, The method further includes: The vehicle configuration information is obtained from the vehicle's production system based on the identification code; Acquire test images and identify test information from the test images using a pre-trained machine vision algorithm. The test information includes configuration information of vehicle tires and configuration information of vehicle chassis. The test information and the configuration information are compared to determine the test result, which is used to indicate whether the vehicle is qualified.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: If the time interval does not exceed the preset time interval, the current detection state is maintained, and the detection state includes the vehicle detection process.
5. The method according to claim 2, characterized in that, Extracting the identification code from the vehicle identification image includes: The vehicle identification image is preprocessed to obtain a preprocessed image, the preprocessing including histogram equalization and / or contrast stretching. The text regions of the preprocessed image are determined using YOLO or Faster R-CNN object detection algorithms; The identification code is obtained by identifying the identification code text in the text region using a pre-configured deep learning model for identifying the identification code.
6. The method according to claim 1, characterized in that, The identification code is the Vehicle Identification Number (VIN), and the method further includes: Verify whether the number of bits and the value of the check bit in the VIN code are correct, and obtain the verification result; If the verification result indicates that the VIN code has insufficient digits, determine whether the VIN code has three consecutive identical characters; If three consecutive identical characters exist, add another identical character after the three identical characters to modify the VIN code and verify it again.
7. The method according to claim 1, characterized in that, The method further includes: Retrieve the system identifier code from the queue in the vehicle production system; Compare the identification code with the system identification code; If the comparison results are consistent, the identification code is determined to be a usable identification code; If the comparison results are inconsistent, the system identifier code will be determined as a usable identifier code.
8. A vehicle detection device, characterized in that, The device includes: The determination module is used to determine, upon receiving a vehicle arrival signal, the time interval between the time of receiving the vehicle arrival signal and the time of the last acquisition of the vehicle identification image, wherein the vehicle identification image includes a unique identification code for the vehicle. The first acquisition module is used to acquire first image data and second image data if the time interval exceeds a preset time interval. The first image data is acquired by a device set to acquire images of the wheels after the vehicle has been positioned, and the second image data is acquired by a device set to acquire images of the chassis after the vehicle has been positioned. The judgment module is used to determine whether the vehicle meets the preset positioning conditions based on the first image data and the second image data. The preset positioning conditions include detecting the tires in the first image data and detecting the front of the vehicle in the second image data. The second acquisition module is used to acquire the vehicle's identification code when the vehicle meets the arrival conditions. The identification code is used to acquire the vehicle's configuration information to detect whether there are any defects in the vehicle's assembly.
9. An electronic device, characterized in that, The electronic device includes: The processor, the memory communicatively connected to the processor, and the communication interface for interacting with other devices; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the vehicle detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the vehicle detection method as described in any one of claims 1 to 7.
11. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, is used to implement the vehicle detection method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Vehicle light detection method, device, equipment and system
CN114323583A
Illegal parking identification method and device, electronic equipment and storage medium
CN115620527A