Data processing method, device and system

By correcting the color matrix of photovoltaic cell modules and connecting area algorithms, the error detection and missed detection problems in mixed defect detection in the prior art are solved, and more accurate detection results are achieved.

CN113112445BActive Publication Date: 2024-11-29ALIBABA GROUP HOLDING LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010023538.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-01-09
Publication Date
2024-11-29
Estimated Expiration
2040-01-09

AI Technical Summary

Technical Problem

In the prior art, in industrial defect detection, especially in mixed defect detection of photovoltaic cell modules, false detection and missed detection are prone to problems, resulting in inaccurate detection results.

Method used

By obtaining the color matrix of the object to be detected and performing correction processing, a connecting area is established to reduce the interference of other defects on the background color, and smoothing the background color of the sub-object, thereby avoiding false detection and missed detection.

Benefits of technology

Accurate detection of the objects to be detected is achieved, the error detection and missed detection rates are reduced, and the accuracy of detection is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113112445B_ABST
    Figure CN113112445B_ABST
Patent Text Reader

Abstract

The present application discloses a data processing method, device and system. The method includes: obtaining a first color matrix of an object to be detected, wherein the object to be detected includes multiple sub-objects, and the first color matrix represents the colors and positional relationships of the multiple sub-objects; performing correction processing on the first color matrix to obtain a second color matrix, wherein the correction processing includes establishing a connected area based on the positional relationship, and correcting the first color matrix through the connected area; detecting the object to be detected based on at least the second color matrix, and identifying normal areas or abnormal areas in the object to be detected. The present application solves the technical problems of false detection and missed detection in the prior art that uses a color mean solution to detect an object to be detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of component detection, and in particular, to a data processing method, device and system. Background Art

[0002] In industrial defect detection systems, it is necessary to detect the defect location and determine the severity of the defect, so that manufacturers can flexibly handle it according to quality requirements, such as product grading or repair. In the photovoltaic industry, multiple cells can be organized into battery modules in a certain order (for example, 6*10, 6*12, 6*20, 6*24). However, due to different manufacturing levels, the power-on efficiency of different cells may be different, resulting in inconsistent power-on efficiency of the battery module during the overall power-on process, which in turn shows mixed-file defects under the infrared camera. Figure 1 The image diagram of the 2*24 battery assembly shown in Figure 1 Each box in the figure represents a battery cell, and different symbols are used to represent the background colors of different mixed levels of the battery cells, wherein the brightness of the background color of the battery cell labeled 0 (normal brightness) is higher than the brightness of the background color of the battery cell labeled 1, the brightness of the background color of the battery cell labeled 1 is higher than the brightness of the background color of the battery cell labeled 2, the brightness of the background color of the battery cell labeled 2 is higher than the brightness of the background color of the battery cell labeled 3, and the brightness of the background color of the battery cell labeled 3 is higher than the brightness of the background color of the battery cell labeled 4. As shown in Figure 1 In the figure, the background color of the battery cell 11 at the 13th-14th column of the 2nd row is a bright mixed color, the background color of the battery cell 22 at the 15th-16th column of the 2nd row is a dark mixed color, and the background color of the battery cell 33 at the 20th-24th column of the 2nd row is a dark mixed color, and the severity of the brightness being lower than the normal brightness is higher than the mixed color of the battery cell 22 at the 15th-16th column of the 2nd row.

[0003] Since the mixed-file defect is a combined defect, the contrast of the surrounding pixels needs to be considered when judging the defect. In the process of detecting mixed-file defects, the existing technology only has a simple color difference comparison. Specifically, the color mean of each battery cell and the color mean of the entire battery assembly are first extracted, and then the difference between the background color of the battery cell and the background color of the assembly is used to determine whether mixed-file occurs. If the color mean of the battery cell is significantly lower than the color mean of the battery assembly, it is dark mixed-file, and if the color mean of the battery cell is significantly higher than the color mean of the battery assembly, it is light mixed-file.

[0004] However, this method is susceptible to outliers caused by defects in the cell itself, e.g. Figure 2The image diagram of the battery assembly shown in the figure shows that the background colors of the cells on the left and right sides of the battery assembly are similar. However, due to the large black defect on the cell on the right, if the average value is used, the overall color of the battery assembly will be darker, resulting in false detection. In addition, since the background color of each cell needs to be calculated and judged by the deviation from the overall background color, even if each cell is similar to the visual background color, there will still be deviations, and when setting the threshold in mixed-file detection, some positions may be missed. For example, Figure 3 In the image diagram of the battery assembly shown, the background color of the battery cell 31 at the 5th row and 7th column is darker than the background color of the battery cell 30 on the left, and is comparable to the background color of the battery cell 32 at the 5th row and 8th to 12th columns, and both are dark mixed. However, since the background color of the battery cell 31 is lighter than that of the battery cell 32, if a threshold is set and card control is performed, the battery cell 31 may be missed.

[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0006] The embodiments of the present application provide a data processing method, device and system to at least solve the technical problems of false detection and missed detection in the prior art when using a color mean value scheme to detect an object to be detected.

[0007] According to one aspect of an embodiment of the present application, a data processing method is provided, including: obtaining a first color matrix of an object to be detected, wherein the object to be detected includes multiple sub-objects, and the first color matrix represents the colors and positional relationships of the multiple sub-objects; performing correction processing on the first color matrix to obtain a second color matrix, wherein the correction processing includes establishing a connected area based on the positional relationship, and correcting the first color matrix through the connected area; and detecting the object to be detected based at least on the second color matrix, and identifying normal areas or abnormal areas in the object to be detected.

[0008] According to another aspect of an embodiment of the present application, a data processing device is also provided, including: an acquisition module, used to acquire a first color matrix of an object to be detected, wherein the object to be detected includes multiple sub-objects, and the first color matrix represents the colors and positional relationships of the multiple sub-objects; a processing module, used to perform correction processing on the first color matrix to obtain a second color matrix, wherein the correction processing includes establishing a connected area based on the positional relationship, and correcting the first color matrix through the connected area; a detection module, used to detect the object to be detected based on at least the second color matrix, and identify normal areas or abnormal areas in the object to be detected.

[0009] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the above-mentioned data processing method.

[0010] According to another aspect of an embodiment of the present application, a processor is further provided, the processor being used to run a program, wherein the above-mentioned data processing method is executed when the program is run.

