Search

US-12620083-B2 - Image processing method, apparatus, and device, and storage medium

US12620083B2US 12620083 B2US12620083 B2US 12620083B2US-12620083-B2

Abstract

An image processing method, apparatus, and device, and a storage medium relate to the field of artificial intelligence. The method may include: obtaining an image corresponding to a target battery module, the target battery module including N solder joints, and the N solder joints being respectively mapped to N solder joint fields in the image; dividing the image according to the N solder joint fields to obtain N image regions in one-to-one correspondence with the N solder joint fields; calculating image difference information between each pair of adjacent image regions among the N image regions to obtain an image difference information set; and performing fault recognition on the target battery module based on the image difference information set. The accuracy for recognizing a preset fault in a battery module can be improved by the method.

Inventors

  • Tianliang ZHANG
  • Jinxiang LAI
  • Liqiang BAO
  • Yi Zeng
  • Jun Liu

Assignees

  • TENCENT CLOUD COMPUTING (BEIJING) CO., LTD.

Dates

Publication Date
20260505
Application Date
20230504
Priority Date
20210618

Claims (20)

  1. 1 . An image processing method, performed by an image processing device, the method comprising: obtaining an image corresponding to a target battery module, the target battery module comprising a plurality of solder joints, the plurality of solder joints being respectively mapped to a plurality of solder joint fields in the image, wherein a number of the plurality of solder joints is equal to a number of the plurality of solder joint fields; dividing the image according to the plurality of solder joint fields to obtain a plurality of image regions in one-to-one correspondence with the plurality of solder joint fields, wherein the number of the plurality of solder joint fields is equal to a number of the plurality of image regions; calculating image difference information between each pair of adjacent image regions among the plurality of image regions to obtain an image difference information set; and performing fault recognition on the target battery module based on the image difference information set.
  2. 2 . The image processing method according to claim 1 , wherein the dividing of the image comprises: performing solder joint field recognition on the image to obtain position information of each of the plurality of solder joint fields; obtaining image region attribute information for indicating a shape and size of an image region; and dividing the image according to the position information of the plurality of solder joint fields and the image region attribute information to obtain the plurality of image regions.
  3. 3 . The image processing method according to claim 2 , wherein the performing of the solder joint field recognition comprises: performing grayscale accumulation on the image in a vertical direction based on an integral projection algorithm to obtain a horizontal integral projection, and performing the grayscale accumulation on the image in a horizontal direction based on the integral projection algorithm to obtain a vertical integral projection, wherein a width of the horizontal integral projection represents a width of the image, a height of the horizontal integral projection represents a result of grayscale accumulation based on at least two length values corresponding to each width value, a width of the vertical integral projection represents a height of the image, and a height of the vertical integral projection represents a result of the grayscale accumulation based on at least two width values corresponding to each height value; obtaining a plurality of width values corresponding to a plurality of peaks in the horizontal integral projection, and obtaining a plurality of height values corresponding to a plurality of peaks in the vertical integral projection; performing permutation and combination on the plurality of width values and the plurality of height values to obtain a plurality of central positions corresponding to the plurality of solder joint fields, wherein a number of the plurality of central positions is equal to a number of the plurality of solder joint fields, and wherein the number of the plurality of central positions is equal to a product of a number of the plurality of width values and a number of the plurality of height values; and determining the position information of the plurality of solder joint fields based on the plurality of central positions and solder joint field attribute information, wherein the solder joint field attribute information is used for indicating the shape and size of a solder joint field.
  4. 4 . The image processing method according to claim 2 , wherein the dividing of the image comprises: preprocessing the image to obtain an enhanced image; and dividing the enhanced image according to the position information of the plurality of solder joint fields and the image region attribute information to obtain the plurality of image regions.
  5. 5 . The image processing method according to claim 4 , wherein the preprocessing of the image comprises: dividing the image into at least two image blocks; performing histogram equalization on the at least two image blocks to obtain an intermediate image; and performing bilinear interpolation on the intermediate image to obtain the enhanced image.
  6. 6 . The method according to claim 1 , wherein the performing of the fault recognition comprises: determining, based on a target quantity of target image difference information existing in the image difference information set, that a preset fault exists in the target battery module, wherein the target image difference information is image difference information satisfying a fault existence condition.
  7. 7 . The image processing method according to claim 6 , wherein the calculating of the image difference information comprises: calculating a grayscale histogram corresponding to each of the plurality of image regions; obtaining a histogram distance calculation rule, and determining, according to the histogram distance calculation rule, a distance between grayscale histograms corresponding to every two adjacent image regions; and storing, in the image difference information set, the distance as the image difference information.
  8. 8 . The image processing method according to claim 7 , wherein the fault existence condition comprises the distance being greater than a preset distance threshold.
  9. 9 . The image processing method according to claim 6 , further comprising, after the determining that the preset fault exists: determining a target image region set from the plurality of image regions based on the image difference information set; and determining a solder joint corresponding to a target image region in the target image region set as a solder joint having the preset fault.
  10. 10 . The image processing method according to claim 9 , wherein the determining of the target image region set comprises: for each piece of target difference information, obtaining a pair of candidate image regions related to the piece of target image difference information, wherein the pair of candidate image regions comprises two adjacent image regions used for calculating the target image difference information; and for each pair of candidate image regions, determining a target image region from the pair of candidate image regions based on mean gray values respectively corresponding to the image regions of the pair of candidate image regions, and storing the target image region in the target image region set.
  11. 11 . The image processing method according to claim 9 , wherein the determining of the target image region set comprises: for each piece of target difference information, obtaining a pair of candidate image regions related to the piece of target image difference information, wherein the pair of candidate image regions comprises two adjacent image regions used for calculating the target image difference information; for each candidate image region, determining a plurality of pieces of image difference information comprising image difference information between the candidate image region and image regions adjacent to the candidate image region; and for each candidate image region, adding the candidate image region as a target image region to the target image region set based on a ratio between a statistical quantity and a number of corresponding plurality of pieces of image difference information being greater than a preset ratio, wherein the statistical quantity is a quantity of the plurality of pieces of image difference information which satisfy the fault existence condition.
  12. 12 . The image processing method according to claim 9 , wherein the determining of the target image region set comprises: for each piece of target difference information, obtaining a pair of candidate image regions related to the piece of target image difference information, wherein the pair of candidate image regions comprises two adjacent image regions used for calculating the target image difference information; and for each pair of candidate image regions, determining, as a target image region, a candidate image region having a mean gray value less than a mean gray value threshold between the image regions of the pair of candidate image regions, and storing the target image region in the target image region set.
  13. 13 . An image processing apparatus, comprising: at least one computer storage medium storing at least one computer program; and at least one processor configured to execute the at least one computer program, the at least one computer program thereby causing the at least one processor to perform operations of: obtaining an image corresponding to a target battery module, the target battery module comprising a plurality of solder joints, the plurality of solder joints being respectively mapped to a plurality of solder joint fields in the image, wherein a number of the plurality of solder joints is equal to a number of the plurality of solder joint fields; dividing the image according to the plurality of solder joint fields to obtain a plurality of image regions in one-to-one correspondence with the plurality of solder joint fields, wherein the number of the plurality of solder joint fields is equal to a number of the plurality of image regions, and calculating image difference information between each pair of adjacent image regions among the plurality of image regions to obtain an image difference information set; and performing fault recognition on the target battery module based on the image difference information set.
  14. 14 . The image processing apparatus according to claim 13 , wherein the at least one processor is caused to divide the image by: performing solder joint field recognition on the image to obtain position information of each of the plurality of solder joint fields; obtaining image region attribute information for indicating a shape and size of an image region; and dividing the image according to the position information of the plurality of solder joint fields and the image region attribute information to obtain the plurality of image regions.
  15. 15 . The image processing apparatus according to claim 14 , wherein the at least one processor is caused to perform solder joint field recognition by: performing grayscale accumulation on the image in a vertical direction based on an integral projection algorithm to obtain a horizontal integral projection, and performing the grayscale accumulation on the image in a horizontal direction based on the integral projection algorithm to obtain a vertical integral projection, wherein a width of the horizontal integral projection represents a width of the image, a height of the horizontal integral projection represents a result of grayscale accumulation based on at least two length values corresponding to each width value, a width of the vertical integral projection represents a height of the image, and a height of the vertical integral projection represents a result of the grayscale accumulation based on at least two width values corresponding to each height value; obtaining a plurality of width values corresponding to a plurality of peaks in the horizontal integral projection, and obtaining a plurality of height values corresponding to a plurality of peaks in the vertical integral projection; performing permutation and combination on the plurality of width values and the plurality of height values to obtain a plurality of central positions corresponding to the plurality of solder joint fields, wherein a number of the plurality of central positions is equal to a number of the plurality of solder joint fields, and wherein the number of the plurality of central positions is equal to a product of a number of the plurality of width values and a number of the plurality of height values; and determining the position information of the plurality of solder joint fields based on the plurality of central positions and solder joint field attribute information, wherein the solder joint field attribute information is used for indicating the shape and size of a solder joint field.
  16. 16 . The image processing apparatus according to claim 13 , wherein the at least one processor is caused to perform the fault recognition by determining, based on a target quantity of target image difference information existing in the image difference information set, that a preset fault exists in the target battery module, wherein the target image difference information is image difference information satisfying a fault existence condition, and wherein the at least one computer program further causes the at least one processor to perform operations of: determining a target image region set from the plurality of image regions based on the image difference information set, and determining a solder joint corresponding to a target image region in the target image region set as a solder joint having the preset fault.
  17. 17 . The image processing apparatus according to claim 16 , wherein the at least one processor is caused to determine the target image region set by: for each piece of target difference information, obtaining a pair of candidate image regions related to the piece of target image difference information, wherein the pair of candidate image regions comprises two adjacent image regions used for calculating the target image difference information; and for each pair of candidate image regions, determining a target image region from the pair of candidate image regions based on mean gray values respectively corresponding to the image regions of the pair of candidate image regions, and storing the target image region in the target image region set.
  18. 18 . The image processing apparatus according to claim 16 , wherein the at least one processor is caused to determine the target image region set by: for each piece of target difference information, obtaining a pair of candidate image regions related to the piece of target image difference information, wherein the pair of candidate image regions comprises two adjacent image regions used for calculating the target image difference information; for each candidate image region, determining a plurality of pieces of image difference information comprising image difference information between the candidate image region and image regions adjacent to the candidate image region; and for each candidate image region, adding the candidate image region as a target image region to the target image region set based on a ratio between a statistical quantity and a number of corresponding plurality of pieces of image difference information being greater than a preset ratio, wherein the statistical quantity is a quantity of the plurality of pieces of image difference information which satisfy the fault existence condition.
  19. 19 . The image processing apparatus according to claim 16 , wherein the at least one processor is caused to determine the target image region set by: for each piece of target difference information, obtaining a pair of candidate image regions related to the piece of target image difference information, wherein the pair of candidate image regions comprises two adjacent image regions used for calculating the target image difference information; and for each pair of candidate image regions, determining, as a target image region, a candidate image region having a mean gray value less than a mean gray value threshold between the image regions of the pair of candidate image regions, and storing the target image region in the target image region set.
  20. 20 . A non-transitory computer storage medium, storing a computer program, the computer program, when executed by a processor, being configured to perform an image processing method comprising: obtaining an image corresponding to a target battery module, the target battery module comprising a plurality of solder joints, the plurality of solder joints being respectively mapped to a plurality of solder joint fields in the image, wherein a number of the plurality of solder joints is equal to a number of the plurality of solder joint fields; dividing the image according to the plurality of solder joint fields to obtain a plurality of image regions in one-to-one correspondence with the plurality of solder joint fields, wherein the number of the plurality of solder joint fields is equal to a number of the plurality of image regions; calculating image difference information between each pair of adjacent image regions among the plurality of image regions to obtain an image difference information set; and performing fault recognition on the target battery module based on the image difference information set.

