Image processing method, device, equipment and storage medium

By analyzing the image difference information of solar cells and using artificial intelligence technology to accurately identify virtual soldering faults, it solves the problems of high detection cost and low accuracy in the existing technology, and improves the efficiency and accuracy of fault detection. sex.

CN113837991BActive Publication Date: 2024-09-24TENCENT CLOUD COMPUTING (BEIJING) CO LTD
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202110682879.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-18
Publication Date
2024-09-24
Estimated Expiration
2041-06-18

AI Technical Summary

Technical Problem

The existing technology has the problems of high detection cost, high turnover rate of quality inspection personnel, inconsistent evaluation standards and high misjudgment rate in solar cell fault detection. In particular, it is difficult to accurately identify virtual soldering faults.

Method used

By obtaining the image to be processed of the solar cell, it is divided into image areas containing welding points, and the image difference information between adjacent areas is calculated. Fault identification is performed based on this information, and artificial intelligence technology is used to achieve accurate identification of virtual soldering faults. .

Benefits of technology

It improves the accuracy and efficiency of solar cell fault detection, reduces detection costs, reduces the turnover rate and misjudgment rate of quality inspection personnel, and achieves accurate identification of virtual soldering faults.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113837991B
    Figure CN113837991B
Patent Text Reader

Abstract

The embodiment of the present invention discloses an image processing method, device, equipment and storage medium, which relates to computer vision technology in artificial intelligence, wherein the method may include: obtaining an image to be processed corresponding to a target battery assembly, the target battery assembly includes N welding points, each welding point is mapped to a welding point domain in the image to be processed; dividing the image to be processed according to the N welding point domains to obtain N image regions, one image region includes a welding point domain, and any image region and the welding point domain included in any image region have the same center; determining an image difference information set according to the N image regions, the image difference information set includes image difference information between every two adjacent image regions in the N image regions; and performing fault identification on the target battery assembly based on the image difference information set. By adopting the embodiment of the present invention, the accuracy of preset fault identification in the battery assembly can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to an image processing method, apparatus, device and storage medium. Background Art

[0002] Solar cells are a type of photoelectric semiconductor wafer that uses sunlight to generate electricity directly. Solar cells are widely used in many fields. For example, in the field of transportation, they are used in traffic / railway signal lights, traffic warning / sign lights, wireless telephone booths, etc. In the field of communications, they are used in solar unmanned microwave relay stations, optical cable maintenance stations, and small communication machines. Due to the important applications of solar cells, once a solar cell fails, it will have a great impact on the production and life of users. Therefore, in the production process of solar cells, timely detection of solar cell failures is one of the important issues in the current field of solar energy research. The important battery components that make up solar cells include solar cells. In many cases, a solar cell failure refers to a solar cell failure. Therefore, in the process of generating and testing solar cells, how to identify solar cell failures has become one of the key issues in current research. Summary of the invention

[0003] The embodiments of the present invention provide an image processing method, apparatus, device and storage medium, which can more accurately identify faults of a target battery assembly.

[0004] In one aspect, an embodiment of the present invention provides an image processing method, comprising:

[0005] Acquire an image to be processed corresponding to a target battery assembly, wherein the target battery assembly includes N welding points, each welding point is mapped to a welding point domain in the image to be processed, and N is an integer greater than or equal to 1;

[0006] The image to be processed is divided according to N solder joint domains to obtain N image regions; each image region includes a solder joint domain, and any image region and a solder joint domain included in any image have the same center;

[0007] Determine an image difference information set according to the N image regions, wherein the image difference information set includes image difference information between every two adjacent image regions among the N image regions;

[0008] Fault identification is performed on the target battery assembly based on the image difference information set.

[0009] In one aspect, an embodiment of the present invention provides an image processing device, comprising:

[0010] An acquisition unit, used for acquiring an image to be processed corresponding to a target battery assembly, the target battery assembly comprising N welding points, each welding point being mapped to a welding point domain in the image to be processed, where N is an integer greater than or equal to 1;

[0011] A determination unit, configured to divide the image to be processed according to N solder joint domains to obtain N image regions, each image region including a solder joint domain, and any image region and a solder joint domain included in any image have the same center;

[0012] The determining unit is further used to determine an image difference information set according to the N image regions, where the image difference information set includes image difference information between every two adjacent image regions in the N image regions;

[0013] The identification unit is used to identify the fault of the target battery component based on the image difference information set.

[0014] In one aspect, an embodiment of the present invention provides an image processing device, characterized in that it includes:

[0015] a processor adapted to implement one or more computer programs; and

[0016] A computer storage medium storing one or more computer programs, wherein the one or more computer program instructions are suitable for being loaded and executed by a processor:

[0017] An image to be processed corresponding to a target battery assembly is obtained, wherein the target battery assembly includes N welding points, each welding point is mapped to a welding point domain in the image to be processed, and N is an integer greater than or equal to 1; the image to be processed is divided according to the N welding point domains to obtain N image areas, each image area includes a welding point domain, and any image area and the welding point domain included in any image have the same center; an image difference information set is determined according to the N image areas, and the image difference information set includes image difference information between every two adjacent image areas in the N image areas; and fault identification is performed on the target battery assembly based on the image difference information set.

[0018] In one aspect, an embodiment of the present invention provides a computer storage medium, characterized in that a computer program is stored in the computer storage medium, and when the computer program instructions are executed by a processor, they are used to execute:

[0019] An image to be processed corresponding to a target battery assembly is obtained, wherein the target battery assembly includes N welding points, each welding point is mapped to a welding point domain in the image to be processed, and N is an integer greater than or equal to 1; the image to be processed is divided according to the N welding point domains to obtain N image areas, each image area includes a welding point domain, and any image area and the welding point domain included in any image have the same center; an image difference information set is determined according to the N image areas, and the image difference information set includes image difference information between every two adjacent image areas in the N image areas; and fault identification is performed on the target battery assembly based on the image difference information set.

[0020] In one aspect, an embodiment of the present invention provides a computer program product or a computer program, wherein the computer program product or the computer program includes a computer program, and the computer program is stored in a computer-readable storage medium; a processor of an image processing device reads the computer program from the computer storage medium and executes:

[0021] An image to be processed corresponding to a target battery assembly is obtained, wherein the target battery assembly includes N welding points, each welding point is mapped to a welding point domain in the image to be processed, and N is an integer greater than or equal to 1; the image to be processed is divided according to the N welding point domains to obtain N image areas, each image area includes a welding point domain, and any image area and the welding point domain included in any image have the same center; an image difference information set is determined according to the N image areas, and the image difference information set includes image difference information between every two adjacent image areas in the N image areas; and fault identification is performed on the target battery assembly based on the image difference information set.

[0022] In an embodiment of the present invention, when it is necessary to identify the fault of a target battery assembly, an image to be processed corresponding to the target battery assembly is obtained, the target battery includes N welding points, and each welding point is mapped to a welding point domain in the image to be processed; further, the image to be processed is divided according to the N welding point domains to obtain N image areas, one image area includes a welding point domain, and any image area and the welding point domain included in any image area have the same center; then the image difference information between every two adjacent image areas in the N image areas is determined and stored in the image difference information set. Then, the target battery assembly is identified for fault based on the image difference information set. Since there may be abnormal image difference information between the image areas where two or more welding point domains are located in the image corresponding to the faulty battery assembly, on the contrary, the image difference information set can be used to more accurately identify whether the target battery assembly has a fault. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0024] Figure 1a It is a schematic diagram of fault identification using a grayscale threshold segmentation method provided by an embodiment of the present invention;

[0025] Figure 1b is a schematic diagram of EL images corresponding to different solar cells provided by an embodiment of the present invention;

[0026] Figure 2 It is a schematic diagram of the structure of a battery assembly fault detection system provided by an embodiment of the present invention;

[0027] Figure 3 is a flowchart of an image processing method provided by an embodiment of the present invention;

[0028] Figure 4a is a schematic diagram of an image to be detected provided by an embodiment of the present invention;

[0029] Figure 4b is a schematic diagram of a horizontal integral projection diagram provided by an embodiment of the present invention;

[0030] Figure 4c is a schematic diagram of a vertical integral projection diagram provided by an embodiment of the present invention;

[0031] Figure 4d It is a schematic diagram of the relationship between an image to be processed, a horizontal integral projection image, and a vertical integral projection image provided by an embodiment of the present invention;

[0032] Figure 5 is a schematic diagram of dividing an image to be processed into regions provided by an embodiment of the present invention;

[0033] Figure 6 is a flowchart of another image processing method provided by an embodiment of the present invention;