[0011] According to another aspect of an embodiment of the present application, a data processing system is also provided, including: an acquisition unit, used to obtain a first color matrix of an object to be detected, wherein the object to be detected includes multiple sub-objects, and the first color matrix represents the colors and positional relationships of the multiple sub-objects; a processing unit, used to perform correction processing on the first color matrix to obtain a second color matrix, and to detect the object to be detected based at least on the second color matrix, and identify normal areas or abnormal areas in the object to be detected, wherein the correction processing includes establishing connected areas based on the positional relationship, and correcting the first color matrix through the connected areas; a display unit, used to display normal areas and / or abnormal areas.

[0012] In an embodiment of the present application, a method of correcting the color matrix of the object to be detected is adopted. After obtaining the first color matrix of the object to be detected, the second color matrix is ​​obtained by correcting the first color matrix. Finally, the object to be detected is detected based on the second color matrix to identify the normal area or abnormal area in the object to be detected.

[0013] In the above process, the first color matrix of the object to be detected is obtained by obtaining the color and position relationship of each sub-object, thereby avoiding the interference of other defects on the background color and reducing the false detection rate of the object to be detected. In addition, by correcting the first color matrix based on the connected region algorithm, the background color of the sub-object can be smoothed, and the background color value of the area associated with the sub-object can be obtained, thereby avoiding the problem of missed detection in the detection process of the object to be detected.

[0014] It can be seen that the solution provided in the present application achieves the purpose of accurately detecting the object to be detected, thereby realizing the technical effect of reducing the false detection rate and missed detection rate of the object to be detected, and further solving the technical problems of false detection and missed detection that exist in the prior art when using the color mean scheme to detect the object to be detected. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0016] Figure 1is a schematic diagram of a battery assembly according to the prior art;

[0017] Figure 2 is a schematic diagram of a battery assembly according to the prior art;

[0018] Figure 3 is a schematic diagram of a battery assembly according to the prior art;

[0019] Figure 4 is a hardware structure block diagram of an optional computing device for implementing a data processing method according to an embodiment of the present application;

[0020] FIG5( a ) is a flow chart of a data processing method according to an embodiment of the present application;

[0021] FIG5( b) is an application block diagram of an optional data processing method according to an embodiment of the present application;

[0022] Figure 6 is a schematic diagram of an optional battery assembly image according to an embodiment of the present application;

[0023] Figure 7 is a flowchart of an optional data processing method according to an embodiment of the present application;

[0024] Figure 8 is a schematic diagram of a histogram corresponding to an optional battery cell image according to an embodiment of the present application;

[0025] Fig. 9 is a schematic diagram of an optional battery assembly image according to an embodiment of the present application;

[0026] Fig.10 is a schematic diagram of a data processing device according to an embodiment of the present application;

[0027] Fig.11 is a schematic diagram of a data processing system according to an embodiment of the present application; and

[0028] Fig.12 It is a structural block diagram of a computing device according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:

[0032] Mixed-file detection refers to a method in which, when testing a whole system that contains multiple identical parts, if a certain part is tested separately, the test results are all normal. Therefore, the whole system needs to be tested to determine whether a certain part of the whole system is abnormal. For example, when testing a battery assembly, the battery assembly includes multiple battery cells. If only a single battery cell is tested, the single battery cell is normal. However, since the power-on efficiency of each battery cell is different, the entire battery assembly needs to be tested as a whole to determine whether each battery cell is normal.

[0033] Example 1

[0034] According to an embodiment of the present application, a data processing method embodiment is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0035] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computing device or a similar computing device. Figure 4 FIG. 1 shows a hardware structure block diagram of a computing device (or mobile device) for implementing a data processing method. Figure 4As shown, the computing device 10 (or mobile device 10) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (BUS) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 4 The structure shown is for illustration only and does not limit the structure of the electronic device. Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown.

[0036] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computing device 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0037] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the data processing method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned data processing method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computing device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0038] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computing device 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0039] The display may be, for example, a touch screen liquid crystal display (LCD) that may enable a user to interact with a user interface of computing device 10 (or mobile device).

[0040] It should be noted that, in some optional embodiments, the above Figure 4 The computer device (or mobile device) shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 4 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the above-described computer device (or mobile device).

[0041] Under the above operating environment, the present application provides a data processing method as shown in Figure 5(a), wherein the mixed-file detection system can be used as the execution subject of this embodiment. Optionally, Figure 5(b) shows an optional application block diagram of the data processing method based on Figure 5(a), wherein, in Figure 5(b), the sub-object is the battery cell image in the battery assembly image, and the object to be detected is the battery assembly image. Specifically, the user can input the battery assembly image into the processing unit of the mixed-file detection system, wherein the processing unit includes a preliminary calculation module, a correction module and a detection module. The preliminary calculation module in the processing unit performs preliminary processing on the battery assembly image to obtain a first color matrix of the battery cell image, wherein the preliminary calculation module can use histogram statistics to obtain the color matrix of the battery cell image to solve the influence of outliers on the detection results.

[0042] Then, the correction module obtains the first color matrix and the positional relationship of multiple cell images to correct the first color matrix of the cell images, obtains the second color matrix to smooth the background color of the cell images, and obtains the background color value of the area associated with the cell images, thereby avoiding the problem of missed detection during the battery component image detection process.

[0043] Finally, the correction module inputs the second color matrix into the detection module, and the detection module performs mixed-file detection on the cell image based on the second color matrix value, and outputs the detection result of the mixed-file detection. Among them, the detection module can perform mixed-file detection by performing overall detection on the battery assembly image, which can effectively detect abnormal cells in the battery assembly, avoiding the problems of false detection and missed detection in the prior art.

[0044] In addition, as can be seen from FIG5(b), the processing unit can also output the detection results to the display unit. After the display unit receives the detection results, the user can intuitively see the detection results of the battery assembly through the display unit. Optionally, the detection module can send the location information of the abnormal battery cells in the battery assembly to the display unit. The display unit can display the location information of the abnormal battery cells in the form of text or table, or directly highlight the abnormal battery cells in the battery cell image in the battery assembly image. In addition, in FIG5(b), the display unit and the processing unit are integrated in the same computing device. Optionally, in actual applications, the display unit and the processing unit can be set in different computing devices respectively.

[0045] Optionally, as shown in FIG5(a), the method provided in the present application specifically includes the following steps:

[0046] Step S502: obtaining a first color matrix of the object to be detected, wherein the object to be detected includes a plurality of sub-objects, and the first color matrix represents the colors and positional relationships of the plurality of sub-objects.

[0047] In step S502, the object to be detected is a battery assembly image, and the multiple sub-objects are battery cell images in the battery assembly image. The positional relationship is the position information of the battery cell image in the battery assembly image, wherein the battery assembly image may include multiple battery cell images, that is, the object to be detected includes multiple sub-objects. Optionally, the mixed-file detection system has an acquisition unit (for example, a camera), which can acquire a battery assembly image of a battery assembly, wherein the battery assembly includes multiple battery cells. In addition, the mixed-file detection system also has a processing unit, which can receive the battery assembly image acquired by the acquisition unit, and perform image segmentation on the battery assembly image according to the boundaries of the battery cells, and divide the battery assembly image into multiple battery cell images, wherein each battery cell image corresponds to a battery cell, such as Figure 6 In the battery assembly image shown, A represents the battery assembly and B represents the battery cell. Further, the processor performs histogram statistics on each battery cell image to obtain the background color value of each battery cell image. Figure 7 A flowchart of an optional data processing method is shown in Figure 7It can be seen that after the mixed-file detection system performs segmentation processing on the battery assembly image to be detected, it obtains multiple battery cell images, and then uses histogram statistics to count the background color value of each battery cell image to obtain statistical results, and obtains a first color matrix based on the statistical results, wherein the background color value of each battery cell image represents the value at the (x, y) position in the first color matrix, and (x, y) represents the position of the battery cell image in the battery assembly image. Optionally, the above statistical results characterize the distribution of background color values ​​of battery cells in the battery assembly. For example, for a certain battery assembly image, the corresponding statistical result may be that the number of battery cells whose background color is in the color interval [a, b] is S1, wherein a and b represent the upper limit and lower limit of a certain color interval, respectively. In addition, since the histogram can intuitively display the distribution of background color values ​​of the battery assembly image, the above statistical results can also be displayed in the form of a histogram.

[0048] It should also be noted that the background color value of each sub-object can be counted by using a histogram statistical method, which can effectively eliminate the influence of outliers and reduce the false detection rate.

[0049] Step S504, performing correction processing on the first color matrix to obtain a second color matrix, wherein the correction processing includes establishing a connected region based on the positional relationship, and correcting the first color matrix through the connected region.

[0050] In step S504, the positional relationship may be a positional relationship between a plurality of sub-objects, wherein the positional relationship between the plurality of sub-objects is determined by positional information of the plurality of sub-objects, and the positional information of the sub-objects is positional information of the cell image in the battery assembly image, such as Figure 6 In the example, the position of the cell image B in the battery assembly image A is the 3rd row and the 2nd column. In addition, after obtaining the first color matrix, the mixed-file detection system uses the connected region algorithm to correct the first color matrix. Optionally, as Figure 7 As shown, the mixed-grade detection system corrects the first color matrix through the connected region algorithm. It should be noted that the first color matrix is ​​used to smooth the background color of each battery cell, and the areas with similar background colors are merged, so that adjacent areas with similar colors can be pulled to the same background color, thereby avoiding the problem of missed detection caused by certain areas being controlled due to threshold factors, and reducing the missed detection rate of battery component detection.

[0051] Step S506: Detect the object to be detected based on at least the second color matrix, and identify a normal area or an abnormal area in the object to be detected.

[0052] In step S506, the detection of the object to be detected based at least on the second color matrix may be mixed-grade detection of the object to be detected based at least on the second color matrix. It should be noted that if only a single battery cell is detected, the detection results obtained may all be normal results. However, since the power-on efficiency of different battery cells is different, the solution of individually identifying whether each battery cell is abnormal for mixed-grade detection has the problem of false detection and missed detection. It is necessary to perform an overall detection on the battery assembly to be detected in order to detect the abnormal battery cell, that is, in the present application, the entire battery assembly to be detected is subjected to mixed-grade detection.

[0053] Optional, such as Figure 7 As shown, after the background color value of each battery cell image is corrected, the deviation between the background color value of each battery cell and the background color value of the entire battery assembly image to be inspected is calculated, and the final result of each battery cell image is determined based on the deviation. Finally, the normal area and the abnormal area in the object to be inspected are determined based on the final result, wherein the final result represents the probability of mixed files for each battery cell.

[0054] Based on the scheme defined in the above steps S502 to S506, it can be known that, after obtaining the first color matrix of the object to be detected, the color matrix is ​​corrected, and the second color matrix is ​​obtained by correcting the first color matrix. Finally, the object to be detected is detected based on the second color matrix to identify the normal area or abnormal area in the object to be detected.

[0055] It is easy to notice that by obtaining the color and position relationship of each sub-object to obtain the first color matrix of the object to be detected, the interference of other defects on the background color is avoided, and the false detection rate of the object to be detected is reduced. In addition, by correcting the first color matrix based on the connected region algorithm, the background color of the sub-object can be smoothed, and the background color value of the area associated with the sub-object can be obtained, thereby avoiding the problem of missed detection in the detection process of the object to be detected.

[0056] It can be seen that the solution provided in the present application achieves the purpose of accurately detecting the object to be detected, thereby realizing the technical effect of reducing the false detection rate and missed detection rate of the object to be detected, and further solving the technical problems of false detection and missed detection that exist in the prior art when using the color mean scheme to detect the object to be detected.

[0057] In an optional embodiment, the mixed-file detection system can obtain the first color matrix of the object to be detected by a histogram statistical method. Specifically, the mixed-file detection system first divides the pixel distribution interval of each sub-object in the multiple sub-objects into multiple pixel sub-intervals, and then uses a histogram statistical method to respectively calculate the number of pixel points falling into each pixel sub-interval in the multiple pixel sub-intervals, and finally determines the colors of the multiple sub-objects according to the pixel sub-interval with the largest number of pixel points, and finally uses the colors and position relationship of the multiple sub-objects to construct the first color matrix.