Description

CROSS-REFERENCE TO RELATED APPLICATIONS This application is a bypass continuation application of International Patent Application No. PCT/CN2021/107207, filed on Jul. 19, 2021, which is based on and claims priority to Chinese Patent Application No. 202110682879.2, filed with the China National Intellectual Property Administration on Jun. 18, 2021, the disclosures of each of which are incorporated herein by reference in their entireties. FIELD This disclosure relates to the field of artificial intelligence, and in particular, to an image processing method, apparatus, and device, and a storage medium. BACKGROUND A solar cell is a photoelectric semiconductor sheet that uses sunlight to generate electricity. An important battery component of a solar battery is a solar cell. In many cases, a solar battery fails due to a fault in a solar cell. SUMMARY Embodiments of the disclosure may provide an image processing method, apparatus, and device, and a storage medium, capable of accurate fault recognition for a target battery model. According to an aspect of the disclosure, an image processing method performed by an image processing device may be provided, which includes: obtaining an image corresponding to a target battery module, the target battery module comprising a plurality of solder joints, the plurality of solder joints being respectively mapped to a plurality of solder joint fields in the image, wherein a number of the plurality of solder joints is equal to a number of the plurality of solder joint fields; dividing the image according to the plurality of solder joint fields to obtain a plurality of image regions in one-to-one correspondence with the plurality of solder joint fields, wherein the number of the plurality of solder joint fields is equal to a number of the plurality of image regions; calculating image difference information between each pair of adjacent image regions among the plurality of image regions to obtain an image difference information set; and performing fault recognition on the target battery module based on the image difference information set. According to an aspect of the disclosure, an image processing apparatus may be provided, which includes: an obtaining unit, configured to obtain an image corresponding to a target battery module, the target battery module comprising a plurality of solder joints, the plurality of solder joints being respectively mapped to a plurality of solder joint fields in the image, wherein a number of the plurality of solder joints is equal to a number of the plurality of solder joint fields; a determining unit, configured to divide the image according to the plurality of solder joint fields to obtain a plurality of image regions in one-to-one correspondence with the plurality of solder joint fields, wherein the number of the plurality of solder joint fields is equal to a number of the plurality of image regions, and calculate image difference information between each pair of adjacent image regions among the plurality of image regions to obtain an image difference information set; and a recognizing unit, configured to perform fault recognition on the target battery module based on the image difference information set. According to an aspect of the disclosure, an image processing apparatus may be provided, which includes: at least one computer storage medium storing at least one computer program; and at least one processor configured to execute the at least one computer program, the at least one computer program thereby causing the at least one processor to perform operations of an image processing method according to the foregoing aspects. According to an aspect of the disclosure, a non-transitory computer storage medium storing a computer program may be provided, the computer program, when executed by a processor, being configured to an image processing method according to the foregoing aspects. According to an aspect of the disclosure, a computer program product or a computer program may be provided, which includes: a computer instruction, the computer instruction being stored in a computer-readable storage medium, a processor of an image processing device reading the computer instruction from the computer-readable storage medium, and the processor executing the computer instruction, so that the image processing device performs an image processing method according to the foregoing aspects. Technical solutions provided in embodiments of the disclosure achieves at least the following beneficial effects: To perform fault recognition on a target battery module, an image corresponding to the target battery module is to be obtained. The image includes images of N solder joints on the target battery module. The image is divided into image regions corresponding to solder joint fields where solder joints are located. Since there may be abnormal image difference information between image regions where at least two solder joint fields are located in an image corresp