[0034] Figure 7a is a schematic diagram of an enhanced image provided by an embodiment of the present invention;

[0035] Figure 7b is a schematic diagram of a grayscale histogram of an image region provided by an embodiment of the present invention;

[0036] Figure 7c is a schematic diagram of image difference information provided by an embodiment of the present invention;

[0037] Figure 7d is a flowchart of another image processing method provided by an embodiment of the present invention;

[0038] Figure 8 is a structural schematic diagram of an image processing device provided by an embodiment of the present invention;

[0039] Fig. 9 It is a structural schematic diagram of an image processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0041] In the current development of the new energy photovoltaic industry, it is necessary to perform fault detection on solar cells. In general, potential faults in photovoltaic solar cell products are usually detected by photoluminescence (EL), also known as field luminescence, to control the quality of the product. The essence of fault detection by photoluminescence is to obtain an EL image reflecting the internal information of the solar cell by photoluminescence technology, and then identify possible faults of the solar cell by analyzing and processing the EL image. Generally speaking, the most common fault in solar cells is the presence of a cold solder joint in multiple solder joints of a battery component (such as a solar cell) in a solar cell. Therefore, the embodiment of the present invention mainly studies whether there is a cold solder joint fault in a battery component in a solar cell. It should be understood that when performing cold solder joint fault detection on a battery component, the EL image includes N solder joint domains, which correspond one-to-one to the N solder joints on the battery component. In other words, the one-to-one correspondence between the N solder joint domains and the N solder joints can be understood as each solder joint being mapped to a solder joint domain in the EL image, and the solder joint domain can be a pixel point or a small area composed of several pixels. In fault detection, it is usually necessary to identify N image regions in the image. One image region is centered on a welding point domain. It can be understood that one image region corresponds to one welding point.

[0042] In the research on the detection of cold solder joint faults in battery components, the following identification methods of cold solder joint faults are proposed:

[0043] The first is the manual detection method. In the EL image, the grayscale of the image area corresponding to the solder joint with a cold solder joint failure (the image area corresponding to each solder joint refers to the image area in the EL image that includes the solder joint domain corresponding to the solder joint) is different from the grayscale of the image area corresponding to the solder joint without a cold solder joint failure, which is either too dark or too bright. Based on this, manual observation can be used to detect cold solder joint failures through the grayscale in the EL image. For example, if the overall grayscale of the EL image is bright, the solder joint corresponding to the image area with a dark grayscale can be confirmed as a solder joint with a cold solder joint failure; for another example, if the overall grayscale of the EL image is dark, the solder joint corresponding to the image area with a bright grayscale can be considered as a solder joint with a cold solder joint failure.

[0044] The second is the threshold segmentation method. In the specific implementation, a grayscale threshold is set in advance, and the grayscale threshold is used to perform grayscale threshold segmentation processing on the EL image. After the segmentation processing, the image areas with grayscale greater than or less than the grayscale threshold are highlighted in the EL image, and the welding points corresponding to these image areas can be determined as welding points with cold soldering faults. For example, assuming that the battery component refers to a solar cell, see Figure 1a A schematic diagram of grayscale threshold segmentation provided by an embodiment of the present invention, 101 represents an EL image corresponding to a solar cell, and 102 represents an EL image after the EL image is segmented using a grayscale threshold.

[0045] The third is an image processing solution based on artificial intelligence, which mainly identifies the fault of cold soldering based on the image difference information of the image area corresponding to each two adjacent welding points. Artificial Intelligence (AI) is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0046] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, mechatronics and other technologies. Artificial intelligence software technologies mainly include computer vision technology, speech processing technology, natural language processing technology, as well as machine learning / deep learning, autonomous driving, smart transportation and other major directions.

[0047] Among them, computer vision technology (Computer Vision, CV) is a science that studies how to make machines "see". To put it more specifically, it refers to machine vision such as using cameras and computers to replace human eyes to identify, track and measure targets, and further perform graphic processing to make computer processing into images that are more suitable for human eye observation or transmission to instrument detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and map construction, automatic driving, smart transportation and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.

[0048] The image processing scheme proposed in the present application mainly involves the image processing technology in artificial intelligence. In a specific implementation, an image to be processed corresponding to a target battery assembly is obtained (the image to be processed may be the above-mentioned EL image), and then the image to be processed is divided according to the N solder point domains corresponding to the N solder points in the image to be processed to obtain N image areas, each of which includes a solder point domain, and any image and the solder point domain contained in the any image have the same center; further, image difference information between every two adjacent image areas in the N image areas is determined, and finally, based on the image difference information, a cold soldering fault is identified for the battery assembly. For example, when there are a target number of image difference information that satisfies a preset image difference information condition, it can be determined that the battery assembly has a cold soldering fault. For another example, according to the grayscale mean of two adjacent image areas whose image difference information satisfies the preset image difference information condition, the soldering point with the cold soldering fault in the battery assembly is determined.

[0049] Comparing and analyzing the above three solutions, the first solution has the problem of detection cost for enterprises (mainly because quality inspectors need to be selected from employees); for quality inspectors, the grayscale difference of each image area in the EL image of a single battery component is small, which makes detection difficult. The high intensity of work and the single content of work may lead to a high employee turnover rate. In addition, the quality inspectors have different levels of mastery of the evaluation standards, so the product quality cannot be guaranteed due to inconsistent evaluation standards. In addition, quality inspectors spend a long time inspecting pictures, and the amount of data is large, which can easily cause visual fatigue, misjudgment or missed judgment, resulting in low accuracy of fault detection.

[0050] The second solution can only distinguish image areas with different grayscales, without comparing the grayscale of any image area with its adjacent image area, which leads to serious overkill (judging a battery component with no solder joint fault as having a solder joint fault). In addition, the overall grayscale of the EL image of different battery components is quite different, so it is difficult to set the grayscale threshold. For example, if the battery component is a solar cell, Figure 1b 11 and 12 are EL images of two different solar cells. The grayscales of 11 and 12 are different, 11 is relatively darker, and 12 is relatively brighter.

[0051] As can be seen from the foregoing, in the EL image corresponding to the battery component with a cold solder joint fault, there may be abnormal image difference information between two or more image areas. On the contrary, the third solution can be used to more accurately identify whether any battery component has a cold solder joint fault through image difference information. Therefore, the following description of the embodiment of the present invention will focus on the third solution.

[0052] Based on the above image processing solution, the embodiment of the present invention proposes a battery assembly fault detection system, see Figure 2 , is a schematic diagram of the structure of a battery assembly fault detection system provided by an embodiment of the present invention. Figure 2 It is assumed that the battery assembly to be checked for faults is a target solar cell, and the target solar cell is any solar cell constituting the solar cell. Figure 2 The fault detection system shown may include a photographing device 201, a target solar cell 202 and an image processing device 203, and the photographing device 201 may be connected to the image processing device 203. The photographing device 201 may be a charge coupled device (CCD) (which may be referred to as a CCD camera) or other devices that can collect photons; the image processing device 203 may be a terminal, such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a smart car, etc.; or, the image processing device 203 may also be a server, such as the image processing device 203 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0053] When it is necessary to perform cold solder joint fault detection on the target solar cell, a forward bias is applied to the target solar cell in a darkroom. At this time, the target solar cell emits photons of near-infrared wavelength due to inter-band radiation recombination. The shooting device 201 collects these photons to obtain a to-be-processed image related to the target solar cell. The to-be-processed image can be used to reflect some information of the target solar cell. Assuming that the target solar cell includes N solder joints, when the shooting device 201 performs the above shooting, each solder joint is mapped to a solder joint domain in the to-be-processed image. Therefore, the to-be-processed image may include N solder joint domains, and these N solder joint domains correspond one-to-one to the N solder joints.

[0054] Further, the photographing device 201 transmits the image to be processed to the image processing device 203, and the image processing device 203 determines N image areas by dividing the image to be processed according to the N solder point domains, each image area includes a solder point domain, and any image area has the same center as the solder point domain it includes; then the image difference information between every two adjacent image areas in the N image areas is determined and stored in the image difference information set. Then, the target solar cell is identified for the cold solder joint fault based on the image difference information set. Since there may be abnormal image difference information between two or more image areas in the image corresponding to the solar cell with the cold solder joint fault, on the contrary, the image difference information set can be used to more accurately identify whether the target solar cell has a cold solder joint fault.

[0055] Based on the above-mentioned image processing scheme and fault detection system, an embodiment of the present invention provides an image processing method, see Figure 3 , is a flow chart of an image processing method provided in an embodiment of the present invention. Figure 3 The image processing method shown may be executed by an image processing device, specifically by a processor of the image processing device. Figure 3 The image processing method shown may include the following steps:

[0056] Step S301: Acquire an image to be processed corresponding to a target battery assembly, wherein the target battery assembly includes N welding points, and each welding point is mapped to a welding point domain in the image to be processed.

[0057] The image to be processed may be obtained from a shooting device. In a specific implementation, the target battery component is placed under forward bias, and the photons emitted by the minority carriers injected into the target battery component after radiative recombination are collected by a shooting device such as a CCD camera, and then a spatial resolution image of the radiative recombination distribution of the target battery component can be obtained, and the spatial resolution image is the image to be processed.

[0058] The target battery assembly may include N welding points, where N is an integer greater than or equal to 1. The image to be processed includes N welding point domains, which correspond one to one to the N welding points. In other words, each welding point on the target battery assembly is mapped to a welding point domain on the image to be processed. Since the shapes and sizes of the welding points are the same, the shapes and sizes of the N welding point domains on the image to be processed are also the same. Assume that a welding point domain can be a rectangle, and the target battery assembly is a target solar cell. For example, see Figure 4a , is a schematic diagram of an image to be detected provided by an embodiment of the present invention, 401 represents a target solar cell, 402 represents an image to be processed obtained by photographing the target solar cell through a photographing device, A and B in 401 are two welding points, C and D in 402 are two welding point domains, welding point domain C corresponds to welding point A, and welding point domain D corresponds to welding point B.

[0059] Step S302: Divide the image to be processed according to N solder joint domains to obtain N image regions, where one image region includes one solder joint domain, and any image region and the solder joint domain included in any image region have the same center.

[0060] From the above, we can see that Figure 3 The image processing method shown is mainly to identify faults in the image to be processed based on the image difference information between the image areas corresponding to each two adjacent welding points. In the image to be processed, an image area includes a welding point domain, and the image area and the welding point domain it includes have the same center, then the image area including any welding point domain is the image area corresponding to the welding point corresponding to the any welding point domain. Before calculating the image difference information between each two adjacent image areas including the welding point domain, it is necessary to determine the image area where each welding point domain is located in the image to be processed through step S302. Since the size and shape of each welding point are the same, the size and shape of the welding point domain mapped to each welding point in the image to be processed are the same. In the embodiment of the present invention, it can be assumed that the size of the image area where each welding point domain is located is also the same.

[0061] In one embodiment, when determining the image region where each solder point region is located, the image processing device may first identify N solder point regions from the image to be processed, and then divide the image to be processed into regions based on the N solder point regions and pre-set image region attribute information (the shape of an image region and the size of an image region), to obtain N image regions, each of which includes a solder point region, and each image region and the solder point region included therein have the same center. Specifically, dividing the image to be processed according to the N solder point regions to obtain the N image regions may include: performing solder point region identification on the image to be processed to obtain the position information of the N solder point regions; obtaining the image region attribute information; and performing region division processing on the image to be processed according to the position information of the N solder point regions and the image region attribute information to obtain the N image regions.

[0062] Among them, a solder point domain is represented by the solder point domain center and the solder point domain attribute information. The solder point domain attribute information includes the shape of the solder point domain and the size of the solder point domain. Therefore, to obtain the position information of N solder point domains, the center positions of the N solder point domains can be obtained first. The center position of a solder point domain can be a pixel point, and then a solder point domain is determined based on the attribute information of the solder point domain and a center position. For example, the solder point domain attribute information indicates that the solder point domain is a rectangle with a length of x and a width of y. Then, assuming that a center position is represented by (x1, y1), the position information of the solder point domain determined according to the solder point domain attribute information and the center position is represented by 4 position coordinates, namely: (x1+1 / 2x, y1-1 / 2y), (x1+1 / 2x, y1+1 / 2y), (x1-1 / 2x, y1-1 / 2y) and (x1-1 / 2x, y1+1 / 2y).

[0063] In the image to be processed, a center position can be represented by a width value and a height value, that is, a width value and a height value represent a solder joint domain. Therefore, the embodiment of the present invention performs pixel recognition on the image to be processed and obtains the center position of N solder joint domains, which can be understood as: performing recognition processing on the image to be processed to obtain multiple width values ​​and multiple height values, combining the width values ​​and the height values, and obtaining the center position of N solder joint domains. In a specific implementation, performing solder joint domain recognition on the image to be processed and obtaining the position information of N solder joint domains includes the following steps:

[0064] S1: Based on the integral projection algorithm, grayscale accumulation processing is performed on the image to be processed in the vertical direction and the horizontal direction respectively, to obtain a horizontal integral projection map and a vertical integral projection map; wherein the width of the horizontal integral projection map represents the width of the image to be processed, and the height of the horizontal integral projection map represents the result of grayscale accumulation processing of the grayscale corresponding to multiple length values ​​corresponding to each width value; the width of the vertical integral projection map represents the height of the image to be processed, and the height of the vertical integral projection map represents the result of grayscale accumulation processing of the grayscale corresponding to multiple width values ​​corresponding to each height value;

[0065] Among them, the grayscale accumulation processing of the image to be processed in the vertical direction is performed based on the integral projection algorithm, which can be expressed by formula (1):

[0066]

[0067] In formula (1), W represents the width of the image to be processed, and H represents the height of the image to be processed. After grayscale accumulation processing in the vertical direction according to formula (1), the horizontal integral projection image can be obtained as follows: Figure 4b As shown, Figure 4b The horizontal axis direction represents the width of the image to be processed, and the vertical axis direction represents the result of grayscale accumulation processing of multiple pixels under multiple length values ​​corresponding to each width value.

[0068] Based on the integral projection algorithm, grayscale accumulation processing is performed on the image to be processed in the horizontal direction, which can be expressed by formula (2):

[0069]

[0070] After grayscale accumulation processing in the horizontal direction using formula (2), the vertical projection image can be obtained as follows: Figure 4c As shown, in Figure 4c The horizontal axis direction represents the height of the image to be processed, and the vertical axis direction represents the result of grayscale accumulation processing of multiple pixels under multiple width values ​​corresponding to each height value.

[0071] In one embodiment, in order to more vividly illustrate the relationship between the horizontal integral projection image, the vertical integral projection image and the image to be processed, the embodiment of the present invention can be Figure 4d Represents the relationship between the horizontal integral projection map, the vertical integral projection map and the image to be processed. Figure 4d In FIG. 4, 41 represents the image to be processed, 42 represents the vertical integral projection image, and 43 represents the horizontal integral projection image. Figure 4d It can be seen that the horizontal coordinate direction of the vertical integral projection image is equal to the width of the image to be processed, and the vertical coordinate direction of the horizontal integral projection image is equal to the height of the image to be processed.

[0072] S2: obtaining M peak values ​​in the horizontal integral projection image, and obtaining M width values ​​corresponding to the M peak points in the image to be processed based on the width values ​​of the M peak values ​​in the horizontal integral projection image;

[0073] The peak value originally refers to the maximum instantaneous value of the changing current, voltage or power within the considered time interval. In the embodiment of the present invention, the peak value in the horizontal integral projection diagram refers to the maximum value of the accumulated grayscale changes within the considered width. Figure 4b In the horizontal integral projection diagram shown, A, B, and C represent peak values. The width value corresponding to the peak value A is W1, the width value corresponding to the peak value B is W2, and the width value corresponding to the peak value C is W3.

[0074] S3: Obtain P peak points in the vertical integral projection image, and obtain P height values ​​corresponding to the P peak points in the image to be processed based on the height values ​​of the P peak points in the vertical integral projection image;

[0075] In the embodiment of the present invention, the peak value in the vertical integral projection diagram refers to the maximum value of the accumulated grayscale value within the considered height. Figure 4c In the vertical integral projection diagram shown, P1-P9 represent peak values. The height value corresponding to the peak value P1 is H1, the height value corresponding to the peak value P2 is H2, and so on, the height value corresponding to the peak value P9 is H9.

[0076] S4: Arrange and combine the M width values ​​and the P height values ​​to obtain N position information, each position information corresponding to a center position of a solder joint domain.

[0077] Specifically, arranging and combining M width values ​​and P height values ​​can be understood as combining each width value with P height values ​​respectively. For example, assuming that the M width values ​​are W1, W2 and W3, and the P height values ​​are H1, H2, ...H9, and the M width values ​​are arranged and combined with the P width values, the obtained position information can be expressed as: (W1, P1), (W1, P2), (W1, P3), ... (W1, P9), (W2, P1), (W2, P2), ... (W2, P9), ... (W3, P9).