[0058] Optionally, the object to be detected is still taken as an example of a battery cell image in a battery assembly image. Figure 8 A schematic diagram of a histogram corresponding to a battery cell image is shown, namely Figure 8 It represents the distribution of pixels corresponding to a certain cell image, where the horizontal axis represents the pixel distribution interval and the vertical axis represents the number of pixels falling into the corresponding pixel sub-interval. Optionally, the horizontal axis can be divided into 32 pixel sub-intervals, each pixel sub-interval corresponding to 8 pixels, for example, the first pixel sub-interval is [0,7], and the second pixel sub-interval is [8,15]. After determining the pixel distribution of the cell image, the mixed-file detection system uses the color value corresponding to the pixel sub-interval with the most pixel data as the color corresponding to the cell image. For example, Figure 8 Among them, the number of pixels corresponding to the pixel subinterval [160,167] is the largest, and the color value corresponding to the pixel subinterval is used as the color of the cell image. Similarly, the above method is still used for other cell images to obtain the color of each cell image.

[0059] It should be noted that in the above process, after determining the pixel sub-interval with the largest number of pixels, the mean pixel value corresponding to the pixel sub-interval can be used as the color of the sub-object. For example, when the pixel sub-interval with the largest number of pixels is [160,167], the corresponding color can be 163.5.

[0060] In an optional embodiment, the mixed-file detection system may determine the pixel sub-interval with the largest number of pixel points by the following steps:

[0061] An acquisition step of acquiring the number of first pixel points falling into the current pixel subinterval, the number of second pixel points falling into a previous pixel subinterval adjacent to the current pixel subinterval, and the number of third pixel points falling into a subsequent pixel subinterval adjacent to the current pixel subinterval;

[0062] A first calculation step is to calculate a first product result of the first number of pixels and a first proportional coefficient, a second product result of the second number of pixels and a second proportional coefficient, and a third product result of the third number of pixels and a third proportional coefficient, and to obtain a sum of the first product result, the second product result, and the third product result;

[0063] In the second calculation step, the sum is set as the input parameter of the maximum independent variable point set function to obtain the output result;

[0064] The judging step is to judge whether the calculation of the plurality of pixel subintervals has been completed. If not, the step returns to the obtaining step. If yes, the pixel subinterval with the largest number of pixels is determined based on the product of the output result and the interval length of the pixel subinterval.

[0065] Optionally, the following formula for determining the pixel subinterval with the largest number of pixels can be obtained through the above-mentioned acquisition step, the first calculation step, the second calculation step and the judgment step:

[0066] 8*argmax[f(i-1)×0.25+f(i)×0.5+f(i+1)×0.25]

[0067] In the above formula, i is the index of the pixel subinterval, for example, the index corresponding to the pixel subinterval [160,167] can be 20; f(i) is the number of pixels falling into the pixel subinterval with index i. In addition, in the above formula, the first number of pixels is f(i), the second number of pixels is f(i-1), and the third number of pixels is f(i+1). The corresponding first proportional coefficient is 0.5, the second proportional coefficient is 0.25, and the third proportional coefficient is 0.25. The interval length of the pixel subinterval is 8.

[0068] It should be noted that the first proportional coefficient, the second proportional coefficient and the third proportional coefficient can be set according to actual applications and are not limited to the values ​​listed in the above formula. In addition, the interval length of each pixel sub-interval is the same, which can be 8 or other values. The specific values ​​can be set according to actual applications and are not listed here one by one.

[0069] In an optional embodiment, in order to improve the accuracy of mixed-speed detection, the mixed-speed detection system needs to eliminate the influence of some extreme values, for example, Figure 2Specifically, after obtaining the first color matrix of the object to be detected, the mixed-file detection system calculates the first average value and the first standard deviation of the first color matrix, and calculates the difference between the first background color value of each sub-object in the multiple sub-objects and the first average value, and finally, based on the comparison relationship between the difference value and the first standard deviation to meet the preset conditions, the first part of the sub-objects are filtered out from the object to be detected to obtain the remaining second part of the sub-objects, and the second average value and the second standard deviation of the remaining second part of the sub-objects are calculated.

[0070] It should be noted that, taking the sub-object as a cell image in a battery assembly image as an example, the mixed-file detection system can construct a first color matrix of the battery assembly image based on the background color value of each cell and the corresponding position information, wherein the first color matrix can be expressed as follows:

[0071]

[0072] In the above formula, val n,m It represents the background color value (ie, the first background color value) corresponding to the battery cell at the nth row and the mth column in the battery assembly to be detected.

[0073] Furthermore, by calculating the mean and standard deviation of the above matrix, the first mean value mean1 and the first standard deviation std1 of the background color matrix of the battery assembly image to be detected can be obtained, and the difference s between the first background color value and the first mean value of each battery cell image can be calculated, that is, s=val n,m -mean1, and finally compare the difference s with the first standard deviation std1, and remove the cell images corresponding to the extreme values ​​in the battery assembly image to be detected according to the comparison result to obtain the remaining cell images. Figure 6 In the battery assembly image shown, the cell image C at the 2nd row and 1st column is a black defect, which does not belong to the mixed file category and needs to be eliminated. Finally, the mixed file detection system calculates the second average value mean of the remaining cell images val and std val .

[0074] In addition, the comparison relationship between the difference value and the first standard deviation satisfies the preset condition including: the ratio between the difference value and the first standard deviation is greater than or equal to a preset integer multiple. The preset integer multiple may be 3, that is, the cell images whose ratio between s and std1 is greater than or equal to 3 are eliminated, thereby avoiding the influence of extreme values.

[0075] Furthermore, the mixed-file detection system can correct the first color matrix through a connected region algorithm. Specifically, the mixed-file detection system calculates the background color difference between each sub-object in the multiple sub-objects and at least one adjacent sub-object based on the positional relationship to obtain a calculation result, wherein if it is determined according to the calculation result that the background color difference is less than a preset threshold, the currently calculated sub-object and at least one adjacent sub-object are merged to obtain a connected region, and the background color value in the connected region that differs the most from the second average value is set as the second background color value of each sub-object in the connected region to obtain a second color matrix.

