Circuit board fault detection method and system based on combination of infrared image and digital twinning
By combining infrared images and digital twin technology, using infrared thermal imaging cameras and ultrasonic units for temperature compensation, combined with area segmentation of the camera unit, accurate identification of faulty parts of the circuit board is achieved, solving the problem of infrared thermal imaging camera detection in the existing technology. Problems that are not clear enough improve the accuracy of detection.
Patent Information
- Application Number
- CN202410664509.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-08-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing infrared thermal imaging cameras have noise problems in circuit board fault detection, resulting in infrared images that are not clear enough to accurately detect faulty parts, and can only obtain a rough fault area.
Using a method based on infrared images combined with digital twins, the infrared thermal imaging camera is used to obtain the initial grayscale image and temperature identification, the ultrasonic unit and the temperature detection unit are combined for temperature compensation, and the camera unit is used to obtain the positioning map and perform area segmentation to accurately identify faults. Component.
It achieves contactless identification of the precise location of faulty parts on the circuit board, improves the accuracy and clarity of detection, and can identify faulty parts caused by excessive temperature.
Smart Images

Figure CN118549792A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent detection technology, and in particular to a circuit board fault detection method, system, electronic device and computer-readable storage medium based on infrared images combined with digital twins. Background Art
[0002] There are many reasons for the failure or failure of circuit boards during use, but most of them are caused by or will cause overtemperature. However, circuit boards are very fragile, and it is very troublesome to detect them one by one. In the detection process, normal parts may be damaged due to improper operation. Therefore, a non-contact circuit board fault detection method is needed.
[0003] In the prior art, infrared thermal imagers can realize non-contact temperature detection, so they are often used in circuit board fault detection.
[0004] However, since infrared thermal imagers are converted from electrical signals, they contain a lot of noise, so the infrared images are often not clear enough. In addition, infrared thermal imagers can only detect temperature, and the temperature will propagate in the circuit board, so they cannot accurately detect the faulty parts in the faulty circuit board, and can only obtain the approximate fault area. Summary of the invention
[0005] The present invention provides a circuit board fault detection method, system and computer-readable storage medium based on infrared images combined with digital twins, the main purpose of which is to achieve contactless identification of faulty parts of a circuit board.
[0006] To achieve the above purpose, the present invention provides a circuit board fault detection method based on infrared images combined with digital twins, comprising:
[0007] Starting a fault scanning device, wherein the fault scanning device includes an infrared thermal imager unit and a camera unit, and the infrared thermal imager unit is preset with a scanning frequency and a thermal sensitivity;
[0008] Using an infrared thermal imager unit to perform a scanning operation on a pre-built faulty circuit board to obtain an initial grayscale image;
[0009] Perform temperature marking operation on the initial grayscale image to obtain an initial temperature measurement image;
[0010] Starting a pre-built temperature compensator, wherein the temperature compensator includes an ultrasonic unit, a temperature detection unit, and a correction unit, obtaining a compensation temperature based on the ultrasonic unit and the temperature detection unit, inputting both the initial temperature measurement map and the compensation temperature into the correction unit, and performing a correction operation on the initial temperature map based on the correction unit to obtain a comprehensive temperature measurement map;
[0011] Based on the camera unit, an initial positioning map of the faulty circuit board is obtained, wherein the initial positioning map is an RGB image, a grayscale operation is performed on the initial positioning map to obtain a grayscale positioning map, and a segmentation operation is performed on the grayscale positioning map using a pre-built region segmentation method to obtain a binary segmentation map, wherein the binary segmentation map includes a plurality of part regions and a background region, and the part regions correspond one-to-one to the parts in the faulty circuit board;
[0012] Extract part regions from the binary segmentation image one by one, and perform the following operations on each extracted part region:
[0013] Based on the comprehensive temperature measurement map and the extracted part area, a part temperature measurement map corresponding to the extracted part area is obtained; based on the part temperature measurement map, a measured maximum temperature corresponding to the extracted part area is obtained; and based on the measured maximum temperature and a preset set maximum temperature, a unit part report is obtained;
[0014] Summarize multiple unit part reports to obtain fault reports, and complete circuit board fault detection based on infrared images combined with digital twins based on the fault reports.
[0015] Optionally, the step of performing a scanning operation on a pre-built faulty circuit board using an infrared thermal imager unit to obtain an initial grayscale image includes:
[0016] Wherein, the infrared thermal imager unit includes an infrared detection unit, a video amplification unit, an image optimization unit and a display unit;
[0017] Based on the infrared detection unit, the infrared radiation of the faulty circuit board is received to obtain an electrical signal. After the electrical signal is sent to the video amplification unit, a first grayscale image is generated based on the video amplification unit. After the image optimization unit performs an image optimization operation on the first grayscale image, the optimized first grayscale image is sent to the display unit to obtain an initial grayscale image.
[0018] Optionally, after performing the image optimization operation on the first grayscale image using the image optimization unit, the method further comprises:
[0019] A plurality of first coordinates in the first grayscale image are acquired based on a pre-constructed image coordinate system, the first coordinates are sequentially extracted from the plurality of first coordinates, and a Gaussian filtering operation is performed on each of the extracted first coordinates, wherein the convolution kernel of the Gaussian filtering is 3×3, and the Gaussian filter function in the Gaussian filtering operation is:
[0020]
[0021] Among them, G(x, y) represents the pixel value corresponding to the coordinate after the Gaussian filter operation is performed on the first coordinate, σ represents the preset bandwidth of the Gaussian filter, x represents the horizontal coordinate in the first coordinate, and y represents the vertical coordinate in the first coordinate.
[0022] Optionally, performing a temperature marking operation on the initial grayscale image to obtain an initial temperature measurement image includes:
[0023] Construct a temperature calibration unit;
[0024] Based on the initial grayscale image, a plurality of initial coordinates corresponding to the initial grayscale image are obtained, and the initial grayscale image is divided based on the plurality of initial coordinates and a pre-constructed simplified window to obtain an optimized grayscale image, wherein the initial coordinates are pixel coordinates of the initial grayscale image in an image coordinate system, the initial grayscale image includes a plurality of initial pixels, and the initial pixels correspond to the initial coordinates one by one, the size of the simplified window is 2×2, 2 represents the number of pixels, the optimized grayscale image includes a plurality of optimized pixels, and each of the plurality of optimized pixels includes 4 initial pixels;
[0025] Extract optimized pixels from the optimized grayscale image in sequence, and perform the following operations on the extracted optimized pixels:
[0026] The optimized mean corresponding to the extracted optimized pixel is obtained according to the extracted optimized pixel, wherein the calculation formula of the optimized mean is:
[0027]
[0028] in, represents the optimized mean corresponding to the optimized pixel, (p, q) represents the pixel coordinates corresponding to the optimized pixel, p represents the horizontal coordinate of the pixel coordinates corresponding to the optimized pixel, q represents the vertical coordinate of the pixel coordinates corresponding to the optimized pixel, i represents the number of the initial pixel in the optimized pixel, i is a positive integer from 1 to 4, h i (p i ,q i ) represents the gray value corresponding to the initial pixel labeled i in the optimized pixel, (p i ,q i ) represents the coordinates of the initial pixel labeled i in the optimized pixel, p i represents the horizontal coordinate of the initial pixel labeled i in the optimized pixel, q i Indicates the ordinate corresponding to the initial pixel labeled i within the optimized pixel.
[0029] After the optimized mean value is input into the temperature calibration unit, an initial temperature value is obtained, and the initial temperature value is used to perform a marking operation on the optimized pixel;
[0030] An initial temperature measurement image is obtained based on a plurality of optimized pixels in the optimized grayscale image.
[0031] Optionally, the temperature calibration unit is constructed, comprising:
[0032] Extract black bodies from a plurality of pre-constructed black bodies in sequence, wherein each of the plurality of black bodies has a different temperature, and perform the following operations on each of the extracted black bodies:
[0033] Scanning the black body using an infrared thermal imager unit to obtain a test infrared image;
[0034] Obtaining a black body image corresponding to the extracted black body based on the test infrared image, and obtaining a black body test value based on the black body image, wherein the black body test value is the average gray value of all pixels in the black body image;
[0035] Obtaining the blackbody temperature based on the extracted blackbody, and constructing the temperature calibration coordinates according to the blackbody temperature and the blackbody test value;
[0036] A plurality of temperature calibration coordinates are obtained based on a plurality of black bodies. After the plurality of temperature calibration coordinates are input into a pre-constructed polynomial fitting curve, a temperature calibration curve is obtained based on a pre-constructed cubic spline interpolation method, wherein the polynomial fitting curve is:
[0037]
[0038] Wherein, Gery(t) represents the extracted blackbody test value, t represents the blackbody temperature of the extracted blackbody, A, B, C, D and E represent the first polynomial coefficient, the second polynomial coefficient, the third polynomial coefficient, the fourth polynomial coefficient and the fifth polynomial coefficient respectively;
[0039] Constructing temperature calibration unit based on temperature calibration curve
[0040] Optionally, obtaining the compensation temperature based on the ultrasonic unit and the temperature detection unit includes:
[0041] The ultrasonic unit is enabled, a time interval is obtained based on the ultrasonic unit, and the time interval is input into a pre-built ultrasonic temperature compensation model to obtain a compensated temperature.
[0042] Optionally, inputting the time interval into a pre-built ultrasonic temperature compensation model to obtain the compensated temperature comprises:
[0043] Acquire an ultrasonic generator and an ultrasonic receiver based on the ultrasonic unit, and acquire a first sensor, a second sensor, and a third sensor based on the temperature detection unit, wherein the first sensor is disposed on the ultrasonic generator, and the second sensor is disposed on the pre-built heater;
[0044] A plurality of test room temperatures are obtained by using a pre-built room temperature control unit, wherein each of the plurality of test room temperatures corresponds to a different temperature, and the test room temperatures are sequentially extracted from the plurality of test room temperatures, and the following operations are performed on the extracted test room temperatures:
[0045] Acquire the ultrasonic temperature according to the first sensor, acquire the heater temperature of the heater according to the second sensor, acquire the propagation temperature difference according to the ultrasonic temperature and the heater temperature, acquire the propagation time according to the ultrasonic generator and the ultrasonic receiver, and construct a room temperature-ultrasonic compensation curve based on a pre-constructed quartic polynomial, the propagation temperature difference and the propagation time;
[0046] Acquire multiple room temperature-compensation curves based on multiple test room temperatures, and acquire an ultrasonic temperature compensation model based on the multiple room temperature-compensation curves;
[0047] The actual room temperature corresponding to the faulty circuit board is obtained based on the temperature detection unit, and the actual room temperature is input into the ultrasonic temperature compensation model to obtain the compensation temperature.
[0048] Optionally, the using a pre-built region segmentation method to perform a segmentation operation on the grayscale positioning map to obtain a binary segmentation map includes:
[0049] Using a pre-built image binarization segmentation method to perform a binarization operation on the grayscale positioning map to obtain an initial binarization map, wherein the image binarization segmentation method is an OTSU adaptive threshold image segmentation method;
[0050] A plurality of connected domains are obtained based on the initial binary graph, connected domains are extracted sequentially from the plurality of connected domains, and a binary segmentation graph is obtained after a marking operation is performed on all the extracted connected domains using a pre-constructed structural graph of a faulty circuit board.
[0051] Optionally, the step of obtaining a unit part report based on the measured maximum temperature and the preset maximum temperature includes:
[0052] Compare the measured maximum temperature and the set maximum temperature. If the measured maximum temperature is greater than or equal to the set maximum temperature, the part corresponding to the part temperature measurement diagram is confirmed to be a faulty part, and a fault warning is issued. A unit part report is generated based on the fault warning. Otherwise, the part corresponding to the part temperature measurement diagram is confirmed to be normal, and a unit part report is generated.
[0053] In order to solve the above problems, the present invention also provides a circuit board fault detection system based on infrared images combined with digital twins, the system comprising:
[0054] An infrared scanning module is used to start a fault scanning device, wherein the fault scanning device includes an infrared thermal imager unit and a camera unit, the infrared thermal imager unit is preset with a scanning frequency and a thermal sensitivity, and the infrared thermal imager unit is used to perform a scanning operation on a pre-built faulty circuit board to obtain an initial grayscale image, and a temperature marking operation is performed on the initial grayscale image to obtain an initial temperature measurement image;
[0055] A temperature compensation module, used to start a pre-built temperature compensator, wherein the temperature compensator includes an ultrasonic unit, a temperature detection unit and a correction unit, obtains a compensation temperature based on the ultrasonic unit and the temperature detection unit, inputs the initial temperature measurement map and the compensation temperature into the correction unit, and performs a correction operation on the initial temperature map based on the correction unit to obtain a comprehensive temperature measurement map;
[0056] A parts identification module, used for obtaining an initial positioning map of a faulty circuit board based on a camera unit, wherein the initial positioning map is an RGB image, performing a grayscale operation on the initial positioning map to obtain a grayscale positioning map, performing a segmentation operation on the grayscale positioning map using a pre-built region segmentation method to obtain a binary segmentation map, wherein the binary segmentation map includes a plurality of part regions and a background region, and the part regions correspond one-to-one to the parts in the faulty circuit board;
[0057] A report generation module is used to extract part areas from the binary segmentation map in sequence, and perform the following operations on each extracted part area: obtain a part temperature measurement map corresponding to the extracted part area based on the comprehensive temperature measurement map and the extracted part area, obtain a measured maximum temperature corresponding to the extracted part area based on the part temperature measurement map, obtain a unit part report based on the measured maximum temperature and a preset set maximum temperature, summarize multiple unit part reports, obtain a fault report, and complete circuit board fault detection based on infrared images combined with digital twins based on the fault report.
[0058] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0059] a memory storing at least one instruction; and
[0060] A processor executes instructions stored in the memory to implement the above-mentioned circuit board fault detection method based on infrared images combined with digital twins.
[0061] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned circuit board fault detection method based on infrared images combined with digital twins.
[0062] To solve the problem described in the background technology, an embodiment of the present invention starts a fault scanning device, wherein the fault scanning device includes an infrared thermal imager unit and a camera unit. The infrared thermal imager unit presets a scanning frequency and thermal sensitivity. The infrared thermal imager unit is used to perform a scanning operation on a pre-constructed faulty circuit board to obtain an initial grayscale image; a temperature marking operation is performed on the initial grayscale image to obtain an initial temperature measurement image. The embodiment of the present invention detects the temperature of the faulty circuit board to determine the fault caused by excessive temperature or to identify the faulty parts corresponding to the fault caused by excessive temperature, thereby locating the source of the fault on the faulty circuit board. A pre-built temperature compensator is started, wherein the temperature compensator includes an ultrasonic unit, a temperature detection unit and a correction unit. The compensation temperature is obtained based on the ultrasonic unit and the temperature detection unit. After the initial temperature measurement map and the compensation temperature are input into the correction unit, a correction operation is performed on the initial temperature map based on the correction unit to obtain a comprehensive temperature measurement map. The embodiment of the present invention uses the correction unit and the compensation temperature to correct the initial temperature map. This is because the heat emitted by the faulty circuit board when a fault occurs will be affected by the room temperature and will also dissipate part of the energy during the propagation process. The embodiment of the present invention believes that the influence of the heat dissipation of the faulty parts on the room temperature is negligible. The correction unit and the compensation temperature are used to correct the initial temperature to eliminate the influence of the room temperature on the detection of the infrared thermal imager unit. Based on the camera unit, an initial positioning map of the faulty circuit board is obtained, wherein the initial positioning map is an RGB image, a grayscale operation is performed on the initial positioning map to obtain a grayscale positioning map, and a segmentation operation is performed on the grayscale positioning map using a pre-built region segmentation method to obtain a binary segmentation map, wherein the binary segmentation map includes multiple part regions and background regions, and the part regions correspond to the parts in the faulty circuit board one by one. In the embodiment of the present invention, an infrared thermal imager unit is used to measure the temperature of the faulty circuit board, and a camera unit is used to identify the parts of the faulty circuit board, thereby identifying the faulty parts in the faulty circuit board. Part regions are sequentially extracted from the binary segmentation map, and the following operations are performed on each extracted part region: based on the comprehensive temperature measurement map and the extracted part region, a part temperature measurement map corresponding to the extracted part region is obtained, based on the part temperature measurement map, a measured maximum temperature corresponding to the extracted part region is obtained, based on the measured maximum temperature and the preset set maximum temperature, a unit part report is obtained, multiple unit part reports are summarized to obtain a fault report, and circuit board fault detection based on infrared images combined with digital twins is completed based on the fault report. The embodiment of the present invention determines the faulty parts by comparing the measured maximum temperature and the set maximum temperature, and can accurately identify the location of the faulty parts. Therefore, the circuit board fault detection method, system, electronic device and computer-readable storage medium based on infrared image combined with digital twin proposed by the present invention can realize contactless identification of faulty parts of the circuit board. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1A schematic diagram of a flow chart of a circuit board fault detection method based on infrared images combined with digital twins provided in one embodiment of the present invention;
[0064] Figure 2 A functional module diagram of a circuit board fault detection system based on infrared images combined with digital twins provided in one embodiment of the present invention;
[0065] Figure 3 A schematic diagram of the structure of an electronic device for implementing the circuit board fault detection method based on infrared images combined with digital twins provided in one embodiment of the present invention.
[0066] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0067] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0068] The embodiment of the present application provides a circuit board fault detection method based on infrared images combined with digital twins. The execution subject of the circuit board fault detection method based on infrared images combined with digital twins includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided in the embodiment of the present application. In other words, the circuit board fault detection method based on infrared images combined with digital twins can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0069] Reference Figure 1 As shown, it is a schematic diagram of the flow of a circuit board fault detection method based on infrared images combined with digital twins provided by an embodiment of the present invention. In this embodiment, the circuit board fault detection method based on infrared images combined with digital twins includes:
[0070] S1. Start a fault scanning device, wherein the fault scanning device includes an infrared thermal imager unit and a camera unit, the infrared thermal imager unit has a preset scanning frequency and thermal sensitivity, and uses the infrared thermal imager unit to perform a scanning operation on a pre-built faulty circuit board to obtain an initial grayscale image.
[0071] It should be noted that there are many reasons for the failure or failure of a circuit board during use, but most of them are caused by or will cause excessive temperature. The embodiment of the present invention detects the temperature of the faulty circuit board to determine the fault caused by excessive temperature or to identify the faulty parts corresponding to the fault of excessive temperature, thereby locating the source of the fault of the faulty circuit board. Furthermore, the embodiment of the present invention uses an infrared thermal imager unit to measure the temperature of the faulty circuit board and uses a camera unit to identify the parts of the faulty circuit board, thereby identifying the faulty parts in the faulty circuit board.
[0072] It is understandable that the fault scanning device is a device for scanning a faulty circuit board and determining a faulty part. The infrared thermal imager unit is a unit composed of an infrared thermal imager, and the infrared thermal imager unit is used to perform temperature detection. The camera unit is a unit composed of a camera, and the camera unit can capture RGB images, and the camera unit is used to identify parts. The scanning frequency is the frequency at which the infrared thermal imager unit scans the faulty circuit board, and the thermal sensitivity is the ratio of the electrical signal generated by the infrared thermal imager unit to the infrared radiation of the faulty circuit board to the change in ambient temperature.
[0073] Furthermore, the use of the infrared thermal imager unit to perform a scanning operation on the pre-built faulty circuit board to obtain an initial grayscale image includes:
[0074] Wherein, the infrared thermal imager unit includes an infrared detection unit, a video amplification unit, an image optimization unit and a display unit;
[0075] Based on the infrared detection unit, the infrared radiation of the faulty circuit board is received to obtain an electrical signal. After the electrical signal is sent to the video amplification unit, a first grayscale image is generated based on the image optimization unit. After the image optimization operation is performed on the first grayscale image using the image optimization unit, the optimized first grayscale image is sent to the display unit to obtain an initial grayscale image.
[0076] It is understandable that the infrared detection unit is a unit for receiving infrared radiation, and the infrared detection unit includes a plurality of infrared detectors, and the infrared detector is a device for receiving infrared radiation. The electrical signal is a form of signal, and the infrared thermal imager unit can convert the received infrared radiation into an electrical signal, and generate a visual image based on the electrical signal. This technology is a prior art and will not be described in detail here. The video amplification unit is a unit corresponding to the video amplifier, and the video amplifier can amplify the video signal to enhance the brightness, chroma, and synchronization signal of the video. The first grayscale image is a visual image obtained based on the video amplification unit. The initial grayscale image is the image finally generated by the infrared thermal imager unit.
[0077] It should be noted that the first grayscale image is an infrared image converted by a video amplifier according to an electrical signal, so there are noise points in the first grayscale image caused by the conversion of infrared radiation into an electrical signal, and also include heat source errors under the influence of the environment, so it is necessary to perform an optimization operation on the first grayscale image. The image optimization unit is a unit for performing an optimization operation on the first image, and the display unit is a unit for displaying an image.
[0078] Furthermore, after the image optimization unit performs the image optimization operation on the first grayscale image, the method further comprises:
[0079] A plurality of first coordinates in the first grayscale image are acquired based on a pre-constructed image coordinate system, the first coordinates are sequentially extracted from the plurality of first coordinates, and a Gaussian filtering operation is performed on each of the extracted first coordinates, wherein the convolution kernel of the Gaussian filtering is 3×3, and the Gaussian filter function in the Gaussian filtering operation is:
[0080]
[0081] Among them, G(x, y) represents the pixel value corresponding to the coordinate after the Gaussian filter operation is performed on the first coordinate, σ represents the preset bandwidth of the Gaussian filter, x represents the horizontal coordinate in the first coordinate, and y represents the vertical coordinate in the first coordinate.
[0082] It is understandable that the first coordinate is the coordinate in the first grayscale image coordinate, and the first coordinate is the coordinate based on the image coordinate system and the first grayscale coordinate, so the selection method of the first coordinate is consistent with the selection method of the pixel coordinate. The convolution kernel is the window size for performing the Gaussian filter operation on the image in the first grayscale image. In order to reduce the noise of the first grayscale image as much as possible, the embodiment of the present invention limits the convolution kernel of the Gaussian filter to 3×3. The bandwidth is the standard deviation σ in the Gaussian filter. When the value of the standard deviation is larger, the bandwidth corresponding to the Gaussian filter is wider, and the smoothness is better. The embodiment of the present invention does not limit this.
[0083] S2. Perform a temperature marking operation on the initial grayscale image to obtain an initial temperature measurement image.
[0084] Furthermore, performing a temperature marking operation on the initial grayscale image to obtain an initial temperature measurement image includes:
[0085] Construct a temperature calibration unit;
[0086] Based on the initial grayscale image, a plurality of initial coordinates corresponding to the initial grayscale image are obtained, and the initial grayscale image is divided based on the plurality of initial coordinates and a pre-constructed simplified window to obtain an optimized grayscale image, wherein the initial coordinates are pixel coordinates of the initial grayscale image in an image coordinate system, the initial grayscale image includes a plurality of initial pixels, and the initial pixels correspond to the initial coordinates one by one, the size of the simplified window is 2×2, 2 represents the number of pixels, the optimized grayscale image includes a plurality of optimized pixels, and each of the plurality of optimized pixels includes 4 initial pixels;
[0087] Extract optimized pixels from the optimized grayscale image in sequence, and perform the following operations on the extracted optimized pixels:
[0088] The optimized mean corresponding to the extracted optimized pixel is obtained according to the extracted optimized pixel, wherein the calculation formula of the optimized mean is:
[0089]
[0090] in, represents the optimized mean corresponding to the optimized pixel, (p, q) represents the pixel coordinates corresponding to the optimized pixel, p represents the horizontal coordinate of the pixel coordinates corresponding to the optimized pixel, q represents the vertical coordinate of the pixel coordinates corresponding to the optimized pixel, i represents the number of the initial pixel in the optimized pixel, i is a positive integer from 1 to 4, h i (p i ,q i ) represents the gray value corresponding to the initial pixel labeled i in the optimized pixel, (p i ,q i ) represents the coordinates of the initial pixel labeled i in the optimized pixel, p i represents the horizontal coordinate of the initial pixel labeled i in the optimized pixel, q i Indicates the ordinate corresponding to the initial pixel labeled i within the optimized pixel.
[0091] After the optimized mean value is input into the temperature calibration unit, an initial temperature value is obtained, and the initial temperature value is used to perform a marking operation on the optimized pixel;
[0092] An initial temperature measurement image is obtained based on a plurality of optimized pixels in the optimized grayscale image.
[0093] It needs to be explained that the temperature calibration unit is a unit that calibrates temperature using the mapping relationship between temperature and grayscale value. The initial coordinates are the pixel coordinates of the initial grayscale image in the image coordinate system. The image coordinate system is a coordinate system commonly used in the prior art. Therefore, the coordinate construction is not repeated in the embodiments of the present invention.
[0094] Specifically, the simplified window is a window with a size of 2×2 pixels. The embodiment of the present invention uses the simplified window to simplify the initial grayscale image. This is because the embodiment of the present invention aims to detect which part has failed during the detection of the faulty circuit board. The area corresponding to a part is larger than a pixel area. Therefore, the embodiment of the present invention simplifies it. The purpose is to reduce the amount of calculation without affecting the detection effect. The optimized grayscale image is the initial grayscale image after being divided using the simplified window.
[0095] It can be understood that the initial pixel is a pixel in the initial grayscale image, the optimized grayscale image includes multiple optimized pixels, the optimized pixel is a pixel in the optimized grayscale image, and the optimized pixel corresponds to the optimized coordinates one by one. The optimized mean is the grayscale value obtained based on the optimized pixel, and the initial temperature measurement image is an image after the temperature is marked on the optimized temperature image. The initial temperature measurement image is used to represent the temperature of the detection area of the infrared thermal imager unit.
[0096] Furthermore, the temperature calibration unit is constructed, comprising:
[0097] Extract black bodies from a plurality of pre-constructed black bodies in sequence, wherein each of the plurality of black bodies has a different temperature, and perform the following operations on each of the extracted black bodies:
[0098] Scanning the black body using an infrared thermal imager unit to obtain a test infrared image;
[0099] Obtaining a black body image corresponding to the extracted black body based on the test infrared image, and obtaining a black body test value based on the black body image, wherein the black body test value is the average gray value of all pixels in the black body image;
[0100] Obtaining the blackbody temperature based on the extracted blackbody, and constructing the temperature calibration coordinates according to the blackbody temperature and the blackbody test value;
[0101] A plurality of temperature calibration coordinates are obtained based on a plurality of black bodies. After the plurality of temperature calibration coordinates are input into a pre-constructed polynomial fitting curve, a temperature calibration curve is obtained based on a pre-constructed cubic spline interpolation method, wherein the polynomial fitting curve is:
[0102]
[0103] Wherein, Gery(t) represents the extracted blackbody test value, t represents the blackbody temperature of the extracted blackbody, A, B, C, D and E represent the first polynomial coefficient, the second polynomial coefficient, the third polynomial coefficient, the fourth polynomial coefficient and the fifth polynomial coefficient respectively;
[0104] A temperature calibration unit is constructed based on the temperature calibration curve.
[0105] It should be noted that the embodiment of the present invention uses a black body as a standard radiation source to calibrate the temperature measurement of the infrared thermal imager. The test infrared image is an image obtained by scanning the black body using the infrared thermal imager unit. The black body image is an image of the black body area in the test infrared image, and its purpose is to distinguish the area corresponding to the black body from the background. The black body test value is the average gray value of all pixels in the black body image. The black body temperature is the pre-set temperature of the black body. It should be noted that the embodiment of the present invention has set the temperature of each black body before using multiple black bodies to construct a temperature calibration curve. For example, the embodiment of the present invention uses 10 black bodies, and the temperature of each of the 10 black bodies is different. The temperature of each of the 10 black bodies is: 10°C, 15°C, 20, 25°C, 30°C, 35°C, 40°C, 45°C, 50°C, 55°C. Although the embodiment of the present invention does not limit the number of black bodies in the multiple black bodies, the more black bodies there are, the more accurate the temperature selection using the temperature calibration curve is. Therefore, the number of black bodies in the embodiment of the present invention should not cause a huge error in the temperature calibration curve due to the selection of the number.
[0106] It can be understood that the temperature calibration coordinates are curve coordinates constructed using black body temperature and black body test values, and the temperature calibration curve is a curve used to describe the relationship between temperature and gray value, wherein the black body test value is the dependent variable and the black body temperature is the independent variable. The cubic spline interpolation method is a prior art, and the cubic spline interpolation method can predict and supplement the missing data in the polynomial fitting curve, which will not be described in detail here.
[0107] S3. Start a pre-built temperature compensator, wherein the temperature compensator includes an ultrasonic unit, a temperature detection unit and a correction unit, obtain the compensation temperature based on the ultrasonic unit and the temperature detection unit, input the initial temperature measurement map and the compensation temperature into the correction unit, perform a correction operation on the initial temperature map based on the correction unit, and obtain a comprehensive temperature measurement map.
[0108] Furthermore, the obtaining of the compensation temperature based on the ultrasonic unit and the temperature detection unit includes:
[0109] The ultrasonic unit is enabled, a time interval is obtained based on the ultrasonic unit, and the time interval is input into a pre-built ultrasonic temperature compensation model to obtain a compensated temperature;
[0110] Furthermore, the step of inputting the time interval into a pre-built ultrasonic temperature compensation model to obtain the compensated temperature includes:
[0111] Acquire an ultrasonic generator and an ultrasonic receiver based on the ultrasonic unit, and acquire a first sensor, a second sensor, and a third sensor based on the temperature detection unit, wherein the first sensor is disposed on the ultrasonic generator, and the second sensor is disposed on the pre-built heater;
[0112] A plurality of test room temperatures are obtained by using a pre-built room temperature control unit, wherein each of the plurality of test room temperatures corresponds to a different temperature, and the test room temperatures are sequentially extracted from the plurality of test room temperatures, and the following operations are performed on the extracted test room temperatures:
[0113] Acquire the ultrasonic temperature according to the first sensor, acquire the heater temperature of the heater according to the second sensor, acquire the propagation temperature difference according to the ultrasonic temperature and the heater temperature, acquire the propagation time according to the ultrasonic generator and the ultrasonic receiver, and construct a room temperature-ultrasonic compensation curve based on a pre-constructed quartic polynomial, the propagation temperature difference and the propagation time;
[0114] Acquire multiple room temperature-compensation curves based on multiple test room temperatures, and acquire an ultrasonic temperature compensation model based on the multiple room temperature-compensation curves;
[0115] The actual room temperature corresponding to the faulty circuit board is obtained based on the temperature detection unit, and the actual room temperature is input into the ultrasonic temperature compensation model to obtain the compensation temperature.
[0116] It should be noted that the temperature compensator is a unit used to eliminate the measurement error of the infrared thermal imager unit due to different room temperatures during actual measurement. The ultrasonic unit is a unit composed of an ultrasonic detector. The temperature detection unit is a unit used to detect temperature. The correction unit is a unit that uses the compensation temperature to correct the initial temperature measurement chart. The compensation temperature is a unit of the temperature difference affected by the gas at room temperature measured by the ultrasonic unit. In order to minimize the error of the compensation temperature, an infrared detector is provided in the infrared detection unit, and the ultrasonic generator and the infrared detection unit are arranged at the same position.
[0117] It is understandable that in the step of performing a correction operation on the initial temperature map based on the correction unit, the correction unit and the compensation temperature are used to correct the initial temperature map. This is because the heat generated by the faulty circuit board when a fault occurs will be affected by the room temperature and will also dissipate part of the energy during the propagation process. The embodiment of the present invention believes that the effect of the heat dissipation of the faulty parts on the room temperature is negligible, and the correction unit and the compensation temperature are used to correct the initial temperature to eliminate the effect of the room temperature on the detection of the infrared thermal imager unit.
[0118] Specifically, the time interval is the time interval between the ultrasonic generator emitting ultrasonic waves to the faulty circuit board and the ultrasonic receiver receiving the ultrasonic waves. Temperature affects the propagation speed of ultrasonic waves, so the temperature can be determined by the time interval. The embodiment of the present invention sets different room temperatures, aiming to build a more standardized model through a large amount of data, so that the corresponding compensation temperature can be obtained after the time interval and room temperature are input into the ultrasonic temperature compensation model, thereby realizing the correction of the initial temperature measurement map.
[0119] It is understandable that the ultrasonic temperature compensation model is a model for determining the compensation temperature at a certain room temperature using a time interval. The first sensor is a sensor for detecting the temperature of the ultrasonic transmitter, the second sensor is a sensor for detecting the temperature of the heater, and the third sensor is a sensor for detecting the room temperature. The heater is a module that emits heat. In the embodiment of the present invention, the same temperature is set for the heater under different test room temperatures. The room temperature control unit is a unit for controlling the room temperature. The test room temperature is based on different room temperatures set by the room temperature control unit. The ultrasonic temperature is the temperature of the ultrasonic generator, the heater temperature is the temperature of the heater, the propagation temperature difference is the temperature difference between the ultrasonic temperature and the heater temperature, the propagation time is the time interval between the ultrasonic unit emitting and receiving the ultrasonic wave under the extracted test room temperature, and the room temperature-ultrasonic compensation curve is a curve that describes the relationship between the time interval and the propagation temperature difference under the extracted test room temperature. The actual room temperature is the temperature of the room temperature environment in which the faulty circuit board is tested using the third sensor.
[0120] S4. Acquire an initial positioning map of the faulty circuit board based on the camera unit, wherein the initial positioning map is an RGB image, perform a grayscale operation on the initial positioning map to obtain a grayscale positioning map, and perform a segmentation operation on the grayscale positioning map using a pre-built region segmentation method to obtain a binary segmentation map, wherein the binary segmentation map includes multiple part regions and a background region, and the part regions correspond one-to-one to the parts in the faulty circuit board.
[0121] It is understandable that the initial positioning map is an image directly captured by a camera unit, and the grayscale positioning map is an image obtained by converting the RGB image of the initial positioning map into a grayscale image.
[0122] Furthermore, the method of using a pre-built region segmentation method to perform a segmentation operation on the grayscale positioning map to obtain a binary segmentation map includes:
[0123] Using a pre-built image binarization segmentation method to perform a binarization operation on the grayscale positioning map to obtain an initial binarization map, wherein the image binarization segmentation method is an OTSU adaptive threshold image segmentation method;
[0124] A plurality of connected domains are obtained based on the initial binary graph, connected domains are extracted sequentially from the plurality of connected domains, and a binary segmentation graph is obtained after a marking operation is performed on all the extracted connected domains using a pre-constructed structural graph of a faulty circuit board.
[0125] It can be understood that the initial binarization image is a segmentation method of the grayscale positioning image using the OTSU adaptive threshold, which aims to convert the grayscale image into a binary image. In the grayscale positioning image, the grayscale values of the background area are basically the same. The grayscale images of the plates of the circuit board in the faulty circuit board are made of the same material, so the grayscale values are basically the same, while the colors of other parts areas in the faulty circuit board are different. At the same time, due to the influence of light, the plates of the circuit board in the faulty circuit board in the background area will produce different grayscale values. Therefore, the embodiment of the present invention uses the OTSU adaptive threshold to distinguish the plates of the circuit board in the faulty circuit board in the background area from the parts in the faulty circuit board, so that in the initial binarization image, the white after binarization is the part area, and the black is the background area.
[0126] It should be noted that the structure diagram is the arrangement diagram of each part in the faulty circuit board. The location of each part is marked in the arrangement diagram of the faulty circuit board. The location of each part in the faulty circuit board can be queried through the structure diagram. The parts in the structure diagram are used to mark each connected domain in the initial binary diagram, which can effectively improve the recognition efficiency of the faulty parts. The binary segmentation diagram is the diagram after the initial binary diagram is marked using the structure diagram.
[0127] S5. Extract part areas from the binary segmentation map in sequence, and perform the following operations on each extracted part area: obtain a part temperature measurement map corresponding to the extracted part area based on the comprehensive temperature measurement map and the extracted part area, obtain the measured maximum temperature corresponding to the extracted part area based on the part temperature measurement map, and obtain a unit part report based on the measured maximum temperature and the preset set maximum temperature.
[0128] It can be understood that the part temperature measurement map maps the corresponding temperature in the comprehensive temperature measurement map to the part area, and assigns the temperature in the comprehensive temperature measurement map to the extracted part area. The highest temperature is the highest temperature in the part temperature measurement map obtained by the embodiment of the present invention in the fault detection test, and the highest temperature is set to the highest temperature at which the part corresponding to the extracted part area can operate normally.
[0129] Furthermore, the step of obtaining a unit part report based on the measured maximum temperature and the preset maximum temperature includes:
[0130] Compare the measured maximum temperature and the set maximum temperature. If the measured maximum temperature is greater than or equal to the set maximum temperature, the part corresponding to the part temperature measurement diagram is confirmed to be a faulty part, and a fault warning is issued. A unit part report is generated based on the fault warning. Otherwise, the part corresponding to the part temperature measurement diagram is confirmed to be normal, and a unit part report is generated.
[0131] S6. Summarize multiple unit part reports to obtain fault reports, and complete circuit board fault detection based on infrared images combined with digital twins based on the fault reports.
[0132] It is understandable that the embodiment of the present invention presupposes that the faulty circuit board includes multiple parts, so there are multiple unit part reports in the embodiment of the present invention. The fault report is a sum report of multiple unit part reports.
[0133] To solve the problem described in the background technology, an embodiment of the present invention starts a fault scanning device, wherein the fault scanning device includes an infrared thermal imager unit and a camera unit. The infrared thermal imager unit presets a scanning frequency and thermal sensitivity. The infrared thermal imager unit is used to perform a scanning operation on a pre-constructed faulty circuit board to obtain an initial grayscale image; a temperature marking operation is performed on the initial grayscale image to obtain an initial temperature measurement image. The embodiment of the present invention detects the temperature of the faulty circuit board to determine the fault caused by excessive temperature or to identify the faulty parts corresponding to the fault caused by excessive temperature, thereby locating the source of the fault on the faulty circuit board. A pre-built temperature compensator is started, wherein the temperature compensator includes an ultrasonic unit, a temperature detection unit and a correction unit. The compensation temperature is obtained based on the ultrasonic unit and the temperature detection unit. After the initial temperature measurement map and the compensation temperature are input into the correction unit, a correction operation is performed on the initial temperature map based on the correction unit to obtain a comprehensive temperature measurement map. The embodiment of the present invention uses the correction unit and the compensation temperature to correct the initial temperature map. This is because the heat emitted by the faulty circuit board when a fault occurs will be affected by the room temperature and will also dissipate part of the energy during the propagation process. The embodiment of the present invention believes that the influence of the heat dissipation of the faulty parts on the room temperature is negligible. The correction unit and the compensation temperature are used to correct the initial temperature to eliminate the influence of the room temperature on the detection of the infrared thermal imager unit. Based on the camera unit, an initial positioning map of the faulty circuit board is obtained, wherein the initial positioning map is an RGB image, a grayscale operation is performed on the initial positioning map to obtain a grayscale positioning map, and a segmentation operation is performed on the grayscale positioning map using a pre-built region segmentation method to obtain a binary segmentation map, wherein the binary segmentation map includes multiple part regions and background regions, and the part regions correspond to the parts in the faulty circuit board one by one. In the embodiment of the present invention, an infrared thermal imager unit is used to measure the temperature of the faulty circuit board, and a camera unit is used to identify the parts of the faulty circuit board, thereby identifying the faulty parts in the faulty circuit board. Part regions are sequentially extracted from the binary segmentation map, and the following operations are performed on each extracted part region: based on the comprehensive temperature measurement map and the extracted part region, a part temperature measurement map corresponding to the extracted part region is obtained, based on the part temperature measurement map, a measured maximum temperature corresponding to the extracted part region is obtained, based on the measured maximum temperature and the preset set maximum temperature, a unit part report is obtained, multiple unit part reports are summarized to obtain a fault report, and circuit board fault detection based on infrared images combined with digital twins is completed based on the fault report. The embodiment of the present invention determines the faulty parts by comparing the measured maximum temperature and the set maximum temperature, and can accurately identify the location of the faulty parts. Therefore, the circuit board fault detection method, system, electronic device and computer-readable storage medium based on infrared image combined with digital twin proposed by the present invention can realize contactless identification of faulty parts of the circuit board.
[0134] like Figure 2As shown, it is a functional module diagram of a circuit board fault detection system based on infrared images combined with digital twins provided by one embodiment of the present invention.
[0135] The circuit board fault detection system 100 based on infrared image combined with digital twins of the present invention can be installed in an electronic device. According to the functions implemented, the circuit board fault detection system 100 based on infrared image combined with digital twins can include an infrared scanning module 101, a temperature compensation module 102, a part identification module 103 and a report generation module 104. The module of the present invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0136] The infrared scanning module 101 is used to start the fault scanning device, wherein the fault scanning device includes an infrared thermal imager unit and a camera unit, the infrared thermal imager unit is preset with a scanning frequency and a thermal sensitivity, and the infrared thermal imager unit is used to perform a scanning operation on a pre-built faulty circuit board to obtain an initial grayscale image, and a temperature marking operation is performed on the initial grayscale image to obtain an initial temperature measurement image;
[0137] The temperature compensation module 102 is used to start a pre-built temperature compensator, wherein the temperature compensator includes an ultrasonic unit, a temperature detection unit and a correction unit, obtains a compensation temperature based on the ultrasonic unit and the temperature detection unit, inputs the initial temperature measurement map and the compensation temperature into the correction unit, and performs a correction operation on the initial temperature map based on the correction unit to obtain a comprehensive temperature measurement map;
[0138] The part identification module 103 is used to obtain an initial positioning map of the faulty circuit board based on the camera unit, wherein the initial positioning map is an RGB image, grayscale the initial positioning map to obtain a gray positioning map, and segment the gray positioning map using a pre-built region segmentation method to obtain a binary segmentation map, wherein the binary segmentation map includes multiple part regions and a background region, and the part regions correspond one-to-one to the parts in the faulty circuit board;
[0139] The report generation module 104 is used to extract part areas from the binary segmentation map in sequence, and perform the following operations on each extracted part area: obtain a part temperature measurement map corresponding to the extracted part area based on the comprehensive temperature measurement map and the extracted part area, obtain a measured maximum temperature corresponding to the extracted part area based on the part temperature measurement map, obtain a unit part report based on the measured maximum temperature and a preset set maximum temperature, summarize multiple unit part reports to obtain a fault report, and complete circuit board fault detection based on infrared images combined with digital twins based on the fault report.
[0140] like Figure 3, is a schematic diagram of the structure of an electronic device for implementing a circuit board fault detection method based on infrared images combined with digital twins provided by one embodiment of the present invention.
[0141] The electronic device 1 may include a processor 10, a memory 11, a bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a circuit board fault detection program based on infrared images combined with digital twins.
[0142] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 can also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 can also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the circuit board fault detection program based on infrared images combined with digital twins, but also can be used to temporarily store data that has been output or is to be output.
[0143] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect the various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, a circuit board fault detection program based on infrared images combined with digital twins, etc.), and calls the data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
[0144] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0145] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0146] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management system, so that the power management system can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0147] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
[0148] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0149] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0150] The circuit board fault detection program based on infrared images combined with digital twins stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:
[0151] Starting a fault scanning device, wherein the fault scanning device includes an infrared thermal imager unit and a camera unit, and the infrared thermal imager unit has a preset scanning frequency and thermal sensitivity;
[0152] Using an infrared thermal imager unit to perform a scanning operation on a pre-built faulty circuit board to obtain an initial grayscale image;
[0153] Perform temperature marking operation on the initial grayscale image to obtain an initial temperature measurement image;
[0154] Starting a pre-built temperature compensator, wherein the temperature compensator includes an ultrasonic unit, a temperature detection unit, and a correction unit, obtaining a compensation temperature based on the ultrasonic unit and the temperature detection unit, inputting both the initial temperature measurement map and the compensation temperature into the correction unit, and performing a correction operation on the initial temperature map based on the correction unit to obtain a comprehensive temperature measurement map;
[0155] Based on the camera unit, an initial positioning map of the faulty circuit board is obtained, wherein the initial positioning map is an RGB image, a grayscale operation is performed on the initial positioning map to obtain a grayscale positioning map, and a segmentation operation is performed on the grayscale positioning map using a pre-built region segmentation method to obtain a binary segmentation map, wherein the binary segmentation map includes a plurality of part regions and a background region, and the part regions correspond one-to-one to the parts in the faulty circuit board;
[0156] Extract part regions from the binary segmentation image one by one, and perform the following operations on each extracted part region:
[0157] Based on the comprehensive temperature measurement map and the extracted part area, a part temperature measurement map corresponding to the extracted part area is obtained; based on the part temperature measurement map, a measured maximum temperature corresponding to the extracted part area is obtained; and based on the measured maximum temperature and a preset set maximum temperature, a unit part report is obtained;
[0158] Summarize multiple unit part reports to obtain fault reports, and complete circuit board fault detection based on infrared images combined with digital twins based on the fault reports.
[0159] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 3 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0160] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or system capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0161] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:
[0162] Starting a fault scanning device, wherein the fault scanning device includes an infrared thermal imager unit and a camera unit, and the infrared thermal imager unit has a preset scanning frequency and thermal sensitivity;
[0163] Using an infrared thermal imager unit to perform a scanning operation on a pre-built faulty circuit board to obtain an initial grayscale image;
[0164] Perform temperature marking operation on the initial grayscale image to obtain an initial temperature measurement image;
[0165] Starting a pre-built temperature compensator, wherein the temperature compensator includes an ultrasonic unit, a temperature detection unit, and a correction unit, obtaining a compensation temperature based on the ultrasonic unit and the temperature detection unit, inputting both the initial temperature measurement map and the compensation temperature into the correction unit, and performing a correction operation on the initial temperature map based on the correction unit to obtain a comprehensive temperature measurement map;
[0166] Based on the camera unit, an initial positioning map of the faulty circuit board is obtained, wherein the initial positioning map is an RGB image, a grayscale operation is performed on the initial positioning map to obtain a grayscale positioning map, and a segmentation operation is performed on the grayscale positioning map using a pre-built region segmentation method to obtain a binary segmentation map, wherein the binary segmentation map includes a plurality of part regions and a background region, and the part regions correspond one-to-one to the parts in the faulty circuit board;
[0167] Extract part regions from the binary segmentation image one by one, and perform the following operations on each extracted part region:
[0168] Based on the comprehensive temperature measurement map and the extracted part area, a part temperature measurement map corresponding to the extracted part area is obtained; based on the part temperature measurement map, a measured maximum temperature corresponding to the extracted part area is obtained; and based on the measured maximum temperature and a preset set maximum temperature, a unit part report is obtained;
[0169] Summarize multiple unit part reports to obtain fault reports, and complete circuit board fault detection based on infrared images combined with digital twins based on the fault reports.
[0170] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0171] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0172] In addition, each functional module in each embodiment of the present invention may be integrated into one correction unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0173] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0174] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0175] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0176] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or systems stated in a system claim can also be implemented by one unit or system through software or hardware. Secondary words are used to indicate names, but not to indicate any particular order.
[0177] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A circuit board fault detection method based on infrared images combined with digital twins, It is characterized in that The method comprises: Starting a fault scanning device, wherein the fault scanning device includes an infrared thermal imager unit and a camera unit, and the infrared thermal imager unit is preset with a scanning frequency and a thermal sensitivity; Using an infrared thermal imager unit to perform a scanning operation on a pre-built faulty circuit board to obtain an initial grayscale image; Perform temperature marking operation on the initial grayscale image to obtain an initial temperature measurement image; Starting a pre-built temperature compensator, wherein the temperature compensator includes an ultrasonic unit, a temperature detection unit, and a correction unit, obtaining a compensation temperature based on the ultrasonic unit and the temperature detection unit, inputting both the initial temperature measurement map and the compensation temperature into the correction unit, and performing a correction operation on the initial temperature map based on the correction unit to obtain a comprehensive temperature measurement map; Based on the camera unit, an initial positioning map of the faulty circuit board is obtained, wherein the initial positioning map is an RGB image, a grayscale operation is performed on the initial positioning map to obtain a grayscale positioning map, and a segmentation operation is performed on the grayscale positioning map using a pre-built region segmentation method to obtain a binary segmentation map, wherein the binary segmentation map includes a plurality of part regions and a background region, and the part regions correspond one-to-one to the parts in the faulty circuit board; Extract part regions from the binary segmentation image one by one, and perform the following operations on each extracted part region: Based on the comprehensive temperature measurement map and the extracted part area, a part temperature measurement map corresponding to the extracted part area is obtained; based on the part temperature measurement map, a measured maximum temperature corresponding to the extracted part area is obtained; and based on the measured maximum temperature and a preset set maximum temperature, a unit part report is obtained; Summarize multiple unit part reports to obtain fault reports, and complete circuit board fault detection based on infrared images combined with digital twins based on the fault reports.
2. The circuit board fault detection method based on infrared image combined with digital twin as claimed in claim 1, It is characterized in that The infrared thermal imager unit is used to perform a scanning operation on the pre-built faulty circuit board to obtain an initial grayscale image. include: Wherein, the infrared thermal imager unit includes an infrared detection unit, a video amplification unit, an image optimization unit and a display unit; Based on the infrared detection unit, the infrared radiation of the faulty circuit board is received to obtain an electrical signal. After the electrical signal is sent to the video amplification unit, a first grayscale image is generated based on the video amplification unit. After the image optimization unit performs an image optimization operation on the first grayscale image, the optimized first grayscale image is sent to the display unit to obtain an initial grayscale image.
3. The circuit board fault detection method based on infrared image combined with digital twin as claimed in claim 2, It is characterized in that After the image optimization unit performs the image optimization operation on the first grayscale image, the method includes: A plurality of first coordinates in the first grayscale image are acquired based on a pre-constructed image coordinate system, the first coordinates are sequentially extracted from the plurality of first coordinates, and a Gaussian filtering operation is performed on each of the extracted first coordinates, wherein the convolution kernel of the Gaussian filtering is 3×3, and the Gaussian filter function in the Gaussian filtering operation is: Among them, G(x, y) represents the pixel value corresponding to the coordinate after the Gaussian filter operation is performed on the first coordinate, σ represents the preset bandwidth of the Gaussian filter, x represents the horizontal coordinate in the first coordinate, and y represents the vertical coordinate in the first coordinate.
4. The circuit board fault detection method based on infrared image combined with digital twin as claimed in claim 3, It is characterized in that The step of performing a temperature identification operation on the initial grayscale image to obtain an initial temperature measurement image includes: Construct a temperature calibration unit; Based on the initial grayscale image, a plurality of initial coordinates corresponding to the initial grayscale image are obtained, and the initial grayscale image is divided based on the plurality of initial coordinates and a pre-constructed simplified window to obtain an optimized grayscale image, wherein the initial coordinates are pixel coordinates of the initial grayscale image in an image coordinate system, the initial grayscale image includes a plurality of initial pixels, and the initial pixels correspond to the initial coordinates one by one, the size of the simplified window is 2×2, 2 represents the number of pixels, the optimized grayscale image includes a plurality of optimized pixels, and each of the plurality of optimized pixels includes 4 initial pixels; Extract optimized pixels from the optimized grayscale image in sequence, and perform the following operations on the extracted optimized pixels: The optimized mean corresponding to the extracted optimized pixel is obtained according to the extracted optimized pixel, wherein the calculation formula of the optimized mean is: in, represents the optimized mean corresponding to the optimized pixel, (p, q) represents the pixel coordinates corresponding to the optimized pixel, p represents the horizontal coordinate of the pixel coordinates corresponding to the optimized pixel, q represents the vertical coordinate of the pixel coordinates corresponding to the optimized pixel, i represents the number of the initial pixel in the optimized pixel, i is a positive integer from 1 to 4, h i (p i ,q i ) represents the gray value corresponding to the initial pixel labeled i in the optimized pixel, (p i ,q i ) represents the coordinates of the initial pixel labeled i in the optimized pixel, p i represents the horizontal coordinate of the initial pixel labeled i in the optimized pixel, q i Indicates the ordinate corresponding to the initial pixel labeled i within the optimized pixel. After the optimized mean value is input into the temperature calibration unit, an initial temperature value is obtained, and the initial temperature value is used to perform a marking operation on the optimized pixel; An initial temperature measurement image is obtained based on a plurality of optimized pixels in the optimized grayscale image.
5. The circuit board fault detection method based on infrared image combined with digital twin as claimed in claim 4, It is characterized in that The temperature calibration unit is constructed, comprising: Extract black bodies from a plurality of pre-constructed black bodies in sequence, wherein each of the plurality of black bodies has a different temperature, and perform the following operations on each of the extracted black bodies: Scanning the black body using an infrared thermal imager unit to obtain a test infrared image; Obtaining a black body image corresponding to the extracted black body based on the test infrared image, and obtaining a black body test value based on the black body image, wherein the black body test value is the average gray value of all pixels in the black body image; Obtaining the blackbody temperature based on the extracted blackbody, and constructing the temperature calibration coordinates according to the blackbody temperature and the blackbody test value; A plurality of temperature calibration coordinates are obtained based on a plurality of black bodies, and after the plurality of temperature calibration coordinates are input into a pre-constructed polynomial fitting curve, a temperature calibration curve is obtained based on a pre-constructed cubic spline interpolation method, wherein the polynomial fitting curve is: Wherein, Gery(t) represents the extracted blackbody test value, t represents the blackbody temperature of the extracted blackbody, A, B, C, D and E represent the first polynomial coefficient, the second polynomial coefficient, the third polynomial coefficient, the fourth polynomial coefficient and the fifth polynomial coefficient respectively; A temperature calibration unit is constructed based on the temperature calibration curve.
6. The circuit board fault detection method based on infrared image combined with digital twin as claimed in claim 1, It is characterized in that The method of obtaining the compensation temperature based on the ultrasonic unit and the temperature detection unit includes: The ultrasonic unit is enabled, a time interval is obtained based on the ultrasonic unit, and the time interval is input into a pre-built ultrasonic temperature compensation model to obtain a compensated temperature.
7. The circuit board fault detection method based on infrared image combined with digital twin as claimed in claim 6, It is characterized in that The step of inputting the time interval into a pre-built ultrasonic temperature compensation model to obtain a compensated temperature comprises: Acquire an ultrasonic generator and an ultrasonic receiver based on the ultrasonic unit, and acquire a first sensor, a second sensor, and a third sensor based on the temperature detection unit, wherein the first sensor is disposed on the ultrasonic generator, and the second sensor is disposed on the pre-built heater; A plurality of test room temperatures are obtained by using a pre-built room temperature control unit, wherein each of the plurality of test room temperatures corresponds to a different temperature, and the test room temperatures are sequentially extracted from the plurality of test room temperatures, and the following operations are performed on the extracted test room temperatures: Acquire the ultrasonic temperature according to the first sensor, acquire the heater temperature of the heater according to the second sensor, acquire the propagation temperature difference according to the ultrasonic temperature and the heater temperature, acquire the propagation time according to the ultrasonic generator and the ultrasonic receiver, and construct a room temperature-ultrasonic compensation curve based on a pre-constructed quartic polynomial, the propagation temperature difference and the propagation time; Acquire multiple room temperature-compensation curves based on multiple test room temperatures, and acquire an ultrasonic temperature compensation model based on the multiple room temperature-compensation curves; The actual room temperature corresponding to the faulty circuit board is obtained based on the temperature detection unit, and the actual room temperature is input into the ultrasonic temperature compensation model to obtain the compensation temperature.
8. The circuit board fault detection method based on infrared image combined with digital twin as claimed in claim 1, It is characterized in that The method of using the pre-built region segmentation method to perform a segmentation operation on the grayscale positioning map to obtain a binary segmentation map includes: Using a pre-built image binarization segmentation method to perform a binarization operation on the grayscale positioning map to obtain an initial binarization map, wherein the image binarization segmentation method is an OTSU adaptive threshold image segmentation method; A plurality of connected domains are obtained based on the initial binary graph, connected domains are extracted sequentially from the plurality of connected domains, and a binary segmentation graph is obtained after a marking operation is performed on all the extracted connected domains using a pre-constructed structural graph of a faulty circuit board.
9. The circuit board fault detection method based on infrared image combined with digital twin as claimed in claim 1, It is characterized in that The unit part report is obtained based on the measured maximum temperature and the preset maximum temperature, including: Compare the measured maximum temperature and the set maximum temperature. If the measured maximum temperature is greater than or equal to the set maximum temperature, the part corresponding to the part temperature measurement diagram is confirmed to be a faulty part, and a fault warning is issued. A unit part report is generated based on the fault warning. Otherwise, the part corresponding to the part temperature measurement diagram is confirmed to be normal, and a unit part report is generated.
10. A circuit board fault detection system based on infrared images combined with digital twins, It is characterized in that The system comprises: An infrared scanning module is used to start a fault scanning device, wherein the fault scanning device includes an infrared thermal imager unit and a camera unit, the infrared thermal imager unit is preset with a scanning frequency and a thermal sensitivity, and the infrared thermal imager unit is used to perform a scanning operation on a pre-built faulty circuit board to obtain an initial grayscale image, and a temperature marking operation is performed on the initial grayscale image to obtain an initial temperature measurement image; A temperature compensation module, used to start a pre-built temperature compensator, wherein the temperature compensator includes an ultrasonic unit, a temperature detection unit and a correction unit, obtains a compensation temperature based on the ultrasonic unit and the temperature detection unit, inputs the initial temperature measurement map and the compensation temperature into the correction unit, and performs a correction operation on the initial temperature map based on the correction unit to obtain a comprehensive temperature measurement map; A parts identification module, used for obtaining an initial positioning map of a faulty circuit board based on a camera unit, wherein the initial positioning map is an RGB image, performing a grayscale operation on the initial positioning map to obtain a grayscale positioning map, performing a segmentation operation on the grayscale positioning map using a pre-built region segmentation method to obtain a binary segmentation map, wherein the binary segmentation map includes a plurality of part regions and a background region, and the part regions correspond one-to-one to the parts in the faulty circuit board; A report generation module is used to extract part areas from the binary segmentation map in sequence, and perform the following operations on each extracted part area: obtain a part temperature measurement map corresponding to the extracted part area based on the comprehensive temperature measurement map and the extracted part area, obtain a measured maximum temperature corresponding to the extracted part area based on the part temperature measurement map, obtain a unit part report based on the measured maximum temperature and a preset set maximum temperature, summarize multiple unit part reports, obtain a fault report, and complete circuit board fault detection based on infrared images combined with digital twins based on the fault report.
Citation Information
Cited By
Power generation enterprise safety fault detection system based on image recognition
CN119469419A