[0078] For example, assuming that the relationship between the image to be processed, the horizontal integral projection image, and the vertical integral projection image can be seen in Figure 4d As shown, in Figure 4dThe horizontal integral projection diagram includes three peaks A, B, and C, and the corresponding width values ​​of the three peaks are W1, W2, and W3 respectively; the vertical integral projection diagram includes 9 peaks P1-P9, and the corresponding height values ​​are H1-H9 respectively; firstly, W1 and H1 are combined to obtain a solder joint domain center position 411, and then W1 and H2 are combined to obtain another solder joint domain center position 422, and so on, the N solder joint domain center positions on the image to be processed can be obtained.

[0079] S5: Determine the position information of N solder joint domains based on the N position information and solder joint domain attribute information, wherein the solder joint domain attribute information includes the shape of the solder joint domain and the size of the solder joint domain.

[0080] After the position information of the centers of N solder joint domains on the image to be processed is determined through the above steps S1-S4, the solder joint domain attribute information is further obtained, and the solder joint domain attribute information can be set based on the size and shape of the solder joint; the position information of the N solder joint domains is determined based on the N position information and the solder joint domain attribute information.

[0081] After obtaining the position information of the N solder joint domains, further obtain the image region attribute information, which may be preset, and may include the shape information and size information of each image region, such as the image region attribute information including that each image region is a rectangle, and the size information of each image region is the same, the length is X, and the width is Y. Then, the image to be processed is divided into regions according to the position information of the N solder joint domains and the image region attribute information. Specifically, the center of each solder joint domain is taken as the center, and a rectangle with a length equal to X and a width equal to Y is taken as an image region, and the image region includes a solder joint domain.

[0082] For example, see Figure 5 , is a schematic diagram of region division of an image to be processed provided by an embodiment of the present invention, 501 represents the image to be processed before region division, 502 represents the image to be processed after region division, it can be seen that the image to be processed after region division includes N rectangles of equal size and shape, one rectangle is an image region, each rectangle and a welding point domain have the same center, and one image region can also be called a region of interest (ROI).

[0083] Step S303: determine an image difference information set according to the N image regions.

[0084] After the image to be processed is divided into N image regions, the image processing device further determines an image difference information set according to the N image regions. The image difference information set includes image difference information between every two adjacent image regions. For example, assuming Figure 5 The N image regions in are represented as N1, N2, N3, ... N27, and the image difference information set includes the image difference information between N1 and N2, the image difference information between N1 and N4, the image difference information between N2 and N3, the image difference information between N2 and N5, and so on.

[0085] Specifically, determining the image difference information set according to the N image regions includes: calculating the image difference information between every two adjacent image regions, and storing the calculated image difference information into the image difference information set.

[0086] As an optional implementation, the image difference information between any two adjacent image regions may refer to the distance between the grayscale histograms corresponding to the any two adjacent image regions. Therefore, calculating the image difference information between any two adjacent image regions may include: respectively obtaining the grayscale histograms corresponding to any two adjacent image regions, calculating the distance between the two grayscale histograms, and using the distance as the image difference information between any two adjacent image regions.

[0087] As another optional implementation, the image difference information between any two adjacent image regions may refer to the difference between the grayscale means of any two adjacent image regions. Therefore, calculating the image difference information between any two adjacent image regions may include: calculating the difference between the grayscale means of any two adjacent image regions.

[0088] Step S304: performing fault identification on the target battery assembly based on the image difference information set.

[0089] In one embodiment, fault identification of a target solar cell assembly based on an image difference information set may include: if there are a target number of image difference information satisfying a fault existence condition in the image difference information set, then it is determined that a preset fault exists in the target solar cell assembly. The preset fault here may refer to a cold solder joint fault. If the image difference information refers to the distance between the grayscale histograms corresponding to two adjacent image regions, then one image difference information satisfies the fault existence condition when the distance between the grayscale histograms corresponding to the two adjacent image regions related to the image difference information is greater than or equal to the distance threshold. The target number may be any value preset by the image processing device, such as 1, 2, etc. If the image difference information refers to the difference between the grayscale means corresponding to the two adjacent image regions, then one image difference information satisfies the fault existence condition when the difference between the grayscale means between the two adjacent image regions related to the image difference information is greater than or equal to the grayscale mean threshold.

[0090] In an embodiment of the present invention, when it is necessary to identify the fault of a target battery assembly, an image to be processed corresponding to the target battery assembly is obtained, the target battery assembly includes N welding points, and each welding point is mapped to a welding point domain in the image to be processed; further, the image to be processed is divided according to the N welding point domains to obtain N image areas, each image area includes a welding point domain, and any image area and the welding point domain included in any image area have the same center; then the image difference information between every two adjacent image areas in the N image areas is determined and stored in the image difference information set. Then, the target battery assembly is identified for fault based on the image difference information set. Since there may be abnormal image difference information between the image areas corresponding to two or more welding points in the image corresponding to the faulty battery assembly, on the contrary, the image difference information set can be used to more accurately identify whether the target battery assembly has a fault.

[0091] Based on the above image processing method, the embodiment of the present invention provides another image processing method. Figure 6 , is a flow chart of another image processing method provided by an embodiment of the present invention. Figure 6 The image processing method shown may be executed by an image processing device, and specifically may be executed by a processor of the image processing device. Figure 6 The image processing method shown may specifically include the following steps:

[0092] Step S601: Acquire an image to be processed corresponding to a target battery assembly, where the target battery assembly includes N welding points, and each welding point is mapped to a welding point domain in the image to be processed.

[0093] Step S602: perform solder joint domain recognition on the image to be processed to obtain position information of N solder joint domains.

[0094] In one embodiment, some feasible implementations of step S601 and step S602 can be found in Figure 3 The introduction of the corresponding contents in step S301 and step S302 in the embodiment will not be repeated here.

[0095] Step S603: Acquire image region attribute information, and perform region division processing on the image to be processed according to the position information of the N solder joint domains and the image region attribute information to obtain N image regions.

[0096] In the embodiment of the present invention, in order to amplify the local grayscale difference of the target battery assembly, before dividing the image to be processed into regions, the image to be processed is first preprocessed to convert the image to be processed into an enhanced image, and then the region division process is performed on the enhanced image.

[0097] Among them, preprocessing the image to be processed may include adaptive histogram equalization. In a specific implementation, preprocessing the image to be processed may include: dividing the image to be processed into multiple image blocks, and performing histogram equalization on each image block to obtain an intermediate image; and then performing bilinear interpolation on the intermediate image to obtain an enhanced image.

[0098] It should be understood that when performing histogram equalization on each image block, if there is noise in the image block, the noise may be amplified. In order to avoid this, a contrast limit is used when performing histogram equalization on each image block. If any image block of the histogram exceeds the contrast limit, the pixels in the image block are cropped and evenly distributed to other blocks before performing histogram equalization on the image block.

[0099] After performing histogram equalization on each image block, an intermediate image is obtained. In order to reduce the artifacts at the boundary of the image block, the intermediate image is subjected to bilinear interpolation to obtain an enhanced image. Figure 7a , is a schematic diagram of an enhanced image provided by an embodiment of the present invention, Figure 7a 701 represents the image to be processed, and 702 represents the enhanced image. Figure 7a It can be seen from the figure that the local grayscale difference in the enhanced image 702 after the adaptive histogram equalization processing is more obvious.

[0100] Step S604: Calculate the grayscale histogram corresponding to each of the N image regions.

[0101] After the image to be processed is divided into N image regions in step S603, a grayscale histogram of each image region may be calculated, so as to calculate image difference information between every two adjacent image regions based on the grayscale histogram of each image region.

[0102] It should be understood that the grayscale value of any pixel is between 0 and 255, that is, the grayscale value of any pixel is between 0 and 255. Calculating the grayscale histogram corresponding to any image area may include: using 0-255 as the horizontal axis, counting the number of occurrences of each grayscale value in any image area, and using the number of occurrences of each grayscale value in any image area as the vertical axis. For example, see Figure 7b , is a schematic diagram of a grayscale histogram of an image region provided by an embodiment of the present invention, Figure 7bThe grayscale histograms of the image regions N4 and N5 are represented by 711, where 71A represents the grayscale histogram of the image region N4, and 71B represents the grayscale histogram of the image region N5. The grayscale histograms of the image regions N20 and N21 are represented by 722, where 72A represents the grayscale histogram of the image region N20, and 72B represents the grayscale histogram of the image region N21.

[0103] Step S605: obtaining a histogram distance calculation rule, and determining the distance between the grayscale histograms corresponding to every two adjacent image regions according to the histogram distance calculation rule.