[0076] It should be noted that a connected region refers to an image region composed of pixels with the same or similar pixel values ​​and adjacent locations. Fig. 9 In the battery assembly image shown in FIG. 1 , if the difference between the battery cell image 90 in the 13th column of the 1st row and the battery cell image 91 in the 14th column of the 1st row is less than a preset threshold (e.g., 8), the battery cell image 90 and the battery cell image 91 are merged to obtain a connected area (e.g., Fig. 9 In addition, Fig. 9 It can be seen that Fig. 9 The five cells corresponding to the dotted box (such as Fig. 9 The background color values ​​of 90, 91, 92, 93 and 94 in the figure are all lower than the preset threshold. After merging the five battery cells using the above method, four connected areas can be obtained, such as Fig. 9 The four dashed boxes shown (such as Fig. 9 0, 92, 93 and 94 in the figure).

[0077] In an optional embodiment, after the connected area is obtained, the object to be detected can be segmented based on the connected area. For example, Fig. 9 The four connected regions in are cut out from the object to be detected. Optionally, all the cut out connected regions can be classified to obtain classification results, and then the number of sub-objects included in each category can be counted according to the classification results, so as to obtain the proportion of each category in the entire object to be detected, and the probability of abnormality of the object to be detected can be determined according to the proportion. For example, Fig. 9 The four connected regions in the image have the same or similar pixel values. After cutting the four connected regions out from the object to be detected, the four connected regions can be classified into one category, and then the probability that the category corresponding to the four connected regions accounts for the entire object to be detected can be determined according to the number of sub-objects contained in the four connected regions and the total number of sub-objects contained in the object to be detected.

[0078] In addition, the background color value of the sub-object in the connected area that differs greatly from the second average value is used as the background color value of the sub-object in the connected area to correct the background color value of the sub-object, and then the second color matrix is ​​obtained according to the corrected background color value.

[0079] It should be noted that the connected region algorithm is used to smooth the background color values ​​of the sub-objects and merge the areas with similar background colors, so that adjacent areas with similar colors can be pulled to the same background color, thus avoiding the problem of missed detection caused by certain areas being controlled due to threshold factors.

[0080] In addition, in industrial project inspection, it is not only necessary to qualitatively determine whether there are defects in the product to prevent defective products from leaving the workshop or the next production line, but also to detect the location and type of the defect and give a judgment on the severity, so as to quickly locate the defect and facilitate subsequent processing and repair.

[0081] In the present application, after the first color matrix is ​​corrected to obtain the second color matrix, the mixed-file detection system can perform mixed-file detection on the object to be detected based on the second color matrix. Specifically, the mixed-file detection system first calculates the difference between the second background color value and the second average value to obtain an intermediate result, and then calculates the ratio of the intermediate result to the second standard deviation to obtain a final result to determine a normal area or an abnormal area. Optionally, the final result is positively correlated with the probability of mixed-file in the object to be detected.

[0082] Specifically, the above process satisfies the following formula:

[0083]

[0084] In the above formula, score i,j represents the probability of mixed-grade battery cells in row i and column j, where score i,j The larger the value of , the greater the probability of bright or dark mixing. i,j It represents the second background color value obtained after the background color value of the cell image in the i-th row and the j-th column is corrected.

[0085] In an optional embodiment, after the probability of mixed file occurrence corresponding to the object to be detected is obtained, the probability of mixed file occurrence corresponding to all sub-objects can be constructed into a mixed file probability matrix, as shown in the following formula:

[0086]

[0087] By analyzing the value corresponding to each element in the matrix, the probability of mixed files for each sub-object can be determined. That is, the above matrix can be used to quickly determine the battery cells that are prone to mixed files and the locations of the battery cells.

[0088] From the above content, it can be seen that the present application adopts the histogram statistical method to obtain the color matrix of the cell image, thereby avoiding the interference of other defect abnormal values ​​on the background color value, thereby reducing the false alarm rate of battery component detection. In addition, the present application also adopts the connected region algorithm to smooth the background color of the cell image and obtain the background color value of the associated area, thereby avoiding the problem of missing reports in the battery component detection process.

[0089] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that the data processing method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0091] Example 2

[0092] According to an embodiment of the present application, a data processing device for implementing the above data processing method is also provided. Fig.10 As shown, the device 100 includes: an acquisition module 1001 , a processing module 1003 and a detection module 1005 .

[0093] Among them, the acquisition module 1001 is used to obtain a first color matrix of the object to be detected, wherein the object to be detected includes multiple sub-objects, and the first color matrix represents the colors and positional relationships of the multiple sub-objects; the processing module 1003 is used to perform correction processing on the first color matrix to obtain a second color matrix, wherein the correction processing includes establishing a connected area based on the positional relationship, and correcting the first color matrix through the connected area; the detection module 1005 is used to detect the object to be detected based on at least the second color matrix, and identify the normal area or abnormal area in the object to be detected.

[0094] It should be noted that the acquisition module 1001, the processing module 1003 and the detection module 1005 correspond to steps S502 to S506 in Example 1, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules, as part of the apparatus, can be run in the computing device 10 provided in Example 1.

[0095] Optionally, the object to be detected is a battery assembly image, the sub-object is a battery cell image in the battery assembly image, and the position information of the object to be detected is the position information of the battery cell image in the battery assembly image.

[0096] In an optional embodiment, the acquisition module includes: a division module, a first calculation module, a first determination module and a construction module. The division module is used to divide the pixel distribution interval of each sub-object in the multiple sub-objects into multiple pixel sub-intervals; the first calculation module is used to use a histogram statistical method to respectively calculate the number of pixels falling into each pixel sub-interval in the multiple pixel sub-intervals; the first determination module is used to determine the colors of the multiple sub-objects according to the pixel sub-interval with the largest number of pixels; the construction module is used to use the colors and positional relationships of the multiple sub-objects to construct a first color matrix.

[0097] In an optional embodiment, the first determination module includes: an acquisition step, acquiring a first number of pixel points falling into a current pixel sub-interval, a second number of pixel points falling into a previous pixel sub-interval adjacent to the current pixel sub-interval, and a third number of pixel points falling into a subsequent pixel sub-interval adjacent to the current pixel sub-interval; a first calculation step, calculating a first product result of the first number of pixel points and a first proportional coefficient, a second product result of the second number of pixel points and a second proportional coefficient, and a third product result of the third number of pixel points and a third proportional coefficient, and obtaining the sum of the first product result, the second product result, and the third product result; a second calculation step, setting the sum as an input parameter of a maximum independent variable point set function to obtain an output result; a judgment step, judging whether multiple pixel sub-intervals have been calculated, if not, returning to the acquisition step, if yes, determining the pixel sub-interval with the largest number of pixels based on the product result of the output result and the interval length of the pixel sub-interval.

[0098] In an optional embodiment, the data processing device further includes: a second calculation module, a third calculation module, a filtering module and a fourth calculation module. The second calculation module is used to calculate the first average value and the first standard deviation of the first color matrix of the object to be detected after obtaining the first color matrix of the object to be detected; the third calculation module is used to calculate the difference between the first background color value of each sub-object in the plurality of sub-objects and the first average value; the filtering module is used to filter the first part of the sub-objects from the object to be detected to obtain the remaining second part of the sub-objects according to the comparison relationship between the difference value and the first standard deviation to meet the preset condition; the fourth calculation module is used to calculate the second average value and the second standard deviation of the remaining second part of the sub-objects.

[0099] Optionally, the comparison relationship between the difference value and the first standard deviation satisfies a preset condition, including: a ratio between the difference value and the first standard deviation is greater than or equal to a preset integer multiple.

[0100] In an optional embodiment, the processing module includes: a fifth calculation module, a first processing module and a second processing module. The fifth calculation module is used to calculate the background color difference between each sub-object in the plurality of sub-objects and at least one adjacent sub-object based on the position relationship to obtain a calculation result; the first processing module is used to merge the currently calculated sub-object and at least one adjacent sub-object to obtain a connected area if the background color difference is determined to be less than a preset threshold according to the calculation result; the second processing module is used to set the background color value in the connected area that differs the most from the second average value as the second background color value of each sub-object in the connected area to obtain a second color matrix.

[0101] In an optional embodiment, the detection module includes: a sixth calculation module and a seventh calculation module. The sixth calculation module is used to calculate the difference between the second background color value and the second average value to obtain an intermediate result; the seventh calculation module is used to calculate the ratio of the intermediate result to the second standard deviation to obtain a final result to determine a normal area or an abnormal area.

[0102] In an optional embodiment, the detection module includes a second detection module, which is used to perform mixed-color detection on the object to be detected based on at least a second color matrix.

[0103] Example 3

[0104] According to an embodiment of the present application, a data processing system for implementing the above data processing method is also provided. Fig.11 As shown, the system includes: a collection unit 1101 , a processing unit 1103 and a display unit 1105 .

[0105] Among them, the acquisition unit is used to obtain a first color matrix of the object to be detected, wherein the object to be detected includes multiple sub-objects, and the first color matrix represents the colors and positional relationships of the multiple sub-objects; the processing unit is used to perform correction processing on the first color matrix to obtain a second color matrix, and at least based on the second color matrix, detect the object to be detected and identify the normal area or abnormal area in the object to be detected, wherein the correction processing includes establishing a connected area based on the positional relationship, and correcting the first color matrix through the connected area; the display unit is used for normal areas and / or abnormal areas.

[0106] From the above, it can be seen that the method of correcting the color matrix of the object to be detected is adopted. After obtaining the first color matrix of the object to be detected, the second color matrix is ​​obtained by correcting the first color matrix. Finally, the object to be detected is detected based on the second color matrix to identify the normal area or abnormal area in the object to be detected.

[0107] In the above process, the first color matrix of the object to be detected is obtained by obtaining the color and position relationship of each sub-object, thereby avoiding the interference of other defects on the background color and reducing the false detection rate of the object to be detected. In addition, by correcting the first color matrix based on the connected region algorithm, the background color of the sub-object can be smoothed, and the background color value of the area associated with the sub-object can be obtained, thereby avoiding the problem of missed detection in the detection process of the object to be detected.

[0108] It can be seen that the solution provided in the present application achieves the purpose of accurately detecting the object to be detected, thereby realizing the technical effect of reducing the false detection rate and missed detection rate of the object to be detected, and further solving the technical problems of false detection and missed detection that exist in the prior art when using the color mean scheme to detect the object to be detected.

[0109] It should be noted that the mixed file detection system in this embodiment can execute the data processing method in Example 1, and the relevant content has been explained in Example 1 and will not be repeated here.

[0110] Example 4

[0111] The embodiment of the present application may provide a computing device, which may be any computing device in a computing device group. Optionally, in this embodiment, the computing device may also be replaced by a terminal device such as a mobile terminal.

[0112] Optionally, in this embodiment, the computing device may be located in at least one network device among a plurality of network devices of a computer network.

[0113] In this embodiment, the computing device can execute the program code of the following steps in the data processing method: obtaining a first color matrix of the object to be detected, wherein the object to be detected includes multiple sub-objects, and the first color matrix represents the colors and positional relationships of the multiple sub-objects; performing correction processing on the first color matrix to obtain a second color matrix, wherein the correction processing includes establishing a connected area based on the positional relationship, and correcting the first color matrix through the connected area; at least based on the second color matrix, detecting the object to be detected and identifying normal areas or abnormal areas in the object to be detected. The object to be detected is a battery assembly image, the multiple sub-objects are battery cell images in the battery assembly image, and the positional relationship is the position information of the battery cell image in the battery assembly image.

[0114] Optionally, Fig.12 is a structural block diagram of a computing device according to an embodiment of the present application. Fig.12 As shown, the computing device 10 may include: one or more (only one is shown in the figure) processors 1202 , a memory 1204 , and a peripheral interface 1206 .

[0115] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the data processing method and device in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned data processing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computing device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0116] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain the first color matrix of the object to be detected, wherein the object to be detected includes multiple sub-objects, and the first color matrix represents the colors and positional relationship of the multiple sub-objects; perform correction processing on the first color matrix to obtain a second color matrix, wherein the correction processing includes establishing a connected area based on the positional relationship, and correcting the first color matrix through the connected area; at least based on the second color matrix, detect the object to be detected and identify the normal area or abnormal area in the object to be detected. The object to be detected is a battery assembly image, the multiple sub-objects are battery cell images in the battery assembly image, and the positional relationship is the position information of the battery cell image in the battery assembly image.

