Battery detection method and system

By using telecentric lenses and driving mechanisms in the battery detection system, real-time monitoring and automatic adjustment of camera position, the image clarity problem caused by device jitter is solved, and the consistency of battery detection efficiency and clarity is improved.

WO2025179803A1PCT designated stage Publication Date: 2025-09-04CONTEMPORARY AMPEREX TECHNOLOGY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/114229
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-02-27
Filing Date
2024-08-23
Publication Date
2025-09-04

AI Technical Summary

Technical Problem

During the battery production process, the image clarity of the FA lens is deteriorated due to equipment jitter, which requires manual debugging, resulting in a long debugging cycle and poor sharpness consistency.

Method used

By using a telecentric lens and a driving mechanism in the battery detection system, the image clarity is monitored in real time, and the camera position is automatically adjusted through the driving mechanism, so that the image clarity meets preset conditions and avoids manual intervention.

Benefits of technology

It realizes automatic adjustment of image clarity without shutting down, improves the consistency of battery detection efficiency and clarity, and reduces debugging cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024114229_04092025_PF_FP_ABST
    Figure CN2024114229_04092025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present disclosure are a battery detection method and system. The battery detection method is applied to a controller of the battery detection system. The battery detection system further comprises a camera and a driving mechanism. The battery detection method comprises: acquiring a determination result for the clarity of an initial image, wherein the initial image is an image of the current battery to be tested that is collected by a camera at an initial position; and when the determination result for the clarity of the initial image indicates that the clarity of the initial image does not meet a preset condition, controlling a driving mechanism to drive the camera to move at least once from the initial position to reach a target position, wherein the target position is the position at which the clarity of a target image of the current battery that is collected by the camera meets the preset condition, and the target image is used for defect detection of the current battery.
Need to check novelty before this filing date? Find Prior Art

Description

Battery detection method and system

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This disclosure is based on and claims the priority of Chinese patent application with application number 202410211857.1, application date February 27, 2024, and invention name “Battery Detection Method and System”. The entire content of this Chinese patent application is hereby incorporated into this disclosure as a reference. Technical Field

[0003] The present disclosure relates to the technical field of battery detection, and in particular to a battery detection method and system. Background Art

[0004] New energy batteries are being used more and more widely in life and industry. For example, new energy vehicles equipped with batteries have been widely used. In addition, batteries are also being increasingly used in energy storage fields.

[0005] Currently, battery defect detection requires capturing battery images. In related technologies, factory automation (FA) lenses are used to capture battery images. However, during the production process, equipment vibrations and other factors can cause the focal ring of the FA lens to loosen, resulting in a decrease in the clarity of the captured battery images. This requires manual intervention and debugging. Manual debugging is subjective, resulting in variations in clarity consistency across the same type of machine. Furthermore, the FA lens needs to be shut down for debugging, which lengthens the debugging cycle.

[0006] Summary of the Invention

[0007] In view of this, embodiments of the present disclosure at least provide a battery detection method and system.

[0008] The technical solution of the embodiment of the present disclosure is implemented as follows:

[0009] In one aspect, an embodiment of the present disclosure provides a battery detection method, which is applied to a controller of a battery detection system. The battery detection system also includes a camera and a drive mechanism. The battery detection method includes:

[0010] Obtaining a result of determining the clarity of an initial image; the initial image is an image of the current battery to be tested captured by the camera at an initial position;

[0011] When the result of the determination of the clarity of the initial image indicates that the clarity of the initial image does not meet the preset condition, controlling the driving mechanism to drive the camera to move at least once from the initial point to the target point;

[0012] The target point is a point where the clarity of the target image of the current battery captured by the camera meets preset conditions; the target image is used to perform defect detection on the current battery.

[0013] In the embodiment of the present disclosure, the controller can obtain the judgment result of the clarity of the image captured by the camera at the initial point in real time, so that the clarity of the image captured by the camera can be monitored in real time. When the judgment result of the clarity of the initial image indicates that the clarity of the initial image does not meet the preset conditions, the driving mechanism can be controlled to drive the camera to move from the initial point, so that the image clarity can be automatically adjusted without stopping, thereby improving the efficiency of adjusting the image clarity.

[0014] In some embodiments, the control driving mechanism drives the camera to move at least once from the initial point to the target point, including: controlling the driving mechanism to drive the camera to move a first adjustment distance from the initial point in a first adjustment direction to reach the first point; obtaining a judgment result on the clarity of the first image; the first image is an image of the current battery captured by the camera at the first point; when the judgment result of the clarity of the first image indicates that the clarity of the first image does not meet the preset conditions, based on the clarity of the first image, the control driving mechanism drives the camera to move at least once from the first point until the clarity of the image of the current battery captured by the camera at the point after movement meets the preset conditions, and the point after movement is used as the target point.

[0015] In the embodiment of the present disclosure, by adjusting the camera's position multiple times, the camera can be accurately moved to the point corresponding to the point where the clarity of the image of the current battery meets the preset conditions, and the subsequent adjustment method is determined by controlling the camera based on the clarity of the image. In this way, the clarity of the image corresponding to the point after each movement can gradually meet the preset conditions, thereby improving the efficiency of controlling the camera to reach the target point.

[0016] In some embodiments, based on the clarity of the first image, the driving mechanism is controlled to drive the camera to move at least once from the first point position, including: when it is determined based on the clarity of the first image that the first image is clearer than the initial image, the driving mechanism is controlled to drive the camera to move a first adjustment distance from the first point position to a second point position in a first adjustment direction; when it is determined based on the clarity of the first image that the first image is blurrier than the initial image, the driving mechanism is controlled to drive the camera to move a second adjustment distance from the first point position in a second adjustment direction; wherein the second adjustment direction is opposite to the first adjustment direction, and the second adjustment distance is smaller than the first adjustment distance.

[0017] In the disclosed embodiment, the clarity of the first image can be used to determine the clarity comparison result between the first image after point adjustment and the initial image before point adjustment. The camera's movement direction can then be determined based on the clarity comparison result between the two. This allows the clarity of the image corresponding to the moved point to gradually meet the preset conditions, thereby improving the efficiency of controlling the camera to reach the target point. Furthermore, if the first image is blurrier than the initial image, the distance the camera is controlled to move is less than the distance the camera was initially moved. By reducing the distance the camera moves, it is possible to reduce the chance of the camera moving further away from the preset conditions due to excessive movement, thereby improving the efficiency of controlling the camera to reach the target point.

[0018] In some embodiments, the battery detection method also includes: when the sharpness error of the first image is smaller than the sharpness error of the initial image, determining that the first image is clearer than the initial image; when the sharpness error of the first image is larger than the sharpness error of the initial image, determining that the first image is blurrier than the initial image; the sharpness error is used to characterize the deviation between the sharpness of the image and the preset sharpness; when the sharpness of the first image is larger than the sharpness of the initial image, determining that the first image is clearer than the initial image; when the sharpness of the first image is smaller than the sharpness of the initial image, determining that the first image is blurrier than the initial image.

[0019] In the disclosed embodiments, the sharpness error can be used to determine which of the first image and the initial image is closer to the preset sharpness. Specifically, a smaller sharpness error indicates that the image's sharpness is closer to the preset sharpness, and thus, the image is clearer. Alternatively, the sharpness of the first image and the initial image can be directly compared; the greater the sharpness, the clearer the image. Thus, by comparing both the sharpness error and the sharpness, the sharpness comparison between the first image and the initial image can be accurately determined.