[0104] In order to calculate the distance between the grayscale histograms corresponding to any two adjacent image regions, the embodiment of the present invention may select the histogram distance calculation rule shown in formula (3):

[0105]

[0106] In formula (3), H1 and H2 are the grayscale histograms corresponding to any two adjacent image regions, N is the number of grids in the entire grayscale histogram, Represents the grayscale mean of any image area, H k (I) represents each gray value of any gray histogram, and I ranges from 0 to 255, where It can be calculated by the following formula (4), where the value of i ranges from 0 to 255.

[0107]

[0108] According to the above histogram distance calculation rule, the distance between the grayscale histogram corresponding to each image region and the grayscale histogram corresponding to its adjacent image region can be calculated. For example, the distance between the grayscale histograms corresponding to each image region and its adjacent image regions can be calculated as follows: Figure 7c As shown, in Figure 7c In any image region, the distance between the grayscale histogram corresponding to any image region and the grayscale histogram corresponding to the image region adjacent to its right is distributed near the intersection line between the image region and the image region adjacent to its right. For example, the image region adjacent to the right of image region N5 is N6, and the distance between the grayscale histogram corresponding to N5 and the grayscale histogram corresponding to N6 is 0.23, which is distributed near the intersection line of N5 and N6. Similarly, the distance between the grayscale histogram corresponding to any image region and the grayscale histogram corresponding to the image region adjacent to its left is distributed near the intersection line between any image region and the image region adjacent to its left.

[0109] Step S606: Store the distance between the grayscale histograms corresponding to every two adjacent image regions as the image difference information between every two adjacent image regions in the image difference information set.

[0110] If the distance between the grayscale histograms corresponding to any two adjacent image regions is relatively large, it can be indicated that the grayscale difference between the two adjacent image regions is large, such as Figure 7b It can be seen that the distance between the grayscale histograms corresponding to the image area N4 and the image area N5 is relatively small. The distance between the grayscale histograms corresponding to the image area N4 and the image area N5 calculated by the above formula (3) is 0.18; the distance between the grayscale histograms corresponding to the image area N20 and the image area N21 is relatively large. The distance between the two grayscale histograms calculated by the above formula (3) is 0.69.

[0111] Step S607: performing fault identification on the target battery assembly based on the image difference information set.

[0112] In one embodiment, fault identification of a target battery assembly based on an image difference information set may refer to determining whether a target battery assembly has a preset fault based on the image difference information, and the preset fault may refer to a cold solder joint fault. Specifically, fault identification of a target battery assembly based on the image difference information includes: if there are a target number of image difference information satisfying a fault existence condition in the image difference information set, determining that a preset fault exists in the target battery assembly.

[0113] As an optional implementation, as can be seen from the above, the image difference information between two adjacent image areas can refer to the distance between the grayscale histograms corresponding to the two adjacent image areas. Therefore, any image difference information satisfying the fault existence condition can refer to any image difference information being greater than or equal to the distance threshold.

[0114] As another optional implementation, the image difference information between two adjacent image areas may refer to the grayscale mean corresponding to the two adjacent image areas. Therefore, any image difference information satisfying the fault existence condition may refer to any image difference information being greater than or equal to the grayscale mean threshold.

[0115] In another embodiment, fault identification of a target battery assembly based on an image difference information set may also refer to identifying a welding point in the target battery assembly that has a preset fault when it is determined that the target battery assembly has a preset fault. In a specific implementation, if it is determined that the target battery assembly has a preset fault based on the image difference information set, a target image area set is determined from N image areas based on the image difference information set; and a welding point among the N welding points included in the target battery assembly that corresponds to a welding point domain in each target image area in the target image area set is determined as a welding point with a preset fault.

[0116] As an optional implementation, determining a target image region from N image regions based on image difference information includes: obtaining a target number of target image difference information that meets the fault existence condition from the image difference information; obtaining two image regions related to each image difference information, wherein the two image regions related to any target image difference information are two adjacent image regions in the image to be processed, and the image difference information between the two image regions related to any target image difference information is equal to any target image difference information; determining a target image region from the two image regions related to each target image difference information based on the grayscale mean corresponding to the two image regions related to each target image difference distance, and storing it in the target image region set. In a specific implementation, the one with the smaller grayscale mean among the two adjacent image regions that meet the fault existence condition can be used as a target image region.

[0117] As another optional implementation, determining a target image area from N image areas based on image difference information includes: determining multiple image difference information corresponding to each image area, the multiple image difference information corresponding to any image area includes image difference information between any image area and multiple image areas adjacent to any image area; if the number of image difference information satisfying the fault existence condition in the multiple image difference information corresponding to any image area meets the preset ratio with the total number of multiple image difference information corresponding to any image area, then adding any image area as a target image area to the target image area set. The preset ratio may be 1 / 3, 1 / 2, 3 / 4, etc. Meeting the preset ratio means being greater than or equal to the preset ratio.

[0118] For example, the preset ratio is 1 / 2, and an image area has 3 adjacent image areas, so the image area corresponds to 3 image difference information. If 2 of the 3 image difference information meet the fault existence condition, then the ratio between the number of image difference information 2 that meets the fault existence condition in the image area and the total number 3 of multiple image difference information corresponding to the image area is 2 / 3. 2 / 3 is greater than 1 / 2, so it can be considered that the image area can be stored in the target image area set as a target image area.

[0119] As another optional implementation, determining a target image area from the N image areas based on the image difference information includes: obtaining a target number of target image difference information that meets a fault existence condition from the image difference information; obtaining two image areas associated with each target image difference information, wherein the two image areas associated with any target image difference information are two adjacent image areas in the image to be processed, and image difference information between the two image areas associated with any target image difference information is equal to the any target image difference information; and determining, among the image areas associated with multiple target image difference information, an image area whose grayscale mean is less than a grayscale mean threshold as a target image area.

[0120] In summary, according to the image difference information between every two adjacent image regions, candidate image regions that may have a preset fault are first selected from the N image regions, and then the grayscale means of these candidate image regions are calculated, and the candidate image regions whose grayscale means are less than the grayscale mean threshold are determined as target image regions with preset faults. The grayscale mean threshold can be determined in advance based on the grayscale conditions of the to-be-processed images corresponding to different target battery components.

[0121] Based on the above description, Figure 6 The specific implementation steps of the image processing method shown can be Figure 7d As shown in the figure: after the image processing device obtains the image to be detected, it performs solder joint domain positioning processing on the image to be detected to obtain the position information of multiple solder joint domains; at the same time, it performs adaptive histogram equalization processing on the image to be processed to obtain an enhanced image; obtains image region attribute information, and performs region extraction on the enhanced image according to the position information of multiple solder joint domains and the image region attribute information to obtain N image regions; further, extracts the grayscale histogram of each image region, and performs neighborhood difference comparison on the grayscale histograms corresponding to every two adjacent image regions, that is, calculates the distance between the grayscale histograms corresponding to adjacent image regions, and finally performs fault detection on the target battery component based on the multiple distances obtained in the above steps.

[0122] In an embodiment of the present invention, when it is necessary to identify the fault of a target battery assembly, an image to be processed corresponding to the target battery assembly is obtained, the target battery assembly includes N welding points inside, and the image to be processed includes N welding point domains, and the N welding point domains correspond to the N welding points one by one; further, the position information of the N welding point domains included in the image to be processed is identified, and the image area attribute information is obtained, and the image to be processed is divided into N image areas according to the position information of the N welding point domains and the image area attribute information; further, the grayscale histogram of each image area is calculated, and then the distance between the grayscale histograms corresponding to each two adjacent image areas is calculated to obtain an image difference information set, and finally the target battery assembly is identified for a preset fault based on the image difference information set. Since there may be abnormal image difference information between two or more image areas in the image corresponding to the battery assembly with a preset fault, on the contrary, the image difference information set can be used to more accurately identify whether the target battery assembly has a fault.

[0123] Based on the above-mentioned embodiment of the image processing method, the embodiment of the present invention provides an image processing device. Figure 8 , is a structural schematic diagram of an image processing device provided by an embodiment of the present invention, Figure 8 The image processing device shown can run the following units:

[0124] An acquisition unit 801 is used to acquire an image to be processed corresponding to a target battery assembly, wherein the target battery assembly includes N welding points, each welding point is mapped to a welding point domain in the image to be processed, and N is an integer greater than or equal to 1;

[0125] A determination unit 802 is configured to divide the image to be processed according to N solder joint domains to obtain N image regions, each image region including a solder joint domain, and any image region and a solder joint domain included in any image have the same center;

[0126] The determining unit 802 is further configured to determine an image difference information set according to the N image regions, wherein the image difference information set includes image difference information between every two adjacent image regions among the N image regions;