[0117] Optionally, the processor may also execute program code of the following steps: dividing the pixel distribution interval of each sub-object among multiple sub-objects into multiple pixel sub-intervals; using a histogram statistical method to respectively calculate the number of pixel points falling into each pixel sub-interval among the multiple pixel sub-intervals; determining the colors of the multiple sub-objects based on the pixel sub-interval with the largest number of pixel points; and constructing a first color matrix using the colors and positional relationships of the multiple sub-objects.

[0118] Optionally, the processor may also execute the program code of the following steps: an acquisition step, acquiring a first number of pixels falling into a current pixel subinterval, a second number of pixels falling into a previous pixel subinterval adjacent to the current pixel subinterval, and a third number of pixels falling into a subsequent pixel subinterval adjacent to the current pixel subinterval; a first calculation step, calculating a first product result of the first number of pixels and a first proportional coefficient, a second product result of the second number of pixels and a second proportional coefficient, and a third product result of the third number of pixels and a third proportional coefficient, and obtaining the sum of the first product result, the second product result, and the third product result; a second calculation step, setting the sum as an input parameter of a maximum independent variable point set function to obtain an output result; a judgment step, judging whether multiple pixel subintervals have been calculated, if not, returning to the acquisition step, if yes, determining the pixel subinterval with the largest number of pixels based on the product result of the output result and the interval length of the pixel subinterval.