[0020] In some embodiments, the battery detection method also includes: obtaining a judgment result of the clarity of a second image; the second image is an image of the current battery captured by the camera at a second point; when the judgment result of the clarity of the second image indicates that the clarity of the second image does not meet a preset condition, and based on the clarity of the second image, it is determined that the second image is blurrier than the first image, controlling the driving mechanism to drive the camera in a second adjustment direction and move a second adjustment distance from the second point.

[0021] In the disclosed embodiment, each time a camera position is adjusted and the clarity of the image corresponding to the adjusted position does not meet a preset condition, the next adjustment method for the camera position is determined in real time based on a clarity comparison between the image before and after the adjustment. This improves the accuracy of determining the adjustment method for the camera position.

[0022] In some embodiments, the first adjustment distance includes the depth of field range information of the camera lens with a first preset coefficient; the second adjustment distance includes the depth of field range information of the camera lens with a second preset coefficient; wherein the first preset coefficient and the second preset coefficient are both positive numbers less than 1, and the first preset coefficient is greater than the second preset coefficient.

[0023] In the disclosed embodiment, because both the first preset coefficient and the second preset coefficient are positive numbers less than 1, and the first preset coefficient is greater than the second preset coefficient, the first adjustment distance is greater than the second adjustment distance. Thus, if the first image is blurrier than the initial image, the distance the camera is controlled to move is less than the distance the camera was initially moved (i.e., the second adjustment distance). By reducing the distance the camera moves, it is possible to reduce the risk of the camera moving further away from the preset conditions due to excessive movement, thereby improving the efficiency of controlling the camera to reach the target point.

[0024] In some embodiments, the battery detection system also includes a visual detection system; after the current battery completes defect detection, the battery detection method also includes: the controller sends an acquisition instruction to the camera at the target point in response to the arrival signal of the next battery to be tested; the controller receives the judgment result of the clarity of the third image sent by the visual detection system; wherein the third image is an image of the next battery captured by the camera at the target point; when the judgment result of the clarity of the third image indicates that the clarity of the third image meets the preset conditions, the third image is used to perform defect detection on the next battery.

[0025] In the embodiment of the present disclosure, in response to the arrival signal of the next battery, an acquisition instruction can be sent to the camera at the target point; then, the visual inspection system receives the judgment result of the clarity of the third image of the next battery captured by the camera at the target point. When the judgment result of the clarity of the third image indicates that the clarity of the third image meets the preset conditions, the third image is used to detect defects in the next battery. In this way, because the target point is the point where the clarity of the target image of the current battery captured by the camera meets the preset conditions, the clarity of the image of the next battery captured by the camera at the target point is likely to meet the preset conditions. In this way, there is no need to adjust the camera's position again, thereby improving the efficiency of defect detection for the next battery.

[0026] In some embodiments, the battery detection method also includes: the controller sends an acquisition instruction to the camera at the initial point position; the camera acquires the initial image of the current battery in response to the acquisition instruction, and sends the initial image to the visual detection system; the visual detection system detects the gradient energy of the image feature area of ​​the initial image, obtains the sharpness value of the initial image, and determines the judgment result of the clarity of the initial image based on the sharpness value of the initial image; obtaining the judgment result of the clarity of the initial image includes: the controller receives the judgment result of the clarity of the initial image sent by the visual detection system.

[0027] In the disclosed embodiments, a visual inspection system can detect the sharpness of the initial image and use this sharpness as the initial image clarity. This solves the problem in related art where subjective adjustments to the focus are manually made, leading to inconsistent clarity across the same type of devices. Furthermore, separate execution entities control camera movement and determine clarity, improving battery inspection efficiency.

[0028] In some embodiments, the battery detection method further includes: when the driving mechanism drives the camera to move a number of times greater than or equal to a preset number, the controller sends a focus alarm message to the visual detection system, and the visual detection system displays the focus alarm message to prompt the user.

[0029] In the embodiment of the present disclosure, by setting a preset number of times, it is possible to reduce the situation where the controller enters an infinite loop due to being unable to move the camera to the target point for a long time.

[0030] On the other hand, an embodiment of the present disclosure provides a battery detection system, which includes a camera, a drive mechanism, a controller, and a visual detection system, wherein:

[0031] A camera, used to capture an initial image of the current battery to be tested at an initial point;

[0032] A visual inspection system for determining a result of a definition of an initial image;

[0033] The controller is used to obtain a judgment result on the clarity of the initial image; when the judgment result on the clarity of the initial image indicates that the clarity of the initial image does not meet the preset conditions, the control driving mechanism drives the camera to move at least once from the initial point to the target point; wherein the target point is the point at which the clarity of the target image of the current battery captured by the camera meets the preset conditions; the target image is used to perform defect detection on the current battery.

[0034] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to explain the technical solutions of the present disclosure.

[0036] FIG1 is a schematic diagram of a welding defect detection system in the related art;

[0037] FIG2 is a schematic diagram of a first implementation flow of a battery detection method provided by an embodiment of the present disclosure;

[0038] FIG3 is a second schematic diagram of an implementation flow of a battery detection method provided by an embodiment of the present disclosure;

[0039] FIG4 is a third schematic diagram of an implementation flow of a battery detection method provided by an embodiment of the present disclosure;

[0040] FIG5 is a fourth schematic diagram of an implementation flow of a battery detection method provided by an embodiment of the present disclosure;

[0041] FIG6 is a schematic diagram of the first structure of a battery detection system provided by an embodiment of the present disclosure;

[0042] FIG7 is a fifth flowchart of an implementation process of a battery detection method provided by an embodiment of the present disclosure;

[0043] FIG8 is a second schematic diagram of the structure of a battery detection system provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the technical solutions of the present disclosure are further elaborated in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0045] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0046] The terms "first / second / third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first / second / third" can be interchanged with a specific order or sequence where permitted so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing this application only and are not intended to limit this application.

[0048] Currently, new energy batteries are increasingly being used in everyday life and industry. They are not only used in energy storage systems such as hydropower, thermal power, wind power, and solar power plants, but are also widely used in electric vehicles like electric bicycles, electric motorcycles, and electric cars, as well as in a variety of fields such as aerospace. As the application of power batteries continues to expand, market demand is also growing.

[0049] In the embodiments of the present disclosure, the battery may be a battery cell. A battery cell refers to a basic unit that can realize the mutual conversion of chemical energy and electrical energy, and can be used to make a battery module or battery pack, thereby being used to supply power to an electrical device. The battery cell may be a secondary battery, which refers to a battery cell that can be recharged to activate the active material after the battery cell is discharged and continue to be used. The battery cell may be a lithium-ion battery, a sodium-ion battery, a sodium-lithium-ion battery, a lithium metal battery, a sodium metal battery, a lithium-sulfur battery, a magnesium-ion battery, a nickel-metal hydride battery, a nickel-cadmium battery, a lead-acid battery, etc., and the embodiments of the present disclosure are not limited to this.

[0050] In the embodiments of the present disclosure, the battery may also be a single physical module including one or more battery cells to provide higher voltage and capacity. When there are multiple battery cells, the multiple battery cells are connected in series, in parallel or in hybrid via a busbar.

[0051] During the adapter welding inspection process in the battery production process, a charge coupled device (CCD) visual inspection system is used to detect defects in the battery after the adapter is welded. Defect detection can include: adapter offset detection and welding defect detection. The adapter welding station in the related art uses an FA lens to capture images of the adapter after welding. However, during the production process, equipment vibration can cause the focal ring of the FA lens to loosen, requiring manual focus adjustment.