[0127] The identification unit 803 is used to identify the fault of the target battery assembly based on the image difference information set.

[0128] In one embodiment, the determining unit 802 divides the image to be processed according to N welding point domains to obtain N image regions and performs the following steps:

[0129] Performing solder joint domain recognition on the image to be processed to obtain position information of the N solder joint domains; obtaining image region attribute information; and performing region division processing on the image to be processed according to the position information of the N solder joint domains and the image region attribute information to obtain N image regions.

[0130] In one embodiment, the determining unit 802 performs the following steps when performing solder joint domain recognition on the image to be processed and obtaining the position information of the N solder joint domains:

[0131] Based on the integral projection algorithm, grayscale accumulation processing is performed on the image to be processed in the vertical direction and the horizontal direction respectively to obtain a horizontal integral projection image and a vertical integral projection image; wherein the width of the horizontal integral projection image represents the width of the image to be processed, and the height of the horizontal integral projection image represents the result of grayscale accumulation processing of the grayscales corresponding to multiple length values ​​corresponding to each width value; the width of the vertical integral projection image represents the height of the image to be processed, and the height of the vertical integral projection image represents the result of grayscale accumulation processing of the grayscales corresponding to multiple width values ​​corresponding to each height value;

[0132] Acquire M peaks in the horizontal integrated projection image, and acquire M width values ​​corresponding to the M peaks in the image to be processed based on the width values ​​of the M peaks in the horizontal integrated projection image;

[0133] Acquire P peaks in the vertical integral projection image, and acquire P height values ​​corresponding to the P peaks in the image to be processed based on the height values ​​of the P peaks in the vertical integral projection image; arrange and combine the M width values ​​and the P height values ​​to obtain N position information, each position information corresponding to a center position of a solder joint domain;

[0134] The position information of N solder joint domains is determined based on the N position information and solder joint domain attribute information, wherein the solder joint domain attribute information is used to indicate the shape and size of a solder joint domain.

[0135] In one embodiment, when the determination unit 802 performs region division processing on the image to be processed according to the position information of the N weld point domains and the image region attribute information, the determination unit 802 performs the following steps: preprocessing the image to be processed to obtain an enhanced image; and performing region division processing on the enhanced image according to the position information of the N weld point domains and the image region attribute information.

[0136] In one embodiment, the determining unit 802 performs the following steps when preprocessing the image to be processed to obtain an enhanced image:

[0137] The image to be processed is divided into a plurality of image blocks, and each image block is subjected to a histogram equalization process to obtain an intermediate image; and the intermediate image is subjected to a bilinear interpolation process to obtain an enhanced image.

[0138] In one embodiment, when the identification unit 803 performs fault identification on the target battery assembly based on the image difference information, the identification unit 803 performs the following steps:

[0139] If there are a target number of image difference information satisfying the fault existence condition in the image difference information set, it is determined that the target battery assembly has a preset fault.

[0140] In one embodiment, when determining the image difference information set according to the N image regions, the recognition unit 803 performs the following steps:

[0141] Calculate the grayscale histogram corresponding to each of the N image areas; obtain a histogram distance calculation rule, and determine the distance between the grayscale histograms corresponding to every two adjacent image areas according to the histogram distance calculation rule; store the distance between the grayscale histograms corresponding to every two adjacent image areas as image difference information between every two adjacent image areas in the image difference information set.

[0142] In one embodiment, any image difference information meeting the fault existence condition means that any image difference information is greater than a distance threshold.

[0143] In one embodiment, when the identification unit 803 performs fault identification on the target battery assembly based on the image difference information, the identification unit 803 performs the following steps:

[0144] If it is determined based on the image difference information set that the target battery assembly has a preset fault, determining a target image area set from the N image areas based on the image difference information set;

[0145] Among the N welding points included in the target battery assembly, welding points corresponding to welding point domains in each target image area in the target image area set are determined as welding points with preset faults.

[0146] In one embodiment, when determining the target image region from the N image regions based on the image difference information, the recognition unit 803 performs the following steps:

[0147] Acquire a target number of target image difference information satisfying a fault existence condition from the image difference information;

[0148] Acquire two image regions related to each target image difference information, wherein the two image regions related to any target image difference information are two adjacent image regions in the image to be processed, and image difference information between the two image regions related to any target image difference information is equal to the any target image difference information;

[0149] Based on the grayscale mean values ​​corresponding to the two image regions related to the difference distance of each target image, a target image region is determined from the two image regions related to the difference information of each target image, and is stored in the target image region set.

[0150] In one embodiment, when determining the target image region from the N image regions based on the image difference information, the recognition unit 803 performs the following steps:

[0151] Determine a plurality of image difference information corresponding to each image region, wherein the plurality of image difference information corresponding to any image region includes image difference information between the any image region and a plurality of image regions adjacent to the any image region;

[0152] If, among the multiple image difference information corresponding to any one of the image regions, the number of image difference information satisfying the fault existence condition and the total number of the multiple image difference information corresponding to the any one of the image regions satisfy a preset ratio, the any one of the image regions is added as a target image region to the target image region set.

[0153] In one embodiment, when determining the target image region from the N image regions based on the image difference information, the recognition unit 803 performs the following steps:

[0154] Acquire a target number of target image difference information satisfying a fault existence condition from the image difference information;

[0155] Acquire two image regions related to each target image difference information, wherein the two image regions related to any target image difference information are two adjacent image regions in the image to be processed, and image difference information between the two image regions related to any target image difference information is equal to the any target image difference information;

[0156] Among the image regions related to the difference information of the multiple target images, the image region whose grayscale mean is less than the grayscale mean threshold is determined as the target image region.

[0157] According to one embodiment of the present invention, Figure 3 and Figure 6 The various steps involved in the image processing method shown can be Figure 8 The image processing device shown in FIG. 1 is executed by each unit in the image processing device shown in FIG. Figure 3 The step S301 can be performed by Figure 8 The acquisition unit 801 in the image processing device described in the embodiment of the present invention is executed, and step S302 and step S303 can be performed by Figure 8 The determination unit 802 in the image processing apparatus shown in FIG. 1 is used to perform step S304. Figure 8 The recognition unit 803 in the image processing device shown in the figure is used for execution; for example, Figure 6 Steps S601 to S603 in the image processing method can be Figure 8 The acquisition unit 801 in the image processing device shown in FIG. 1 is used to perform the steps S604 and S605. Figure 8 The image processing apparatus shown in FIG. 1 is used to determine the image processing apparatus 802, and step S606 can be performed by Figure 8 The recognition unit 803 in the image processing device shown is used for execution.

[0158] According to another embodiment of the present invention, Figure 8 The various units in the image processing device shown can be individually or completely combined into one or several other units to form, or one (some) of the units can be further divided into multiple functionally smaller units to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present invention. The above-mentioned units are divided based on logical functions. In practical applications, the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present invention, other units can also be included based on the image processing device. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.

[0159] According to another embodiment of the present invention, the program can be executed by running a program on a general computing device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and other processing elements and storage elements. Figure 3 as well as Figure 6 A computer program (including program code) for each step involved in the corresponding method shown in FIG. Figure 8 The image processing apparatus shown in the embodiment of the present invention is used to implement the image processing method of the embodiment of the present invention. The computer program can be recorded on a computer-readable storage medium, for example, and loaded into the above-mentioned computing device through the computer-readable storage medium and run therein.

[0160] In an embodiment of the present invention, when it is necessary to perform preset fault identification on a target battery assembly, an image to be processed corresponding to the target battery assembly is obtained, the interior of the target battery assembly includes N welding points, and the image to be processed includes N welding point domains, and the N welding point domains correspond to the N welding points one by one; further, the image to be processed is divided according to the N welding point domains to obtain N image areas, each image area includes a welding point domain, and any image area has the same center as the welding point domain included in any image area; then the image difference information between every two adjacent image areas in the N image areas is determined and stored in the image difference information set. Then, the target battery assembly is fault identified based on the image difference information set. Since there may be abnormal image difference information between two or more image areas in the image corresponding to the battery assembly with a fault, on the contrary, the image difference information set can be used to more accurately identify whether the target battery assembly has a fault.

[0161] Based on the above-mentioned image processing method and device embodiments, the present invention also provides an image processing device, see Fig. 9 , is a structural schematic diagram of an image processing device provided by an embodiment of the present invention. Fig. 9 The image processing device shown may include at least a processor 901, an input interface 902, an output interface 903, and a computer storage medium 904. The processor 901, the input interface 902, the output interface 903, and the computer storage medium 904 may be connected via a bus or other means.