[0119] Optionally, the processor may also execute the following program code: after obtaining the first color matrix of the object to be detected, calculating the first average value and the first standard deviation of the first color matrix; calculating the difference between the first background color value of each sub-object in a plurality of sub-objects and the first average value; filtering the first part of the sub-objects from the object to be detected to obtain the remaining second part of the sub-objects based on the comparison relationship between the difference value and the first standard deviation satisfying a preset condition; and calculating the second average value and the second standard deviation of the second part of the sub-objects.

[0120] Optionally, the comparison relationship between the difference value and the first standard deviation satisfies a preset condition, including: a ratio between the difference value and the first standard deviation is greater than or equal to a preset integer multiple.

[0121] Optionally, the processor may also execute the program code of the following steps: based on the positional relationship, calculating the background color difference between each sub-object in a plurality of sub-objects and at least one adjacent sub-object to obtain a calculation result; if it is determined according to the calculation result that the background color difference is less than a preset threshold, merging the currently calculated sub-object and at least one adjacent sub-object to obtain a connected area; setting the background color value in the connected area that is most different from the second average value as the second background color value of each sub-object in the connected area to obtain a second color matrix.

[0122] Optionally, the processor may also execute program code of the following steps: calculating the difference between the second background color value and the second average value to obtain an intermediate result; calculating the ratio of the intermediate result to the second standard deviation to obtain a final result to determine a normal area or an abnormal area.

[0123] Optionally, the processor may also execute program code of the following steps: performing mixed-color detection on the object to be detected based at least on the second color matrix.

[0124] It can be understood by those skilled in the art that Fig.12 The structure shown is for illustration only, and the computing device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Fig.12 The structure of the electronic device is not limited. For example, the computing device 10 may also include Fig.12 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.12 Different configurations shown.

[0125] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0126] Example 5

[0127] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the data processing method provided in the first embodiment.

[0128] Optionally, in this embodiment, the above storage medium may be located in any one of the computing devices in the computing device group in the computer network, or in any one of the mobile terminals in the mobile terminal group.

[0129] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: obtaining a first color matrix of an object to be detected, wherein the object to be detected includes a plurality of sub-objects, and the first color matrix represents the colors and positional relationships of the plurality of sub-objects; performing correction processing on the first color matrix to obtain a second color matrix, wherein the correction processing includes establishing a connected region based on the positional relationship, and correcting the first color matrix through the connected region; and detecting the object to be detected based at least on the second color matrix to identify normal regions or abnormal regions in the object to be detected. The object to be detected is a battery assembly image, the plurality of sub-objects are cell images in the battery assembly image, and the positional relationship is the position information of the cell images in the battery assembly image.

[0130] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: dividing the pixel distribution interval of each sub-object in a plurality of sub-objects into a plurality of pixel sub-intervals; using a histogram statistical method to respectively calculate the number of pixel points falling into each of the plurality of pixel sub-intervals; determining the colors of the plurality of sub-objects based on the pixel sub-interval with the largest number of pixel points; and constructing a first color matrix using the colors and positional relationships of the plurality of sub-objects.

[0131] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: an acquisition step of acquiring a first number of pixels falling into a current pixel subinterval, a second number of pixels falling into a previous pixel subinterval adjacent to the current pixel subinterval, and a third number of pixels falling into a subsequent pixel subinterval adjacent to the current pixel subinterval; a first calculation step of calculating a first product result of the first number of pixels and a first proportional coefficient, a second product result of the second number of pixels and a second proportional coefficient, and a third product result of the third number of pixels and a third proportional coefficient, and obtaining the sum of the first product result, the second product result, and the third product result; a second calculation step of setting the sum as an input parameter of a maximum independent variable point set function to obtain an output result; a judgment step of judging whether multiple pixel subintervals have been calculated, if not, returning to the acquisition step, if yes, determining the pixel subinterval with the largest number of pixels based on the product result of the output result and the interval length of the pixel subinterval.

[0132] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: after obtaining the first color matrix of the object to be detected, calculating the first average value and the first standard deviation of the first color matrix; calculating the difference between the first background color value of each sub-object in a plurality of sub-objects and the first average value; filtering a first part of the sub-objects from the object to be detected to obtain the remaining second part of the sub-objects based on a comparison relationship between the difference value and the first standard deviation that satisfies a preset condition; and calculating the second average value and the second standard deviation of the second part of the sub-objects.

[0133] Optionally, the comparison relationship between the difference value and the first standard deviation satisfies a preset condition, including: a ratio between the difference value and the first standard deviation is greater than or equal to a preset integer multiple.

[0134] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: based on the positional relationship, calculating the background color difference between each sub-object in a plurality of sub-objects and at least one adjacent sub-object to obtain a calculation result; if it is determined according to the calculation result that the background color difference is less than a preset threshold, merging the currently calculated sub-object and at least one adjacent sub-object to obtain a connected area; setting the background color value in the connected area that is most different from the second average value as the second background color value of each sub-object in the connected area to obtain a second color matrix.

[0135] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: calculating the difference between the second background color value and the second average value to obtain an intermediate result; calculating the ratio of the intermediate result to the second standard deviation to obtain a final result to determine a normal area or an abnormal area.

[0136] Optionally, in this embodiment, the storage medium is configured to store a program code for executing the following steps: performing mixed-color detection on the object to be detected based at least on the second color matrix.