[0052] FIG1 is a schematic diagram of a welding defect detection system in the related art. As shown in FIG1 , the welding defect detection system includes a CCD camera 101, an FA lens 102, a fixing frame 103, and a fixing platform 105 for fixing a battery 104. The fixing frame 103 includes a slide rail 1031 and a camera fixing bracket 1032. The camera fixing bracket 1032 is slidably connected to the slide rail 1031. The CCD camera 101 is mounted on the camera fixing bracket 1032. The FA lens 102 is mounted on the CCD camera 101. The CCD camera 101 and the FA lens 102 can move along the slide rail 1031 with the camera fixing bracket 1032, so that the battery 104 on the fixing platform 105 is within the field of view of the FA lens 102. The FA lens 102 is provided with a focus ring, and the focal length of the FA lens 102 can be adjusted by selecting the focus ring. During the actual production process, the CCD camera 101 may shake due to various reasons, causing the focal ring to loosen, thereby causing the focal length of the FA lens 102 to change. In this case, manual intervention and debugging are required.

[0053] Therefore, the above-mentioned related technologies have the following problems: 1. Manual debugging is subjective, and there are differences in the clarity consistency of the same type of machines; 2. Image clarity cannot be monitored in real time, and closed-loop adjustment cannot be achieved; 3. After the FA lens is shut down for debugging, the field of view size is different from that before adjustment, and recalibration and verification are required, which takes a long debugging cycle.

[0054] In order to solve the above technical problems, the embodiments of the present disclosure provide a battery detection method, which can be applied to the adapter welding detection process to detect the adapter welding results. In some embodiments, the battery detection method is also applicable to the appearance inspection of bare cells and the inspection of batteries after ultrasonic welding. The battery detection method is applied to the controller of the battery detection system, which also includes a camera and a drive mechanism. As shown in Figure 2, the method includes steps S201 and S202, wherein:

[0055] Step S201 , obtaining a result of determining the clarity of an initial image; the initial image is an image of the current battery to be tested captured by the camera at an initial position.

[0056] Here, the initial point may be a preset point, which is a point determined by the controller based on the depth of field range information of the telecentric lens. In some embodiments, the initial point may also be a point corresponding to the image used to perform defect detection on the previous battery of the current battery. That is, the camera captures the image of the previous battery at the initial point, and then performs defect detection on the previous battery through the image. After the detection is completed, the position of the camera does not change, and the camera can continue to capture the image (i.e., the initial image) of the next battery (i.e., the current battery). The judgment result of the clarity of the initial image is used to characterize whether the clarity of the initial image meets the preset conditions, which may be a preset clarity range. When the clarity of the initial image is within the preset clarity range, it indicates that the clarity of the initial image meets the preset conditions; when the clarity of the initial image is not within the preset clarity range, it indicates that the clarity of the initial image does not meet the preset conditions.

[0057] In the disclosed embodiment, the camera is equipped with a telecentric lens, through which an image of the current battery is captured. When the distance between the telecentric lens and the current battery remains unchanged, the focal length of the telecentric lens will not change due to external factors (such as device shaking). Therefore, compared with the FA lens in the related art, capturing images through a telecentric lens can improve the consistency of the field of view, and no manual intervention is required in the process of adjusting the lens focal length. Automatic adjustment of the focal length can be achieved by adjusting the distance between the telecentric lens and the battery.

[0058] In the embodiment of the present disclosure, the camera may be a CCD camera.

[0059] In an embodiment of the present disclosure, the judgment result of the clarity of the initial image can be determined based on the visual detection system in the battery detection system. After the visual detection system determines the judgment result of the clarity of the initial image, the judgment result can be sent to the controller, so that the controller obtains the judgment result of the clarity of the initial image.

[0060] In some embodiments, the clarity of the initial image can be determined first, and then it can be determined whether the clarity is within a preset clarity range, to obtain a judgment result that the clarity is within the preset clarity range, or a judgment result that the clarity is not within the preset clarity range. In the embodiment of the present disclosure, determining the clarity of the initial image may include: determining the grayscale data of the initial image; determining the variance value of the grayscale data of the initial image; and determining the clarity of the initial image based on the variance value of the grayscale data. The variance value of the grayscale data is proportional to the clarity of the initial image, and the larger the variance value of the grayscale data, the higher the clarity of the initial image. In other embodiments, the Sobel operator or the Laplace operator can also be used to extract the gradient of the initial image in the horizontal and vertical directions, and determine the clarity of the initial image based on the gradient. The subject that determines the clarity of the initial image and the judgment result can be a visual detection system, a controller, or other equipment in the visual detection system.

[0061] Step S202 : When the result of the definition judgment of the initial image indicates that the definition of the initial image does not meet a preset condition, controlling the driving mechanism to drive the camera to move at least once from the initial point to a target point.

[0062] Here, the target point is a point where the clarity of the target image of the current battery captured by the camera meets a preset condition. The target image of the current battery is used to perform defect detection on the current battery.

[0063] In the disclosed embodiment, when the clarity of the initial image does not meet the preset conditions, it indicates that the distance between the telecentric lens mounted on the camera and the current battery is not within the depth of field of the telecentric lens, and the camera position needs to be adjusted. The battery detection system in the disclosed embodiment is provided with a drive mechanism connected to the camera, so that the controller can control the drive mechanism to move the camera at least once from the initial position, so that the camera reaches a point (i.e., the target point) where the clarity of the image captured by the camera meets the preset conditions.

[0064] In embodiments of the present disclosure, the visual inspection system in the battery inspection system can perform defect detection on the current battery based on a target image. In some embodiments, defect detection can also be performed on the current battery based on a target image using other equipment outside the battery inspection system. Defect detection can include inspecting the adapter soldered to the battery to determine whether the soldering position of the adapter is normal; inspecting the battery's appearance; or inspecting the battery after ultrasonic welding.

[0065] In the embodiment of the present disclosure, the controller can obtain the judgment result of the clarity of the image captured by the camera at the initial point in real time, so that the clarity of the image captured by the camera can be monitored in real time. When the judgment result of the clarity of the initial image indicates that the clarity of the initial image does not meet the preset conditions, the driving mechanism can be controlled to drive the camera to move from the initial point, so that the image clarity can be automatically adjusted without stopping the machine, thereby improving the efficiency of adjusting the image clarity.

[0066] In some embodiments, as shown in FIG3 , the “controlling the driving mechanism to drive the camera to move at least once from the initial position to the target position” in step S202 may be implemented through steps S301 to S303 :

[0067] Step S301 : controlling the driving mechanism to drive the camera to move a first adjustment distance from the initial position in a first adjustment direction to reach a first position.

[0068] Here, the first adjustment direction may be an adjustment direction preset by the controller. The adjustment direction is related to the positional relationship between the camera and the current battery. Exemplarily, if the camera and the current battery are placed horizontally, the first adjustment direction may be horizontally to the left or horizontally to the right, that is, the camera moves in the horizontal left or horizontal right direction; if the camera and the current battery are placed vertically, the first adjustment direction may be vertically downward or vertically upward, that is, the camera moves in the vertical downward or vertical upward direction. The first adjustment distance is related to the depth of field range information of the telecentric lens. In some embodiments, the first adjustment distance is less than the depth of field range information. This is because if the first adjustment distance is greater than the depth of field range information, the camera may exceed the depth of field range information due to excessive movement distance during the adjustment process, thereby causing the clarity of the image captured by the camera to fail to meet the preset conditions.

