Image detection method, device and equipment for battery sealing nails
Through contactless 3D image detection technology, the corrosion and low efficiency problems in the contact height measurement method are solved, efficient and accurate detection of battery sealing nails is achieved, and the efficiency of welding quality evaluation is improved.
Patent Information
- Application Number
- CN202310220312.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-09
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2043-03-09
AI Technical Summary
The existing method of sealing nail detection is contact height measurement, which has corrosion problems and low detection efficiency, making it difficult to effectively detect the welding quality of sealing nails on the battery case.
Using contactless 3D scanning camera and height detection laser to obtain the stereoscopic image of the battery sealed nails, intercept different areas through image processing technology, calculate the reference height and center coordinates, fit the virtual circular area, calculate the position and height deviation, and achieve the correctness of the Efficient inspection of sealing nails.
It avoids frequent maintenance of detection components, improves detection efficiency, and can detect multiple battery housings at the same time, shortens detection time and improves the detection accuracy of sealing nail welding quality.
Smart Images

Figure CN116109620B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image detection, and in particular to a method, device and equipment for detecting an image of a battery sealing nail. Background Art
[0002] Sealing pin welding is an important process to achieve complete isolation of the battery interior from the external environment. After the battery cell is manufactured, it will be packaged into the battery shell. A liquid injection hole will be left on the top of the battery shell for injecting electrolyte. After injecting the electrolyte, the liquid injection hole is plugged with a rubber plug and transported to the sealing pin welding station for the final shell sealing. However, during the injection and transportation process, the electrolyte will remain in the cover plate receiving groove and form crystals after standing for a long time. When welding the sealing pins, it is often easy to have welding spots, blown welds, leaking welds, pinholes, and biased welds. Welding defects will cause the performance of the power battery to decline or even be scrapped, so it is necessary to inspect the welding quality of the sealing pins of the battery shell.
[0003] Existing sealing nail detection methods all use contact height measurement methods. The contact height measurement methods require that the detection element be in contact with the battery case for detection. The contact height measurement methods have the following defects: First, since the electrolyte has a certain degree of corrosiveness, there is a situation where the detection element is corroded, so the detection element needs to be frequently maintained; second, the method of the prior art requires contact detection one by one when the battery is stationary, and the detection efficiency of the sealing nails on the battery case is low.
[0004] Therefore, a battery sealing nail image detection method is needed to solve the problems existing in the prior art. Summary of the invention
[0005] To this end, the present invention provides a method, device and equipment for image detection of battery sealing nails, in an effort to solve or at least alleviate at least one of the above problems.
[0006] According to one aspect of the present invention, there is provided an image detection method for battery sealing nails, comprising:
[0007] Acquire a stereoscopic image of a battery sealing nail, and cut the stereoscopic image into a first image area and a second image area, and acquire a first reference height for battery sealing nail detection, wherein the first image area is a battery sealing nail detection area, the second image area is a stereoscopic image area excluding the battery sealing nail detection area, and the first reference height is an average height of the second image area;
[0008] According to the first reference height, acquiring a third image area in the first image area and first center coordinates of the third image area, wherein the third image area is an image area in the first image area that is lower than the first reference height;
[0009] According to the first circle center coordinates and the diameter of the battery sealing nail, a fourth image area is acquired, where the fourth image area is a virtual circular area after the first circle center coordinates and the diameter of the battery sealing nail are fitted;
[0010] According to the fourth image area and the third image area, a fifth image area and a second reference height for battery sealing nail detection are obtained, wherein the fifth image area is a remaining image area after the fourth image area is removed from the third image area, and the second reference height is an average height of the fifth image area;
[0011] According to the second reference height of the battery sealing nail detection and the third image area, a sixth image area, a second center coordinate of the sixth image area and a third reference height of the battery sealing nail detection are obtained, wherein the sixth image area is an image area in the third image area whose height is greater than the second reference height, and the third reference height is an average height of the sixth image area;
[0012] According to the first circle center coordinates and the second circle center coordinates, the first reference height and the third reference height, the position deviation and the height deviation of the battery sealing nail are respectively obtained.
[0013] In another embodiment, obtaining a stereoscopic image of a battery sealing nail includes:
[0014] A 3D scanning camera is set above the battery sealing nail, and a height detection laser is set below the battery sealing nail;
[0015] When the height detection laser is projected toward the top surface of the battery sealing nail area, the light sensing chip of the 3D scanning camera senses the height detection laser;
[0016] The 3D scanning camera scans and captures a stereoscopic image of the battery sealing nail area;
[0017] The stereoscopic image of the battery sealing nail area obtained by scanning and photographing the 3D scanning camera is subjected to median filtering to obtain a stereoscopic image of the battery sealing nail with edge interference eliminated.
[0018] In another embodiment, the step of intercepting the stereoscopic image into a first image area and a second image area to obtain a first reference height for detecting a battery sealing nail includes:
[0019] Cutting an image area of the stereoscopic image located in the battery sealing nail area as a first image area;
[0020] Setting the stereoscopic image except the first image area as a second image area;
[0021] Acquire image height information of the second image area;
[0022] According to the image height information of the second image area, an average image height of the second image area is obtained as a first reference height for battery sealing nail detection.
[0023] In another embodiment, acquiring a third image area in the first image area and first center coordinates of the third image area according to the first reference height includes:
[0024] Acquire image height information of the first image area;
[0025] Acquire, according to the image height information of the first image area and the first reference height, an image area in the first image area whose image height is lower than the first reference height;
[0026] According to an image area in the first image area whose image height is lower than the first reference height, acquiring a hole area in the image area in the first image area whose image height is lower than the first reference height and higher than the first reference height;
[0027] Performing an opening operation and a hole filling process on the hole area to obtain a third image area;
[0028] According to the third image area, the center coordinates of the circumscribed circle of the third image area are acquired as the first center coordinates.
[0029] In another embodiment, the step of acquiring the fifth image area and the second reference height for detecting the battery sealing nail according to the fourth image area and the third image area includes:
[0030] Removing the fourth image area from the third image area to obtain a fifth image area;
[0031] According to the fifth image area, acquiring image height information of the fifth image area;
[0032] According to the image height information of the fifth image area, an average value of the image height of the fifth image area is obtained as a second reference height for detecting the battery sealing nail.
[0033] In another embodiment, the obtaining of the sixth image area, the second center coordinates of the sixth image area and the third reference height of the battery sealing nail detection based on the second reference height of the battery sealing nail detection and the third image area includes:
[0034] Acquiring image height information of the third image area;
[0035] According to the image height information of the third image area and the second reference height of the battery sealing nail detection, an image area whose image height of the third image area is greater than the second reference height of the battery sealing nail detection is obtained as a sixth image area;
[0036] According to the sixth image area, image height information of the sixth image area is acquired, and the center coordinates of the circumscribed circle of the sixth image area are second center coordinates;
[0037] According to the image height information of the sixth image area, an average value of the image height of the sixth image area is obtained as a third reference height for detecting the battery sealing nail.
[0038] In another embodiment, the obtaining of the position deviation and height deviation of the battery sealing nail respectively according to the first circle center coordinates and the second circle center coordinates, the first reference height and the third reference height includes:
[0039] Calculate the area value of the region in the fourth image region whose image height is greater than the second reference height;
[0040] When the area value of the region in the fourth image region where the image height is greater than the second reference height is greater than a set threshold, the difference between the first circle center coordinate and the second circle center coordinate is calculated as the position deviation of the battery sealing nail;
[0041] When the position deviation of the battery sealing nail is less than a set value, the difference between the first reference height and the third reference height is calculated as the height deviation of the battery sealing nail.
[0042] In another embodiment, the obtaining of the position deviation and height deviation of the battery sealing nail according to the first circle center coordinates and the second circle center coordinates, the first reference height and the third reference height, respectively, further includes:
[0043] When the area value of the region in the fourth image region where the image height is greater than the second reference height is less than a set threshold, it is determined that the battery sealing nail does not exist;
[0044] When the position deviation of the battery sealing nail is greater than a set value, it is determined that the battery sealing nail is deviated.
[0045] According to another aspect of the present invention, an image detection device for battery sealing nails is disclosed, the device comprising:
[0046] An image acquisition module, used to acquire a stereoscopic image of a battery sealing nail, and cut the stereoscopic image into a first image area and a second image area, and acquire a first reference height for battery sealing nail detection, wherein the first image area is a battery sealing nail detection area, the second image area is a stereoscopic image area excluding the battery sealing nail detection area, and the first reference height is an average height of the second image area;
[0047] An image recognition module is used to obtain a third image area in the first image area and a first center coordinate of the third image area according to the first reference height, wherein the third image area is an image area in the first image area that is lower than the first reference height; obtain a fourth image area according to the first center coordinate and the diameter of the battery sealing nail, wherein the fourth image area is a virtual circular area after the first center coordinate and the diameter of the battery sealing nail are fitted; obtain a fifth image area and a second reference height for battery sealing nail detection according to the fourth image area and the third image area, wherein the fifth image area is a remaining image area after the fourth image area is removed from the third image area, and the second reference height is an average height of the fifth image area; obtain a sixth image area according to the second reference height for battery sealing nail detection and the third image area, wherein the second center coordinate of the sixth image area and a third reference height for battery sealing nail detection are obtained, wherein the sixth image area is an image area in the third image area whose height is greater than the second reference height, and the third reference height is an average height of the sixth image area;
[0048] The image detection module is used to obtain the position deviation and height deviation of the battery sealing nail according to the first circle center coordinates and the second circle center coordinates, the first reference height and the third reference height.
[0049] According to another aspect of the present invention, there is provided a device comprising:
[0050] One or more processors; and memory; one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the methods for image detection of battery sealing nails as described above.
[0051] According to the image detection scheme of the battery sealing nail of the present invention, by obtaining a stereoscopic image of the battery sealing nail and cutting the stereoscopic image into a first image area and a second image area, the first reference height of the battery sealing nail detection is obtained; according to the first reference height, the third image area in the first image area and the first center coordinates of the third image area are obtained; according to the first center coordinates and the diameter of the battery sealing nail, the fourth image area is obtained; according to the fourth image area and the third image area, the fifth image area and the second reference height of the battery sealing nail detection are obtained; according to the second reference height of the battery sealing nail detection and the third image area, the sixth image area and the second center coordinates of the sixth image area and the third reference height of the battery sealing nail detection are obtained; according to the first center coordinates and the second center coordinates, the first reference height and the third reference height, the position deviation and height deviation of the battery sealing nail are respectively obtained. The present application adopts non-contact imaging detection, avoids frequent maintenance of the detection element, can simultaneously perform imaging detection on the top surfaces of multiple battery shells, and the duration of imaging detection is shorter than that of the contact height measurement method, which improves the detection efficiency of the welding quality of the sealing nails on the battery shell. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] To achieve the above and related purposes, certain illustrative aspects are described herein in conjunction with the following description and accompanying drawings, which indicate various ways in which the principles disclosed herein can be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. The above and other purposes, features and advantages of the present disclosure will become more apparent by reading the following detailed description in conjunction with the accompanying drawings. Throughout the present disclosure, the same reference numerals generally refer to the same parts or elements.
[0053] Figure 1 A schematic diagram showing the structure of a device 100 according to an embodiment of the present invention; and
[0054] Figure 2 A flowchart showing an image detection method 200 for a battery sealing nail according to an embodiment of the present invention; and
[0055] Figure 3 A schematic structural diagram of an image detection device 300 for battery sealing nails according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0056] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0057] Figure 1 1 is a block diagram of an exemplary device 100. In a basic configuration, the device 100 of the present application typically includes: a system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between the processor 104 and the system memory 106.
[0058] Depending on the desired configuration, the processor 104 can be any type of processor, including but not limited to: a microprocessor (μP), a microcontroller (μC), a digital information processor (DSP), or any combination thereof. The processor 104 can include one or more levels of cache such as a first-level cache 110 and a second-level cache 112, a processor core 114, and registers 116. An example processor core 114 can include an arithmetic logic unit (ALU), a floating point unit (FPU), a digital signal processing core (DSP core), or any combination thereof. An example memory controller 118 can be used with the processor 104, or in some implementations, the memory controller 118 can be an internal part of the processor 104.
[0059] Depending on the desired configuration, the system memory 106 can be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. The system memory 106 can include an operating system 120, one or more applications 122, and program data 124. In some embodiments, the application 122 can be arranged to operate on the operating system using the program data 124. In some embodiments, the device 100 is configured to perform an image detection method 200 for battery sealing nails, and the program data 124 includes instructions for performing the method 200.
[0060] The device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus / interface controller 130. Example output devices 142 include a graphics processing unit 148 and an audio processing unit 150. They can be configured to facilitate communication with various external devices such as a display or speakers via one or more A / V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboards, mice, pens, voice input devices, touch input devices) or other peripherals (e.g., printers, scanners, etc.) via one or more I / O ports 158. Example communication devices 146 may include a network controller 160, which may be arranged to facilitate communication with one or more other devices 162 via a network communication link via one or more communication ports 164.
[0061] A network communication link can be an example of a communication medium. The communication medium can generally be embodied as a computer-readable instruction, a data structure, a program module in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium. A "modulated data signal" can be such a signal, one or more of which or its changes in a data set can be carried out in a manner that encodes information in a signal. As a non-limiting example, the communication medium can include a wired medium such as a wired network or a dedicated line network, and various wireless media such as sound, radio frequency (RF), microwave, infrared (IR) or other wireless media. The term computer-readable medium used here can include both storage media and communication media. In some embodiments, one or more programs are stored in a computer-readable medium, and the one or more programs include instructions for executing certain methods, such as according to an embodiment of the present invention, the device 100 executes the image detection method 200 of the battery sealing nail by the instructions.
[0062] The device 100 may be implemented as a part of a small-sized portable (or mobile) electronic device, such as a cellular phone, a personal digital assistant (PDA), a personal media player device, a wireless network browsing device, a personal head-mounted device, an application-specific device, or a hybrid device that may include any of the above functions. The device 100 may also be implemented as a personal computer including desktop and notebook computer configurations.
[0063] Figure 2 FIG. 2 is a flow chart of a method 200 for detecting an image of a battery sealing nail according to an embodiment of the present invention. Figure 2As shown, method 200 starts with step S210, obtaining a stereoscopic image of a battery sealing nail, and cutting the stereoscopic image into a first image area and a second image area, obtaining a first reference height for battery sealing nail detection, wherein the first image area is a battery sealing nail detection area, and the second image area is a stereoscopic image area excluding the battery sealing nail detection area, and the first reference height is an average height of the second image area.
[0064] Specifically, the stereoscopic image of the battery sealing nail is taken by a 3D scanning camera. The image taken by the 3D scanning camera has height position information. Since the stereoscopic image taken by the 3D scanning camera includes not only the battery sealing nail area, but also the battery area outside the battery sealing nail area, the stereoscopic image is divided into a first image area and a second image area, which are used to compare the battery sealing nail area with the area outside the battery sealing nail area, and the position information of the battery sealing nail is determined by the difference in the height of the stereoscopic image.
[0065] Specifically, in one embodiment of the present application, the step of obtaining a stereoscopic image of a battery sealing nail includes:
[0066] A 3D scanning camera is arranged above the battery sealing nail, and a height detection laser is arranged below the battery sealing nail; through the cooperation of the 3D scanning camera and the height detection laser, a stereoscopic image of the battery sealing nail can be well obtained.
[0067] When the height detection laser is projected toward the top surface of the battery sealing nail area, the light sensing chip of the 3D scanning camera senses the height detection laser;
[0068] The 3D scanning camera scans and captures a stereoscopic image of the battery sealing nail area;
[0069] The stereoscopic image of the battery sealing nail area obtained by scanning and photographing the 3D scanning camera is subjected to median filtering to obtain a stereoscopic image of the battery sealing nail with edge interference eliminated.
[0070] Specifically, in one embodiment of the present application, the step of intercepting the stereoscopic image into a first image area and a second image area to obtain a first reference height for battery sealing nail detection includes:
[0071] The image area of the stereoscopic image located in the battery sealing nail area is cut off as the first image area; specifically, by cutting off the image area of the stereoscopic image located in the battery sealing nail area, a rectangular stereoscopic image will be obtained, and the rectangular stereoscopic image will be the first image area. The image cutting will reduce the amount of calculation of the image height information.
[0072] Setting the stereoscopic image except the first image area as a second image area;
[0073] Acquire image height information of the second image area;
[0074] According to the image height information of the second image area, the average image height of the second image area is obtained as the first reference height for battery sealing nail detection. Specifically, the first reference height is the average image height of the second image area. Since the second image area is a battery shell that does not include a battery sealing nail area, the second image area is relatively smooth relative to the battery sealing nail area, and its image height is relatively consistent. Therefore, the first reference height is used as a reference for determining the height difference between the battery shell and the battery sealing nail in a single battery.
[0075] Through step S220, according to the first reference height, a third image area in the first image area and the first center coordinates of the third image area are obtained, and the third image area is an image area in the first image area that is lower than the first reference height.
[0076] Specifically, based on the first reference height, the image area in the first image area below the first reference height is extracted as the third image area. It can be seen that the third image area is the circular area where the battery sealing nail is located. Therefore, the first center coordinates of the third image area can be obtained.
[0077] Specifically, in one embodiment of the present application, acquiring the third image area in the first image area and the first center coordinates of the third image area according to the first reference height includes:
[0078] Acquire image height information of the first image area;
[0079] Acquire, according to the image height information of the first image area and the first reference height, an image area in the first image area whose image height is lower than the first reference height;
[0080] According to an image area in the first image area whose image height is lower than the first reference height, acquiring a hole area in the image area in the first image area whose image height is lower than the first reference height and higher than the first reference height;
[0081] Performing an opening operation and a hole filling process on the hole area to obtain a third image area;
[0082] According to the third image area, the center coordinates of the circumscribed circle of the third image area are acquired as the first center coordinates.
[0083] Specifically, it should be noted that there are two phenomena in the battery sealing nail area. One is that there is a groove around the battery sealing nail. Since the diameter of the groove is larger than the diameter of the battery sealing nail, the battery sealing nail can be fixed in the groove at this time. Therefore, when the battery sealing nail is nailed into the groove, there is still an annular area in the groove. Second, when the battery sealing nail is nailed into the groove, its height will exceed the height of the groove and may also exceed the height of the battery shell. Therefore, the third image area obtained is actually the area of the groove. Since the battery sealing nail is also fixed in the groove, that is, the hole area, it is necessary to fill the hole area higher than the first reference height so that the image height of the hole area is also lower than the first reference height, so that the groove and the battery sealing nail area are selected into the third image area.
[0084] Through step S230, a fourth image area is acquired according to the first circle center coordinates and the diameter of the battery sealing nail, and the fourth image area is a virtual circular area after the first circle center coordinates and the diameter of the battery sealing nail are fitted.
[0085] Specifically, since the first center coordinate is the center coordinate of the third image area, and the third image area is the groove area where the battery sealing nail is set, the first center coordinate is the standard area where the battery sealing nail needs to be fixed. If the battery sealing nail is not fixed at the first center coordinate, it means that there is a deviation in the position of the battery sealing nail. Through the first center coordinate and the diameter of the battery sealing nail, the exact position where the battery sealing nail should be set in the stereoscopic image can be obtained. Therefore, the fourth image area is the exact area where the battery sealing nail should be set. It should be noted that since there may be a position deviation between the actual setting position of the battery sealing nail and the position where it should be set, the fourth image area is a virtual area, which is a virtual circular area obtained based on the first center coordinate and the diameter of the battery sealing nail.
[0086] Through step S240, the fifth image area and the second reference height for battery sealing nail detection are obtained based on the fourth image area and the third image area. The fifth image area is the remaining image area after the fourth image area is removed from the third image area, and the second reference height is the average height of the fifth image area.
[0087] Specifically, the fifth image area is obtained by subtracting the theoretically existing fourth image area from the actually existing third image area. Since the fourth image area is the exact position where the battery sealing nail should theoretically be set, after removing the fourth image area from the third image area, the retained fifth image area will be an annular area. This annular area is the annular groove area remaining after the groove for fixing the battery sealing nail set on the battery shell is removed from the position where the battery sealing nail is fixed. The second reference height is the average height of the remaining annular groove area. Therefore, the second reference height represents the average height of the battery sealing nail fixing groove set in the battery shell. If there is an area in the battery sealing nail fixing groove that is higher than the second reference height, then this area will be the area where the battery sealing nail is actually set.
[0088] Specifically, in one embodiment of the present application, the step of acquiring the fifth image area and the second reference height of the battery sealing nail detection based on the fourth image area and the third image area includes:
[0089] Removing the fourth image area from the third image area to obtain a fifth image area;
[0090] According to the fifth image area, acquiring image height information of the fifth image area;
[0091] According to the image height information of the fifth image area, an average value of the image height of the fifth image area is obtained as a second reference height for detecting the battery sealing nail.
[0092] Through step S250, based on the second reference height of the battery sealing nail detection and the third image area, the sixth image area, the second center coordinates of the sixth image area and the third reference height of the battery sealing nail detection are obtained, the sixth image area is an image area in the third image area whose height is greater than the second reference height, and the third reference height is the average height of the sixth image area.
[0093] Specifically, since the second reference height represents the actual height of the battery sealing nail fixing groove set on the battery shell, the area in the third image area where the image height is greater than the second reference height can be obtained through the second reference height and the third image area. The area in the third image area where the image height is greater than the second reference height is the area where the battery sealing nail is actually set, which is referred to as the sixth image area in the embodiment of the present application. The second center coordinates of the sixth image area and the third reference height calculated from the average image height of the sixth image area can be obtained through the sixth image area. Therefore, since the fourth image area is the exact position where the battery sealing nail needs to be set obtained by you and after, and the sixth image area is the actual position where the battery sealing nail is set obtained by stereoscopic image analysis and comparison, the position deviation and height deviation of the battery sealing nail can be obtained by comparing the parameters of the fourth image area and the sixth image area.
[0094] Specifically, in one embodiment of the present application, the obtaining of the sixth image area, the second center coordinates of the sixth image area and the third reference height of the battery sealing nail detection based on the second reference height of the battery sealing nail detection and the third image area includes:
[0095] Acquiring image height information of the third image area;
[0096] According to the image height information of the third image area and the second reference height of the battery sealing nail detection, an image area whose image height of the third image area is greater than the second reference height of the battery sealing nail detection is obtained as a sixth image area;
[0097] According to the sixth image area, image height information of the sixth image area is acquired, and the center coordinates of the circumscribed circle of the sixth image area are second center coordinates;
[0098] According to the image height information of the sixth image area, an average value of the image height of the sixth image area is obtained as a third reference height for detecting the battery sealing nail.
[0099] Through step S260, the position deviation and height deviation of the battery sealing nail are respectively obtained according to the first circle center coordinates and the second circle center coordinates, the first reference height and the third reference height.
[0100] Specifically, since the fourth image area is calculated based on the first image area, the second image area, the third image area, and the first reference coordinates, the coordinates and height parameters of the fourth image area are geometrically transformed relative to the first center coordinates and the first reference height. Therefore, the coordinates and height parameters of the fourth image area can be characterized by the first center coordinates and the first reference height. Since the coordinates and height parameters of the fourth image area are based on the theoretical values obtained from the battery sealing nail fixing groove, and the sixth image area is based on the actual position captured by the 3D scanning camera, the coordinates and height parameters of the sixth image area are the actual parameters of the battery sealing nail position. By comparing the actual parameters with the theoretical parameters, the position deviation and height deviation of the actual fixed position of the battery sealing nail relative to the theoretical fixed position can be obtained.
[0101] Specifically, to determine whether there is a position deviation in the sixth image area, it is necessary to first determine whether there is actually a battery sealing nail. If the area of the sixth image area is greater than 0, it is considered that the battery sealing nail exists. At this time, the distance difference between the first circle center coordinate and the second circle center coordinate is determined. In an embodiment of the present application, if the distance difference between the two is greater than 0.5 mm, it is considered that there is a position deviation, and it is necessary to further determine whether there is a height deviation.
[0102] Specifically, in one embodiment of the present application, the position deviation and height deviation of the battery sealing nail are respectively obtained according to the first circle center coordinate and the second circle center coordinate, the first reference height and the third reference height, including:
[0103] Calculate the area value of the region in the fourth image region whose image height is greater than the second reference height;
[0104] When the area value of the region in the fourth image region where the image height is greater than the second reference height is greater than a set threshold, the difference between the first circle center coordinate and the second circle center coordinate is calculated as the position deviation of the battery sealing nail;
[0105] When the position deviation of the battery sealing nail is less than a set value, the difference between the first reference height and the third reference height is calculated as the height deviation of the battery sealing nail.
[0106] It also includes: when the area value of the area in the fourth image area where the image height is greater than the second reference height is less than a set threshold, it is determined that the battery sealing nail does not exist;
[0107] When the position deviation of the battery sealing nail is greater than a set value, it is determined that the battery sealing nail is deviated.
[0108] According to the image detection scheme of the battery sealing nail of the present invention, by obtaining a stereoscopic image of the battery sealing nail and cutting the stereoscopic image into a first image area and a second image area, the first reference height of the battery sealing nail detection is obtained; according to the first reference height, the third image area in the first image area and the first center coordinates of the third image area are obtained; according to the first center coordinates and the diameter of the battery sealing nail, the fourth image area is obtained; according to the fourth image area and the third image area, the fifth image area and the second reference height of the battery sealing nail detection are obtained; according to the second reference height of the battery sealing nail detection and the third image area, the sixth image area and the second center coordinates of the sixth image area and the third reference height of the battery sealing nail detection are obtained; according to the first center coordinates and the second center coordinates, the first reference height and the third reference height, the position deviation and height deviation of the battery sealing nail are respectively obtained. The present application adopts non-contact imaging detection, avoids frequent maintenance of the detection element, can simultaneously perform imaging detection on the top surfaces of multiple battery shells, and the duration of imaging detection is shorter than that of the contact height measurement method, which improves the detection efficiency of the welding quality of the sealing nails on the battery shell.
[0109] It should be understood that although Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0110] In one embodiment, Figure 3 As shown, a battery sealing nail image detection device 300 is provided, and the device 300 includes: an image acquisition module, an image recognition module, and an image detection module.
[0111] An image acquisition module, used to acquire a stereoscopic image of a battery sealing nail, and cut the stereoscopic image into a first image area and a second image area, and acquire a first reference height for battery sealing nail detection, wherein the first image area is a battery sealing nail detection area, the second image area is a stereoscopic image area excluding the battery sealing nail detection area, and the first reference height is an average height of the second image area;
[0112] An image recognition module is used to obtain a third image area in the first image area and a first center coordinate of the third image area according to the first reference height, wherein the third image area is an image area in the first image area that is lower than the first reference height; obtain a fourth image area according to the first center coordinate and the diameter of the battery sealing nail, wherein the fourth image area is a virtual circular area after the first center coordinate and the diameter of the battery sealing nail are fitted; obtain a fifth image area and a second reference height for battery sealing nail detection according to the fourth image area and the third image area, wherein the fifth image area is a remaining image area after the fourth image area is removed from the third image area, and the second reference height is an average height of the fifth image area; obtain a sixth image area according to the second reference height for battery sealing nail detection and the third image area, wherein the second center coordinate of the sixth image area and a third reference height for battery sealing nail detection are obtained, wherein the sixth image area is an image area in the third image area whose height is greater than the second reference height, and the third reference height is an average height of the sixth image area;
[0113] The image detection module is used to obtain the position deviation and height deviation of the battery sealing nail according to the first circle center coordinates and the second circle center coordinates, the first reference height and the third reference height.
[0114] Specifically, in another embodiment of the present application, the image acquisition module is used to set a 3D scanning camera above the battery sealing nail and set a height detection laser below the battery sealing nail; when the height detection laser is projected toward the top surface of the battery sealing nail area, the photosensitive chip of the 3D scanning camera senses the height detection laser; the 3D scanning camera scans and captures a stereoscopic image of the battery sealing nail area; the stereoscopic image of the battery sealing nail area scanned and captured by the 3D scanning camera is median filtered to obtain a stereoscopic image of the battery sealing nail with edge interference eliminated.
[0115] Specifically, in another embodiment of the present application, the image acquisition module is used to cut off the image area of the stereoscopic image located in the battery sealing nail area as a first image area; set the stereoscopic image excluding the first image area as a second image area; obtain image height information of the second image area; and based on the image height information of the second image area, obtain the average image height of the second image area as a first reference height for battery sealing nail detection.
[0116] Specifically, in another embodiment of the present application, the image recognition module is used to obtain image height information of the first image area; based on the image height information of the first image area and the first reference height, obtain an image area in the first image area whose image height is lower than the first reference height; based on the image area in the first image area whose image height is lower than the first reference height, obtain a hole area in the image area in the first image area whose image height is lower than the first reference height and which is higher than the first reference height; perform opening operation and hole filling processing on the hole area to obtain a third image area; based on the third image area, obtain the center coordinates of the circumscribed circle of the third image area as the first center coordinates.
[0117] Specifically, in another embodiment of the present application, the image recognition module is used to remove the fourth image area from the third image area to obtain the fifth image area; based on the fifth image area, obtain the image height information of the fifth image area; based on the image height information of the fifth image area, obtain the average value of the image height of the fifth image area as the second reference height for battery sealing nail detection.
[0118] Specifically, in another embodiment of the present application, the image recognition module is used to obtain image height information of the third image area; based on the image height information of the third image area and the second reference height of the battery sealing nail detection, the image area of the third image area whose image height is greater than the second reference height of the battery sealing nail detection is the sixth image area; based on the sixth image area, the image height information of the sixth image area is obtained, and the center coordinates of the circumscribed circle of the sixth image area are the second center coordinates; based on the image height information of the sixth image area, the average value of the image height of the sixth image area is obtained as the third reference height of the battery sealing nail detection.
[0119] Specifically, in another embodiment of the present application, the image detection module is used to calculate the area value of the area in the fourth image area where the image height is greater than the second reference height; when the area value of the area in the fourth image area where the image height is greater than the second reference height is greater than a set threshold, the difference between the first circle center coordinate and the second circle center coordinate is calculated as the position deviation of the battery sealing nail; when the position deviation of the battery sealing nail is less than a set value, the difference between the first reference height and the third reference height is calculated as the height deviation of the battery sealing nail. When the area value of the area in the fourth image area where the image height is greater than the second reference height is less than a set threshold, it is judged that the battery sealing nail does not exist; when the position deviation of the battery sealing nail is greater than a set value, it is judged that the battery sealing nail has a deviated nail.
[0120] According to the image detection scheme of the battery sealing nail of the present invention, the stereoscopic image of the battery sealing nail is obtained by the image acquisition module, and the stereoscopic image is intercepted into the first image area and the second image area, and the first reference height of the battery sealing nail detection is obtained; the image recognition module obtains the third image area in the first image area according to the first reference height, and the first center coordinates of the third image area; according to the first center coordinates and the diameter of the battery sealing nail, the fourth image area is obtained; according to the fourth image area and the third image area, the fifth image area and the second reference height of the battery sealing nail detection are obtained; according to the second reference height of the battery sealing nail detection and the third image area, the sixth image area and the second center coordinates of the sixth image area and the third reference height of the battery sealing nail detection are obtained; the image detection module obtains the position deviation and height deviation of the battery sealing nail according to the first center coordinates and the second center coordinates, the first reference height and the third reference height. The present application adopts non-contact imaging detection, avoids the frequent maintenance of the detection element, can simultaneously perform imaging detection on the top surfaces of multiple battery shells, and the duration of imaging detection is shorter than the contact height measurement method, which improves the detection efficiency of the welding quality of the sealing nails on the battery shell.
[0121] It should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0122] Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in the devices described in the embodiment, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the foregoing examples may be combined into one module or may be divided into multiple submodules.
[0123] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0124] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0125] In addition, some of the embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices that perform the functions. Therefore, a processor with necessary instructions for implementing the method or method elements forms a device for implementing the method or method elements. In addition, the elements described herein of the device embodiments are examples of devices for implementing the functions performed by the elements for the purpose of implementing the invention.
[0126] As used herein, unless otherwise specified, the use of ordinal numbers "first," "second," "third," etc. to describe common objects merely indicates that different instances of similar objects are involved, and is not intended to imply that the objects so described must have a given order in time, space, order, or in any other manner.
[0127] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is selected primarily for readability and teaching purposes, rather than for explaining or defining the subject matter of the present invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is illustrative, not restrictive, with respect to the scope of the present invention, which is defined by the appended claims.
Claims
1. A battery sealing nail image detection method, characterized in that: include: Acquire a stereoscopic image of a battery sealing nail, and cut the stereoscopic image into a first image area and a second image area, and acquire a first reference height for battery sealing nail detection, wherein the first image area is a battery sealing nail detection area, the second image area is a stereoscopic image area excluding the battery sealing nail detection area, and the first reference height is an average height of the second image area; According to the first reference height, acquiring a third image area in the first image area and first center coordinates of the third image area, wherein the third image area is an image area in the first image area that is lower than the first reference height; According to the first circle center coordinates and the diameter of the battery sealing nail, a fourth image area is acquired, where the fourth image area is a virtual circular area after the first circle center coordinates and the diameter of the battery sealing nail are fitted; According to the fourth image area and the third image area, a fifth image area and a second reference height for battery sealing nail detection are obtained, wherein the fifth image area is a remaining image area after the fourth image area is removed from the third image area, and the second reference height is an average height of the fifth image area; According to the second reference height of the battery sealing nail detection and the third image area, a sixth image area, a second center coordinate of the sixth image area and a third reference height of the battery sealing nail detection are obtained, wherein the sixth image area is an image area in the third image area whose height is greater than the second reference height, and the third reference height is an average height of the sixth image area; According to the first circle center coordinates and the second circle center coordinates, the first reference height and the third reference height, respectively obtaining the position deviation and the height deviation of the battery sealing nail; The obtaining, according to the first circle center coordinate and the second circle center coordinate, the first reference height and the third reference height, the position deviation and the height deviation of the battery sealing nail respectively comprises: Calculate the area value of the region in the fourth image region whose image height is greater than the second reference height; When the area value of the region in the fourth image region where the image height is greater than the second reference height is greater than a set threshold, the difference between the first circle center coordinate and the second circle center coordinate is calculated as the position deviation of the battery sealing nail; When the position deviation of the battery sealing nail is less than a set value, the difference between the first reference height and the third reference height is calculated as the height deviation of the battery sealing nail; When the area value of the region in the fourth image region where the image height is greater than the second reference height is less than a set threshold, it is determined that the battery sealing nail does not exist; When the position deviation of the battery sealing nail is greater than a set value, it is determined that the battery sealing nail is deviated.
2. The method according to claim 1, characterized in that The step of obtaining a stereoscopic image of the battery sealing nail comprises: A 3D scanning camera is set above the battery sealing nail, and a height detection laser is set below the battery sealing nail; When the height detection laser is projected toward the top surface of the battery sealing nail area, the light sensing chip of the 3D scanning camera senses the height detection laser; The 3D scanning camera scans and captures a stereoscopic image of the battery sealing nail area; The stereoscopic image of the battery sealing nail area obtained by scanning and photographing the 3D scanning camera is subjected to median filtering to obtain a stereoscopic image of the battery sealing nail with edge interference eliminated.
3. The method according to claim 1, characterized in that The method of cutting the stereoscopic image into a first image area and a second image area to obtain a first reference height for battery sealing nail detection includes: Cutting an image area of the stereoscopic image located in the battery sealing nail area as a first image area; Setting the stereoscopic image except the first image area as a second image area; Acquire image height information of the second image area; According to the image height information of the second image area, an average image height of the second image area is obtained as a first reference height for battery sealing nail detection.
4. The method according to claim 1, characterized in that The step of acquiring a third image area in the first image area and first center coordinates of the third image area according to the first reference height includes: Acquire image height information of the first image area; Acquire, according to the image height information of the first image area and the first reference height, an image area in the first image area whose image height is lower than the first reference height; According to an image area in the first image area whose image height is lower than the first reference height, acquiring a hole area in the image area in the first image area whose image height is lower than the first reference height and higher than the first reference height; Performing an opening operation and a hole filling process on the hole area to obtain a third image area; According to the third image area, the center coordinates of the circumscribed circle of the third image area are acquired as the first center coordinates.
5. The method according to claim 1, characterized in that The method of acquiring the fifth image area and the second reference height of the battery sealing nail detection according to the fourth image area and the third image area includes: Removing the fourth image area from the third image area to obtain a fifth image area; According to the fifth image area, acquiring image height information of the fifth image area; According to the image height information of the fifth image area, an average value of the image height of the fifth image area is obtained as a second reference height for detecting the battery sealing nail.
6. The method according to claim 1, characterized in that The method of acquiring the sixth image area, the second center coordinates of the sixth image area and the third reference height of the battery sealing nail detection according to the second reference height of the battery sealing nail detection and the third image area comprises: Acquiring image height information of the third image area; According to the image height information of the third image area and the second reference height of the battery sealing nail detection, an image area whose image height of the third image area is greater than the second reference height of the battery sealing nail detection is obtained as a sixth image area; According to the sixth image area, image height information of the sixth image area is acquired, and the center coordinates of the circumscribed circle of the sixth image area are second center coordinates; According to the image height information of the sixth image area, an average value of the image height of the sixth image area is obtained as a third reference height for detecting the battery sealing nail.
7. A battery sealing nail image detection device, the device is used to perform the battery sealing nail image detection method according to any one of claims 1 to 6, the device comprising: An image acquisition module, used to acquire a stereoscopic image of a battery sealing nail, and cut the stereoscopic image into a first image area and a second image area, and acquire a first reference height for battery sealing nail detection, wherein the first image area is a battery sealing nail detection area, the second image area is a stereoscopic image area excluding the battery sealing nail detection area, and the first reference height is an average height of the second image area; An image recognition module is used to obtain a third image area in the first image area and a first center coordinate of the third image area according to the first reference height, wherein the third image area is an image area in the first image area that is lower than the first reference height; and to obtain a fourth image area according to the first center coordinate and a diameter of the battery sealing nail, wherein the fourth image area is a virtual circular area after the first center coordinate and the diameter of the battery sealing nail are fitted; According to the fourth image area and the third image area, a fifth image area and a second reference height for battery sealing nail detection are obtained, wherein the fifth image area is a remaining image area after the fourth image area is removed from the third image area, and the second reference height is an average height of the fifth image area; According to the second reference height of the battery sealing nail detection and the third image area, a sixth image area, a second center coordinate of the sixth image area and a third reference height of the battery sealing nail detection are obtained, wherein the sixth image area is an image area in the third image area whose height is greater than the second reference height, and the third reference height is an average height of the sixth image area; The image detection module is used to obtain the position deviation and height deviation of the battery sealing nail according to the first circle center coordinates and the second circle center coordinates, the first reference height and the third reference height.
8. A device comprising: one or more processors; and memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for executing any of the methods according to claims 1-6.