[0162] The computer storage medium 904 may be stored in the memory of the image processing device, the computer storage medium 904 is used to store computer programs, and the processor 901 is used to execute the computer programs stored in the computer storage medium 904. The processor 901 (or CPU (Central Processing Unit)) is the computing core and control core of the image processing device, which is suitable for implementing one or more computer programs, and is specifically suitable for loading and executing one or more computer programs to implement corresponding method flows or corresponding functions.

[0163] In one embodiment, the processor 901 described in the embodiment of the present invention can be used to perform: obtaining an image to be processed corresponding to a target battery assembly, the target battery assembly includes N welding points, each welding point is mapped to a welding point domain in the image to be processed, and N is an integer greater than or equal to 1; dividing the image to be processed according to the N welding point domains to obtain N image areas, one image area includes a welding point domain, and any image area and the welding point domain included in any image area have the same center; determining an image difference information set based on the N image areas, the image difference information set includes image difference information between every two adjacent image areas in the N image areas; and performing fault identification on the target battery assembly based on the image difference information set.

[0164] In an embodiment of the present invention, when it is necessary to perform preset fault identification on a target battery assembly, an image to be processed is obtained for reflecting the internal information of the target battery assembly, the interior of the target battery assembly includes N welding points, and the image to be processed includes N welding point domains, and the N welding point domains correspond to the N welding points one by one; further, N image areas are determined in the image to be processed, one image area includes one welding point domain, and any image area and the welding point domain included in any image area have the same center; then the image difference information between every two adjacent image areas in the N image areas is determined and stored in the image difference information set. Then, the target battery assembly is fault identified based on the image difference information set. Since there may be abnormal image difference information between two or more image areas in the image corresponding to the battery assembly with a fault, on the contrary, the image difference information set can be used to more accurately identify whether the target battery assembly has a fault.

[0165] The embodiment of the present invention also provides a computer storage medium (Memory), which is a memory device in the image processing device for storing programs and data. It can be understood that the computer storage medium here can include both the built-in storage medium in the image processing device and the extended storage medium supported by the image processing device. The computer storage medium provides a storage space, which stores the operating system of the image processing device. In addition, one or more computer programs suitable for being loaded and executed by the processor 901 are also stored in the storage space. It should be noted that the computer storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage; optionally, it can also be at least one computer storage medium located away from the aforementioned processor.

[0166] In one embodiment, the processor 901 may load and execute one or more computer programs in the computer storage medium to implement the above-mentioned Figure 3 as well as Figure 6 In the corresponding steps of the image processing method embodiment, in a specific implementation, one or more first computer programs in the computer storage medium are loaded by the processor 901 and execute the following steps:

[0167] An image to be processed corresponding to a target battery assembly is obtained, wherein the target battery assembly includes N welding points, each welding point is mapped to a welding point domain in the image to be processed, and N is an integer greater than or equal to 1; the image to be processed is divided according to the N welding point domains to obtain N image areas, wherein one image area includes one welding point domain, and any image area and the welding point domain included in any image area have the same center; an image difference information set is determined according to the N image areas, and the image difference information set includes image difference information between every two adjacent image areas in the N image areas; and fault identification is performed on the target battery assembly based on the image difference information set.

[0168] In one embodiment, when the processor 901 determines N image regions in the image to be processed, the processor 901 performs the following steps:

[0169] Performing solder joint domain recognition on the image to be processed to obtain position information of the N solder joint domains; obtaining image region attribute information; and performing region division processing on the image to be processed according to the position information of the N solder joint domains and the image region attribute information to obtain N image regions.

[0170] In one embodiment, the processor 901 performs the following steps when performing solder joint domain recognition on the image to be processed and obtaining the position information of the N solder joint domains:

[0171] Based on the integral projection algorithm, grayscale accumulation processing is performed on the image to be processed in the vertical direction and the horizontal direction respectively to obtain a horizontal integral projection image and a vertical integral projection image; wherein the width of the horizontal integral projection image represents the width of the image to be processed, and the height of the horizontal integral projection image represents the result of grayscale accumulation processing of the grayscale corresponding to multiple length values ​​corresponding to each width value; the width of the vertical integral projection image represents the height of the image to be processed, and the height of the vertical integral projection image represents the result of grayscale accumulation processing of the grayscale corresponding to multiple width values ​​corresponding to each height value;

[0172] Acquire M peaks in the horizontal integrated projection image, and acquire M width values ​​corresponding to the M peaks in the image to be processed based on the width values ​​of the M peaks in the horizontal integrated projection image;

[0173] Acquire P peaks in the vertical integral projection image, and acquire P height values ​​corresponding to the P peaks in the image to be processed based on the height values ​​of the P peaks in the vertical integral projection image;

[0174] Arrange and combine the M width values ​​and the P height values ​​to obtain N position information, each position information corresponding to a center position of a solder joint domain;

[0175] The position information of N solder joint domains is determined based on the N position information and solder joint domain attribute information, wherein the solder joint domain attribute information is used to indicate the shape and size of a solder joint domain.

[0176] In one embodiment, the processor 901 performs the following steps when performing region division processing on the image to be processed according to the position information of the N welding point domains and the image region attribute information:

[0177] The image to be processed is preprocessed to obtain an enhanced image; and the enhanced image is divided into regions according to the position information of the N welding point regions and the image region attribute information.

[0178] In one embodiment, the processor 901 performs the following steps when preprocessing the image to be processed to obtain an enhanced image:

[0179] The image to be processed is divided into a plurality of image blocks, and each image block is subjected to a histogram equalization process to obtain an intermediate image; and the intermediate image is subjected to a bilinear interpolation process to obtain an enhanced image.

[0180] In one embodiment, the processor 901 performs the following steps when performing pre-fault identification on the target battery assembly based on the image difference information:

[0181] If there are a target number of image difference information satisfying the fault existence condition in the image difference information set, it is determined that the target battery assembly has a preset fault.

[0182] In one embodiment, the processor 901 performs the following steps when determining the image difference information set according to the N image regions:

[0183] Calculate the grayscale histogram corresponding to each of the N image areas; obtain a histogram distance calculation rule, and determine the distance between the grayscale histograms corresponding to every two adjacent image areas according to the histogram distance calculation rule; store the distance between the grayscale histograms corresponding to every two adjacent image areas as image difference information between every two adjacent image areas in the image difference information set.

[0184] In one embodiment, any image difference information meeting the fault existence condition means that any image difference information is greater than a distance threshold.

[0185] In one embodiment, the processor 901 performs the following steps when performing fault identification on the target battery assembly based on the image difference information:

[0186] If it is determined based on the image difference information set that the target battery assembly has a preset fault, determining a target image area set from the N image areas based on the image difference information set;

[0187] Among the N welding points included in the target battery assembly, welding points corresponding to welding point domains in each target image area in the target image area set are determined as welding points with preset faults.

[0188] In one embodiment, when determining the target image region from the N image regions based on the image difference information, the processor 901 performs the following steps:

[0189] A target number of target image difference information satisfying a fault existence condition is obtained from the image difference information; two image regions associated with each target image difference information are obtained, wherein the two image regions associated with any target image difference information are two adjacent image regions in the image to be processed, and the image difference information between the two image regions associated with any target image difference information is equal to the any target image difference information; a target image region is determined from the two image regions associated with each target image difference information based on the grayscale mean corresponding to the two image regions associated with each target image difference distance, and is stored in a target image region set.

[0190] In one embodiment, when determining the target image region from the N image regions based on the image difference information, the processor 901 performs the following steps:

[0191] A plurality of image difference information corresponding to each image region is determined, wherein the plurality of image difference information corresponding to any image region includes image difference information between the any image region and a plurality of image regions adjacent to the any image region; if, among the plurality of image difference information corresponding to the any image region, the number of image difference information satisfying a fault existence condition and the total number of the plurality of image difference information corresponding to the any image region satisfy a preset ratio, the any image region is added as a target image region to the target image region set.

[0192] In one embodiment, when determining the target image region from the N image regions based on the image difference information, the processor 901 performs the following steps:

[0193] A target number of target image difference information satisfying a fault existence condition is obtained from the image difference information; two image regions associated with each target image difference information are obtained, wherein the two image regions associated with any target image difference information are two adjacent image regions in the image to be processed, and the image difference information between the two image regions associated with any target image difference information is equal to the any target image difference information; and an image region whose grayscale mean is less than a grayscale mean threshold among the image regions associated with the multiple target image difference information is determined as a target image region.