[0069] Step S302: Obtain a result of determining the clarity of a first image; the first image is an image of the current battery captured by the camera at the first position.

[0070] In an embodiment of the present disclosure, after the camera is at the first position, the controller can send an acquisition instruction to the camera, and then the camera can acquire a first image of the current battery in response to the acquisition instruction, and then send the first image to the visual detection system. The visual detection system can detect the clarity of the first image and determine the judgment result of the clarity of the first image, and send the judgment result to the controller.

[0071] Step S303: When the result of the judgment on the clarity of the first image indicates that the clarity of the first image does not meet the preset condition, based on the clarity of the first image, control the driving mechanism to drive the camera to move at least once from the first point position until the clarity of the image of the current battery captured by the camera at the point position after movement meets the preset condition, and use the point position after movement as the target point position.

[0072] In an embodiment of the present disclosure, when the clarity of the first image corresponding to the first point does not meet the preset conditions, it means that the initial adjustment of the controller cannot directly obtain the target point. At this time, it is necessary to continue to adjust the camera point according to the clarity of the first image until the clarity of the image of the current battery captured by the adjusted point meets the preset conditions.

[0073] In some embodiments, continuing to adjust the camera position based on the clarity of the first image may involve adjusting the camera position based on a clarity comparison result between the first image and the initial image. The comparison result may indicate whether the first image is clearer than the initial image. In other words, if it is determined that the clarity of the first image does not meet a preset condition, it is necessary to determine the change in clarity between the image corresponding to the adjusted position and the image corresponding to the position before the adjustment. If the image corresponding to the adjusted position is clearer than the image corresponding to the position before the adjustment, the initial adjustment by the controller is effective. Even if the clarity of the image corresponding to the adjusted position still does not meet the preset condition, the camera position can be adjusted again in the same manner as the initial adjustment. If the image corresponding to the adjusted position is blurrier than the image corresponding to the position before the adjustment, it indicates that the initial adjustment by the controller was incorrect, and the camera position needs to be readjusted using a method opposite to the initial adjustment.

[0074] In the disclosed embodiment, if the clarity of the initial image does not meet a preset condition, the camera position can be initially adjusted, that is, the driving mechanism is controlled to move the camera in a first adjustment direction from the initial position by a first adjustment distance to a first position. If the clarity of the image corresponding to the first position does not meet the preset condition, further adjustment can be performed, that is, based on the clarity of the first image, the driving mechanism is controlled to move the camera from the first position at least once until the clarity of the image of the current battery captured by the camera at the moved position meets the preset condition, and the moved position is used as the target position. In this way, by adjusting the camera position multiple times, the camera can be accurately moved to the point corresponding to the clarity of the image of the current battery meeting the preset condition, and the subsequent adjustment method is determined by controlling the camera based on the clarity of the image. In this way, the clarity of the image corresponding to each moved position can gradually meet the preset condition, thereby improving the efficiency of controlling the camera to reach the target point.

[0075] In some embodiments, the step S303 of "controlling the driving mechanism to drive the camera to move at least once from the first position based on the clarity of the first image" can be implemented by steps 1 and 2:

[0076] Step 1: When it is determined based on the clarity of the first image that the first image is clearer than the initial image, control the driving mechanism to drive the camera to move the first adjustment distance from the first point position to the second point position in the first adjustment direction.

[0077] Step 2: When it is determined based on the clarity of the first image that the first image is more blurred than the initial image, control the driving mechanism to drive the camera to move a second adjustment distance from the first point in a second adjustment direction.

[0078] In the disclosed embodiment, when the first image is clearer than the initial image, it indicates that the initial adjustment of the camera position (i.e., controlling the camera to move from the initial position to the first position) is effective, and thus the camera movement can continue to be controlled in the same manner as the camera movement from the initial position to the first position, i.e., controlling the driving mechanism to move the camera from the first position to the first adjustment distance in the first adjustment direction. When the first image is blurrier than the initial image, it indicates that the initial adjustment of the camera position (i.e., controlling the camera to move from the initial position to the first position) is incorrect, and thus the camera position needs to be readjusted in a second adjustment direction opposite to the first adjustment direction, i.e., controlling the driving mechanism to move the camera from the first position to the second adjustment distance in the second adjustment direction.

[0079] In some embodiments, when the first adjustment direction is vertically downward, the second adjustment direction is vertically upward; when the first adjustment direction is horizontally leftward, the second adjustment direction is horizontally rightward.

[0080] In some embodiments, the first adjustment distance includes depth of field information of the camera lens at a first preset coefficient, and the second adjustment distance includes depth of field information at a second preset coefficient. The first preset coefficient and the second preset coefficient are both positive numbers less than 1, and the first preset coefficient is greater than the second preset coefficient. For example, the first preset coefficient may be 1 / 5, and the second preset coefficient may be 1 / 10.

[0081] In the disclosed embodiment, the clarity of the first image can be used to determine the clarity comparison result between the first image after point adjustment and the initial image before point adjustment. The camera's movement direction can then be determined based on the clarity comparison result between the two. This allows the clarity of the image corresponding to the moved point to gradually meet the preset conditions, thereby improving the efficiency of controlling the camera to reach the target point. Furthermore, if the first image is blurrier than the initial image, the distance the camera is controlled to move is less than the distance the camera was initially moved. By reducing the distance the camera moves, it is possible to reduce the chance of the camera moving further away from the preset conditions due to excessive movement, thereby improving the efficiency of controlling the camera to reach the target point.

[0082] In some embodiments, the "determining that the first image is clearer than the initial image based on the clarity of the first image" in step 1 may include: when the sharpness error of the first image is smaller than the sharpness error of the initial image, determining that the first image is clearer than the initial image; the "determining that the first image is blurrier than the initial image based on the clarity of the first image" in step 2 includes: when the sharpness error of the first image is greater than the sharpness error of the initial image, determining that the first image is blurrier than the initial image.

[0083] Here, sharpness can indicate the clarity of an image; the greater the sharpness of an image, the clearer the image. The sharpness error is used to characterize the deviation between the sharpness of the image and a preset sharpness. In some embodiments, the difference between the sharpness of the image and the preset sharpness can be used as the sharpness error of the image. The preset sharpness can be any sharpness value within a preset sharpness range. The smaller the sharpness error, the higher the clarity of the first image.

[0084] In an embodiment of the present disclosure, the controller may send a request to the visual detection unit to obtain a sharpness error of the first image and a sharpness error of the initial image. The visual detection unit may determine the sharpness error of the first image based on the clarity of the first image and a preset sharpness, and determine the sharpness error of the initial image based on the clarity of the initial image and a preset sharpness, and then send the sharpness error of the first image and the sharpness error of the initial image to the controller. The controller determines a clarity comparison result between the first image and the initial image based on the magnitude relationship between the sharpness error of the first image and the sharpness error of the initial image.

[0085] In some embodiments, the "determining that the first image is clearer than the initial image based on the clarity of the first image" in step 1 may include: when the sharpness of the first image is greater than the sharpness of the initial image, determining that the first image is clearer than the initial image; the "determining that the first image is blurrier than the initial image based on the clarity of the first image" in step 2 includes: when the sharpness of the first image is less than the sharpness of the initial image, determining that the first image is blurrier than the initial image.

