Battery appearance abnormity detection system and method based on visual identification
Through visual recognition technology, the battery appearance abnormality detection system is built, and the three-dimensional modeling and image quality evaluation model are used to solve the problems of traditional low detection efficiency and insufficient accuracy, and the efficient detection of battery appearance abnormalities and user safety guarantees are achieved.
Patent Information
- Application Number
- CN202411433883.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-10-15
AI Technical Summary
Traditional manual detection of battery appearance defects is inefficient and has the risk of missed detection. The existing machine vision system fails to evaluate image quality in real time, resulting in insufficient detection accuracy and security.
Using a battery appearance abnormality detection system based on visual recognition, the battery image is captured through the camera, a three-dimensional appearance model is constructed, a comparison image is generated, image quality evaluation and environmental correlation model is constructed, lighting equipment parameters are adjusted in real time, abnormal areas are determined, and generated according to the database. Test results.
It improves the accuracy and stability of battery appearance abnormality detection, ensures the safety of user assets, and improves the automation and computing efficiency of the system through three-dimensional modeling and multi-parameter evaluation.
Smart Images

Figure CN119269528A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery anomaly detection, and in particular to a battery appearance anomaly detection system and method based on visual recognition. Background Art
[0002] With the popularity of electric vehicles, portable electronic devices, etc., batteries have become increasingly important as an efficient energy storage solution. However, battery safety is directly related to the reliability of the product and user safety. Defects in the appearance of the casing may cause battery performance to deteriorate and even cause safety issues.
[0003] Traditional manual inspection methods are inefficient and have the risk of missed detection. In existing machine vision systems, there is no image quality assessment of the real-time images of batteries collected, and no adjustment of image acquisition parameters to improve image quality, which is not conducive to detection accuracy and has the risk of false detection.
[0004] Therefore, the present invention discloses a battery appearance abnormality detection system and method based on visual recognition to solve the above problems. Summary of the invention
[0005] The purpose of the present invention is to provide a battery appearance abnormality detection system and method based on visual recognition to solve the problems raised in the above background technology.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: a method for detecting abnormal appearance of a battery based on visual recognition, the method comprising the following steps:
[0007] S1: Use a camera to capture the appearance image of the battery, use a sensor to collect the environmental information of the battery, upload the basic information, appearance image and environmental information of the battery to a database, extract the basic information of the battery in the database, build a three-dimensional appearance model of the battery, and generate a battery appearance comparison image based on the environmental information and the three-dimensional appearance model;
[0008] S2: Obtain historical appearance images and historical environmental information of the battery, parse the historical appearance images and historical environmental information of the battery, build an image quality assessment model based on the historical appearance images, and build an image assessment and environment association model based on the image quality assessment results of the historical appearance images and the historical environmental information;
[0009] S3: Perform image quality assessment on the real-time appearance image of the battery based on the image quality assessment model, and adjust the lighting equipment parameters in real time according to the image quality assessment result and the image assessment and environment association model;
[0010] S4: After adjusting the lighting equipment parameters, the real-time appearance image of the battery is obtained again, and the real-time appearance image of the battery is compared with the battery appearance comparison image to determine the abnormal area in the real-time appearance image of the battery;
[0011] S5: Generate anomaly detection results based on the abnormal area comparison database, and provide prompts and alarms to users.
[0012] According to the above scheme, the basic information of the battery in step S1 includes the identification information, type information and specification information of the battery; the identification information corresponds to the battery one by one, the identification information includes the label information of the battery, and all the information of the corresponding battery can be found and extracted from the database according to the label information; the specification information includes the model information and standard appearance information of the battery; the standard appearance information does not have defects and quality problems;
[0013] The environmental information includes light information, battery posture information, and the relative position of the battery and the camera; the light information includes the light value of the lighting device and the light value of the non-lighting device;
[0014] The non-lighting device brightness value is collected by using a sensor to measure the brightness of natural light when the lighting device is not turned on;
[0015] A 3D appearance model of the battery is created using 3D modeling software according to the specification information of the battery; a 3D coordinate system is created based on the 3D appearance model, and the camera is mapped to a mapping point in the 3D coordinate system based on the battery posture information and the relative position between the battery and the camera;
[0016] Creating a 3D appearance model of a battery based on 3D modeling software can effectively present the appearance of a standard battery without any problems.
[0017] Taking the mapping point of the camera in the three-dimensional coordinate system as the starting point, a shooting range ray is generated according to the shooting range of the camera; a battery appearance comparison image is generated based on the shooting range ray, the camera shooting parameters and the three-dimensional appearance model, and the original color battery appearance comparison image is grayed out.
[0018] Based on the three-dimensional appearance model, it can provide basic information of battery appearance comparison images more accurately, and improve the stability and accuracy of system abnormality detection.
[0019] According to the above scheme, in step S2, the historical appearance images collected by a camera are subjected to the same rule of image grayscale processing, and after processing, they are combined to generate a historical appearance image set, which is recorded as HAI = {HAI i |i∈[1,N]}, where HAI i represents the historical appearance image with sequence number i in the historical appearance image set, and N represents the total number of historical appearance images in the historical appearance image set;
[0020] For historical appearance images HAI i , respectively calculate the evaluation image quality parameters of the historical appearance images, and normalize each evaluation image quality parameter; the evaluation image quality parameter includes the Laplace transform value SH i , standard deviation of the histogram CO i , the average value of pixels BR i and peak signal-to-noise ratio NO i ;
[0021] Construct an image quality assessment model based on the assessed image quality parameters of historical appearance images:
[0022] QV i =A1×SH i +A2×CO i +A3×BR i +A4×NO i ;
[0023] IQV i Represents the historical appearance image HAI i A1, A2, A3 and A4 are the Laplace transform value, the standard deviation of the histogram, the average value of the pixel and the weight value of the peak signal-to-noise ratio of the historical appearance image, where A1+A2+A3+A4=1;
[0024] The Laplace transform value can effectively evaluate the clarity of the image, the standard deviation of the histogram can effectively evaluate the contrast of the image, the average value of the pixel can effectively evaluate the brightness of the image, and the peak signal-to-noise ratio can effectively evaluate the noise level of the image; evaluating the overall image quality of the historical appearance image based on the above parameters can effectively improve the accuracy of the evaluation;
[0025] HAI of historical appearance images based on image quality assessment model i Evaluate image quality; based on historical appearance image HAI i Image Quality Value IQV i , Lighting equipment brightness value LFB i and non-lighting equipment brightness value NLFB i Construct an image evaluation and environment association set, denoted as IEE = {(LFB i ,NLFB i , IQV i)|i∈[1,N]}; A model of image evaluation and environment association is constructed based on the image evaluation and environment association set: z=α1×x+α2×y+α3; wherein α1, α2 and α3 represent fitting coefficients, x represents the independent variable of the brightness value of lighting equipment, y represents the independent variable of the brightness value of non-lighting equipment, and z represents the dependent variable of the image quality value. The least squares method is used to calculate and solve α1, α2 and α3 in the image evaluation and environment association model.
[0026] The image quality value, the brightness value of the lighting equipment and the brightness value of the non-lighting equipment are used to build an image evaluation and environment association model, which can effectively associate the image evaluation with the brightness information, provide a numerical basis for the subsequent adjustment of the lighting equipment parameters, and effectively improve the automation of the system;
[0027] According to the above scheme, in step S3, the evaluation image quality parameters of the real-time appearance image of the battery are calculated respectively, and each evaluation image quality parameter is normalized; the normalized evaluation image quality parameters are substituted into the image quality assessment model to perform image quality assessment on the real-time appearance image of the battery;
[0028] An image quality value threshold is set for the image quality value. If the image quality value of the real-time appearance image of the battery is greater than or equal to the image quality value threshold, the process directly jumps to step S4.
[0029] If the image quality value of the real-time appearance image of the battery is less than the image quality value threshold, the image quality value threshold and the brightness value of the non-lighting device are substituted into the fitted image evaluation and environment association model, the brightness value of the lighting device is calculated, and the lighting device parameters are adjusted to achieve the lighting device brightness value.
[0030] Adjust the lighting equipment parameters for real-time battery appearance images with poor image quality, improve the image quality of real-time battery appearance images, and improve the accuracy and stability of battery appearance anomaly detection;
[0031] According to the above scheme, in step S4, after adjusting the lighting device parameters, the real-time appearance image of the battery is acquired again, and when the real-time appearance image of the battery and the battery appearance comparison image are acquired, the battery posture information, the relative position between the battery and the camera, and the focal length of the camera are the same;
[0032] By setting the battery posture information, the relative position between the battery and the camera, and the focal length of the camera, images with the same field of view of the camera can be obtained, thereby improving the efficiency of subsequent comparison;
[0033] Compare the real-time appearance image of the battery that has been subjected to image grayscale processing with the battery appearance comparison image, including:
[0034] Split the battery real-time appearance image and the battery appearance comparison image into pixel blocks of size P×Q;
[0035] The real-time appearance image of the battery and the comparison image of the battery appearance are split and then similarity calculation is performed. During the calculation, a distributed system is used to perform pixel degree calculation on multiple groups of pixel blocks together to improve the efficiency of system calculation;
[0036] The pixel blocks of the real-time battery appearance image and the corresponding battery appearance comparison image are used to calculate the pixel value similarity PVS. The specific calculation formula is as follows:
[0037]
[0038] RPV (p,q) Indicates the pixel value when the pixel block coordinates are (p, q) in the real-time appearance image of the battery, CPV (p,q) Represents the pixel value when the pixel block coordinates in the battery appearance comparison image are (p, q), and determines the abnormal area in the real-time appearance image of the battery, p∈[1, P], q∈[1, Q];
[0039] A similarity threshold is set for the pixel value similarity of the pixel blocks, and all pixel blocks whose pixel value similarity is greater than the similarity threshold are extracted. The pixel blocks are arranged in the order of the original battery real-time appearance image and recorded as abnormal areas of the battery real-time appearance image.
[0040] According to the above scheme, in step S5, a defect database is compared based on the abnormal area, and the database includes images of common abnormal phenomena of batteries;
[0041] Generate specific abnormal types for abnormal areas, and provide users with different levels of prompts and alarms set by the system according to the specific abnormal types.
[0042] The system sets different levels of prompts and alarms for users, which can inform users of the degree of abnormality and effectively protect the safety of users' assets.
[0043] Another aspect of the present application is a battery appearance anomaly detection system based on visual recognition, the system is applied to the above-mentioned battery appearance anomaly detection method based on visual recognition, the system includes a battery data acquisition module, a database, an appearance comparison image generation module, an evaluation association model construction module, a parameter adjustment module and an abnormality comparison and prompt module;
[0044] The battery data acquisition module uses a camera to capture the appearance image of the battery, and the sensor collects the environmental information of the battery; the database is used to receive and store battery data;
[0045] The appearance comparison image generation module is used to extract basic information of the battery in the database, construct a three-dimensional appearance model of the battery, and generate a battery appearance comparison image according to the environmental information and the three-dimensional appearance model;
[0046] The evaluation association model construction module is used to obtain the historical appearance images and historical environmental information of the battery, parse the historical appearance images and historical environmental information of the battery, build an image quality evaluation model based on the historical appearance images, and build an image evaluation and environmental association model based on the image quality evaluation results of the historical appearance images and the historical environmental information;
[0047] The parameter adjustment module uses the image quality assessment model to evaluate the real-time appearance image of the battery, uses the environmental association model to calculate the brightness value of the lighting device, and adjusts the lighting device parameters in real time;
[0048] The abnormal comparison and prompt module is used to compare the real-time appearance image of the battery with the battery appearance comparison image, determine the abnormal area in the real-time appearance image of the battery, generate an abnormal detection result based on the abnormal area comparison database, and prompt and alarm the user.
[0049] According to the above solution, the appearance contrast image generation module includes a three-dimensional model and mapping unit and a contrast image generation unit;
[0050] The three-dimensional model and mapping unit creates a three-dimensional appearance model of the battery using three-dimensional modeling software according to the specification information of the battery; creates a three-dimensional coordinate system based on the three-dimensional appearance model, and maps the camera to a mapping point in the three-dimensional coordinate system based on the battery posture information and the relative position between the battery and the camera;
[0051] The contrast image generation unit takes the mapping point of the camera in the three-dimensional coordinate system as the starting point, generates a shooting range ray according to the shooting range of the camera, and generates a battery appearance contrast image based on the shooting range ray, the camera shooting parameters and the three-dimensional appearance model.
[0052] According to the above scheme, the evaluation association model construction module includes an image quality evaluation unit and an image evaluation and environment association unit;
[0053] The image quality assessment unit is used to calculate the assessed image quality parameters of the historical appearance images, and to construct an image quality assessment model based on the assessed image quality parameters of the historical appearance images;
[0054] The image assessment and environment association unit constructs an image assessment and environment association set based on image quality values, lighting device brightness values and non-lighting device brightness values, and constructs an image assessment and environment association model based on the image assessment and environment association set.
[0055] According to the above scheme, the abnormality comparison and prompting module includes an image abnormality comparison unit and an alarm prompting unit;
[0056] The image abnormality comparison unit is used to split the battery real-time appearance image and the battery appearance comparison image into pixel blocks of the same size, perform pixel value similarity on the two images, and generate an abnormal area;
[0057] The alarm prompt unit is used to compare the abnormal area with the defect database, generate a specific abnormal type of the abnormal area, and provide the user with different levels of prompts and alarms set by the system according to the specific abnormal type.
[0058] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: a three-dimensional appearance model of a battery is created based on three-dimensional modeling software, which can effectively present the appearance of a standard battery without any problems; basic information of a battery appearance comparison image can be provided more accurately based on the three-dimensional appearance model, which improves the stability and accuracy of the system abnormality detection; the overall image quality of historical appearance images is evaluated based on multiple parameters, which can effectively improve the accuracy of the evaluation; image evaluation and brightness information are associated to provide a numerical basis for subsequent lighting equipment parameter adjustment, thereby improving the degree of automation of the system; lighting equipment parameters are adjusted for real-time appearance images of batteries with poor image quality, thereby improving the accuracy and stability of battery appearance abnormality detection; the real-time appearance image of the battery and the battery appearance comparison image are split and then similarity is calculated, and a distributed system is used to calculate the pixel degree of multiple groups of pixel blocks together during the calculation, thereby improving the efficiency of the system calculation; different levels of prompts and alarms set by the system for users can enable users to know the degree of abnormality and effectively protect the user's asset safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0060] Figure 1 It is a flow chart of a method for detecting abnormal appearance of a battery based on visual recognition according to the present invention;
[0061] Figure 2 It is a structural schematic diagram of a battery appearance abnormality detection system based on visual recognition of the present invention. DETAILED DESCRIPTION
[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] Example 1: Please refer to Figure 1 The present invention provides a technical solution: a method for detecting abnormal appearance of a battery based on visual recognition, the method comprising the following steps:
[0064] S1: Use a camera to capture the appearance image of the battery, use a sensor to collect the environmental information of the battery, upload the basic information, appearance image and environmental information of the battery to a database, extract the basic information of the battery in the database, build a three-dimensional appearance model of the battery, and generate a battery appearance comparison image based on the environmental information and the three-dimensional appearance model;
[0065] According to the above scheme, the basic information of the battery in step S1 includes the identification information, type information and specification information of the battery; the identification information corresponds to the battery one by one, and the identification information includes the label information of the battery. According to the label information, all the information of the corresponding battery can be found and extracted from the database; the specification information includes the model information and standard appearance information of the battery; the standard appearance information does not have defects and quality problems;
[0066] Environmental information includes light information, battery posture information, and the relative position of the battery and the camera; light information includes the light value of lighting equipment and the light value of non-lighting equipment;
[0067] A 3D appearance model of the battery is created using 3D modeling software according to the specification information of the battery; a 3D coordinate system is created based on the 3D appearance model, and the camera is mapped to a mapping point in the 3D coordinate system based on the battery posture information and the relative position between the battery and the camera;
[0068] Taking the mapping point of the camera in the three-dimensional coordinate system as the starting point, a shooting range ray is generated according to the shooting range of the camera; a battery appearance comparison image is generated based on the shooting range ray, the camera shooting parameters and the three-dimensional appearance model, and the original color battery appearance comparison image is grayed out.
[0069] S2: Obtain historical appearance images and historical environmental information of the battery, parse the historical appearance images and historical environmental information of the battery, build an image quality assessment model based on the historical appearance images, and build an image assessment and environment association model based on the image quality assessment results of the historical appearance images and the historical environmental information;
[0070] According to the above scheme, in step S2, the historical appearance images collected by a camera are subjected to the same rule of image grayscale processing, and after processing, they are combined to generate a historical appearance image set, which is recorded as HAI = {HAI i |i∈[1,N]}, where HAI i represents the historical appearance image with sequence number i in the historical appearance image set, and N represents the total number of historical appearance images in the historical appearance image set;
[0071] For historical appearance images HAI i , respectively calculate the evaluation image quality parameters of the historical appearance image, and normalize each evaluation image quality parameter; the evaluation image quality parameter includes the Laplace transform value SH i , standard deviation of the histogram CO i , the average value of pixels BR i and peak signal-to-noise ratio NO i ;
[0072] Construct an image quality assessment model based on the assessed image quality parameters of historical appearance images:
[0073] QV i =A1×SH i +A2×CO i +A3×BR i +A4×NO i ;
[0074] IQV i Represents the historical appearance image HAI i A1, A2, A3 and A4 are the Laplace transform value, the standard deviation of the histogram, the average value of the pixel and the weight value of the peak signal-to-noise ratio of the historical appearance image, where A1+A2+A3+A4=1;
[0075] HAI of historical appearance images based on image quality assessment model i Evaluate image quality; based on historical appearance image HAI i Image Quality Value IQV i , Lighting equipment brightness value LFB i and non-lighting equipment brightness value NLFB i Construct an image evaluation and environment association set, denoted as IEE = {(LFB i ,NLFB i , IQV i)|i∈[1,N]}; A model of image evaluation and environment association is constructed based on the image evaluation and environment association set: z=α1×x+α2×y+α3; wherein α1, α2 and α3 represent fitting coefficients, x represents the independent variable of the brightness value of lighting equipment, y represents the independent variable of the brightness value of non-lighting equipment, and z represents the dependent variable of the image quality value. The least squares method is used to calculate and solve α1, α2 and α3 in the image evaluation and environment association model.
[0076] S3: Perform image quality assessment on the real-time appearance image of the battery based on the image quality assessment model, and adjust the lighting equipment parameters in real time according to the image quality assessment result and the image assessment and environment association model;
[0077] According to the above scheme, in step S3, the evaluation image quality parameters of the real-time appearance image of the battery are calculated respectively, and each evaluation image quality parameter is normalized; the normalized evaluation image quality parameters are substituted into the image quality assessment model to perform image quality assessment on the real-time appearance image of the battery;
[0078] An image quality value threshold is set for the image quality value. If the image quality value of the real-time appearance image of the battery is greater than or equal to the image quality value threshold, the process directly jumps to step S4.
[0079] If the image quality value of the real-time appearance image of the battery is less than the image quality value threshold, the image quality value threshold and the brightness value of the non-lighting device are substituted into the fitted image evaluation and environment association model, the brightness value of the lighting device is calculated, and the lighting device parameters are adjusted to achieve the lighting device brightness value.
[0080] S4: After adjusting the lighting equipment parameters, the real-time appearance image of the battery is obtained again, and the real-time appearance image of the battery is compared with the battery appearance comparison image to determine the abnormal area in the real-time appearance image of the battery;
[0081] According to the above scheme, in step S4, after adjusting the lighting equipment parameters, the real-time appearance image of the battery is acquired again. When the real-time appearance image of the battery and the comparison image of the battery appearance are acquired, the battery posture information, the relative position between the battery and the camera, and the focal length of the camera are the same;
[0082] Compare the real-time appearance image of the battery that has been subjected to image grayscale processing with the battery appearance comparison image, including:
[0083] The real-time battery appearance image and the battery appearance comparison image are split into pixel blocks of size P×Q. The pixel blocks of the real-time battery appearance image and the corresponding pixel blocks of the battery appearance comparison image are used to calculate the pixel value similarity PVS. The specific calculation formula is as follows:
[0084]
[0085] RPV (p,q) Indicates the pixel value when the pixel block coordinates are (p, q) in the real-time appearance image of the battery, CPV (p,q) Represents the pixel value when the pixel block coordinates in the battery appearance comparison image are (p, q), and determines the abnormal area in the real-time appearance image of the battery, p∈[1, P], q∈[1, Q];
[0086] A similarity threshold is set for the pixel value similarity of the pixel blocks, and all pixel blocks whose pixel value similarity is greater than the similarity threshold are extracted. The pixel blocks are arranged in the order of the original battery real-time appearance image and recorded as abnormal areas of the battery real-time appearance image.
[0087] S5: Generate anomaly detection results based on the abnormal area comparison database, and provide prompts and alarms to users.
[0088] According to the above scheme, in step S5, a defect database is compared based on the abnormal area, and the database includes images of common abnormal phenomena of batteries;
[0089] Generate specific abnormal types for abnormal areas, and provide users with different levels of prompts and alarms set by the system according to the specific abnormal types.
[0090] Example 2: Please refer to Figure 2 , the present invention provides a technical solution: a battery appearance anomaly detection system based on visual recognition, the system includes a battery data acquisition module, a database, an appearance comparison image generation module, an evaluation association model construction module, a parameter adjustment module and an abnormality comparison and prompt module;
[0091] The battery data acquisition module uses a camera to capture the appearance of the battery, and the sensor collects the environmental information of the battery; the database is used to receive and store battery data;
[0092] The appearance comparison image generation module is used to extract the basic information of the battery in the database, build a three-dimensional appearance model of the battery, and generate a battery appearance comparison image based on the environmental information and the three-dimensional appearance model;
[0093] The evaluation association model building module is used to obtain the historical appearance images and historical environmental information of the battery, parse the historical appearance images and historical environmental information of the battery, build an image quality evaluation model based on the historical appearance images, and build an image evaluation and environmental association model based on the image quality evaluation results of the historical appearance images and the historical environmental information;
[0094] The parameter adjustment module uses the image quality assessment model to evaluate the real-time appearance image of the battery, uses the environmental association model to calculate the brightness value of the lighting equipment, and adjusts the lighting equipment parameters in real time;
[0095] The abnormal comparison and prompt module is used to compare the real-time appearance image of the battery with the battery appearance comparison image, determine the abnormal area in the real-time appearance image of the battery, generate abnormal detection results based on the abnormal area comparison database, and prompt and alarm the user.
[0096] According to the above scheme, the appearance contrast image generation module includes a three-dimensional model and mapping unit and a contrast image generation unit;
[0097] The three-dimensional model and mapping unit creates a three-dimensional appearance model of the battery using three-dimensional modeling software according to the specification information of the battery; creates a three-dimensional coordinate system based on the three-dimensional appearance model, and maps the camera to a mapping point in the three-dimensional coordinate system based on the battery posture information and the relative position between the battery and the camera;
[0098] The contrast image generation unit takes the mapping point of the camera in the three-dimensional coordinate system as the starting point, generates a shooting range ray according to the shooting range of the camera, and generates a battery appearance contrast image based on the shooting range ray, the camera shooting parameters and the three-dimensional appearance model.
[0099] According to the above scheme, the evaluation association model building module includes an image quality evaluation unit and an image evaluation and environment association unit;
[0100] The image quality assessment unit is used to calculate the assessment image quality parameters of the historical appearance image, and to construct an image quality assessment model based on the assessment image quality parameters of the historical appearance image;
[0101] The image assessment and environment association unit constructs an image assessment and environment association set based on the image quality value, the lighting device brightness value and the non-lighting device brightness value, and constructs an image assessment and environment association model based on the image assessment and environment association set.
[0102] According to the above scheme, the abnormality comparison and prompting module includes an image abnormality comparison unit and an alarm prompting unit;
[0103] The image abnormality comparison unit is used to split the battery real-time appearance image and the battery appearance comparison image into pixel blocks of the same size, perform pixel value similarity on the two images, and generate an abnormal area;
[0104] The alarm prompt unit is used to compare the abnormal area with the defect database, generate the specific abnormal type of the abnormal area, and provide the user with different levels of prompts and alarms set by the system according to the specific abnormal type.
[0105] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0106] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A battery appearance abnormality detection method based on visual recognition, characterized in that: The method comprises the following steps: S1: Use a camera to capture the appearance image of the battery, use a sensor to collect the environmental information of the battery, upload the basic information, appearance image and environmental information of the battery to a database, extract the basic information of the battery in the database, build a three-dimensional appearance model of the battery, and generate a battery appearance comparison image based on the environmental information and the three-dimensional appearance model; S2: Obtain historical appearance images and historical environmental information of the battery, parse the historical appearance images and historical environmental information of the battery, build an image quality assessment model based on the historical appearance images, and build an image assessment and environment association model based on the image quality assessment results of the historical appearance images and the historical environmental information; S3: Perform image quality assessment on the real-time appearance image of the battery based on the image quality assessment model, and adjust the lighting equipment parameters in real time according to the image quality assessment result and the image assessment and environment association model; S4: After adjusting the lighting equipment parameters, the real-time appearance image of the battery is obtained again, and the real-time appearance image of the battery is compared with the battery appearance comparison image to determine the abnormal area in the real-time appearance image of the battery; S5: Generate anomaly detection results based on the abnormal area comparison database, and provide prompts and alarms to users.
2. The method for detecting battery appearance abnormality based on visual recognition according to claim 1, characterized in that: The basic information of the battery in step S1 includes identification information, type information and specification information of the battery; the identification information corresponds to the battery one by one, the identification information includes the label information of the battery, and all information of the corresponding battery can be found and extracted from the database according to the label information; the specification information includes the model information and standard appearance information of the battery; the standard appearance information does not have defects and quality problems; The environmental information includes light information, battery posture information, and the relative position of the battery and the camera; the light information includes the light value of the lighting device and the light value of the non-lighting device; A 3D appearance model of the battery is created using 3D modeling software according to the specification information of the battery; a 3D coordinate system is created based on the 3D appearance model, and the camera is mapped to a mapping point in the 3D coordinate system based on the battery posture information and the relative position between the battery and the camera; Taking the mapping point of the camera in the three-dimensional coordinate system as the starting point, a shooting range ray is generated according to the shooting range of the camera; a battery appearance comparison image is generated based on the shooting range ray, the camera shooting parameters and the three-dimensional appearance model, and the original color battery appearance comparison image is grayed out.
3. The method for detecting battery appearance abnormality based on visual recognition according to claim 2, characterized in that: In step S2, the historical appearance images collected by a camera are subjected to the same rule of image grayscale processing, and after processing, they are combined to generate a historical appearance image set, which is recorded as HAI = {HAI i |i∈[1,N]}, where HAI i represents the historical appearance image with sequence number i in the historical appearance image set, and N represents the total number of historical appearance images in the historical appearance image set; For historical appearance images HAI i , respectively calculate the evaluation image quality parameters of the historical appearance images, and normalize each evaluation image quality parameter; the evaluation image quality parameter includes the Laplace transform value SH i , standard deviation of the histogram CO i , the average value of pixels BR i and peak signal-to-noise ratio NO i ; Construct an image quality assessment model based on the assessed image quality parameters of historical appearance images: IQV i =A1×SH i +A2×CO i +A3×BR i +A4×NO i ; IQV i Represents the historical appearance image HAI i A1, A2, A3 and A4 are the Laplace transform value, the standard deviation of the histogram, the average value of the pixel and the weight value of the peak signal-to-noise ratio of the historical appearance image, where A1+A2+A3+A4=1; HAI of historical appearance images based on image quality assessment model i Assess image quality; based on historical appearance image HAI i Image Quality Value IQV i , Lighting equipment brightness value LFB i and non-lighting equipment brightness value NLFB i Construct an image evaluation and environment association set, denoted as IEE = {(LFB i ,NLFB i , IQV i )|i∈[1,N]}; A model of image evaluation and environment association is constructed based on the image evaluation and environment association set: z=α1×x+α2×y+α3; wherein α1, α2 and α3 represent fitting coefficients, x represents the independent variable of the brightness value of lighting equipment, y represents the independent variable of the brightness value of non-lighting equipment, and z represents the dependent variable of the image quality value. The least squares method is used to calculate and solve α1, α2 and α3 in the image evaluation and environment association model.
4. The method for detecting battery appearance abnormality based on visual recognition according to claim 3, characterized in that: In step S3, the evaluation image quality parameters of the real-time appearance image of the battery are calculated respectively, and each evaluation image quality parameter is normalized; the evaluation image quality parameters after normalization are substituted into the image quality evaluation model to perform image quality evaluation on the real-time appearance image of the battery; An image quality value threshold is set for the image quality value. If the image quality value of the real-time appearance image of the battery is greater than or equal to the image quality value threshold, the process directly jumps to step S4. If the image quality value of the real-time appearance image of the battery is less than the image quality value threshold, the image quality value threshold and the brightness value of the non-lighting device are substituted into the fitted image evaluation and environment association model, the brightness value of the lighting device is calculated, and the lighting device parameters are adjusted to achieve the lighting device brightness value.
5. The method for detecting battery appearance abnormality based on visual recognition according to claim 4, characterized in that: In step S4, after adjusting the lighting device parameters, the real-time appearance image of the battery is acquired again, wherein the real-time appearance image of the battery and the battery appearance comparison image have the same battery posture information, the relative position between the battery and the camera, and the focal length of the camera when the real-time appearance image of the battery and the battery appearance comparison image are acquired; Compare the real-time appearance image of the battery that has been subjected to image grayscale processing with the battery appearance comparison image, including: The real-time battery appearance image and the battery appearance comparison image are split into pixel blocks of size P×Q. The pixel blocks of the real-time battery appearance image and the corresponding pixel blocks of the battery appearance comparison image are used to calculate the pixel value similarity PVS. The specific calculation formula is as follows: RPV (p,q) Indicates the pixel value when the pixel block coordinates are (p, q) in the real-time appearance image of the battery, CPV (p,q) Represents the pixel value when the pixel block coordinates in the battery appearance comparison image are (p, q), and determines the abnormal area in the real-time appearance image of the battery, p∈[1, P], q∈[1, Q]; A similarity threshold is set for the pixel value similarity of the pixel blocks, and all pixel blocks whose pixel value similarity is greater than the similarity threshold are extracted. The pixel blocks are arranged in the order of the original battery real-time appearance image and recorded as abnormal areas of the battery real-time appearance image.
6. The method for detecting battery appearance abnormality based on visual recognition according to claim 5, characterized in that: In step S5, a defect database is compared based on the abnormal area, wherein the database includes images of common abnormal phenomena of batteries; Generate specific abnormal types for abnormal areas, and provide users with different levels of prompts and alarms set by the system according to the specific abnormal types.
7. A battery appearance abnormality detection system based on visual recognition, the system is applied to the battery appearance abnormality detection method based on visual recognition according to any one of claims 1 to 6, characterized in that: The system includes a battery data acquisition module, a database, an appearance comparison image generation module, an evaluation association model construction module, a parameter adjustment module and an abnormality comparison and prompt module; The battery data acquisition module uses a camera to capture the appearance image of the battery, and the sensor collects the environmental information of the battery; the database is used to receive and store battery data; The appearance comparison image generation module is used to extract basic information of the battery in the database, construct a three-dimensional appearance model of the battery, and generate a battery appearance comparison image according to the environmental information and the three-dimensional appearance model; The evaluation association model construction module is used to obtain the historical appearance images and historical environmental information of the battery, parse the historical appearance images and historical environmental information of the battery, build an image quality evaluation model based on the historical appearance images, and build an image evaluation and environmental association model based on the image quality evaluation results of the historical appearance images and the historical environmental information; The parameter adjustment module uses the image quality assessment model to evaluate the real-time appearance image of the battery, uses the environmental association model to calculate the brightness value of the lighting device, and adjusts the lighting device parameters in real time; The abnormal comparison and prompt module is used to compare the real-time appearance image of the battery with the battery appearance comparison image, determine the abnormal area in the real-time appearance image of the battery, generate an abnormal detection result based on the abnormal area comparison database, and prompt and alarm the user.
8. The battery appearance abnormality detection system based on visual recognition according to claim 7 is characterized in that: The appearance contrast image generation module includes a three-dimensional model and mapping unit and a contrast image generation unit; The three-dimensional model and mapping unit creates a three-dimensional appearance model of the battery using three-dimensional modeling software according to the specification information of the battery; creates a three-dimensional coordinate system based on the three-dimensional appearance model, and maps the camera to a mapping point in the three-dimensional coordinate system based on the battery posture information and the relative position between the battery and the camera; The contrast image generation unit takes the mapping point of the camera in the three-dimensional coordinate system as the starting point, generates a shooting range ray according to the shooting range of the camera, and generates a battery appearance contrast image based on the shooting range ray, the camera shooting parameters and the three-dimensional appearance model.
9. The battery appearance abnormality detection system based on visual recognition according to claim 7, characterized in that: The evaluation association model building module includes an image quality evaluation unit and an image evaluation and environment association unit; The image quality assessment unit is used to calculate the assessed image quality parameters of the historical appearance images, and to construct an image quality assessment model based on the assessed image quality parameters of the historical appearance images; The image assessment and environment association unit constructs an image assessment and environment association set based on image quality values, lighting device brightness values and non-lighting device brightness values, and constructs an image assessment and environment association model based on the image assessment and environment association set.
10. The battery appearance abnormality detection system based on visual recognition according to claim 7, characterized in that: The abnormality comparison and prompting module includes an image abnormality comparison unit and an alarm prompting unit; The image abnormality comparison unit is used to split the battery real-time appearance image and the battery appearance comparison image into pixel blocks of the same size, perform pixel value similarity on the two images, and generate an abnormal area; The alarm prompt unit is used to compare the abnormal area with the defect database, generate a specific abnormal type of the abnormal area, and provide the user with different levels of prompts and alarms set by the system according to the specific abnormal type.
Citation Information
Patent Citations
Image processing method and device, equipment and medium
CN112561906A
Image acquisition method and device and storage medium
CN113259595A
Sorting robot system for retired batteries of electric vehicles
CN114535112A
Defect analysis method and system based on synthetic leather high-quality image acquisition
CN116148265A
Automobile part defect identification system based on machine vision
CN118427101A