Image tampering identification method and device for photovoltaic module
By pre-processing and differential processing of the EL image of the photovoltaic module, the pixel standard deviation is calculated to identify image tampering, the problems of low detection rate of image tampering and high error judgment rate in the prior art are solved, and high-precision and low-cost image tampering recognition are achieved.
Patent Information
- Application Number
- CN202510321708.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-06-20
AI Technical Summary
In the prior art, the EL images of photovoltaic modules may be maliciously tampered with, resulting in inaccurate quality assessment and even safety hazards, and the manual visual inspection rate is low and easy to misjudgment.
An image tamper recognition method for photovoltaic modules is proposed. By pre-processing and differential processing of the sub-image of the target cell, the pixel standard deviation is calculated to determine whether the sub-image is tampered.
This method has high detection accuracy and accuracy, effectively improves the detection rate, reduces the misjudgment rate, and has high detection efficiency and low cost, ensuring the quality and reliability of photovoltaic modules.
Smart Images

Figure CN120182236A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of photovoltaic systems, and particularly relates to a method and device for identifying image tampering of photovoltaic modules. Background Art
[0002] As the core component of a photovoltaic system, the quality of a photovoltaic module directly affects the power generation efficiency and system reliability. Electroluminescence (EL) images are one of the important means for quality inspection of photovoltaic modules. With the development of digital image processing technology, EL images may be maliciously tampered with to cover up component defects or forge quality reports. In related technologies, tampering detection is mainly carried out through manual visual inspection, with a low detection rate and prone to misjudgment, affecting the quality assessment of photovoltaic modules and even potentially leading to safety hazards. Summary of the Invention
[0003] This application aims to at least solve one of the technical problems existing in the prior art. For this purpose, this application proposes a method and device for identifying image tampering of photovoltaic modules, which determines whether a sub-image has been tampered with based on the obtained pixel standard deviation, has high detection accuracy and precision, effectively improves the detection rate of the target, and reduces the misjudgment rate.
[0004] In a first aspect, this application provides a method for identifying image tampering of a photovoltaic module, the method comprising:
[0005] Preprocess the sub-image of the target cell in the obtained photovoltaic module to obtain a first image;
[0006] Perform differential processing on the pixel values of the first image along a target direction to obtain the pixel standard deviation corresponding to the pixel points in the target direction;
[0007] Determine the tampering recognition result of the sub-image according to the pixel standard deviation.
[0008] According to the method for identifying image tampering of a photovoltaic module of this application, by performing differential processing on the sub-image of the target cell, using the computer vision pixel differential algorithm, it is determined whether the sub-image has been tampered with based on the obtained pixel standard deviation, which has high detection accuracy and precision, effectively improves the detection rate of the target, and reduces the misjudgment rate; and has high detection efficiency and low detection cost to ensure the quality and reliability of photovoltaic modules.
[0009] According to an embodiment of this application, the performing differential processing on the pixel values of the first image along a target direction to obtain the pixel standard deviation corresponding to the pixel points in the target direction includes:
[0010] Calculate the absolute value of the pixel difference between adjacent pixel points in the target direction;
[0011] For the absolute values of the pixel differences that are not within a preset range, perform boundary value replacement on the absolute values to update the absolute values;
[0012] Calculate the standard deviation of the updated multiple absolute values corresponding to the target direction to obtain the pixel standard deviation corresponding to the target direction.
[0013] According to an embodiment of the present application, the target direction includes at least one of horizontal and vertical.
[0014] According to an embodiment of the present application, the determining the tampering recognition result of the sub-image according to the pixel standard deviation includes:
[0015] When there is at least one pixel standard deviation corresponding to the target direction in the first image that is greater than or equal to a tampering threshold, determine that the sub-image is a tampered image;
[0016] When the pixel standard deviations corresponding to each target direction in the first image are all less than the tampering threshold, determine that the sub-image is an untampered image.
[0017] According to an embodiment of the present application, the preprocessing the sub-image of the target cell in the photovoltaic module obtained to obtain a first image includes:
[0018] Convert the sub-image into a grayscale image;
[0019] Perform an array type conversion on the grayscale image to obtain the first image.
[0020] According to an embodiment of the present application, before the preprocessing the sub-image of the target cell in the photovoltaic module obtained to obtain a first image, the method further includes:
[0021] Perform a line finding operation on the image to be detected of the photovoltaic module, and screen out the boundary line segments and gap line segments of the photovoltaic module from the found multiple line segments;
[0022] According to the boundary line segments, the gap line segments, and the component parameters of the photovoltaic module, determine the gap position information of each gap of the photovoltaic module in the image to be detected, where the gap position information includes the gap line segments corresponding to the boundaries of the gap and the identifiers corresponding to the gap line segments;
[0023] According to the gap position information, segment the image to be detected to obtain the sub-images of each cell.
[0024] According to an embodiment of the present application, performing a line finding operation on the image to be detected of the photovoltaic component, and screening out boundary line segments and gap line segments of the photovoltaic component from the found multiple line segments, includes:
[0025] According to at least one of a preset angle, a preset distance, a preset number of pixels, a minimum line segment length, and a maximum line segment gap, a line finding operation is performed on the image to be detected to obtain the plurality of line segments and line segment position information corresponding to each of the line segments;
[0026] Determining the length of the line segment and the distance information from the boundary of the image to be detected according to the line segment position information;
[0027] Based on the length and the distance information, the boundary line segments and the gap line segments are screened from the plurality of line segments.
[0028] According to an embodiment of the present application, determining the gap position information of each gap of the photovoltaic component in the image to be detected according to the boundary line segment, the gap line segment and the component parameters of the photovoltaic component includes:
[0029] Based on the boundary line segment, determining the overall size information of the photovoltaic assembly;
[0030] Based on the overall size information, the component parameters, and the total gap spacing corresponding to the horizontal and vertical directions, the single cell size information corresponding to the battery cell is calculated;
[0031] The gap position information is determined according to the difference between the pixel position of the gap line segment and the pixel position of the boundary line segment, and the single piece size information.
[0032] According to an embodiment of the present application, determining the gap position information according to the difference between the pixel position of the gap line segment and the pixel position of the boundary line segment, and the single piece size information, includes:
[0033] When the gap position information corresponding to the gap is incomplete, the gap position information is completed according to at least one of the pixel position of the gap line segment and the single-piece size information of the battery cell.
[0034] According to an embodiment of the present application, segmenting the image to be detected according to the gap position information to obtain a sub-image of each battery cell includes:
[0035] Taking the gap line segment close to one side of the battery cell in the gap position information corresponding to each gap adjacent to the battery cell as a reference, the target pixel distance is expanded outward to determine the cropping position;
[0036] Perform cutting according to the cutting position to obtain a sub-image of the cell.
[0037] In a second aspect, the present application provides an image tampering recognition device for a photovoltaic module, and the device includes:
[0038] A first processing module, configured to preprocess a sub-image of a target cell in the obtained photovoltaic module to obtain a first image;
[0039] A second processing module, configured to perform differential processing on pixel values of the first image along a target direction to obtain a pixel standard deviation corresponding to a pixel point in the target direction;
[0040] A third processing module, configured to determine a tampering recognition result of the sub-image according to the pixel standard deviation.
[0041] According to the image tampering recognition device for a photovoltaic module of the present application, by performing differential processing on a sub-image of a target cell, using a computer vision pixel differential algorithm, and judging whether the sub-image is tampered according to the obtained pixel standard deviation, it has high detection accuracy and precision, effectively improves the detection rate of the target, and reduces the false positive rate; and has high detection efficiency and low detection cost to ensure the quality and reliability of the photovoltaic module.
[0042] In a third aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the image tampering recognition method for a photovoltaic module as described in the first aspect above.
[0043] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the image tampering recognition method for a photovoltaic module as described in the first aspect above.
[0044] In a fifth aspect, the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the image tampering recognition method for a photovoltaic module as described in the first aspect above.
[0045] One or more of the above technical solutions in the embodiments of the present application have at least one of the following technical effects:
[0046] By performing differential processing on a sub-image of a target cell, using a computer vision pixel differential algorithm, and judging whether the sub-image is tampered according to the obtained pixel standard deviation, it has high detection accuracy and precision, effectively improves the detection rate of the target, and reduces the false positive rate; and has high detection efficiency and low detection cost to ensure the quality and reliability of the photovoltaic module.
[0047] Further, the pixel standard deviation is obtained by differentiating the pixel values on the same straight line row by row and / or column by column, and the gradient change of the pixel values in each area of the sub-image is represented by the magnitudes of the pixel standard deviations corresponding to each row and each column, so as to facilitate subsequent determination of whether the sub-image has been tampered with according to the gradient change, and has high detection accuracy and precision.
[0048] Furthermore, by splitting the image to be detected of the photovoltaic module into sub-images of individual solar cells and performing tampering determination in the smallest unit, the accuracy and precision of the tampering recognition result can be further improved.
[0049] Still further, by performing a line-finding operation on the image to be detected of the photovoltaic module to obtain the boundary line segments and gap line segments of the photovoltaic module, and performing rough positioning of the solar cells according to the boundary line segments, gap line segments and module parameters of the photovoltaic module, and then segmenting the image to be detected according to the rough positioning result to obtain sub-images of each solar cell, the positions of each solar cell in the image to be detected can be more accurately located, so that the sub-images obtained by subsequent segmentation can contain as complete solar cell areas as possible, improving the image accuracy and image integrity of the sub-images corresponding to each solar cell obtained by segmentation and improving the subsequent tampering recognition result.
[0050] Some of the additional aspects and advantages of the present application will be given in the following description, some will become obvious from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The above and / or additional aspects and advantages of the present application will become obvious and easy to understand from the description of the embodiments in conjunction with the following drawings, where:
[0052] Figure 1 is one of the schematic flowcharts of the method for identifying image tampering of a photovoltaic module provided by an embodiment of the present application;
[0053] Figure 2 is another schematic flowchart of the method for identifying image tampering of a photovoltaic module provided by an embodiment of the present application;
[0054] Figure 3 is one of the schematic diagrams of the image related to the method for identifying image tampering of a photovoltaic module provided by an embodiment of the present application;
[0055] Figure 4 is another schematic diagram of the image related to the method for identifying image tampering of a photovoltaic module provided by an embodiment of the present application;
[0056] Figure 5 is one of the schematic diagrams of the result of the method for identifying image tampering of a photovoltaic module provided by an embodiment of the present application;
[0057] Figure 6 It is the second schematic diagram of the result of the method for identifying image tampering of a photovoltaic module provided by an embodiment of the present application;
[0058] Figure 7 It is a schematic structural diagram of an image tampering identification device for a photovoltaic module provided by an embodiment of the present application;
[0059] Figure 8 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0060] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.
[0061] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are usually of the same category, and do not limit the number of objects. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means an "or" relationship between the associated objects before and after.
[0062] Next, in conjunction with the accompanying drawings, the method for identifying image tampering of a photovoltaic module, the device for identifying image tampering of a photovoltaic module, an electronic device, and a readable storage medium provided by the embodiments of the present application will be described in detail through specific embodiments and their application scenarios.
[0063] Among them, the method for identifying image tampering of a photovoltaic module can be applied to a terminal, and specifically can be executed by hardware or software in the terminal.
[0064] The terminal includes, but is not limited to, portable communication devices such as mobile phones or tablet computers. It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer.
[0065] In the following various embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse, and a joystick.
[0066] The image tampering recognition method for a photovoltaic module provided by an embodiment of this application. The execution subject of this image tampering recognition method for a photovoltaic module can be an electronic device or a functional module or functional entity in the electronic device that can implement the function of this image tampering recognition method for a photovoltaic module. The electronic devices mentioned in the embodiments of this application include, but are not limited to, mobile phones, tablet computers, computers, cameras, wearable devices, etc. Hereinafter, taking the electronic device as the execution subject as an example, the image tampering recognition method for a photovoltaic module provided by the embodiments of this application will be described.
[0067] As Figure 1 shown, the image tampering recognition method for a photovoltaic module includes: step 110, step 120, and step 130.
[0068] Step 110: Preprocess the sub-image of the target cell in the obtained photovoltaic module to obtain a first image;
[0069] In this step, the target cell can be any single cell in the photovoltaic module.
[0070] The sub-image is an image including the complete area of the target cell, as Figure 4 shown; one cell corresponds to one sub-image. In some embodiments, the sub-image can be an electroluminescence (EL) image, and this sub-image can be an image in BGR format.
[0071] The first image is a single-channel image. In some embodiments, preprocessing the sub-image of the target cell in the obtained photovoltaic module may include: performing noise reduction processing on the sub-image and converting the three-channel image into a single-channel image to delete useless features.
[0072] In some embodiments, step 110 may include:
[0073] Convert the sub-image into a grayscale image;
[0074] Perform an array type conversion on the grayscale image to obtain the first image.
[0075] In this embodiment, the first image can be represented in the form of an array.
[0076] The sub-image can be traversed, converted from BGR format to grayscale image, and then the grayscale image is converted from an int8 type array to an int16 type array using numpy to obtain the first image, so as to avoid that after subsequent differential operations, elements exceeding 0 to 255 will be assigned default values.
[0077] Among them, the int16 type array can be an m×n array, and each point in the array corresponds to the pixel value of the pixel at that position. m and n are the length and width of the grayscale image.
[0078] According to the image tampering identification method of photovoltaic components provided in the embodiment of the present application, by converting the sub-image from a multi-channel image to a single-channel image, and then converting the single-channel image into an int16 type array, subsequent differential operations are facilitated and the precision and accuracy of differential calculations are improved.
[0079] Step 120, performing differential processing on the pixel values of the first image along the target direction to obtain the pixel standard deviation corresponding to the pixel points in the target direction;
[0080] In this step, the target direction is a straight line direction, and the target direction may include one direction or multiple directions. For each direction, the corresponding pixel standard deviation may be calculated.
[0081] In some embodiments, the target orientation includes at least one of landscape and portrait.
[0082] For example, along the horizontal direction, the pixel values of each row in the first image are subjected to differential processing to obtain the pixel standard deviation corresponding to each row.
[0083] For another example, along the longitudinal direction, the pixel values of each column in the first image are subjected to difference processing to obtain the pixel standard deviation corresponding to each column.
[0084] For another example, the standard deviation of pixels corresponding to each row and the standard deviation of pixels corresponding to each column in the first image may be calculated along the horizontal direction and the vertical direction respectively.
[0085] like Figure 2 As shown, in some embodiments, step 120 may include:
[0086] Calculate the absolute value of the pixel difference between each adjacent pixel point in the target direction;
[0087] For the absolute values of the pixel differences that are not within the preset range, the boundary values are replaced to update the absolute values;
[0088] The standard deviation of the updated multiple absolute values corresponding to the target direction is calculated to obtain the pixel standard deviation corresponding to the target direction.
[0089] In this embodiment, the preset range is used to filter the boundary value, and the preset range can be customized based on the user, such as setting the preset range to 0-255.
[0090] Taking the target direction as the horizontal direction as an example, perform a horizontal difference operation on the first image, that is, calculate the pixel difference between adjacent elements in the array. After taking the absolute value of the pixel difference, the absolute value of the pixel difference corresponding to the two adjacent elements is obtained. Perform the difference operation on any two adjacent elements in the same row respectively, so as to obtain the first array corresponding to that row. The first array includes the absolute values of multiple pixel differences corresponding to that row.
[0091] After obtaining the first array corresponding to each row in the horizontal direction, perform an interception operation on the array, limit all elements in the array between 0 and 255. If it exceeds 0 to 255, it is default assigned to the boundary value to obtain the final absolute value corresponding to each row; then for each row, calculate the standard deviation according to the absolute value respectively to obtain the pixel standard deviation corresponding to that row, so as to obtain the pixel standard deviation corresponding to each row.
[0092] The difference processing method in the case where the target direction is vertical is similar and will not be elaborated here.
[0093] According to the image tampering recognition method of the photovoltaic module provided by the embodiment of the present application, the pixel standard deviation is obtained by performing difference processing on the pixel values in the same straight line row by row and / or column by column. The gradient change of the pixel values in each area of the sub-image is represented by the magnitudes of the pixel standard deviations corresponding to each row and each column, so as to facilitate subsequent judgment of whether the sub-image has been tampered with according to the gradient change, and has high detection accuracy and accuracy.
[0094] Step 130: Determine the tampering recognition result of the sub-image according to the pixel standard deviation and the tampering threshold.
[0095] In this step, the tampering threshold can be user-defined or calculated according to the existing training set, such as set to 6 or 6.5, etc. The present application does not make a limitation here.
[0096] The tampering recognition result includes: a tampered image or an untampered image. In some embodiments, in the case where the tampering recognition result includes an untampered image, the tampering recognition result may further include the tampering position.
[0097] It can be understood that for a sub-image, multiple pixel standard deviations can be obtained. For an untampered sub-image, the pixel standard deviation of each row or each column should be within a small range, or the sizes are relatively average; while for a tampered sub-image, there are gaps at the splicing positions on both sides of the sub-image (such as the head and tail regions of the sub-image), which will cause the pixel standard deviation corresponding to the row or column corresponding to the splicing position to be larger, much larger than the pixel standard deviations of other normal regions.
[0098] In some embodiments, it is possible to determine whether a sub-image is a tampered image based on the degree of difference between the standard deviations of the respective pixels corresponding to the sub-image. For example, when the degrees of difference are small, it is considered that the standard deviations of the respective pixels are relatively average, and it is approximately considered as an untampered image; when there is a degree of difference between one pixel standard deviation and the other pixel standard deviations that is much greater than the degrees of difference between the other pixel standard deviations, it is considered as a tampered image.
[0099] In the actual execution process, continuing to take the horizontal direction as the target direction as an example, after obtaining the standard deviation of the pixels corresponding to each row, the standard deviation of the pixels can be converted into a histogram, such as Figure 5 and Figure 6 shown, where Figure 5 illustrates a differential histogram of an untampered image. It can be seen that the standard deviations of the pixels corresponding to each row are all small and relatively average; Figure 6 illustrates a differential histogram of a tampered image. It can be seen that there is one or more rows with a standard deviation of pixels much greater than that of the other rows, as indicated by the arrow.
[0100] In some embodiments, step 130 may further include: determining the tampering recognition result of the sub-image according to the size relationship between the standard deviation of the pixels and the tampering threshold, so as to quickly and relatively accurately determine whether the sub-image is a tampered image.
[0101] In some embodiments, step 130 may include:
[0102] When there is at least one standard deviation of the pixels corresponding to the target direction in the first image that is greater than or equal to the tampering threshold, it is determined that the sub-image is a tampered image;
[0103] When the standard deviations of the pixels corresponding to each target direction in the first image are all less than the tampering threshold, it is determined that the sub-image is an untampered image.
[0104] In this embodiment, the tampering threshold can be user-defined or calculated according to an existing training set, such as set to 6 or 6.5, etc., and the present application does not make a limitation here.
[0105] When it is determined that there is at least one row in the first image whose corresponding pixel standard deviation is greater than or equal to the tampering threshold, and / or there is at least one column whose corresponding pixel standard deviation is greater than or equal to the tampering threshold, it is considered that there is a splicing seam in the first image, and it is determined that the first image is a tampered image.
[0106] When it is determined that the standard deviations of the pixels corresponding to each row and each column in the first image are all less than the tampering threshold, it is approximately considered that there is no splicing seam in the first image, and it is determined that the first image is an untampered image.
[0107] According to the image tampering recognition method of a photovoltaic module provided by an embodiment of the present application, by performing differential processing on a sub-image of a target cell and setting a tampering threshold, it is determined whether the sub-image has been tampered with according to the obtained pixel standard deviation and the tampering threshold, which has high detection accuracy and precision, effectively improves the detection rate of the target, and reduces the false positive rate; and has high detection efficiency and low detection cost.
[0108] In some embodiments, after determining that the sub-image is a tampered image, the method may further include:
[0109] Determine the tampered area as the area corresponding to the pixel standard deviation greater than or equal to the tampering threshold, and determine the tampering position.
[0110] In this embodiment, the area corresponding to the pixel standard deviation greater than or equal to the tampering threshold may be determined as the tampered area, and according to the pixel positions of the pixel points in the row or column corresponding to the pixel standard deviation, the abscissa or ordinate of the tampered area is determined, so as to determine the tampering position.
[0111] In some embodiments, the tampering position may also be determined according to the target direction corresponding to the pixel standard deviation greater than the tampering threshold, such as determining whether it is a horizontal splicing or a vertical splicing, etc., further improving the accuracy of the tampering recognition result.
[0112] After multiple tests and verifications by the inventor, through the method of the present application, the tampered area is automatically identified using a vision algorithm, and the detection time for each EL image of a photovoltaic module can be shortened to the second level, significantly improving the detection efficiency; and there is no need to set up additional imaging hardware, EL detection equipment, or professional and experienced technicians, effectively reducing the detection cost; on this basis, the accurate assessment of the true quality of photovoltaic modules can be realized, reducing the probability of defective modules flowing into the market, ensuring the overall performance and lifespan of the photovoltaic system, helping the purchaser and the testing institution to better conduct quality control, improving the transparency and credibility of the testing process; in addition, it also helps to prevent and combat fraud in the photovoltaic industry, maintain fair competition in the market, protect the rights and interests of legitimate enterprises and consumers; enhance customers' trust in the quality of photovoltaic modules, improve the brand reputation, and promote market promotion and application.
[0113] According to the image tampering recognition method of a photovoltaic module provided by an embodiment of the present application, by performing differential processing on a sub-image of a target cell, using a computer vision pixel difference algorithm, it is determined whether the sub-image has been tampered with according to the obtained pixel standard deviation, which has high detection accuracy and precision, effectively improves the detection rate of the target, and reduces the false positive rate; and has high detection efficiency and low detection cost to ensure the quality and reliability of photovoltaic modules.
[0114] The method for obtaining the sub-image will be described below.
[0115] Continue to refer to Figure 2 , in some embodiments, before step 110, the method may further include:
[0116] Perform a line finding operation on the image to be detected of the photovoltaic module, and screen out the boundary line segments and gap line segments of the photovoltaic module from the found multiple line segments;
[0117] Determine the gap position information of each gap of the photovoltaic module in the image to be detected according to the boundary line segments, gap line segments and the module parameters of the photovoltaic module;
[0118] Segment the image to be detected according to the gap position information to obtain sub-images of each cell.
[0119] In this embodiment, the image to be detected is the overall image of the photovoltaic module. As Figure 3 shown, the image to be detected can be an EL image.
[0120] The boundary line segments are the contour line segments of the photovoltaic module in the image to be detected, including the upper boundary of the module, the lower boundary of the module, the left boundary of the module, and the right boundary of the module, as Figure 3 shown by the thick straight lines in.
[0121] The gap line segments are the other line segments except the contour line segments among the multiple line segments found by performing the line finding operation, including horizontal line segments and vertical line segments, as Figure 3 shown by the thin straight lines in; it can be understood that the gap line segments correspond to the gaps between adjacent cells, and the gaps in the same row or the same column can be approximately considered to be on the same gap line segment.
[0122] In the actual execution process, any line finding tool can be used to perform the line finding operation, and only the corresponding line finding target parameters need to be set for the line finding tool.
[0123] The module parameters are used to characterize the specification information of the photovoltaic module, including but not limited to the arrangement direction, arrangement form of each cell in the photovoltaic module, and the number of cells, etc.
[0124] The gap position information includes the gap line segments corresponding to the boundaries of the gap, and the identifiers corresponding to the gap line segments; among them, the identifiers can be expressed as serial numbers numbered in sequence along the horizontal or vertical direction. It can be understood that for each gap, it has a certain width, and the gap line segments found by the line finding tool may be line segments at any position within the gap area; in some embodiments, for a gap, there are at least two gap line segments corresponding to the gap boundaries, and each gap line segment corresponds to a pixel coordinate in the image.
[0125] After obtaining the position information of the horizontal and vertical gaps, the position coordinates of each solar cell in the image can be initially located. For example, there is a solar cell corresponding to the intersection of any two adjacent horizontal gaps and two adjacent vertical gaps, thereby achieving a rough positioning of the solar cells. On this basis, the image to be detected is segmented according to the rough positioning result, and the sub-images corresponding to each solar cell can be obtained.
[0126] According to the method for identifying image tampering of a photovoltaic module provided by the embodiments of the present application, by splitting the image to be detected of the photovoltaic module into sub-images of individual solar cells and performing tampering determination in the smallest unit, the accuracy and accuracy of the tampering recognition result can be further improved.
[0127] In some embodiments, when performing a line finding operation on the image to be detected of the photovoltaic module and screening the boundary lines and gap lines of the photovoltaic module from the multiple found lines, it may include:
[0128] Scale the image to be detected;
[0129] Perform a line finding operation on the scaled image to be detected, and screen the boundary lines and gap lines of the photovoltaic module from the multiple found lines.
[0130] In this embodiment, the scaling ratio can be customized according to actual needs. For example, the scaling ratio can be set to 1, 1 / 2, 1 / 4, or 1 / 8, etc., to obtain higher processing performance and improve detection efficiency on the premise of ensuring accuracy.
[0131] In the actual execution process, the opencv tool library can be used to read the cv format image from the image path and convert it into a grayscale image to adapt to subsequent image operations; then the image to be detected is reduced according to a certain scaling ratio scale to obtain higher processing performance on the premise of ensuring accuracy; then the scaled image to be detected is adaptively binarized, and the binarization parameters can be adjusted according to actual effects and needs. For example, binarization is performed according to the maximum pixel value of 255 using an adaptive binarization algorithm, the threshold type is set to THRESH_BINARY_INV, that is, inverse binarization, and the neighborhood block size for calculating the threshold is 779.
[0132] Among them, the adaptive binarization algorithm can include the ADAPTIVE_THRESH_MEAN_C algorithm, which is used in the OpenCV library. The threshold is determined by calculating the average value within the neighborhood of each pixel and subtracting a constant C, thereby converting the grayscale image into a binary image. The constant C is 20 and is suitable for images with uneven illumination.
[0133] THRESH_BINARY_INV is used to set the pixels in a grayscale image that are higher than a specified threshold to 0 (black), and the pixels that are lower than or equal to the threshold to the maximum value (usually 255, white), thereby generating an inverted binary image.
[0134] Then, a line finding operation is performed on the binary processed image to be detected, and the boundary line segments and gap line segments of the photovoltaic module are screened out.
[0135] In some embodiments, when performing a line finding operation on the image to be detected of the photovoltaic module and screening out the boundary line segments and gap line segments from the multiple found line segments, it may include:
[0136] Performing a line finding operation on the image to be detected according to at least one of a preset angle, a preset distance, a preset number of pixel points, a minimum line segment length, and a maximum line segment gap, to obtain multiple line segments and the line position information corresponding to each line segment;
[0137] Determining the length of the line segment and the distance information from the boundary of the image to be detected according to the line position information;
[0138] Based on the length and distance information, screening out the boundary line segments and gap line segments from the multiple line segments.
[0139] In this embodiment, the Hough line detection can be used for the line finding operation. During the line finding process, the detection parameters of the accumulator can be adjusted according to the actual effect and requirements. Among them, the detection parameters include but are not limited to: a preset angle, a preset distance, a preset number of pixel points, a minimum line segment length, and a maximum line segment gap, etc.
[0140] The preset angle is the angle resolution of the accumulator during the line finding process, which is used to limit the angle between the line and the horizontal line. For example, it can be set to 0°, 90°, 180°, 270°, etc. By setting the preset angle, the found lines can be horizontal or vertical line segments.
[0141] The preset distance is the distance resolution of the accumulator during the line finding process. For example, it can be set to 1 pixel.
[0142] The preset number of pixel points is the threshold parameter of the accumulator. For example, it can be set to 3000 or 4000, etc., which is used to limit the maximum value of the total number of pixel points included in a straight line.
[0143] The minimum line segment length is used to limit the maximum length of the found line. For example, it can be set to 3000 pixels or 3500 pixels, etc.
[0144] It can be understood that for the found line segments, they may not be a continuous line segment, but include multiple sub-line segments located on the same straight line and with a relatively small interval. The maximum line segment gap is used to define the maximum gap between adjacent sub-line segments included in the found line segments, such as set to 40 or 35, etc.
[0145] In the above manner, vertical or horizontal line segments that meet the detection requirements and the corresponding line segment position information in the image to be detected can be found. These line segments are line segments close to the width or height of the image to be detected.
[0146] In some embodiments, the line segment position information may include the pixel coordinates of the starting point and / or the midpoint of the line segment.
[0147] After finding the line segments that meet the detection requirements, these line segments are classified according to the length and distance information to obtain boundary line segments and gap line segments.
[0148] Among them, the distance information is used to represent information such as the distance between the line segment and the edge of the image to be detected, the height difference or width difference between the head and the tail of the same line segment, etc.
[0149] It can be understood that since the image to be detected of the photovoltaic module includes invalid border regions around the photovoltaic module, these invalid border regions need to be screened out. Therefore, the line segments found by the line finding tool can be traversed to determine whether they are the boundaries of the solar cells around the photovoltaic module.
[0150] In the actual execution process, the starting point and ending point coordinates of the line segment can be scaled proportionally according to the previous scaling ratio to restore to the coordinates in the original image to be detected; then a boundary line segment screening threshold is set to enter the four-side boundary judgment logic, for example:
[0151] When the height difference of the line segment is greater than the original image height minus the first value (such as 1000 or 1001, etc.), the width difference is less than the second value (such as 15 or 16, etc.), and the starting point abscissa is within the third value on the left (such as 80 pixels or 85 pixels, etc.), it is determined as the left boundary of the photovoltaic module; when the height difference of the line segment is greater than the original image height minus the first value, the width difference is less than the second value, and the starting point abscissa is within the third value on the right, it is determined as the right boundary of the photovoltaic module; when the width difference of the line segment is greater than the original image width minus the first value, the height difference is less than the second value, and the starting point ordinate is within the fourth value above (such as 150 pixels, 155 pixels, etc.), it is determined as the upper boundary of the photovoltaic module; when the width difference of the line segment is greater than the original image width minus the first value, the height difference is less than the second value, and the starting point ordinate is within the fourth value below, it is determined as the lower boundary of the photovoltaic module; record the information of the 4 line segments of the left, right, upper, and lower boundaries as the four-side boundary positions of the battery region in the photovoltaic module, so as to obtain the boundary line segments.
[0152] Among them, the first numerical value, the second numerical value, the third numerical value, and the fourth numerical value are all boundary line segment screening thresholds, which can be customized according to the user; of course, in other embodiments, the boundary line segment screening threshold can also be customized according to the actual size of the image to be detected and the component parameters of the photovoltaic module, etc., to screen out the boundary line segments, and the present application does not limit this here.
[0153] In some embodiments, after obtaining the boundary line segments, other line segments except the boundary line segments among the multiple line segments can be determined as gap line segments. In some embodiments, for the image to be detected of the photovoltaic module, when performing a line finding operation and screening out the boundary line segments and gap line segments of the photovoltaic module from the multiple found line segments, it may further include:
[0154] Performing a line finding operation on the image to be detected according to at least one of a preset angle, a preset distance, a preset number of pixel points, a minimum line segment length, and a maximum line segment gap, to obtain multiple line segments and the line segment position information corresponding to each line segment;
[0155] Determining the length of the line segment and the distance information from the boundary of the image to be detected according to the line segment position information;
[0156] Based on the length and distance information, screening out the boundary line segments and gap line segments from the multiple line segments.
[0157] In this embodiment, different screening thresholds can be set for the boundary line segments and gap line segments respectively.
[0158] For example, traverse all the recognized line segments, first magnify the coordinates of the start and end points of the line segment corresponding to the scaling ratio to restore the coordinates in the original image. When the height difference between the start and end points of the line segment is greater than the height of the image to be detected minus the fifth numerical value (such as 1000, or 1001, etc.), the width difference is less than the sixth numerical value (such as 5 or 6, etc.), and the abscissa of the start point is within the target ratio of the width of a single solar cell (such as 1 / 2, etc.) to the total width minus the target ratio of the width of a single solar cell (such as 1 / 2, etc.), it is the gap line segment corresponding to the gap between the longitudinal solar cells after excluding the horizontal line segments and the left and right boundary line segments of the component.
[0159] Among them, the fifth numerical value, the sixth numerical value, and the target ratio are all gap line segment screening thresholds, which can be customized according to the user.
[0160] The horizontal gap screening method is similar and will not be elaborated here.
[0161] In some embodiments, according to the boundary line segments, the gap line segments, and the component parameters of the photovoltaic module, determining the gap position information of each gap of the photovoltaic module in the image to be detected may include:
[0162] Based on the boundary line segments, determining the overall size information of the photovoltaic module;
[0163] Based on the overall dimension information, component parameters, and the total gap spacing corresponding horizontally and vertically, the single-piece dimension information corresponding to the cell is calculated;
[0164] According to the difference between the pixel positions of the gap line segment and the boundary line segment, and the single-piece dimension information, the gap position information is determined.
[0165] In this embodiment, the gap position information may include the gap serial numbers corresponding to the gap line segments of the left and right boundaries or the upper and lower boundaries of the gap, and the pixel positions in the image to be detected, etc.
[0166] The single-piece dimension information includes the width and height of the spacer cell, etc.
[0167] According to the recognized left, right, upper, and lower boundaries of the component, the width and height of the total battery area can be calculated, that is, the overall dimension information of the photovoltaic module; the pixel offsets in the horizontal and vertical directions (the cumulative widths of the cell gaps in the horizontal and vertical directions respectively) are estimated respectively to obtain the total gap spacing corresponding horizontally and vertically; then according to the component parameters, the overall dimension information of the total battery area, and the total gap spacing, the default width and height of the single cell are calculated, that is, the single-piece dimension information corresponding to the cell;
[0168] Define built-in data structures, such as defining multiple dictionary types, storing data in the form of key-value pairs, allowing fast look-up, insertion, and deletion operations. The multiple dictionaries include: a vertical gap dictionary and a horizontal gap dictionary, which are used to store the vertical and horizontal gap positions respectively. Among them, the key value of each dictionary can be the serial number of the gap, and the corresponding value value is a list (i.e., the gap position information) storing the gap boundary information such as the topmost, bottommost, leftmost, or rightmost line segments of each gap:
[0169] Among them, the vertical gap dictionary includes the number of horizontal cells + 1 keys. The value values of the first and last keys are the left and right boundary values of the total battery area (i.e., the left and right boundary line segments) respectively, and the other initial values are empty lists;
[0170] The horizontal gap dictionary includes the number of vertical cells + 1 values. The value values of the first and last keys are the upper and lower boundary values of the total battery area (i.e., the upper and lower boundary line segments) respectively, and the other initial values are empty lists.
[0171] For each selected vertical gap line segment, subtract the left boundary value from the starting abscissa of the gap line segment to obtain the difference between the pixel position of the gap line segment and the pixel position of the boundary line segment. After dividing this difference by the width of the single cell and taking the integer, it is determined as the vertical gap serial number corresponding to the gap line segment and stored in the value list corresponding to the key value.
[0172] When the list is full of 3 values, sort them and delete the middle value, leaving the abscissas of the leftmost and rightmost line segments of the two gaps, so as to obtain the gap line segments corresponding to the left and right boundary line segments of the gap; it can be understood that a gap can correspond to a list, and two valid values can be stored in the list, corresponding to two gap line segments respectively, each gap line segment corresponds to a serial number, and each gap line segment corresponds to a pixel position.
[0173] The judgment of horizontal gaps is the same by analogy and will not be elaborated here.
[0174] In some embodiments, determining the gap position information according to the difference between the pixel positions of the gap line segments and the pixel positions of the boundary line segments, and the single-piece size information may include:
[0175] In the case where the gap position information corresponding to the gap is incomplete, complete the gap position information according to at least one of the pixel positions of the gap line segments and the single-piece size information of the battery cell.
[0176] In this embodiment, it should be noted that due to the influence of imaging quality and actual battery cell offset on line detection, for the found gap line segments, there may be missing situations, that is, there may be only one serial number or a null value in the list corresponding to a certain gap. In this case, the missing gap line segments need to be completed.
[0177] In some embodiments, completing the gap position information may include:
[0178] In the case where the gap position information includes one valid value, add the valid value to the gap position information;
[0179] In the case where the gap position information is a null value, complete the gap position information according to the gap position information corresponding to the gap adjacent to the gap corresponding to the gap position information and the single-piece size information.
[0180] In this embodiment, the valid values correspond to the gap line segments one by one. In the case where the gap position information is complete, the gap position information may include at least two valid values, corresponding to two gap line segments respectively, each gap line segment corresponds to a serial number, and each gap line segment corresponds to a pixel position.
[0181] Continuing with the above embodiment as an example, in the actual execution process, the two dictionaries obtained in the previous step store the vertical and horizontal gap positions respectively. Each key value in the dictionary represents the gap serial number, and the corresponding value is the list of the leftmost, rightmost, topmost, or bottommost line segments of the gap. However, due to the influence of imaging quality and actual battery cell offset on line detection, there may be two default null values for a certain gap, or a situation of one valid value plus one default null value, and post-processing and completion are required.
[0182] All values of the two dictionaries are traversed. When the gap position information corresponding to a gap includes only one valid value, another null value can be assigned to the valid value.
[0183] When the gap position information corresponding to the next gap includes two null values, the horizontal or vertical coordinate of the right or lower line segment of the gap plus the width or height of the single battery cell is used as a valid value of the next gap, and so on, until the traversal is completed, you can get two dictionaries that store vertical and horizontal gaps respectively, and the value corresponding to each key value is a list that stores 2 valid values, so as to obtain the gap position information corresponding to each gap.
[0184] According to the image tampering identification method of photovoltaic components provided in the embodiment of the present application, on the basis of obtaining gap line segments through line finding, the missing gap position information is supplemented according to the existing gap line segments and the single-piece size information of the battery cell, so as to obtain more complete gap position information, improve the accuracy and completeness of the line finding results, and easily improve the accuracy and completeness of the sub-images obtained by subsequent image cutting according to the gap position information.
[0185] In some embodiments, segmenting the image to be detected according to the gap position information to obtain sub-images of each battery cell may include:
[0186] Taking the gap line segment close to one side of the battery cell in the gap position information corresponding to each gap adjacent to the battery cell as a reference, the target pixel distance is expanded outward to determine the cropping position;
[0187] The sub-image of the battery cell is obtained by cropping according to the cropping position.
[0188] In this embodiment, the target pixel distance can be customized by the user, such as being set to 25 pixels, 30 pixels, or 32 pixels.
[0189] In the actual implementation process, each cell can be traversed as a unit, and based on the coordinates of the gap line segments adjacent to the top, bottom, left, and right of the cell, it is expanded 30 pixels in all directions, and then cut out in the original image, so as to avoid the possible tampering gaps being mistakenly cut out, resulting in unrecognizable situations. After the traversal is completed, the sub-image of each single cell can be obtained.
[0190] According to the method for identifying image tampering of a photovoltaic module provided by an embodiment of the present application, by performing a line finding operation on the image to be detected of the photovoltaic module, the boundary line segments and gap line segments of the photovoltaic module are obtained. Based on the boundary line segments, gap line segments, and component parameters of the photovoltaic module, rough positioning of the solar cells is performed. Then, according to the rough positioning result, the image to be detected is segmented to obtain sub-images of each solar cell, which can more accurately locate the positions of each solar cell in the image to be detected, so that the subsequent segmented sub-images can contain as much as possible the complete solar cell area, improving the image accuracy and integrity of the sub-images corresponding to each solar cell obtained by segmentation, and improving the subsequent tampering recognition result.
[0191] For the method for identifying image tampering of a photovoltaic module provided by an embodiment of the present application, the execution subject can be an image tampering recognition device for a photovoltaic module. In the embodiments of the present application, taking the image tampering recognition device for a photovoltaic module to execute the method for identifying image tampering of a photovoltaic module as an example, the image tampering recognition device for a photovoltaic module provided by the embodiments of the present application is described.
[0192] An embodiment of the present application also provides an image tampering recognition device for a photovoltaic module.
[0193] As Figure 7 shown, the image tampering recognition device for a photovoltaic module includes: a first processing module 710, a second processing module 720, and a third processing module 730.
[0194] The first processing module 710 is configured to preprocess the sub-image of the target solar cell in the obtained photovoltaic module to obtain a first image;
[0195] The second processing module 720 is configured to perform differential processing on the pixel values of the first image along the target direction to obtain the pixel standard deviation corresponding to the pixel points in the target direction;
[0196] The third processing module 730 is configured to determine the tampering recognition result of the sub-image according to the pixel standard deviation.
[0197] According to the image tampering recognition device for a photovoltaic module provided by an embodiment of the present application, by performing differential processing on the sub-image of the target solar cell, using the computer vision pixel differential algorithm, it is determined whether the sub-image has been tampered with according to the obtained pixel standard deviation, which has high detection accuracy and accuracy, effectively improves the detection rate of the target, and reduces the false positive rate; and has high detection efficiency and low detection cost to ensure the quality and reliability of the photovoltaic module.
[0198] In some embodiments, the second processing module 720 may also be configured to:
[0199] Calculate the absolute value of the pixel difference between adjacent pixel points in the target direction;
[0200] For the absolute values of the pixel differences that are not within the preset range, perform boundary value replacement on the absolute values and update the absolute values;
[0201] Calculate the standard deviation of the updated multiple absolute values corresponding to the target direction to obtain the pixel standard deviation corresponding to the target direction.
[0202] In some embodiments, the third processing module 730 may further be configured to:
[0203] When there is at least one pixel standard deviation corresponding to the target direction in the first image that is greater than or equal to the tampering threshold, determine that the sub-image is a tampered image;
[0204] When the pixel standard deviations corresponding to the target directions in the first image are all less than the tampering threshold, determine that the sub-image is an untampered image.
[0205] In some embodiments, the first processing module 710 may further be configured to:
[0206] Convert the sub-image into a grayscale image;
[0207] Perform an array type conversion on the grayscale image to obtain the first image.
[0208] In some embodiments, the apparatus may further include a fourth processing module, configured to:
[0209] Before preprocessing the sub-image of the target cell in the obtained photovoltaic module to obtain the first image, perform a line finding operation on the to-be-detected image of the photovoltaic module, and screen out the boundary line segments and gap line segments of the photovoltaic module from the found multiple line segments;
[0210] According to the boundary line segments, gap line segments, and component parameters of the photovoltaic module, determine the gap position information of each gap of the photovoltaic module in the to-be-detected image, where the gap position information includes the gap line segments corresponding to the boundaries of the gap and the identifiers corresponding to the gap line segments;
[0211] Segment the to-be-detected image according to the gap position information to obtain the sub-images of each cell.
[0212] In some embodiments, the fourth processing module may further be configured to:
[0213] Perform a line finding operation on the to-be-detected image according to at least one of a preset angle, a preset distance, a preset number of pixel points, a minimum line segment length, and a maximum line segment gap to obtain multiple line segments and the line segment position information corresponding to each line segment;
[0214] Determine the length of the line segment and the distance information from the boundary of the to-be-detected image according to the line segment position information;
[0215] Based on the length and distance information, boundary line segments and gap line segments are screened out from multiple line segments.
[0216] In some embodiments, the fourth processing module may further be configured to:
[0217] Based on the boundary line segments, determine the overall size information of the photovoltaic module;
[0218] Based on the overall size information, component parameters, and the total gap spacing corresponding to the horizontal and vertical directions, calculate the single-piece size information corresponding to the solar cell;
[0219] Determine the gap position information according to the difference between the pixel positions of the gap line segments and the pixel positions of the boundary line segments, as well as the single-piece size information.
[0220] In some embodiments, the fourth processing module may further be configured to:
[0221] In the case where the gap position information corresponding to the gap is incomplete, supplement the gap position information according to at least one of the pixel positions of the gap line segments and the single-piece size information of the solar cell.
[0222] In some embodiments, the fourth processing module may further be configured to:
[0223] Taking the gap line segment closer to the solar cell side among the gap position information corresponding to each gap adjacent to the solar cell as a reference, expand outward by the target pixel distance to determine the cutting position;
[0224] Perform cutting according to the cutting position to obtain a sub-image of the solar cell.
[0225] The image tampering recognition device for a photovoltaic module in an embodiment of the present application may be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal or other devices other than terminals. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. It may also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.
[0226] The image tampering recognition device for a photovoltaic module in an embodiment of the present application may be a device with an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations.
[0227] The image tampering recognition device for a photovoltaic module provided in the embodiments of the present application can implement Figures 1 to 6 each process implemented by the method embodiments. To avoid repetition, details are not described here again.
[0228] In some embodiments, as Figure 8 shown, the embodiments of the present application further provide an electronic device 800, including a processor 801, a memory 802, and a computer program stored on the memory 802 and executable on the processor 801. When the program is executed by the processor 801, it implements each process of the method embodiment for image tampering recognition of the above photovoltaic module, and can achieve the same technical effect. To avoid repetition, details are not described here again.
[0229] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0230] An embodiment of the present application further provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements each process of the above-mentioned embodiment of the method for identifying image tampering of a photovoltaic module, and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0231] Among them, the processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes computer-readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disks or optical discs, etc.
[0232] An embodiment of the present application further provides a computer program product, including a computer program, which implements the above-mentioned method for identifying image tampering of a photovoltaic module when executed by a processor.
[0233] Among them, the processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes computer-readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disks or optical discs, etc.
[0234] Another embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above-mentioned embodiment of the method for identifying image tampering of a photovoltaic module, and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0235] It should be understood that the chip mentioned in the embodiment of the present application may also be referred to as a system-on-chip, system chip, chip system or system-on-chip, etc.
[0236] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the methods and devices in the embodiments of the present application are not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0237] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described example methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0238] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific implementation manners. The above specific implementation manners are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them fall within the protection scope of the present application.
[0239] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0240] Although the embodiments of the present application have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principle and purpose of the present application. The scope of the present application is defined by the claims and their equivalents.
Claims
1. A method for identifying image tampering of a photovoltaic module, characterized in that: include: Preprocessing the acquired sub-image of the target cell in the photovoltaic module to obtain a first image; Performing differential processing on the pixel values of the first image along the target direction to obtain pixel standard deviations corresponding to the pixel points in the target direction; A tampering identification result of the sub-image is determined according to the pixel standard deviation.
2. The method for identifying image tampering of a photovoltaic module according to claim 1, characterized in that: The performing differential processing on the pixel values of the first image along the target direction to obtain the pixel standard deviation corresponding to the pixel points in the target direction includes: Calculate the absolute value of the pixel difference between each adjacent pixel point in the target direction; Perform boundary value replacement on the absolute values of the pixel differences that are not within a preset range, and update the absolute values; The standard deviation of the updated multiple absolute values corresponding to the target direction is calculated to obtain the pixel standard deviation corresponding to the target direction.
3. The method for identifying image tampering of a photovoltaic module according to claim 1, characterized in that: The target direction includes at least one of a horizontal direction and a vertical direction.
4. The method for identifying image tampering of a photovoltaic assembly according to any one of claims 1 to 3, characterized in that: The determining, according to the pixel standard deviation, a tampering identification result of the sub-image includes: When there is at least one pixel in the first image corresponding to the target direction with a standard deviation greater than or equal to a tampering threshold, determining that the sub-image is a tampered image; When the standard deviations of pixels corresponding to the target directions in the first image are all smaller than the tampering threshold, it is determined that the sub-image is an untampered image.
5. The method for identifying image tampering of a photovoltaic assembly according to any one of claims 1 to 3, characterized in that: The step of preprocessing the acquired sub-image of the target cell in the photovoltaic assembly to obtain a first image includes: Converting the sub-image into a grayscale image; Perform array type conversion on the grayscale image to obtain the first image.
6. The method for identifying image tampering of a photovoltaic assembly according to any one of claims 1 to 3, characterized in that: Before preprocessing the acquired sub-image of the target cell in the photovoltaic assembly to obtain the first image, the method further includes: Performing a line finding operation on the image to be detected of the photovoltaic module, and screening out the boundary line segments and the gap line segments of the photovoltaic module from the found multiple line segments; Determine, according to the boundary line segments, the gap line segments and the component parameters of the photovoltaic component, the gap position information of each gap of the photovoltaic component in the image to be detected, wherein the gap position information includes the gap line segments corresponding to the boundaries of the gaps and the identifiers corresponding to the gap line segments; The image to be detected is segmented according to the gap position information to obtain sub-images of each battery cell.
7. The method for identifying image tampering of a photovoltaic assembly according to claim 6, characterized in that: The performing of a line finding operation on the image to be detected of the photovoltaic assembly, and screening out boundary line segments and gap line segments of the photovoltaic assembly from the found multiple line segments, comprises: According to at least one of a preset angle, a preset distance, a preset number of pixels, a minimum line segment length, and a maximum line segment gap, a line finding operation is performed on the image to be detected to obtain the plurality of line segments and line segment position information corresponding to each of the line segments; Determining the length of the line segment and the distance information from the boundary of the image to be detected according to the line segment position information; Based on the length and the distance information, the boundary line segments and the gap line segments are screened from the plurality of line segments.
8. The method for identifying image tampering of a photovoltaic assembly according to claim 6, characterized in that: The determining, according to the boundary line segments, the gap line segments and the component parameters of the photovoltaic component, the gap position information of each gap of the photovoltaic component in the image to be detected includes: Based on the boundary line segment, determining the overall size information of the photovoltaic assembly; Based on the overall size information, the component parameters, and the total gap spacing corresponding to the horizontal and vertical directions, the single cell size information corresponding to the battery cell is calculated; The gap position information is determined according to the difference between the pixel position of the gap line segment and the pixel position of the boundary line segment, and the single piece size information.
9. The method for identifying image tampering of a photovoltaic module according to claim 8, characterized in that: The determining the gap position information according to the difference between the pixel position of the gap line segment and the pixel position of the boundary line segment, and the single piece size information, comprises: When the gap position information corresponding to the gap is incomplete, the gap position information is completed according to at least one of the pixel position of the gap line segment and the single-piece size information of the battery cell.
10. The method for identifying image tampering of a photovoltaic module according to claim 6, characterized in that: The step of segmenting the image to be detected according to the gap position information to obtain sub-images of each battery cell includes: Taking the gap line segment close to one side of the battery cell in the gap position information corresponding to each gap adjacent to the battery cell as a reference, the target pixel distance is expanded outward to determine the cropping position; The sub-image of the battery cell is obtained by performing cropping according to the cropping position.
11. An image tampering identification device for a photovoltaic module, characterized in that: include: A first processing module, configured to preprocess the acquired sub-image of the target cell in the photovoltaic assembly to obtain a first image; A second processing module, configured to perform differential processing on the pixel values of the first image along a target direction to obtain a pixel standard deviation corresponding to the pixel points in the target direction; The third processing module is used to determine the tampering identification result of the sub-image according to the pixel standard deviation.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for identifying image tampering of a photovoltaic assembly as described in any one of claims 1 to 10 is implemented.
13. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for identifying image tampering of a photovoltaic component as described in any one of claims 1 to 10 is implemented.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for identifying image tampering of a photovoltaic assembly as claimed in any one of claims 1 to 10 is implemented.