[0086] In the embodiment of the present disclosure, the comparison result of the clarity between the first image and the initial image may be determined by directly comparing the sharpness corresponding to the first image and the initial image respectively.

[0087] In some embodiments, after step 1, the battery detection method may further include steps 3 and 4:

[0088] Step 3, obtaining a judgment result of the clarity of the second image; the second image is an image of the current battery captured by the camera at the second point; the second point is the point where the camera is located after moving the first adjustment distance from the first point.

[0089] Step 4. When the judgment result of the clarity of the second image indicates that the clarity of the second image does not meet the preset conditions, and it is determined based on the clarity of the second image that the second image is blurrier than the first image, the driving mechanism is controlled to drive the camera to move the second adjustment distance from the second point position in the second adjustment direction.

[0090] In the embodiment of the present disclosure, after the camera is controlled to continue moving in the first adjustment direction from the first point position to the second point position by the first adjustment distance, a clarity judgment result of a second image of the current battery captured by the camera at the second point position can be obtained. If the clarity judgment result of the second image indicates that the clarity of the second image does not meet a preset condition, it is necessary to continue to judge the clarity comparison result between the second image and the first image. That is, in the embodiment of the present disclosure, each time the camera position is adjusted and the clarity of the image corresponding to the adjusted point position does not meet the preset condition, the adjustment method for the next adjustment of the camera position is determined in real time based on the clarity comparison result between the image before the camera position adjustment and the image after the camera position adjustment. That is, if the clarity error of the second image is greater than the clarity error of the first image, the driving mechanism is controlled to drive the camera to move in the second adjustment direction from the second point position by the second adjustment distance.

[0091] In some embodiments, when the judgment result of the clarity of the second image indicates that the clarity of the second image does not meet a preset condition, and based on the clarity of the second image, it is determined that the second image is clearer than the first image, the control driving mechanism drives the camera to move a first adjustment distance from a second point position in a first adjustment direction.

[0092] In some embodiments, after step 2, the battery detection method may further include steps 5 to 7:

[0093] Step 5, obtaining a result of determining the clarity of a fourth image; the fourth image is an image of the current battery captured by the camera at a third position; the third position is the position of the camera after moving the second adjustment distance from the first position;

[0094] Step 6: When the judgment result of the clarity of the fourth image indicates that the clarity of the fourth image does not meet the preset conditions, and based on the clarity of the fourth image, it is determined that the fourth image is blurrier than the first image, the driving mechanism is controlled to drive the camera to move the first adjustment distance from the second point position in the first adjustment direction.

[0095] Step 7: When the judgment result of the clarity of the fourth image indicates that the clarity of the fourth image does not meet the preset conditions, and based on the clarity of the fourth image, it is determined that the fourth image is clearer than the first image, the driving mechanism is controlled to drive the camera to move the second adjustment distance from the second point position in the second adjustment direction.

[0096] In the disclosed embodiment, after the driving mechanism is controlled to move the camera in a second adjustment direction from a first position by a second adjustment distance to a third position, a fourth image clarity determination result can be obtained. If the clarity of the fourth image does not meet a preset condition, the clarity of the fourth image can be used to determine the direction and distance of further camera movement.

[0097] In some embodiments, the battery detection system further includes a visual detection system. As shown in FIG4 , the battery detection method may further include steps S401 to S403 , and step S201 may be implemented by step S404 :

[0098] Step S401: the controller sends a capture instruction to the camera at the initial position;

[0099] Step S402: the camera captures an initial image of the current battery in response to the capture instruction, and sends the initial image to the visual inspection system;

[0100] In step S403 , the visual inspection system detects the gradient energy of the image feature region of the initial image to obtain a sharpness value of the initial image, and determines the judgment result based on the sharpness value of the initial image.

[0101] In an embodiment of the present disclosure, after the current battery is in place, an acquisition instruction can be sent to the camera at the initial position. In response to the acquisition instruction, the camera captures an initial image of the current battery and sends the initial image to the visual inspection system. After receiving the initial image, the visual inspection system can first determine the image feature area of ​​the initial image, and then determine the gradient energy of the image feature area to obtain the sharpness value of the initial image; based on the sharpness value of the initial image and a preset sharpness range, the visual inspection system determines the judgment result of the clarity of the initial image. The above-mentioned image feature area is the position area of ​​the current battery in the initial image.

[0102] In some embodiments, the visual detection system may detect the initial image using a target detection algorithm to obtain an image feature area, and then detect the gradient energy of the image feature area to obtain a sharpness value of the initial image.

[0103] In some embodiments, the visual inspection system can implement the determination of image feature regions and the detection of gradient energy using processing software pre-installed in the visual inspection system. For example, the processing software can be VisionPro; the image feature regions in the initial image can be determined using the template alignment function (CogPMAlignTool) in VisionPro, and the gradient energy of the image feature regions can be determined using the CogImageSharpnessTool tool in VisionPro.

[0104] In step S404 , the controller receives a result of determining the clarity of the initial image sent by the visual inspection system.

[0105] In the embodiment of the present disclosure, after determining the judgment result of the clarity of the initial image, the visual inspection system may send the judgment result to the controller, so that the controller can receive the judgment result of the clarity of the initial image.

[0106] In the disclosed embodiments, a visual inspection system can detect the sharpness of the initial image and use this sharpness as the initial image clarity. This solves the problem in related art where subjective adjustments to the focus are manually made, leading to inconsistent clarity across the same type of devices. Furthermore, separate execution entities control camera movement and determine clarity, improving battery inspection efficiency.

[0107] In some embodiments, as shown in FIG5 , after the current battery completes defect detection, the battery detection method may further include steps S501 and S502:

[0108] In step S501 , the controller sends a capture instruction to a camera at the target location in response to a signal indicating that the next battery to be tested has arrived.

[0109] In an embodiment of the present disclosure, the battery detection system includes a position detection system. When the next battery to be tested is transmitted to the detection position of the battery detection system, the position detection system can send an in-position signal to the controller to indicate that defect detection can be performed. At this time, the camera is at the target point position and can respond to the acquisition instruction to capture the image of the next battery and send the image of the next battery to the visual detection system. The visual detection system can determine the judgment result of the clarity of the image of the next battery.

[0110] In some embodiments, the position detection system may be a photoelectric sensor.

[0111] In step S502 , the controller receives a result of determining the clarity of the third image sent by the visual inspection system.

[0112] Here, the third image is the image of the next battery captured by the camera at the target location. That is, after adjusting the camera's position to the target location, the camera's movement is not controlled. Because the target location is the location where the clarity of the target image of the current battery captured by the camera meets the preset conditions, if the next battery is the same type as the current battery, the clarity of the image of the next battery captured by the camera at the target location will likely also meet the preset conditions. This eliminates the need to adjust the camera's position again, thereby improving the efficiency of defect detection for the next battery.

[0113] In some embodiments, if the clarity determination result of the third image indicates that the clarity of the third image meets a preset condition, the third image is used to perform defect detection on the next battery. In some embodiments, if the clarity determination result of the third image indicates that the clarity of the third image does not meet the preset condition, the controller may control the drive mechanism to move the camera at least once from the target position. The method for controlling the movement of the camera can refer to the above embodiment.