[0137] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0138] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0139] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0140] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0141] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0142] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0143] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A data processing method, characterized in that: include: Acquire a first color matrix of an object to be detected, wherein the object to be detected includes a plurality of sub-objects, the first color matrix represents the colors and positional relationship of the plurality of sub-objects, the object to be detected is a battery assembly image, the plurality of sub-objects are battery cell images in the battery assembly image, and the positional relationship is position information of the battery cell image in the battery assembly image; Calculating a first average value and a first standard deviation of the first color matrix; calculating a difference between a first background color value of each sub-object in the plurality of sub-objects and the first average value; filtering a first portion of sub-objects from the object to be detected to obtain a remaining second portion of sub-objects based on a comparison relationship between the difference value and the first standard deviation satisfying a preset condition; calculating a second average value and a second standard deviation of the second portion of sub-objects; Based on the positional relationship, a background color difference between each sub-object in the multiple sub-objects and at least one adjacent sub-object is calculated to obtain a calculation result; if it is determined according to the calculation result that the background color difference is less than a preset threshold, a merging process is performed on the sub-object currently being calculated and at least one adjacent sub-object to obtain a connected area; a background color value in the connected area that is most different from the second average value is set as a second background color value of each sub-object in the connected area to obtain a second color matrix; Calculate the difference between the second background color value corresponding to the second color matrix and the second average value of the second part of sub-objects to obtain an intermediate result; The ratio of the intermediate result to the second standard deviation of the second part of the sub-objects is calculated to obtain a final result to identify a normal area or an abnormal area in the object to be detected.

2. The method according to claim 1, characterized in that Acquiring the first color matrix of the object to be detected includes: Dividing a pixel distribution interval of each sub-object in the plurality of sub-objects into a plurality of pixel sub-intervals; Calculating the number of pixel points falling into each pixel subinterval of the plurality of pixel subintervals respectively by using a histogram statistical method; Determine the colors of the plurality of sub-objects according to the pixel sub-interval with the largest number of pixels; The first color matrix is ​​constructed using the colors of the multiple sub-objects and the positional relationship.

3. The method according to claim 2, characterized in that Determining the pixel subinterval with the largest number of pixel points includes: An acquisition step of acquiring the number of first pixel points falling into a current pixel subinterval, the number of second pixel points falling into a previous pixel subinterval adjacent to the current pixel subinterval, and the number of third pixel points falling into a subsequent pixel subinterval adjacent to the current pixel subinterval; A first calculation step is to calculate a first product result of the first number of pixels and a first proportional coefficient, a second product result of the second number of pixels and a second proportional coefficient, and a third product result of the third number of pixels and a third proportional coefficient, and to obtain a sum of the first product result, the second product result, and the third product result; The second calculation step is to set the sum as an input parameter of the maximum independent variable point set function to obtain an output result; A judging step is to judge whether the calculation of the plurality of pixel subintervals has been completed. If not, return to the obtaining step. If yes, determine the pixel subinterval with the largest number of pixels based on the product of the output result and the interval length of the pixel subinterval.

4. The method according to claim 1, characterized in that: The comparison relationship between the difference value and the first standard deviation meets the preset condition including: The ratio between the difference value and the first standard deviation is greater than or equal to a preset integer multiple.

5. A data processing device, characterized in that: include: an acquisition module, configured to acquire a first color matrix of an object to be detected, wherein the object to be detected includes a plurality of sub-objects, the first color matrix represents the colors and positional relationship of the plurality of sub-objects, the object to be detected is a battery assembly image, the plurality of sub-objects are battery cell images in the battery assembly image, and the positional relationship is position information of the battery cell images in the battery assembly image; a processing module, configured to calculate a first average value and a first standard deviation of the first color matrix, calculate a difference between a first background color value of each sub-object in the plurality of sub-objects and the first average value, filter a first portion of sub-objects from the object to be detected to obtain a remaining second portion of sub-objects based on a comparison relationship between the difference value and the first standard deviation satisfying a preset condition, and calculate a second average value and a second standard deviation of the second portion of sub-objects; The processing module is further used to: calculate the background color difference between each sub-object of the multiple sub-objects and at least one adjacent sub-object based on the positional relationship to obtain a calculation result; if it is determined according to the calculation result that the background color difference is less than a preset threshold, merge the sub-object currently being calculated and at least one adjacent sub-object to obtain a connected area; and set the background color value in the connected area that has the largest difference from the second average value as the second background color value of each sub-object in the connected area to obtain a second color matrix; A detection module is used to calculate the difference between the second background color value corresponding to the second color matrix and the second average value of the second part of the sub-object to obtain an intermediate result, and calculate the ratio of the intermediate result to the second standard deviation of the second part of the sub-object to obtain a final result, so as to identify the normal area or abnormal area in the object to be detected.

6. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the data processing method according to any one of claims 1 to 4.

7. A processor, characterized in that: The processor is used to run a program, wherein the program executes the data processing method according to any one of claims 1 to 4 when running.

8. A data processing system, characterized in that: include: an acquisition unit, configured to acquire a first color matrix of an object to be detected, wherein the object to be detected includes a plurality of sub-objects, the first color matrix represents the colors and positional relationship of the plurality of sub-objects, the object to be detected is a battery assembly image, the plurality of sub-objects are battery cell images in the battery assembly image, and the positional relationship is position information of the battery cell images in the battery assembly image; a processing unit, configured to calculate a first average value and a first standard deviation of the first color matrix, calculate a difference between a first background color value of each sub-object in the plurality of sub-objects and the first average value, filter a first portion of sub-objects from the object to be detected to obtain a remaining second portion of sub-objects based on a comparison relationship between the difference value and the first standard deviation satisfying a preset condition, and calculate a second average value and a second standard deviation of the second portion of sub-objects; The processing unit is further configured to: calculate the background color difference between each sub-object of the multiple sub-objects and at least one adjacent sub-object based on the positional relationship to obtain a calculation result; if it is determined according to the calculation result that the background color difference is less than a preset threshold, merge the sub-object currently being calculated and at least one adjacent sub-object to obtain a connected area; and set the background color value in the connected area that is most different from the second average value as the second background color value of each sub-object in the connected area to obtain a second color matrix; a detection unit, configured to calculate a difference between the second background color value corresponding to the second color matrix and the second average value of the second part of sub-objects to obtain an intermediate result, and to calculate a ratio of the intermediate result to the second standard deviation of the second part of sub-objects to obtain a final result, so as to identify a normal area or an abnormal area in the object to be detected; A display unit is used to display the normal area and / or the abnormal area.

Citation Information

Patent Citations

  • Method for detecting edge red film of solar cell panel

    CN106057700A

  • Machine vision-based tobacco leaf portion identification method, electronic device and storage medium

    CN108268895A