Battery detection method and system
By using the driving mechanism and visual inspection system in the battery detection system, real-time monitoring and automatic adjustment of the camera point position solve the problem of reduced image clarity caused by shake of the FA lens, and achieve an efficient and automatic battery detection process.
Patent Information
- Application Number
- CN202410211857.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-27
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-02-27
AI Technical Summary
During the battery testing process, the focus ring of the FA lens became loose due to equipment jitter, and the image clarity decreased, requiring manual debugging, resulting in a long debugging cycle and poor clarity consistency.
By introducing a driving mechanism and a visual detection system into the battery detection system, the image clarity captured by the camera can be monitored in real time, and the camera point position can be automatically adjusted to ensure that the image clarity meets the preset conditions and avoid downtime for debugging.
It realizes the automatic adjustment of image clarity without stopping the machine, improves detection efficiency, reduces manual intervention, and ensures the consistency of image clarity.
Smart Images

Figure CN117782998B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of battery detection, and in particular to a battery detection method and system. Background Art
[0002] 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 areas such as energy storage.
[0003] At present, it is necessary to detect battery defects by collecting battery images. In related technologies, factory automation (FA) lenses are used to collect battery images. However, during the production process, equipment jitter and other reasons can cause the focal ring of the FA lens to loosen, making the clarity of the collected battery image worse, and manual intervention and debugging are required. Manual debugging is subjective, and there are differences in the consistency of clarity of the same type of machines, and the FA lens needs to be shut down for debugging, which lengthens the debugging cycle. Summary of the invention
[0004] In view of this, the embodiments of the present application at least provide a battery detection method and system.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] On the one hand, an embodiment of the present application provides a battery detection method, which is applied to a controller of a battery detection system, wherein the battery detection system also includes a camera and a driving mechanism; the battery detection method includes:
[0007] Obtaining a judgment result on 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 point;
[0008] When the result of the judgment 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 at least once from the initial point to a target point;
[0009] The target point is a point where 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.
[0010] In an embodiment of the present application, the controller can obtain in real time the judgment result of the clarity of the image captured by the camera at the initial point, 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.
[0011] In some embodiments, controlling the driving mechanism to drive the camera to move at least once from the initial point to a target point includes: 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 judgment result for the clarity of a 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 condition, based on the clarity of the first image, controlling the driving mechanism to drive 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 the movement meets the preset condition, and taking the point after the movement as the target point.
[0012] In the embodiment of the present application, 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 image clarity, so that 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.
[0013] 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 the first adjustment distance from the first point position to a 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 blurrier than the initial image, the driving mechanism is controlled to drive the camera to move the second adjustment distance from the first point position in the 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.
[0014] In the embodiment of the present application, the clarity comparison result between the first image of the point adjustment and the initial image before the point adjustment can be determined by the clarity of the first image, so as to determine the movement direction of the camera based on the clarity comparison result between the two, and then the clarity of the image corresponding to the point after the movement can be gradually made to meet the preset conditions, so as to improve the efficiency of controlling the camera to reach the target point. And, in the case where the first image is more blurred than the initial image, the distance controlled to move the camera is less than the distance the camera first moved. In this way, by reducing the distance the camera moves, the situation where the camera moves too far away from the preset conditions again can be reduced, thereby improving the efficiency of controlling the camera to reach the target point.
[0015] 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 greater 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 less than the sharpness of the initial image, determining that the first image is blurrier than the initial image.
[0016] In the embodiment of the present application, the sharpness error can be used to determine which image between the first image and the initial image is closer to the preset sharpness, that is, the smaller the sharpness error is, the closer the sharpness of the image is to the preset sharpness, and the image is clearer; the sharpness of the first image and the initial image can also be directly compared, and the greater the sharpness of the image, the clearer the image is. In this way, by comparing the size of the sharpness error and comparing the size of the sharpness, the comparison result of the clarity between the first image and the initial image can be accurately determined.
[0017] 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 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 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 the second adjustment direction and move the second adjustment distance from the second point.
[0018] In the embodiment of the present application, each time the camera position is adjusted and the clarity of the image corresponding to the adjusted position does not meet the preset condition, the adjustment method for adjusting the camera position next time 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. In this way, the accuracy of determining the adjustment method for adjusting the camera position can be improved.
[0019] In some embodiments, the first adjustment distance includes the depth of field range information of the camera lens of a first preset coefficient; the second adjustment distance includes the depth of field range information of the camera lens of 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.
[0020] In the embodiment of the present application, because 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, the first adjustment distance is greater than the second adjustment distance. In this way, when the first image is more blurred than the initial image, the distance of controlling the camera to move is less than the distance the camera initially moves (i.e., the second adjustment distance). In this way, by reducing the distance the camera moves, the situation where the camera moves too far away from the preset condition again can be reduced, thereby improving the efficiency of controlling the camera to reach the target point.
[0021] 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 a 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 a preset condition, the third image is used to perform defect detection on the next battery.
[0022] In an embodiment of the present application, in response to the arrival signal of the next battery, a collection instruction can be sent to the camera at the target point; then, the judgment result of the clarity of the third image of the next battery collected by the camera at the target point sent by the visual inspection system is received. 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. In this way, because the target point is the point where the clarity of the target image of the current battery collected by the camera meets the preset conditions, the clarity of the image of the next battery collected by the camera at the target point is likely to meet the preset conditions, so there is no need to adjust the position of the camera again, thereby improving the efficiency of defect detection on the next battery.
[0023] 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.
[0024] In the embodiment of the present application, the sharpness value of the initial image can be detected by the visual detection system, and the sharpness value is used as the clarity of the initial image, which solves the problem in the related art that the consistency of the clarity of the same type of machine is different due to the self-subjective consciousness when manually adjusting the focal length. In addition, the control of the movement of the camera and the determination of the judgment result of the clarity are realized by different execution entities, which can improve the efficiency of battery detection.
[0025] In some embodiments, the battery detection method also includes: when the driving mechanism drives the camera to move a number of times greater than or equal to a preset number of times, 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.
[0026] In the embodiment of the present application, by setting a preset number of times, it is possible to reduce the situation where the controller enters an infinite loop because the camera cannot be moved to the target point for a long time.
[0027] On the other hand, an embodiment of the present application provides a battery detection system, the battery detection system comprising a camera, a drive mechanism, a controller and a visual detection system, wherein:
[0028] The camera is used to collect an initial image of the current battery to be tested at an initial point;
[0029] The visual inspection system is used to determine a result of determining the clarity of the initial image;
[0030] 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 a preset condition, the driving mechanism is controlled 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.
[0031] 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 application. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0033] Figure 1 It is a schematic diagram of a welding defect detection system in the related art;
[0034] Figure 2 A schematic diagram of the implementation process of a battery detection method provided in an embodiment of the present application Figure 1 ;
[0035] Figure 3 A schematic diagram of the implementation process of a battery detection method provided in an embodiment of the present application Figure 2 ;
[0036] Figure 4 A schematic diagram of the implementation process of a battery detection method provided in an embodiment of the present application Figure 3 ;
[0037] Figure 5 A schematic diagram of the implementation process of a battery detection method provided in an embodiment of the present application Figure 4 ;
[0038] Figure 6 A schematic diagram of the structure of a battery detection system provided in an embodiment of the present application Figure 1 ;
[0039] Figure 7 A schematic diagram of the implementation process of a battery detection method provided in an embodiment of the present application Figure 5 ;
[0040] Figure 8 A schematic diagram of the structure of a battery detection system provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0042] In the following description, reference is made to “some embodiments”, which describe 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.
[0043] 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.
[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing this application and are not intended to limit this application.
[0045] At present, new energy batteries are increasingly used in life and industry. New energy batteries are not only used in energy storage power systems such as hydropower, thermal power, wind power and solar power stations, but are also widely used in electric vehicles such as electric bicycles, electric motorcycles, electric cars, as well as aerospace and other fields. With the continuous expansion of the application field of power batteries, the market demand is also constantly expanding.
[0046] 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 between chemical energy and electrical energy, and can be used to make a battery module or a battery pack, so as to supply power to an electrical device. A battery cell may be a secondary battery, which refers to a battery cell that can be continuously used by activating the active material by charging after the battery cell is discharged. 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-hydrogen battery, a nickel-cadmium battery, a lead-acid battery, etc., and the embodiments of the present disclosure are not limited to this.
[0047] 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 connection through a busbar component.
[0048] In the adapter welding inspection process during the battery production process, a charge coupled device (CCD) visual inspection system is used to perform defect detection on the battery after the adapter is welded. Among them, defect detection can include: adapter offset detection and welding defect detection. The FA lens used in the adapter welding station in the related technology captures the image of the adapter after welding. However, during the production process, equipment jitter will cause the focal ring of the FA lens to loosen, requiring manual focus adjustment.
[0049] Figure 1 Schematic diagram of a welding defect detection system in the related art. Figure 1 As shown, the welding defect detection system includes a CCD camera 101, a FA lens 102 and a fixing frame 103, wherein the CCD camera 101 is arranged on the fixing frame 103, and the FA lens 102 is mounted on the CCD camera 101; a focal ring is arranged on the FA lens 102, and the focal length of the FA lens 102 can be adjusted by selecting the focal ring. In the actual production process, due to various reasons, the CCD camera 101 may shake, so that the focal ring is loose, and then the focal length of the FA lens 102 changes, and manual intervention and debugging are required at this time. Therefore, the related technology has the following problems: 1. Manual debugging is subjective, and there are differences in the clarity consistency of the same type of machines; 2. The 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 is different from that before adjustment, and recalibration and verification are required, and the debugging cycle is long.
[0050] In order to solve the above technical problems, the present application provides 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 detection of bare cells and the detection 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, such as Figure 2 As shown, the method includes step S201 and step S202, wherein:
[0051] Step S201, obtaining a judgment result on 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 point.
[0052] 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 to say, 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 point where the camera is located will not change, and the image (i.e., the initial image) of the next battery (i.e., the current battery) can continue to be captured. 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, and the preset conditions may be a preset clarity range. When the clarity of the initial image is within the preset clarity range, it means 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 means that the clarity of the initial image does not meet the preset conditions.
[0053] In the embodiment of the present application, the camera is equipped with a telecentric lens, through which the image of the current battery is collected. Wherein, 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 reasons (such as device shaking). Therefore, compared with the FA lens in the related art, collecting images through a telecentric lens can improve the consistency of the field of view, and there is no need for manual intervention in the process of adjusting the focal length of the lens. By adjusting the distance between the telecentric lens and the battery, the focal length can be automatically adjusted.
[0054] In the embodiment of the present application, the camera may be a CCD camera.
[0055] In an embodiment of the present application, 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.
[0056] 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 an embodiment of the present application, 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. Among them, 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, a Sobel operator or a 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. Among them, the subject that determines the clarity of the initial image and the judgment result can be a visual detection system, a controller, or other devices in the visual detection system.
[0057] Step S202, when the judgment 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 at least once from the initial point to a target point.
[0058] 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.
[0059] In the embodiment of the present application, when the clarity of the initial image does not meet the preset conditions, it means 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, so the position of the camera needs to be adjusted. The battery detection system in the embodiment of the present application is provided with a driving mechanism, which is connected to the camera, so the controller can control the driving mechanism to drive the camera to move at least once from the initial point position, so that the camera reaches the point position (i.e., the target point position) where the clarity of the image captured by the camera meets the preset conditions.
[0060] In an embodiment of the present application, the visual inspection system in the battery inspection system can perform defect inspection on the current battery based on the target image. In some embodiments, defect inspection on the current battery can also be performed based on the target image by other devices other than the battery inspection system. Among them, defect inspection can be to inspect the adapter welded on the battery to determine whether the welding position of the adapter is normal; defect inspection can also be an appearance inspection of the battery; defect inspection can also be an inspection of the battery after ultrasonic welding.
[0061] In the embodiment of the present application, 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.
[0062] In some embodiments, Figure 3 As shown, the "controlling the driving mechanism to drive the camera to move at least once from the initial point to the target point" in the above step S202 can be implemented through steps S301 to S303:
[0063] Step S301, 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 a first point.
[0064] 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 horizontal to the left or horizontal 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.
[0065] Step S302, obtaining a judgment result on the clarity of a first image; the first image is an image of the current battery captured by the camera at the first point.
[0066] In an embodiment of the present application, 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, which can detect the clarity of the first image and determine a judgment result of the clarity of the first image, and send the judgment result to the controller.
[0067] Step S303, when the judgment result of 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 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 the movement meets the preset condition, and use the point after the movement as the target point.
[0068] In an embodiment of the present application, 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.
[0069] In some embodiments, the camera position is adjusted continuously according to the clarity of the first image, and the camera position can be adjusted based on the clarity comparison result between the first image and the initial image. The comparison result can indicate whether the first image is clearer than the initial image. That is, when it is determined that the clarity of the first image does not meet the preset condition, it is necessary to determine the change relationship between the clarity of the image corresponding to the adjusted point and the clarity of the image corresponding to the point before the adjustment. If the image corresponding to the adjusted point becomes clearer than the image corresponding to the point before the adjustment, it means that the initial adjustment of the controller is effective, even if the clarity of the image corresponding to the adjusted point still does not meet the preset condition, the camera position can be adjusted in the same way as the initial adjustment of the camera position; if the image corresponding to the adjusted point becomes more blurred than the image corresponding to the point before the adjustment, it means that the initial adjustment of the controller is wrong, and the camera position needs to be readjusted in the opposite way to the initial adjustment of the camera position.
[0070] In the embodiment of the present application, when the clarity of the initial image does not meet the preset conditions, the camera position can be initially adjusted, that is, the control driving mechanism drives the camera to move the first adjustment distance from the initial position in the first adjustment direction to the first position. When the clarity of the image corresponding to the first position does not meet the preset conditions, it can be adjusted again, that is, based on the clarity of the first image, the control driving mechanism drives the camera to move at least once from the first position until the clarity of the image of the current battery collected by the camera at the point after the movement meets the preset conditions, and the point after the movement is used as the target point. 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 that meets the preset conditions, and the subsequent adjustment method is determined by controlling the camera based on the clarity of the image, so that 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.
[0071] In some embodiments, "based on the clarity of the first image, controlling the driving mechanism to drive the camera to move at least once from the first point position" in step S303 can be implemented by steps 1 and 2:
[0072] 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 from the first point position to the second point position by the first adjustment distance in the first adjustment direction.
[0073] 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.
[0074] In the embodiment of the present application, when the first image is clearer than the initial image, it means 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, so the camera movement can continue to be controlled in the manner of the camera moving from the initial position to the first position, that is, the control driving mechanism drives the camera to move the first adjustment distance from the first position in the first adjustment direction. When the first image is more blurred than the initial image, it means 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, so the camera position needs to be readjusted in a second adjustment direction opposite to the first adjustment direction, that is, the control driving mechanism drives the camera to move the second adjustment distance from the first position in the second adjustment direction.
[0075] 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.
[0076] In some embodiments, the first adjustment distance includes the depth of field range information of the camera lens of the first preset coefficient, and the second adjustment distance includes the depth of field range information of the 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. Exemplarily, the first preset coefficient may be 1 / 5, and the second preset coefficient may be 1 / 10.
[0077] In the embodiment of the present application, the clarity comparison result between the first image of the point adjustment and the initial image before the point adjustment can be determined by the clarity of the first image, so as to determine the movement direction of the camera based on the clarity comparison result between the two, and then the clarity of the image corresponding to the point after the movement can be gradually made to meet the preset conditions, so as to improve the efficiency of controlling the camera to reach the target point. And, in the case where the first image is more blurred than the initial image, the distance controlled to move the camera is less than the distance the camera first moved. In this way, by reducing the distance the camera moves, the situation where the camera moves too far away from the preset conditions again can be reduced, thereby improving the efficiency of controlling the camera to reach the target point.
[0078] 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.
[0079] Here, the sharpness can represent the clarity of the image. The greater the sharpness of the image, the clearer the image. The sharpness error is used to characterize the deviation between the sharpness of the image and the 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.
[0080] In an embodiment of the present application, the controller may send a request to the visual detection unit to obtain the sharpness error of the first image and the sharpness error of the initial image. The visual detection unit may determine the sharpness error of the first image by comparing the clarity of the first image with a preset sharpness, and determine the sharpness error of the initial image by comparing the clarity of the initial image with 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 the clarity comparison result between the first image and the initial image by comparing the sharpness error of the first image with the sharpness error of the initial image.
[0081] 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.
[0082] In the embodiment of the present application, the comparison result of the clarity between the first image and the initial image can be determined by directly comparing the sharpness corresponding to the first image and the initial image respectively.
[0083] In some embodiments, after step 1, the battery detection method may further include steps 3 and 4:
[0084] Step 3, 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; the second point is the point at which the camera is located after moving the first adjustment distance from the first point.
[0085] 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 more blurred 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.
[0086] In the embodiment of the present application, after the camera is controlled to continue to move the first adjustment distance from the first point position to the second point position in the first adjustment direction, the judgment result of the clarity of the second image of the current battery captured by the camera at the second point position can be obtained. If the judgment result of the clarity of the second image indicates that the clarity of the second image does not meet the preset condition, it is necessary to continue to judge the clarity comparison result between the second image and the first image. That is to say, in the embodiment of the present application, 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 of the next adjustment of the camera position will be 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, when the clarity error of the second image is greater than the clarity error of the first image, the control driving mechanism drives the camera to move the second adjustment distance from the second point position in the second adjustment direction.
[0087] In some embodiments, when the judgment result of the clarity of the second image indicates that the clarity of the second image does not satisfy a preset condition, and it is determined based on the clarity of the second image 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.
[0088] In some embodiments, after step 2, the battery detection method may further include steps 5 to 7:
[0089] 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 point; the third point is the point at which the camera is located after moving the second adjustment distance from the first point;
[0090] 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 it is determined based on the clarity of the fourth image 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.
[0091] 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.
[0092] In the embodiment of the present application, after the driving mechanism is controlled to drive the camera to move the second adjustment distance from the first point in the second adjustment direction to the third point, the clarity judgment result of the fourth image can be obtained. If the clarity of the fourth image does not meet the preset condition, the direction and distance of moving the camera again can be determined based on the clarity of the fourth image.
[0093] In some embodiments, the battery detection system further comprises a visual detection system; Figure 4 As shown, the battery detection method may further include steps S401 to S403, and step S201 may be implemented by step S404:
[0094] Step S401, the controller sends a collection instruction to the camera at the initial point;
[0095] Step S402, the camera acquires an initial image of the current battery in response to the acquisition instruction, and sends the initial image to the visual inspection system;
[0096] Step S403: 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 the judgment result based on the sharpness value of the initial image.
[0097] In an embodiment of the present application, after the current battery is in place, an acquisition instruction can be sent to the camera at the initial point position. In response to the acquisition instruction, the camera acquires the initial image of the current battery and sends the initial image to the visual inspection system. After the visual inspection system receives the initial image, it 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; the visual inspection system determines the judgment result of the clarity of the initial image based on the sharpness value of the initial image and the preset sharpness range. Among them, the above-mentioned image feature area is the position area of the current battery in the initial image.
[0098] In some embodiments, the visual detection system may detect the initial image through 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.
[0099] In some embodiments, the visual inspection system can achieve the determination of the image feature area and the detection of the gradient energy through the processing software pre-installed in the visual inspection system. Exemplarily, the processing software can be VisionPro; wherein the image feature area in the initial image can be determined through the template positioning function (CogPMAlignTool) in VisionPro, and the gradient energy of the image feature area can be determined through the CogImageSharpnessTool tool in VisionPro.
[0100] Step S404: the controller receives a result of determining the clarity of the initial image sent by the visual inspection system.
[0101] In an embodiment of the present application, after determining the judgment result of the clarity of the initial image, the visual inspection system can send the judgment result to the controller, so that the controller can receive the judgment result of the clarity of the initial image.
[0102] In the embodiment of the present application, the sharpness value of the initial image can be detected by the visual detection system, and the sharpness value is used as the clarity of the initial image, which solves the problem in the related art that the consistency of the clarity of the same type of machine is different due to the self-subjective consciousness when manually adjusting the focal length. In addition, the control of the movement of the camera and the determination of the judgment result of the clarity are realized by different execution entities, which can improve the efficiency of battery detection.
[0103] In some embodiments, Figure 5 As shown, after the defect detection of the current battery is completed, the above battery detection method may further include step S501 and step S502:
[0104] Step S501: the controller sends a collection instruction to the camera at the target point in response to the arrival signal of the next battery to be tested.
[0105] In an embodiment of the present application, 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.
[0106] In some embodiments, the position detection system may be a photoelectric sensor.
[0107] Step S502: the controller receives a result of determining the clarity of the third image sent by the visual inspection system.
[0108] Here, the third image is the image of the next battery captured by the camera at the target point. That is to say, after the camera position is adjusted to the target point, the camera movement will not be controlled. 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, if the next battery is the same type of battery as the current battery, the clarity of the image of the next battery captured by the camera at the target point is likely to meet the preset conditions, so there is no need to adjust the camera position again, thereby improving the efficiency of defect detection for the next battery.
[0109] In some embodiments, when the result of the judgment 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. In some embodiments, when the result of the judgment of the clarity of the third image indicates that the clarity of the third image does not meet the preset conditions, the controller can control the driving mechanism to drive the camera to move at least once from the target point. The method of controlling the movement of the camera can refer to the above embodiment.
[0110] In an embodiment of the present application, in response to the arrival signal of the next battery, a collection instruction can be sent to the camera at the target point; then the judgment result of the clarity of the third image of the next battery collected by the camera at the target point sent by the visual inspection system is received. 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. In this way, because the target point is the point where the clarity of the target image of the current battery collected by the camera meets the preset conditions, the clarity of the image of the next battery collected by the camera at the target point is likely to meet the preset conditions, so there is no need to adjust the position of the camera again, thereby improving the efficiency of defect detection on the next battery.
[0111] In some embodiments, the battery detection method may further include at least one of the steps:
[0112] When the number of times the driving mechanism drives the camera to move is greater than or equal to a preset number of times, 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;
[0113] Detecting the on state of the visual inspection system; and stopping the operation when the on state indicates that the visual inspection system is not on.
[0114] Here, the number of movements is used to characterize the number of times the controller adjusts the camera's position. Exemplarily, 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 and becomes 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.
[0115] In the embodiment of the present application, when the number of times the driving mechanism drives the camera to move is greater than or equal to the preset number of times, and / or the visual detection system is not turned on, an alarm can be issued to stop the camera. In this way, the consistency of the imaging effect can be improved by setting a variety of foolproof measures.
[0116] Figure 6 A schematic diagram of a battery detection system provided in an embodiment of the present application Figure 1 ,like Figure 6 As shown, the battery detection system 600 includes a camera 601, a driving mechanism 603, a controller 604 and a visual detection system (not shown), wherein:
[0117] A camera 601 is used to collect an image of the current battery 605 to be tested and send the image to a visual inspection system;
[0118] The driving mechanism 603 includes a driving assembly 631 and a slide rail assembly 632. The camera 601 is slidably connected to the slide rail assembly 632. The driving assembly 631 can drive the camera 601 to move along the slide rail assembly 632. In some embodiments, the slide rail assembly 632 can be a linear rail, and the driving assembly 631 can be a servo motor.
[0119] A visual inspection system, 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;
[0120] The controller 604 is used to control the driving component 631 to drive the camera 601 to move along the slide rail component 632 when the judgment result of the image clarity indicates that the image clarity does not meet the preset condition.
[0121] 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 .
[0122] Figure 7A schematic diagram of the implementation flow of a battery detection method provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the method includes steps S701 to S709, wherein:
[0123] Step S701: The controller controls the camera to reach a preset photographing point and sends a photographing instruction to the camera.
[0124] Step S702: The camera takes an image of the current battery in response to a photo taking instruction, and sends the image to a visual inspection system.
[0125] Step S703: the visual inspection system determines the clarity of the image.
[0126] In an embodiment of the present application, 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.
[0127] Step S704, determining whether the clarity of the image meets a set range.
[0128] In the embodiment of the present application, when the clarity of the image meets the set range, step S701 is executed; when the clarity of the image does not meet the set range, step S705 is executed.
[0129] Step S705: the controller controls the camera to adjust downward a first adjustment distance.
[0130] Step S706, determining whether the clarity of the image captured by the camera at the adjusted point meets the set range.
[0131] In the embodiment of the present application, 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.
[0132] Step S707, record and save the adjustment points.
[0133] 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.
[0134] In an embodiment of the present application, 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.
[0135] Step S709: the controller controls the camera to adjust upwards to a second adjustment distance.
[0136] In the embodiment of the present application, after executing step S709, the process returns to executing step S706.
[0137] In the embodiment of the present application, 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 returns an NG alarm, the equipment shuts down, and checks the visual hardware and incoming materials to see if they are abnormal.
[0138] In the embodiments of the present application, the sharpness of the image in the field of view is detected by a visual inspection system, so as to achieve a closed-loop focus correction for the lens and improve the stability of the visual inspection system. The visual inspection system is used instead of manual focusing to improve stability and reduce labor costs. Poor image focus is marked and an alarm is issued to prevent the stability of the visual inspection system from decreasing, resulting in over-killing of large quantities of products and equipment downtime.
[0139] Figure 8 A schematic diagram of the structure of a battery detection system provided in an embodiment of the present application Figure 2 ,like Figure 8 As shown, the battery detection system 800 includes:
[0140] Camera 801, used to collect an initial image of the current battery to be tested at an initial point;
[0141] A visual inspection system 802, used to determine a result of determining the clarity of the initial image;
[0142] The 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, the driving mechanism is controlled 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.
[0143] 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 condition, 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 the movement meets the preset condition, and the point after the movement is used as the target point.
[0144] 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.
[0145] 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, the first image is determined to be clearer than the initial image; and when the sharpness of the first image is less than the sharpness of the initial image, the first image is determined to be blurrier than the initial image.
[0146] 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; the second point is the point where the camera is located after moving the first adjustment distance from the first 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, the driving mechanism is controlled to drive the camera to move the second adjustment distance from the second point in the second adjustment direction.
[0147] In some embodiments, the first adjustment distance includes the depth of field range information of the camera lens of a first preset coefficient, and the second adjustment distance includes the depth of field range information of the camera lens of 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.
[0148] In some embodiments, after the defect detection of the current battery is completed, the controller 803 is also 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; receive the judgment result of the clarity of the third image sent by the visual inspection system; wherein the third image is the image of the next battery collected 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.
[0149] 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 inspection system; the visual inspection 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 inspection system.
[0150] 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 of times; the visual detection system is used to display the focus alarm message to prompt the user.
[0151] 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 application. 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 various embodiments of the present application, the size of the serial number of each step / process mentioned above 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 embodiment of the present application. The serial numbers of the embodiments of the present application mentioned above are for description only and do not represent the advantages and disadvantages of the embodiments.
[0152] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0153] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A battery detection method, characterized in that: The battery detection method is applied to a controller of a battery detection system, and the battery detection system also includes a camera, a driving mechanism, and a visual detection system; the battery detection method includes: The point corresponding to the image of the previous battery of the current battery to be tested performed by the camera for defect detection is used as the initial point; the camera is used to collect the initial image of the current battery at the initial point and send the initial image to the visual inspection system; Receiving a result of determining the clarity of the initial image sent by the visual inspection system; When the result of the judgment 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 position in a first adjustment direction to a first point position; Obtaining a judgment result on the clarity of a 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 condition, and it is determined based on the clarity of the first image that the first image is more blurred than the initial image, the driving mechanism is controlled 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 the point after the movement is used as the target point; Wherein, the second adjustment direction is opposite to the first adjustment direction; the first adjustment distance includes the depth of field range information of the lens of the camera of the first preset coefficient; the second adjustment distance includes the depth of field range information of the lens of the camera of the 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; the target point is the point where 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; After the defect detection of the current battery is completed, in response to the arrival signal of the next battery to be tested, a collection instruction is sent to the camera at the target point; the camera is used to collect a third image of the next battery at the target point, and send the third image to the visual inspection system; receiving a determination result of the clarity of the third image sent by the visual inspection system; Wherein, 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.
2. The battery detection method according to claim 1, characterized in that: 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 2, characterized in that: The battery detection method further includes: When the sharpness error of the first image is smaller than the sharpness error of the initial image, it is determined 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, it is determined 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 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, characterized in that: 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 to move the second adjustment distance from the second point position in the second adjustment direction.
5. The battery detection method according to claim 1, characterized in that: The battery detection method further includes: The controller sends a collection instruction to the camera at the initial point; The camera acquires an initial image of the current battery in response to the acquisition 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 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.
6. The battery detection method according to claim 1, characterized in that: 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 of times, the controller sends a focus alarm message to the visual detection system; and the visual detection system displays the focus alarm message to prompt a user.
7. A battery detection system, characterized in that: The battery detection system includes a camera, a driving mechanism, a controller and a visual detection system, wherein: The controller is used to use the point corresponding to the image of the previous battery of the current battery to be tested, which is detected by the camera, as the initial point; The camera is used to collect an initial image of the current battery to be tested at the initial point and send the initial image to the visual inspection system; The visual inspection system is used to determine a result of determining the clarity of the initial image; The controller is used to receive a judgment result of the clarity of an initial image sent by the visual inspection system; when the judgment 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 of 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 condition, and 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 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 the point after the movement is used as the target point; Wherein, the second adjustment direction is opposite to the first adjustment direction; the first adjustment distance includes the depth of field range information of the lens of the camera of the first preset coefficient; the second adjustment distance includes the depth of field range information of the lens of the camera of the 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; the target point is the point where 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; After the defect detection of the current battery is completed, the controller is further used to: in response to the arrival signal of the next battery to be tested, send a collection instruction to the camera at the target point; The camera is used to collect a third image of the next battery at the target point and send the third image to the visual inspection system; The controller is used to receive the judgment result of the clarity of the third image sent by the visual detection system; Wherein, 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.
8. The battery detection system according to claim 7, characterized in that: 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.
9. The battery detection system according to claim 7 or 8, characterized in that: The controller is further used to send a collection instruction to the camera at the initial point; The camera is further used 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 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 of the clarity of the initial image based on the sharpness value of the initial image; The controller is also used to receive a judgment result of the clarity of the initial image sent by the visual detection system.
10. The battery detection system according to claim 7 or 8, characterized in that: 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 of times, the controller sends a focus alarm message to the visual detection system; and the visual detection system displays the focus alarm message to prompt a user.