[0114] In an embodiment of the present disclosure, a capture instruction can be sent to a camera at a target location in response to a signal indicating the next battery is in position; and then a judgment result of the clarity of a third image of the next battery captured by the camera at the target location is received from the visual inspection system. When the judgment result of the clarity of the third image indicates that the clarity of the third image meets a preset condition, the third image is used to perform defect detection on the next battery. In this way, because the target location is the location where the clarity of the target image of the current battery captured by the camera meets the preset condition, the clarity of the image of the next battery captured by the camera at the target location is likely to meet the preset condition. This eliminates the need to adjust the camera's position again, thereby improving the efficiency of defect detection on the next battery.

[0115] In some embodiments, the battery detection method may further include at least one of the following steps:

[0116] When the driving mechanism drives the camera to move a number of times greater than or equal to a preset number, the controller sends a focus alarm message to the visual detection system; the visual detection system displays the focus alarm message to prompt the user;

[0117] Detecting the on state of the visual inspection system; and stopping operation when the on state indicates that the visual inspection system is not on.

[0118] Here, the number of movements is used to represent the number of times the controller adjusts the camera's position. For example, when the controller controls the camera to move from the initial position to the first position, the number of movements is 1; further, when the controller controls the camera to move from the first position to the second position, the number of movements is increased by 1 to become 2. It should be noted that the number of movements is for a battery to be tested. When the clarity of the image of a battery to be tested meets the preset conditions, the controller will clear the currently recorded number of movements; or, when the number of movements of a battery to be tested is greater than or equal to the preset number, the controller sends a focus alarm message to the visual inspection system, and the controller will also clear the currently recorded number of movements. After the alarm is lifted, even if the image of the battery to be tested is collected again, the number of movements will start to accumulate from 0.

[0119] In the embodiment of the present disclosure, if the number of times the driving mechanism drives the camera to move is greater than or equal to a preset number, and / or the visual detection system is not turned on, an alarm can be issued to stop the camera. In this way, by setting up multiple foolproof measures, the consistency of the imaging effect can be improved.

[0120] FIG6 is a structural schematic diagram of a battery detection system provided in an embodiment of the present disclosure. As shown in FIG6 , the battery detection system 600 includes a camera 601, a drive mechanism 603, a controller 604, and a visual detection system (not shown), wherein:

[0121] A camera 601 is used to capture an image of the current battery 605 to be tested and send the image to a visual inspection system;

[0122] The driving mechanism 603 includes a driving assembly 631 and a slide assembly 632. The camera 601 is slidably connected to the slide assembly 632. The driving assembly 631 can drive the camera 601 to move along the slide assembly 632. In some embodiments, the slide assembly 632 can be a linear rail, and the driving assembly 631 can be a servo motor.

[0123] A visual inspection system is used to detect the clarity of the image, determine the judgment result of the clarity of the image, and send the judgment result of the clarity of the image to the controller 604;

[0124] The controller 604 is configured to control the driving assembly 631 to move the camera 601 along the slide rail assembly 632 when the image clarity determination result indicates that the image clarity does not meet a preset condition.

[0125] In some embodiments, the camera 601 is equipped with a telecentric lens 602 , and the image of the battery is captured through the telecentric lens 602 .

[0126] As shown in FIG6 , the cell detection system 600 further includes a camera fixing part 606, a work surface 607 and a slider 608, wherein the work surface 607 carries the current battery 605; the telecentric lens 602 and the camera 601 are respectively fixedly connected to the camera fixing part 605, the camera fixing part 606 is fixedly connected to the slider 608, and the slider 608 is slidably connected to the slide rail assembly 632.

[0127] The driving assembly 631 can drive the camera fixing member 606 to move, driving the slider 608 to move along the slide rail assembly 632 , thereby causing the camera 601 and the telecentric lens 602 to move along the slide rail assembly 632 .

[0128] FIG7 is a schematic diagram of an implementation flow of a battery detection method provided by an embodiment of the present disclosure. As shown in FIG7 , the method includes steps S701 to S709, wherein:

[0129] Step S701: The controller controls the camera to reach a preset photographing point and sends a photographing instruction to the camera.

[0130] In step S702 , the camera responds to the photo taking instruction, takes a photo of the current battery, and sends the photo to the visual inspection system.

[0131] Step S703: The visual inspection system determines the clarity of the image.

[0132] In the embodiment of the present disclosure, the visual inspection system locates the inspection area through CogPMAlignTool, creates a new inspection area Rectangle, and assigns the new inspection area Rectangle to the CogImageSharpnessTool tool inspection area. The inspection mode is set to energy gradient detection, and the tool is run to obtain the sharpness of the inspection image to obtain the clarity of the image.

[0133] Step S704: determine whether the clarity of the image meets the set range.

[0134] In the embodiment of the present disclosure, if the clarity of the image meets the set range, step S701 is executed; if the clarity of the image does not meet the set range, step S705 is executed.

[0135] Step S705: The controller controls the camera to adjust downward to a first adjustment distance.

[0136] Step S706 , determining whether the clarity of the image captured by the camera at the adjusted position meets a set range.

[0137] In the embodiment of the present disclosure, when the clarity of the image taken by the camera at the adjusted point meets the set range, step S707 is executed; when the clarity of the image taken by the camera at the adjusted point does not meet the set range, step S708 is executed.

[0138] Step S707: record and save the adjustment points.

[0139] Step S708 , determining whether the clarity of the image captured by the camera at the adjusted position is improved based on the clarity of the image captured last time.

[0140] In the embodiment of the present disclosure, when the clarity of the image taken by the camera at the adjusted point is improved based on the clarity of the image taken last time, step S705 is executed; when the clarity of the image taken by the camera at the adjusted point is reduced based on the clarity of the image taken last time, step S709 is executed.

[0141] Step S709: the controller controls the camera to adjust upwards to a second adjustment distance.

[0142] In the embodiment of the present disclosure, after executing step S709 , the process returns to executing step S706 .

[0143] In the disclosed embodiment, a count is accumulated each time the camera position is adjusted. When the count is greater than the set autofocus times, the visual inspection system will give an NG alarm, the equipment will shut down, and the visual hardware and incoming materials will be checked for abnormalities.

[0144] In the disclosed embodiments, the sharpness of the image in the field of view is detected by the visual inspection system, thereby achieving a closed-loop correction of the lens focus and improving the stability of the visual inspection system; the visual inspection system is used instead of manual focusing to improve stability and reduce labor costs; and poorly focused images are marked and alarmed to prevent the stability of the visual inspection system from decreasing, resulting in overkill of large quantities of products and equipment downtime.

[0145] FIG8 is a second schematic diagram of the structure of a battery detection system provided in an embodiment of the present disclosure. As shown in FIG8 , the battery detection system 800 includes:

[0146] Camera 801 is used to capture an initial image of the current battery to be tested at an initial point;

[0147] A visual inspection system 802 is configured to determine a result of determining the clarity of the initial image;

[0148] Controller 803 is used to obtain a judgment result on the clarity of the initial image; when the judgment result on the clarity of the initial image indicates that the clarity of the initial image does not meet a preset condition, control the driving mechanism to drive the camera to move at least once from the initial point to a target point; wherein the target point is a point at which the clarity of the target image of the current battery captured by the camera meets the preset condition; the target image is used to perform defect detection on the current battery.