[0194] In an embodiment of the present invention, when it is necessary to identify the fault of the target battery assembly, an image to be processed corresponding to the target battery assembly is obtained, the target battery assembly includes N welding points inside, and the image to be processed includes N welding point domains, and the N welding point domains correspond to the N welding points one by one; further, the image to be processed is divided according to the N welding point domains to obtain N image areas, one image area includes a welding point domain, and any image area and the welding point domain included in any image area have the same center; then the image difference information between every two adjacent image areas in the N image areas is determined and stored in the image difference information set. Then, the target battery assembly is identified for fault based on the image difference information set. Since there may be abnormal image difference information between two or more image areas in the image corresponding to the faulty battery assembly, on the contrary, the image difference information set can be used to more accurately identify whether the target battery assembly has a fault.

[0195] The embodiment of the present invention provides a computer program product or a computer program, which is in a computer storage medium. A processor of an image processing device reads the computer program from the computer storage medium, and the processor executes the computer program, so that the image processing device performs the above-mentioned Figure 3 or Figure 6 The computer storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0196] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present 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. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. An image processing method, It is characterized in that include: Acquire an image to be processed corresponding to a target battery assembly, wherein the target battery assembly includes N welding points, each welding point is mapped to a welding point domain in the image to be processed, and N is an integer greater than or equal to 1; Performing welding point domain recognition on the image to be processed to obtain position information of N welding point domains; Acquire image region attribute information, where the image region attribute information is used to indicate shape information and size information of the image region; Performing region division processing on the image to be processed according to the position information of the N soldering point domains and the image region attribute information to obtain N image regions, each image region includes a soldering point domain, and any image region and the soldering point domain included in any image region have the same center; Determine an image difference information set according to the N image regions, wherein the image difference information set includes image difference information between every two adjacent image regions among the N image regions; the image difference information between any two adjacent image regions includes a distance between grayscale histograms corresponding to the any two adjacent image regions, or a difference between grayscale means of the any two adjacent image regions; If there are a target number of image difference information satisfying the fault existence condition in the image difference information set, it is determined that the target battery assembly has a preset fault.

2. The method according to claim 1, It is characterized in that The step of performing solder joint domain recognition on the image to be processed to obtain position information of N solder joint domains includes: Based on the integral projection algorithm, grayscale accumulation processing is performed on the image to be processed in the vertical direction and the horizontal direction respectively to obtain a horizontal integral projection image and a vertical integral projection image; wherein the width of the horizontal integral projection image represents the width of the image to be processed, and the height of the horizontal integral projection image represents the result of grayscale accumulation processing of grayscales corresponding to multiple length values ​​corresponding to each width value; the width of the vertical integral projection image represents the height of the image to be processed, and the height of the vertical integral projection image represents the result of grayscale accumulation processing of grayscales corresponding to multiple width values ​​corresponding to each height value; Acquire M peaks in the horizontal integrated projection image, and acquire M width values ​​corresponding to the M peaks in the image to be processed based on the width values ​​of the M peaks in the horizontal integrated projection image; Acquire P peaks in the vertical integral projection image, and acquire P height values ​​corresponding to the P peaks in the image to be processed based on the height values ​​of the P peaks in the vertical integral projection image; Arrange and combine the M width values ​​and the P height values ​​to obtain N position information, each position information corresponding to a center position of a solder joint domain; The position information of N solder joint domains is determined based on the N position information and solder joint domain attribute information, wherein the solder joint domain attribute information is used to indicate the shape and size of a solder joint domain.

3. The method according to claim 1, It is characterized in that The performing region division processing on the image to be processed according to the position information of the N welding point domains and the image region attribute information includes: Preprocessing the image to be processed to obtain an enhanced image; The enhanced image is subjected to region division processing according to the position information of the N welding point domains and the image region attribute information.

4. The method according to claim 3, It is characterized in that The preprocessing of the image to be processed to obtain an enhanced image includes: Dividing the image to be processed into a plurality of image blocks, and performing histogram equalization processing on each image block respectively to obtain an intermediate image; A bilinear interpolation process is performed on the intermediate image to obtain an enhanced image.

5. The method according to claim 1, It is characterized in that The determining of the image difference information set according to the N image regions comprises: Calculating a grayscale histogram corresponding to each of the N image regions; Obtaining a histogram distance calculation rule, and determining the distance between grayscale histograms corresponding to every two adjacent image regions according to the histogram distance calculation rule; The distance between the grayscale histograms corresponding to each two adjacent image regions is stored in the image difference information set as the image difference information between each two adjacent image regions.

6. The method according to claim 5, It is characterized in that Any image difference information satisfies the fault existence condition means that any image difference information is greater than a distance threshold.

7. The method according to any one of claims 1, 5 and 6, It is characterized in that The method further comprises: If it is determined based on the image difference information set that the target battery assembly has a preset fault, determining a target image area set from the N image areas based on the image difference information set; Among the N welding points included in the target battery assembly, welding points corresponding to welding point domains in each target image area in the target image area set are determined as welding points with preset faults.

8. The method according to claim 7, It is characterized in that The determining a target image region set from the N image regions based on the image difference information set comprises: Acquire a target number of target image difference information satisfying a fault existence condition from the image difference information set; Acquire two image regions related to each target image difference information, wherein the two image regions related to any target image difference information are two adjacent image regions in the image to be processed, and image difference information between the two image regions related to any target image difference information is equal to the any target image difference information; Based on the grayscale mean values ​​corresponding to the two image regions related to the difference distance of each target image, a target image region is determined from the two image regions related to the difference information of each target image, and is stored in the target image region set.

9. The method according to claim 7, It is characterized in that The determining a target image region set from the N image regions based on the image difference information set comprises: Determine a plurality of image difference information corresponding to each image region, wherein the plurality of image difference information corresponding to any image region includes image difference information between the any image region and a plurality of image regions adjacent to the any image region; If, among the multiple image difference information corresponding to any one of the image regions, the number of image difference information satisfying the fault existence condition and the total number of the multiple image difference information corresponding to the any one of the image regions satisfy a preset ratio, the any one of the image regions is added as a target image region to the target image region set.

10. The method according to claim 7, It is characterized in that The determining a target image region set from the N image regions based on the image difference information set comprises: Acquire a target number of target image difference information satisfying a fault existence condition from the image difference information set; Acquire two image regions related to each target image difference information, wherein the two image regions related to any target image difference information are two adjacent image regions in the image to be processed, and image difference information between the two image regions related to any target image difference information is equal to the any target image difference information; Among the image regions related to the difference information of the multiple target images, the image region whose grayscale mean is less than the grayscale mean threshold is determined as the target image region and added into the target image region set.

11. An image processing device, It is characterized in that include: An acquisition unit, configured to acquire an image to be processed corresponding to a target battery assembly, wherein the target battery assembly includes N welding points, each welding point is mapped to a welding point domain in the image to be processed, and N is an integer greater than or equal to 1; A determination unit, configured to perform welding point domain recognition on the image to be processed and obtain position information of N welding point domains; The determining unit is further used to obtain image region attribute information, where the image region attribute information is used to indicate shape information and size information of the image region; The determining unit is further configured to perform region division processing on the image to be processed according to the position information of the N soldering point domains and the image region attribute information to obtain N image regions, wherein each image region includes a soldering point domain, and any image region and the soldering point domain included in any image region have the same center; The determining unit is further configured to determine an image difference information set according to the N image regions, wherein the image difference information set includes image difference information between every two adjacent image regions among the N image regions; the image difference information between any two adjacent image regions includes a distance between grayscale histograms corresponding to the any two adjacent image regions, or a difference between grayscale means of the any two adjacent image regions; The identification unit is used to determine that the target battery assembly has a preset fault if there are a target number of image difference information satisfying the fault existence condition in the image difference information set.

12. An image processing device, It is characterized in that include: a processor adapted to implement one or more computer programs; and, A computer storage medium storing one or more computer programs, wherein the one or more computer programs are suitable for being loaded by the processor and executing the image processing method according to any one of claims 1 to 10.

13. A computer storage medium, It is characterized in that The computer storage medium stores a computer program, and when the computer program is executed by a processor, it is used to execute the image processing method according to any one of claims 1 to 10.

14. A computer program product, It is characterized in that The computer program product comprises a computer program, and the computer program is executed by a processor to implement the image processing method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Multilayer multipass welding track detecting device based on multi-vision information fusion and method thereof

    CN106990112A

  • Lead bonding welding spot defect positioning and classifying method

    CN110400285A

  • Marine typical artificial target recognition system and method for high-resolution remote sensing image

    CN111079596A

  • Image processing method and device, and storage medium

    CN111143589A

  • Periodic texture background defect label automatic labeling method and device, equipment and medium

    CN111739020A