[0149] In some embodiments, the controller 803 is also used to control the driving mechanism to drive the camera to move a first adjustment distance from the initial point in a first adjustment direction to reach a first point; obtain a judgment result on the clarity of the first image; the first image is an image of the current battery captured by the camera at the first point; when the judgment result of the clarity of the first image indicates that the clarity of the first image does not meet the preset conditions, based on the clarity of the first image, control the driving mechanism to drive the camera to move from the first point at least once until the clarity of the image of the current battery captured by the camera at the point after movement meets the preset conditions, and the point after movement is used as the target point.

[0150] In some embodiments, the controller 803 is further used to control the driving mechanism to drive the camera to move the first adjustment distance from the first point position to the second point position in the first adjustment direction when it is determined based on the clarity of the first image that the first image is clearer than the initial image; and to control the driving mechanism to drive the camera to move the second adjustment distance from the first point position in the second adjustment direction when it is determined based on the clarity of the first image that the first image is blurrier than the initial image; wherein the second adjustment direction is opposite to the first adjustment direction, and the second adjustment distance is smaller than the first adjustment distance.

[0151] In some embodiments, the controller 803 is further used to determine that the first image is clearer than the initial image when the sharpness error of the first image is smaller than the sharpness error of the initial image; and to determine that the first image is blurrier than the initial image when the sharpness error of the first image is larger than the sharpness error of the initial image; the sharpness error is used to characterize the deviation between the sharpness of the image and the preset sharpness; when the sharpness of the first image is greater than the sharpness of the initial image, determine that the first image is clearer than the initial image; when the sharpness of the first image is less than the sharpness of the initial image, determine that the first image is blurrier than the initial image.

[0152] In some embodiments, the controller 803 is also used to obtain a judgment result of the clarity of a second image; the second image is an image of the current battery captured by the camera at the second point position; the second point position is the point position where the camera is located after moving the first adjustment distance from the first point position; when the judgment result of the clarity of the second image indicates that the clarity of the second image does not meet the preset conditions, and based on the clarity of the second image, it is determined that the second image is blurrier than the first image, the driving mechanism is controlled to drive the camera to move the second adjustment distance from the second point position in the second adjustment direction.

[0153] In some embodiments, the first adjustment distance includes the depth of field range information of the camera lens with a first preset coefficient, and the second adjustment distance includes the depth of field range information of the camera lens with a second preset coefficient; wherein the first preset coefficient and the second preset coefficient are both positive numbers less than 1, and the first preset coefficient is greater than the second preset coefficient.

[0154] In some embodiments, after the current battery completes defect detection, the controller 803 is further used to send an acquisition instruction to the camera at the target point in response to the arrival signal of the next battery to be tested; and receive a clarity judgment result of a third image sent by the visual inspection system; wherein the third image is an image of the next battery acquired by the camera at the target point; when the clarity judgment result of the third image indicates that the clarity of the third image meets a preset condition, the third image is used to perform defect detection on the next battery.

[0155] In some embodiments, the controller 803 is also used to send an acquisition instruction to the camera at the initial point; the camera 801 is also used to acquire the initial image of the current battery in response to the acquisition instruction, and send the initial image to the visual detection system; the visual detection system 802 is also used to detect the gradient energy of the image feature area of ​​the initial image, obtain the sharpness value of the initial image, and determine the judgment result based on the sharpness value of the initial image; the controller 803 is also used to receive the judgment result of the clarity of the initial image sent by the visual detection system.

[0156] In some embodiments, the controller 803 is further used to send a focus alarm message to the visual detection system when the number of times the driving mechanism drives the camera to move is greater than or equal to a preset number; the visual detection system is used to display the focus alarm message to prompt the user.

[0157] It should be understood that “one embodiment” or “an embodiment” mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present disclosure. Therefore, “in one embodiment” or “in an embodiment” appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present disclosure, the size of the serial numbers of the above-mentioned steps / processes does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure. The serial numbers of the embodiments of the present disclosure are for description only and do not represent the advantages and disadvantages of the embodiments.

[0158] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0159] The above is only an embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present disclosure, and they should all be covered by the protection scope of the present disclosure.

Claims

1. A battery detection method, the battery detection method being applied to a controller of a battery detection system, the battery detection system also including a camera and a drive mechanism; The battery detection method comprises: Obtaining a result of determining the clarity of an initial image; the initial image is an image of the current battery to be tested captured by the camera at an initial position; If the result of the determination of the clarity of the initial image indicates that the clarity of the initial image does not meet a preset condition, controlling the driving mechanism to drive the camera to move a first adjustment distance from the initial point in a first adjustment direction to a first point; Obtaining a result of determining the clarity of a first image; the first image is an image of the current battery captured by the camera at the first point; If the result of the judgment of the clarity of the first image indicates that the clarity of the first image does not meet the preset condition, and it is determined based on the clarity of the first image that the first image is blurrier than the initial image, controlling the driving mechanism to drive the camera to move a second adjustment distance from the first point in a second adjustment direction until the clarity of the image of the current battery captured by the camera at the point after the movement meets the preset condition, and setting the point after the movement as the target point; Among them, the second adjustment direction is opposite to the first adjustment direction, and the second adjustment distance is smaller than the first adjustment distance; the target point is the point where the clarity of the target image of the current battery captured by the camera meets the preset conditions; the target image is used to perform defect detection on the current battery.

2. The battery detection method according to claim 1, wherein: The method further comprises: When it is determined based on the clarity of the first image that the first image is clearer than the initial image, the driving mechanism is controlled to drive the camera to move from the first point position to a second point position by the first adjustment distance in the first adjustment direction.

3. The battery detection method according to claim 1 or 2, wherein: The battery detection method further includes: If the sharpness error of the first image is smaller than the sharpness error of the initial image, the first image is determined to be clearer than the initial image; if the sharpness error of the first image is larger than the sharpness error of the initial image, the first image is determined to be blurrier than the initial image; the sharpness error is used to represent the deviation between the sharpness of the image and a preset sharpness; When the sharpness of the first image is greater than that of the initial image, it is determined that the first image is clearer than the initial image; when the sharpness of the first image is less than that of the initial image, it is determined that the first image is blurrier than the initial image.

4. The battery detection method according to claim 2, wherein: The battery detection method further includes: Obtaining a result of determining the clarity of a second image; the second image is an image of the current battery captured by the camera at the second point; When the judgment result of the clarity of the second image indicates that the clarity of the second image does not meet the preset conditions, and it is determined based on the clarity of the second image that the second image is blurrier than the first image, the driving mechanism is controlled to drive the camera in the second adjustment direction and move the second adjustment distance from the second point position.

5. The battery detection method according to claim 4, wherein: The battery detection method further includes: Obtaining a result of determining the clarity of a fourth image; the fourth image being an image of the current battery captured by the camera at a third position; the third position being the position of the camera after moving the second adjustment distance from the first position; When the result of the determination of the clarity of the fourth image indicates that the clarity of the fourth image does not meet the preset condition, and when it is determined based on the clarity of the fourth image that the fourth image is more blurred than the first image, the driving mechanism is controlled to drive the camera to move the first adjustment distance from the second point in the first adjustment direction. Leave; When the judgment result of the clarity of the fourth image indicates that the clarity of the fourth image does not meet the preset conditions, and based on the clarity of the fourth image, it is determined that the fourth image is clearer than the first image, the driving mechanism is controlled to drive the camera in the second adjustment direction and move the second adjustment distance from the second point position.

6. The battery detection method according to any one of claims 1 to 5, wherein: The first adjustment distance includes depth of field range information of the camera lens of a first preset coefficient; The second adjustment distance includes depth of field range information of the camera lens of a second preset coefficient; The first preset coefficient and the second preset coefficient are both positive numbers less than 1, and the first preset coefficient is greater than the second preset coefficient.

7. The battery detection method according to any one of claims 1 to 6, wherein: The battery detection system also includes a visual detection system; After the defect detection of the current battery is completed, the battery detection method further includes: The controller sends a capture instruction to the camera at the target point in response to the arrival signal of the next battery to be tested; The controller receives a determination result of the clarity of the third image sent by the visual inspection system; Among them, the third image is an image of the next battery captured by the camera at the target point; when the judgment result of the clarity of the third image indicates that the clarity of the third image meets the preset conditions, the third image is used to perform defect detection on the next battery.

8. The battery detection method according to claim 7, wherein: The battery detection method further includes: The controller sends an acquisition instruction to the camera at the initial point; The camera captures an initial image of the current battery in response to the capture instruction, and sends the initial image to the visual inspection system; The visual detection system detects the gradient energy of the image feature area of ​​the initial image to obtain a sharpness value of the initial image, and determines a judgment result of the clarity of the initial image based on the sharpness value of the initial image; The obtaining of a determination result of the clarity of the initial image includes: The controller receives a determination result of the clarity of the initial image sent by the visual inspection system.

9. The battery detection method according to claim 7 or 8, wherein: The battery detection method further includes: When the driving mechanism drives the camera to move a number of times greater than or equal to a preset number, the controller sends a focus alarm message to the visual detection system; and the visual detection system displays the focus alarm message to prompt the user.

10. The battery detection method according to claim 9, wherein: The battery detection method further includes at least one of the following: When the number of moves is greater than or equal to a preset number of times, clearing the preset number of times; When the clarity of the image of the current battery collected by the camera at the point after the movement meets the preset condition, the preset number of times is cleared.

11. A battery detection system, comprising a camera, a drive mechanism, a controller, and a visual detection system, wherein: The camera is used to capture an initial image of the current battery to be tested at an initial point; The visual inspection system is used to determine a result of a determination of the clarity of the initial image; The controller is configured to obtain a determination result of the clarity of the initial image; and, if the determination result of the clarity of the initial image indicates that the clarity of the initial image does not meet a preset condition, control the driving mechanism to drive the camera to move a first adjustment distance from the initial point in a first adjustment direction to a first point; Obtain a judgment result on the clarity of the first image; the first image is captured by the camera at the first point An image of the current battery; If the result of the judgment of the clarity of the first image indicates that the clarity of the first image does not meet the preset condition, and it is determined based on the clarity of the first image that the first image is blurrier than the initial image, controlling the driving mechanism to drive the camera to move a second adjustment distance from the first point in a second adjustment direction until the clarity of the image of the current battery captured by the camera at the point after the movement meets the preset condition, and setting the point after the movement as the target point; The second adjustment direction is opposite to the first adjustment direction, and the second adjustment distance is smaller than the first adjustment distance; the target point is a point at which the clarity of the target image of the current battery captured by the camera meets the preset condition; The target image is used to perform defect detection on the current battery.

12. The battery detection system according to claim 11, wherein: The controller is also used for: When it is determined based on the clarity of the first image that the first image is clearer than the initial image, the driving mechanism is controlled to drive the camera to move from the first point position to a second point position by the first adjustment distance in the first adjustment direction.

13. The battery detection system according to claim 11 or 10, wherein: The controller is also used for: If the sharpness error of the first image is smaller than the sharpness error of the initial image, the first image is determined to be clearer than the initial image; if the sharpness error of the first image is larger than the sharpness error of the initial image, the first image is determined to be blurrier than the initial image; the sharpness error is used to represent the deviation between the sharpness of the image and a preset sharpness; When the sharpness of the first image is greater than that of the initial image, it is determined that the first image is clearer than the initial image; when the sharpness of the first image is less than that of the initial image, it is determined that the first image is blurrier than the initial image.

14. The battery detection system according to claim 12, wherein: The controller is also used for: Obtaining a result of determining the clarity of a second image; the second image is an image of the current battery captured by the camera at the second point; When the judgment result of the clarity of the second image indicates that the clarity of the second image does not meet the preset conditions, and it is determined based on the clarity of the second image that the second image is blurrier than the first image, the driving mechanism is controlled to drive the camera in the second adjustment direction and move the second adjustment distance from the second point position.

15. The battery detection system according to claim 14, wherein: The controller is also used for: Obtaining a result of determining the clarity of a fourth image; the fourth image being an image of the current battery captured by the camera at a third position; the third position being the position of the camera after moving the second adjustment distance from the first position; If the clarity determination result of the fourth image indicates that the clarity of the fourth image does not meet a preset condition, and if it is determined based on the clarity of the fourth image that the fourth image is blurrier than the first image, controlling the driving mechanism to drive the camera to move the first adjustment distance from the second point in the first adjustment direction; When the judgment result of the clarity of the fourth image indicates that the clarity of the fourth image does not meet the preset conditions, and based on the clarity of the fourth image, it is determined that the fourth image is clearer than the first image, the driving mechanism is controlled to drive the camera in the second adjustment direction and move the second adjustment distance from the second point position.

16. The battery detection system according to claim 11 or 12, wherein: The first adjustment distance includes depth of field range information of the camera lens of a first preset coefficient; The second adjustment distance includes depth of field range information of the camera lens of a second preset coefficient; The first preset coefficient and the second preset coefficient are both positive numbers less than 1, and the first preset coefficient is greater than the second preset coefficient.

17. The battery detection system according to any one of claims 11 to 15, wherein: After the defect detection of the current battery is completed, the controller is further configured to: In response to a signal indicating that the next battery to be tested is in position, sending a capture instruction to a camera at the target location; receiving a determination result of the clarity of the third image sent by the visual inspection system; Among them, the third image is an image of the next battery captured by the camera at the target point; when the judgment result of the clarity of the third image indicates that the clarity of the third image meets the preset conditions, the third image is used to perform defect detection on the next battery.

18. The battery detection system according to claim 16, wherein: The controller is further configured to send an acquisition instruction to the camera at the initial position; The camera is further configured to capture an initial image of the current battery in response to the capture instruction, and send the initial image to the visual inspection system; The visual detection system is further configured to detect the gradient energy of the image feature region of the initial image to obtain a sharpness value of the initial image, and determine a result of determining the clarity of the initial image based on the sharpness value of the initial image; The controller is further configured to receive a result of determining the clarity of the initial image sent by the visual inspection system.

19. The battery detection system according to claim 16 or 17, wherein: The controller is also used for: When the driving mechanism drives the camera to move a number of times greater than or equal to a preset number, the controller sends a focus alarm message to the visual detection system; and the visual detection system displays the focus alarm message to prompt the user.

20. The battery testing system according to claim 19, wherein: The controller is further configured to: When the number of moves is greater than or equal to a preset number of times, clearing the preset number of times; When the clarity of the image of the current battery collected by the camera at the point after the movement meets the preset condition, the preset number of times is cleared.

Citation Information

Patent Citations

  • Online automatic focusing method and system in flying shooting mode

    CN113923358A

  • Automatic focusing method and device, electronic equipment and storage medium

    CN115567778A

  • Focal length adjusting method and device, storage medium, electronic equipment and processing equipment

    CN115767271A

  • Monocular vision ranging method, camera and medium

    CN116182786A

  • Focusing control method and device for microscopic imaging

    CN117310962A