Thermodynamic diagram drawing method and device, equipment and storage medium

By drawing the thermal map using rectangular defect coordinates and maximum stacking times in the canvas canvas, the problem of low intuitiveness of existing thermal maps is solved, and the efficiency and flexibility of defect detection are improved.

CN119648841APending Publication Date: 2025-03-18STORAGEX TECH INC
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411596357.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Existing heat maps are less intuitive when displaying defect data sets, which causes quality inspectors to spend more time analyzing and analyzing defect data, which in turn affects the efficiency of defect detection.

Method used

The final defect heatmap is generated by drawing the assigned color bars in the canvas canvas, and the color value of each pixel is calculated based on transparency.

Benefits of technology

The efficiency of defect detection is improved, allowing quality inspectors to see the defect distribution position more intuitively, and focus on inspecting areas according to the defect stacking situation, thereby improving the flexibility and intuitiveness of thermal mapping.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119648841A_ABST
    Figure CN119648841A_ABST
Patent Text Reader

Abstract

The invention relates to a thermodynamic diagram drawing method, device and equipment and a storage medium, and is applied to the field of defect detection, and the thermodynamic diagram drawing method comprises the following steps: obtaining rectangular defect coordinates and the maximum stacking times of rectangular defects, and drawing an assignment color bar according to the maximum stacking times of the rectangular defects; calculating the transparency of each pixel in the canvas according to the rectangular defect coordinates and the maximum stacking times of the rectangular defects; determining a color determination value of each pixel according to the transparency of each pixel and the maximum stacking frequency of the rectangular defects, and searching a corresponding color in the assignment color bar according to the color determination value of each pixel; and coloring the color corresponding to each searched pixel to the canvas, and generating a final defect thermodynamic diagram. The method has the technical effects that the intuition and the flexibility of the defect thermodynamic diagram are improved, and then the defect detection efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of defect detection technology, and in particular to a thermal map drawing method, device, equipment and storage medium. Background Art

[0002] A heat map is a statistical chart that displays data by coloring blocks of color. When drawing a heat map, you need to specify the color mapping rules; for example, larger values ​​are represented by darker colors, smaller values ​​are represented by lighter colors, or larger values ​​are represented by warmer colors, smaller values ​​are represented by cooler colors, etc. In the process of product production, the identified defects can be marked in the form of a heat map, so that the areas where defects are concentrated can be displayed, so that quality inspectors can view and troubleshoot defects.

[0003] Currently, thermal Figure 1 Generally, a defect heat map can be drawn in the form of point drawing through a third-party plug-in. However, the defect heat map drawn in point form displays data in the form of a scatter plot, and each data point represents only one data value, which makes the point heat map less intuitive when displaying data sets. This may cause quality inspectors to spend more time parsing and analyzing defect data, which may affect the efficiency of defect detection and reduce the efficiency of defect detection. Summary of the invention

[0004] In order to help solve the problem that point heat maps are less intuitive in displaying data sets, which may cause quality inspectors to spend more time parsing and analyzing defect data, which may in turn lead to reduced defect detection efficiency, the present application provides a heat map drawing method, device, equipment and storage medium.

[0005] In a first aspect, the present application provides a method for drawing a heat map, which adopts the following technical solution: the method is based on a canvas, the canvas includes a number of pixels, and the method includes:

[0006] Obtaining the coordinates of the rectangular defect and the maximum stacking times of the rectangular defect, and drawing a valued color bar according to the maximum stacking times of the rectangular defect;

[0007] Calculate the transparency of each pixel in the canvas according to the rectangular defect coordinates and the maximum stacking times of the rectangular defects;

[0008] Determine a color determination value for each pixel according to the transparency of each pixel and the maximum number of stacking times of the rectangular defects, and search for a corresponding color in the assigned color bar according to the color determination value of each pixel;

[0009] The color corresponding to each pixel found is colored to the canvas, and the final defect heat map is generated.

[0010] In a specific implementation scheme, the assigned color bar is a color bar whose preset color value corresponds to the number of stacking times of the rectangular defects, and the height of the assigned color bar is determined according to the maximum number of stacking times of the rectangular defects and a preset constant.

[0011] In a specific implementation scheme, the height of the assigned color bar is determined according to the maximum stacking number of the rectangular defects and a preset constant, including:

[0012] Determining whether the maximum stacking number of the rectangular defects is less than a preset number;

[0013] If the maximum stacking number of the rectangular defects is less than the preset number, the height of the assigned color bar is the maximum stacking number of the rectangular defects multiplied by the preset constant;

[0014] If the maximum stacking number of the rectangular defects is not less than a preset number, the maximum stacking number of the rectangular defects is set to the height of the assigned color bar.

[0015] In a specific implementation scheme, the calculating the transparency of each pixel in the canvas according to the rectangular defect coordinates and the maximum stacking times of the rectangular defects includes:

[0016] Calculating the transparency of a single layer of rectangular defects according to the maximum number of stacking times of the rectangular defects;

[0017] Draw a defect transparency display diagram according to the rectangular defect coordinates and the transparency of the single-layer rectangular defect;

[0018] The stacking times of each pixel are obtained according to the trap transparency display map, and the transparency of each pixel in the canvas is calculated according to the stacking times of each pixel.

[0019] In a specific possible implementation manner, before determining the color determination value of each pixel according to the transparency of each pixel and the maximum stacking number of the rectangular defects, the method further includes:

[0020] Draw a slider color bar according to the maximum number of stacking of the rectangular defects;

[0021] Set the maximum value and minimum value of the slider color bar, wherein the maximum value of the slider color bar is not greater than the maximum stacking times of the rectangular defects;

[0022] Calculate the color value range of each pixel according to the maximum and minimum values ​​of the slider color bar;

[0023] The step of determining the color value of each pixel according to the transparency of each pixel and the maximum number of stacking times of the rectangular defects comprises:

[0024] Calculating the color value of each pixel according to the transparency of each pixel and the maximum stacking number of the rectangular defects, and generating a color calculation value of each pixel;

[0025] It is determined whether the color calculation value of each pixel is within the color value range, and the color determination values ​​of a plurality of the pixels are determined according to the determination result.

[0026] In a specific implementation manner, determining the color values ​​of the plurality of pixels according to the judgment result comprises:

[0027] If the color calculation value of the pixel is not within the color value range, and the color calculation value is greater than an upper limit value of the color value range, setting the upper limit value of the color value range as the color determination value of the pixel;

[0028] If the color calculation value of the pixel is not within the color value range, and the color calculation value is less than the lower limit of the color value range, setting the color determination value of the pixel to 0;

[0029] If the color calculation value of the pixel is within the color value range, the color calculation value is set as the color determination value of the pixel.

[0030] In a specific implementation scheme, after coloring the color corresponding to each pixel found to the canvas and generating the final defect heat map, the method further includes:

[0031] In response to the stacking times acquisition instruction, the stacking times of the position of the times to be acquired are determined according to the color value of the position of the times to be acquired and the assigned color bar, and the stacking times of the position of the times to be acquired are displayed.

[0032] In a second aspect, the present application provides a heat map drawing device, which adopts the following technical solution: the device is based on a canvas, the canvas includes a number of pixels, and the device includes:

[0033] A data acquisition module, used to acquire the coordinates of the rectangular defects and the maximum stacking times of the rectangular defects, and to draw a valued color bar according to the maximum stacking times of the rectangular defects;

[0034] A transparency calculation module, used for calculating the transparency of each pixel in the canvas according to the rectangular defect coordinates and the maximum stacking times of the rectangular defects;

[0035] A color value determination module, used to determine a color determination value of each pixel according to the transparency of each pixel and the maximum stacking times of the rectangular defects, and to search for a corresponding color in the assigned color bar according to the color determination value of each pixel;

[0036] The heat map generation module is used to color the color corresponding to each pixel found to the canvas and generate the final defect heat map.

[0037] In a third aspect, the present application provides a computer device, which adopts the following technical solution: it includes a memory and a processor, and the memory stores a computer program that can be loaded by the processor and execute any of the above-mentioned thermal map drawing methods.

[0038] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution: storing a computer program that can be loaded by a processor and execute any of the above-mentioned thermal map drawing methods.

[0039] In summary, this application has the following beneficial technical effects:

[0040] Through the coordinates of rectangular defects and the maximum number of stacking of rectangular defects, a heat map showing the distribution of defects can be drawn on the canvas, so that quality inspectors can see the distribution of defects more intuitively, so that they can focus on inspecting a certain area according to the defect stacking situation, thereby improving the efficiency of defect detection. In addition, quality inspectors can flexibly select key areas that need further analysis and viewing as needed, and intuitively view the number of stacking, which improves the flexibility and intuitiveness of heat map drawing, and can further improve the efficiency of defect detection based on heat maps. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 is a flow chart of a method for drawing a thermal map in an embodiment of the present application;

[0042] Figure 2 is a schematic diagram of rectangular defect stacking in an embodiment of the present application;

[0043] Figure 3 is a schematic diagram of a slider color bar provided in an embodiment of the present application;

[0044] Figure 4 is a schematic diagram of a thermal map drawing device in an embodiment of the present application;

[0045] Figure 5 It is a schematic diagram used to embody a computer device in an embodiment of the present application.

[0046] Reference numerals: 401, data acquisition module; 402, transparency calculation module; 403, color value determination module; 404, heat map generation module. DETAILED DESCRIPTION

[0047] The following combination Figure 1-Figure 5 This application is described in further detail.

[0048] An embodiment of the present application discloses a thermal map drawing method, which is applied to a thermal map drawing system. The method can be used to draw a rectangular defect thermal map, so that quality inspectors can more intuitively view the distribution locations of defects and the number of defect stackings in the same area. Quality inspectors can focus on checking areas with a large number of defect stackings to ensure the quality of product production.

[0049] In the process of product production, defect detection is an essential step. Defect detection can be used to troubleshoot and solve product defects, thereby improving the yield of the product. In the process of defect detection, users can usually use a rectangular box to mark the defective part with a rectangular detection box to obtain a rectangular defect. For the same batch of materials, the rectangular defects detected on each material are displayed in the form of a heat map for the convenience of quality inspectors to view. When drawing a heat map, the defects of the same batch of materials are displayed on a canvas, and the distribution of defects in different areas is displayed by the depth of color. For example, when the color of an area is dark, it means that there may be multiple materials with defects in the same area. Quality inspectors need to focus on the location of the area. If the color of an area is light, it means that only individual materials have defects at that location. It may be an accidental situation and can be set as a non-key area for investigation.

[0050] However, some existing third-party plug-ins generally use point drawing to draw heat maps. Point drawing heat maps display data sets in the form of scattered points. For the drawing of rectangular defects, the final displayed data set is less intuitive, which may cause quality inspectors to spend more time parsing and analyzing data, thereby affecting the efficiency of defect detection. In order to help improve the efficiency of defect detection, the present application provides a heat map drawing method.

[0051] Reference Figure 1 , the method comprises the following steps:

[0052] S10, obtaining the coordinates of the rectangular defect and the maximum stacking times of the rectangular defect, and drawing a valued color bar according to the maximum stacking times of the rectangular defect.

[0053] Specifically, the rectangular defect heat map is drawn on the front end through canvas. Canvas is a tag in HTML5 that provides a blank canvas on which graphics can be drawn through JavaScript. The heat map drawing system can directly obtain the coordinates of the rectangular defects and the maximum number of stacking of rectangular defects through the back end; the rectangular defect can also be understood as a rectangular box marked according to the size and position of the defect after the defect is detected. The maximum number of defect stacking can be understood as the maximum number of times a defect occurs in the same area. For example, refer to Figure 2 , the maximum stacking number of rectangular defects is 2. Draw a valued color bar according to the obtained maximum stacking number; wherein the valued color bar is a color bar corresponding to the preset color value and the stacking number of rectangular defects, and the height of the valued color bar can be determined according to the maximum stacking number of rectangular defects and a preset constant.

[0054] Specifically, the method for determining the height of the assigned color bar includes: first, judging whether the maximum stacking number of rectangular defects is less than the preset number; if the maximum stacking number of rectangular defects is less than the preset number, the height of the assigned color bar is the maximum stacking number of rectangular defects multiplied by the preset constant; if the maximum stacking number of rectangular defects is not less than the preset number, the maximum stacking number of rectangular defects is set as the height of the assigned color bar. For example, assuming that the preset constant is 10 and the preset number of stacking is set to 20, first, judge whether the maximum number of stacking obtained is less than 20. If the maximum number of stacking is less than 20, the height of the assigned color bar is the maximum number of stacking times multiplied by 10. If the maximum number of stacking is greater than or equal to 20, the maximum number of stacking is directly set as the height of the assigned color bar; for example, assuming that the maximum number of stacking is 5, 5 is less than 20, the height of the assigned color bar is set to 5*10=50, assuming that the maximum number of stacking is 80, 80 is greater than 20, the height of the assigned color bar is directly set to 80, and the preset constant defaults to 1. It should be noted that the preset constant and the preset value of the number of stacking in the embodiment of the present application can be set according to actual needs, and there is no restriction here.

[0055] S20, calculating the transparency of each pixel in the canvas according to the coordinates of the rectangular defect and the maximum number of stacking times of the rectangular defects.

[0056] Specifically, the transparency of each pixel in the canvas is calculated according to the position of the rectangular defect and the number of times the rectangular defects are stacked. Since different transparencies correspond to different stacking times, and different stacking times correspond to different color values, the transparency of each pixel is calculated to facilitate the determination of the color value corresponding to each pixel.

[0057] The transparency calculation method of each pixel may include: first, calculating the transparency of a single layer of rectangular defects according to the maximum number of stacking times of rectangular defects. The transparency calculation method of a single layer of rectangular defects is to divide 1 by the maximum number of stacking times. For example, if the maximum number of stacking times is 20, the transparency of each layer of rectangular defects is 1 / 20, which is 0.05. After calculating the transparency of a single layer of rectangular defects, all rectangular defects can be drawn on the canvas with different degrees of transparency according to the coordinates of the defects to generate a transparency display diagram of rectangular defects; the coordinates of the rectangular defects can determine the specific position of the rectangular defects on the canvas, and the rectangular defects of all materials are drawn on a canvas. The transparency of different areas can be obtained by superimposing single layers of transparency. Assuming that the transparency of a single layer of defects is 0.05, in the defect transparency display diagram, the transparency value of the rectangular defects at the position where the number of stacking times is 20 is 1, the transparency of the rectangular defects stacked once is 0.05, and the transparency of the position without rectangular defects is 0. Afterwards, the number of stacking times for each pixel can be obtained according to the defect transparency display diagram. After obtaining the number of stacking times for each pixel, the transparency of each pixel in the canvas is calculated. The range of pixel transparency is 0 to 255, where 0 represents full transparency and 255 represents full opacity.

[0058] S30, determining a color determination value for each pixel according to the transparency of each pixel and the maximum number of stacking times of rectangular defects, and searching for a corresponding color in the assigned color bar according to the color determination value for each pixel.

[0059] Specifically, the assigned color bar pre-sets the color value corresponding to each stacking number. After calculating the transparency of each pixel, the color value of each pixel can be determined based on the pixel transparency and the maximum stacking number, and then the corresponding color in the assigned color bar is searched based on the color value.

[0060] The color value of each pixel can be determined as follows:

[0061] J = imgeData[i] / (255 / maximum stacking times)*4*indexValue;

[0062] Among them, J represents the color value of each pixel, imgeData[i] represents the transparency of each pixel in the canvas, and indexValue represents a preset constant.

[0063] S40, coloring the color corresponding to each pixel found to the canvas, and generating a final defect heat map.

[0064] Specifically, after finding the color corresponding to each pixel, the color of each pixel is colored on the canvas, and a defect heat map is generated through different colors and color depths. The generated defect heat map can show the distribution of defects for quality inspectors to view and analyze.

[0065] In the present application, a heat map showing the defect distribution can be drawn on the canvas through the rectangular defect coordinates and the maximum stacking number of rectangular defects, so that quality inspectors can see the distribution of defects more intuitively, so that quality inspectors can focus on inspecting a certain area according to the defect stacking situation, thereby improving the efficiency of defect detection.

[0066] In one embodiment, considering that it is inconvenient to observe and analyze the details of a certain area in a complete defect heat map, the following steps may be performed before determining the color determination value of each pixel according to the transparency of each pixel and the maximum number of stacking times of rectangular defects:

[0067] First, draw the slider color bar according to the maximum number of stacking times of rectangular defects. Set the slider color bar as follows Figure 3 As shown, the set slider color can be displayed on the front page for the user to select the area to be viewed. After that, the maximum and minimum values ​​of the slider color bar are set. The maximum value of the slider color bar is not greater than the maximum stacking times of rectangular defects. The setting method is that the user sets it according to the needs. Specifically, the user selects the area to be viewed to set the maximum and minimum values ​​of the stacking times. The user transmits the information of the set maximum and minimum values ​​to the system, and the system sets the maximum and minimum values ​​of the slider according to the received range information; for example, refer to Figure 3 (a) The user did not set the range of the maximum and minimum values. When the maximum number of stacking times of a batch of materials is 81, the maximum value of the slider is set to 81, the minimum value of the slider is set to 0, and the slider color bar is displayed on the front end. Figure 3 (b), users can choose to set the number of stacking times they need to focus on. When the user wants to view the defect distribution area with a stacking number between 85 and 197, the maximum value of the slider color can be set to 197 and the minimum value of the slider color bar can be set to 85. By setting the slider color bar, users can view the area they need to analyze, which increases flexibility. After determining the maximum and minimum values ​​of the slider color bar, calculate the color value range of each pixel based on the maximum and minimum values ​​of the slider color bar.

[0068] Afterwards, determining the color determination value of each pixel according to the transparency of each pixel and the maximum number of stacking times of rectangular defects may be specifically performed as follows:

[0069] The color value of each pixel is calculated according to the transparency of each pixel and the maximum stacking number of rectangular defects, and the color calculation value of each pixel is generated; whether the color calculation value of each pixel is within the color value range is judged, and the color determination values ​​of several pixels are determined according to the judgment result.

[0070] The method of determining the color determination values ​​of a plurality of pixels according to the judgment result may be specifically performed as follows:

[0071] If the color calculation value of the pixel is not within the color value range, and the color calculation value is greater than the upper limit of the color value range, the upper limit of the color value range is set as the color determination value of the pixel; if the color calculation value of the pixel is not within the color value range, and the color calculation value is less than the lower limit of the color value range, the color determination value of the pixel is set to 0; if the color calculation value of the pixel is within the color value range, the color calculation value is set as the color determination value of the pixel. For example, refer to Figure 3 (b) The user determines the maximum value of the slider color bar as 197 and the minimum value as 85 according to the user's needs. First, the color value range is calculated according to the user's needs. The calculated color maximum value corresponding to 197 is assumed to be J max , the minimum color value corresponding to 85 is assumed to be J min , calculate the color value J of each pixel according to the transparency and the maximum number of stacking times. If the calculated J is in [J min , J max ], the calculated color value is directly set as the color value of the pixel. If the calculated J is greater than J max , then J max Set to the color value of the pixel. If the calculated J is less than J min , then the color value of the pixel can be directly set to 0.

[0072] In the present application, considering that the global reality defect heat map is difficult to view and analyze the details of the defect distribution in different locations and regions, therefore, by setting the slider tone and dynamically drawing the heat map, the user can more intuitively view the area location required by the user, which is more helpful for quality inspectors to analyze the defect distribution and subsequently conduct targeted investigation of the causes of defects.

[0073] In one embodiment, considering that it is difficult for the naked eye to directly obtain the number of stacking times corresponding to a color when the colors are similar, after coloring the color corresponding to each pixel found to the canvas and generating the final defect heat map, the following steps may be performed:

[0074] In response to the instruction to obtain the number of stacks, the number of stacks at the position to be obtained is determined according to the color value of the position to be obtained and the assigned color bar, and the number of stacks at the position to be obtained is displayed. In actual applications, in the canvas interface, the mouse moves to the position where the number of stacks needs to be displayed in the canvas, and the system receives an instruction to obtain the number of stacks, finds the corresponding number of stacks by determining the color value of the current position, and displays the number of stacks in the rectangular box following the mouse. If the number of stacks is 0, it is not displayed.

[0075] In the present application scheme, it is considered that when the colors are similar, it is difficult for the human eye to distinguish the colors, and the stacking number corresponding to the color is directly obtained by the color. Therefore, the stacking number display setting is used to allow the user to view the stacking number, so that the key points can be checked according to the stacking number to improve the efficiency of defect detection.

[0076] Figure 1 FIG. 1 is a flow chart of a method for drawing a thermal map in one embodiment. It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but the steps are not necessarily executed in the order indicated by the arrows; unless otherwise specified in this document, there is no strict order restriction for the execution of the steps, and the steps may be executed in other orders; and Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0077] Based on the above method, an embodiment of the present application also discloses a thermal map drawing device.

[0078] Reference Figure 4 , the device includes the following modules:

[0079] The data acquisition module 401 is used to acquire the coordinates of the rectangular defects and the maximum stacking times of the rectangular defects, and draw the assigned color bar according to the maximum stacking times of the rectangular defects;

[0080] A transparency calculation module 402 is used to calculate the transparency of each pixel in the canvas according to the coordinates of the rectangular defect and the maximum stacking number of the rectangular defects;

[0081] A color value determination module 403 is used to determine a color determination value of each pixel according to the transparency of each pixel and the maximum number of stacking times of rectangular defects, and to search for a corresponding color in the assigned color bar according to the color determination value of each pixel;

[0082] The heat map generation module 404 is used to color the color corresponding to each pixel found to the canvas and generate a final defect heat map.

[0083] In one embodiment, the assigned color bar in the data acquisition module 401 is a color bar with a preset color value corresponding to the number of stacking times of rectangular defects, and the height of the assigned color bar is determined according to the maximum number of stacking times of rectangular defects and a preset constant.

[0084] In one embodiment, the data acquisition module 401 is specifically used to determine whether the maximum stacking number of rectangular defects is less than a preset number; if the maximum stacking number of rectangular defects is less than the preset number, the height of the assigned color bar is the maximum stacking number of rectangular defects multiplied by a preset constant; if the maximum stacking number of rectangular defects is not less than the preset number, the maximum stacking number of rectangular defects is set to the height of the assigned color bar.

[0085] In one embodiment, the transparency calculation module 402 is specifically used to calculate the transparency of a single-layer rectangular defect according to the maximum stacking number of rectangular defects; draw a defect transparency display map according to the rectangular defect coordinates and the transparency of the single-layer rectangular defect; obtain the stacking number of each pixel according to the defect transparency display map, and calculate the transparency of each pixel in the canvas according to the stacking number of each pixel.

[0086] In one embodiment, the color value determination module 403 is further used to draw a slider color bar according to the maximum stacking number of rectangular defects; set the maximum value and the minimum value of the slider color bar, wherein the maximum value of the slider color bar is not greater than the maximum stacking number of rectangular defects; calculate the color value range of each pixel according to the maximum value and the minimum value of the slider color bar; determine the color determination value of each pixel according to the transparency of each pixel and the maximum stacking number of rectangular defects, including: calculating the color value of each pixel according to the transparency of each pixel and the maximum stacking number of rectangular defects, and generating a color calculation value for each pixel; judging whether the color calculation value of each pixel is within the color value range, and determining the color determination values ​​of several pixels according to the judgment result.

[0087] In one embodiment, the color value determination module 403 is further used to set the upper limit value of the color value range as the color determination value of the pixel if the color calculation value of the pixel is not within the color value range and the color calculation value is greater than the upper limit value of the color value range; set the color determination value of the pixel to 0 if the color calculation value of the pixel is not within the color value range and the color calculation value is less than the lower limit value of the color value range; and set the color calculation value as the color determination value of the pixel if the color calculation value of the pixel is within the color value range.

[0088] In one embodiment, the heat map generation module 404 is also used to respond to the stacking number acquisition instruction, determine the stacking number of the number position to be acquired according to the color value of the number position to be acquired and the assigned color bar, and display the stacking number of the number position to be acquired.

[0089] The thermal map drawing device provided in the embodiment of the present application can be applied to the thermal map drawing method provided in the above embodiment. For relevant details, refer to the above method embodiment. The implementation principle and technical effect are similar and will not be repeated here.

[0090] It should be noted that: when the thermal map drawing device provided in the embodiment of the present application draws a thermal map, only the division of the above-mentioned functional modules / functional units is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules / functional units as needed, that is, the internal structure of the thermal map drawing device is divided into different functional modules / functional units to complete all or part of the functions described above. In addition, the implementation method of the thermal map drawing method provided in the above method embodiment and the implementation method of the thermal map drawing device provided in this embodiment belong to the same concept. The specific implementation process of the thermal map drawing device provided in this embodiment is detailed in the above method embodiment, which will not be repeated here.

[0091] The embodiment of the present application also discloses a computer device.

[0092] Specifically, if Figure 5 As shown, the computer device can be a computer device such as a desktop computer, a laptop computer, a PDA, and a cloud server. The computer device may include, but is not limited to, a processor and a memory. The processor and the memory may be connected via a bus or otherwise. The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, graphics processors (GPU), embedded neural network processors (NPU) or other dedicated deep learning coprocessors, discrete gates or transistor logic devices, discrete hardware components and other chips, or a combination of the above-mentioned various chips.

[0093] As a non-transient computer-readable storage medium, the memory can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the methods in the above-mentioned embodiments of the present application. The processor executes various functional applications and data processing of the processor by running the non-transient software programs, instructions and modules stored in the memory, that is, the method in the above-mentioned method implementation is realized. The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0094] The embodiment of the present application also discloses a computer-readable storage medium.

[0095] Specifically, a computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method in the above-mentioned method implementation is implemented. Those skilled in the art will understand that the implementation of all or part of the process in the above-mentioned implementation method of the present application can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and the program, when executed, may include the process of the implementation of the above-mentioned methods. Among them, the storage medium may be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (Hard Disk Drive, abbreviated as: HDD) or a solid-state drive (SSD), etc.; the storage medium may also include a combination of the above-mentioned types of memory.

[0096] This specific embodiment is merely an explanation of the present invention and is not a limitation of the present invention. After reading this specification, those skilled in the art may make non-creative modifications to the present embodiment as needed. However, as long as they are within the scope of the claims of the present invention, they are protected by the patent law.

Claims

1. A method for drawing a heat map, characterized in that: The method is based on a canvas, the canvas includes a number of pixels, and the method includes: Obtaining the coordinates of the rectangular defect and the maximum stacking times of the rectangular defect, and drawing a valued color bar according to the maximum stacking times of the rectangular defect; Calculate the transparency of each pixel in the canvas according to the rectangular defect coordinates and the maximum stacking times of the rectangular defects; Determine a color determination value for each pixel according to the transparency of each pixel and the maximum number of stacking times of the rectangular defects, and search for a corresponding color in the assigned color bar according to the color determination value of each pixel; The color corresponding to each pixel found is colored to the canvas, and the final defect heat map is generated.

2. The method according to claim 1, characterized in that: The valued color bar is a color bar having a preset color value corresponding to the number of stacking times of the rectangular defects, and the height of the valued color bar is determined according to the maximum number of stacking times of the rectangular defects and a preset constant.

3. The method according to claim 2, characterized in that: The height of the assigned color bar is determined according to the maximum stacking times of the rectangular defects and a preset constant, including: Determining whether the maximum stacking number of the rectangular defects is less than a preset number; If the maximum stacking number of the rectangular defects is less than the preset number, the height of the assigned color bar is the maximum stacking number of the rectangular defects multiplied by the preset constant; If the maximum stacking number of the rectangular defects is not less than a preset number, the maximum stacking number of the rectangular defects is set to the height of the assigned color bar.

4. The method according to claim 1, characterized in that: The calculating the transparency of each pixel in the canvas according to the rectangular defect coordinates and the maximum stacking times of the rectangular defects includes: Calculating the transparency of a single layer of rectangular defects according to the maximum number of stacking times of the rectangular defects; Draw a defect transparency display diagram according to the rectangular defect coordinates and the transparency of the single-layer rectangular defect; The stacking times of each pixel are obtained according to the trap transparency display map, and the transparency of each pixel in the canvas is calculated according to the stacking times of each pixel.

5. The method according to claim 1, characterized in that: Before determining the color determination value of each pixel according to the transparency of each pixel and the maximum stacking number of the rectangular defects, the method further includes: Draw a slider color bar according to the maximum number of stacking of the rectangular defects; Set the maximum value and minimum value of the slider color bar, wherein the maximum value of the slider color bar is not greater than the maximum stacking times of the rectangular defects; Calculate the color value range of each pixel according to the maximum and minimum values ​​of the slider color bar; The step of determining the color value of each pixel according to the transparency of each pixel and the maximum number of stacking times of the rectangular defects comprises: Calculating the color value of each pixel according to the transparency of each pixel and the maximum stacking number of the rectangular defects, and generating a color calculation value of each pixel; It is determined whether the color calculation value of each pixel is within the color value range, and the color determination values ​​of a plurality of the pixels are determined according to the determination result.

6. The method according to claim 5, characterized in that: Determining the color determination values ​​of the plurality of pixels according to the judgment result comprises: If the color calculation value of the pixel is not within the color value range, and the color calculation value is greater than an upper limit value of the color value range, setting the upper limit value of the color value range as the color determination value of the pixel; If the color calculation value of the pixel is not within the color value range, and the color calculation value is less than the lower limit of the color value range, setting the color determination value of the pixel to 0; If the color calculation value of the pixel is within the color value range, the color calculation value is set as the color determination value of the pixel.

7. The method according to claim 1, characterized in that: After coloring the color corresponding to each pixel found to the canvas and generating the final defect heat map, the method further includes: In response to the stacking times acquisition instruction, the stacking times of the position of the times to be acquired are determined according to the color value of the position of the times to be acquired and the assigned color bar, and the stacking times of the position of the times to be acquired are displayed.

8. A thermal map drawing device, characterized in that: The device is based on a canvas, the canvas includes a number of pixels, and the device includes: A data acquisition module (401) is used to acquire the coordinates of the rectangular defects and the maximum stacking times of the rectangular defects, and to draw a valued color bar according to the maximum stacking times of the rectangular defects; A transparency calculation module (402), used for calculating the transparency of each pixel in the canvas according to the rectangular defect coordinates and the maximum stacking number of the rectangular defects; A color value determination module (403) is used to determine the color determination value of each pixel according to the transparency of each pixel and the maximum stacking number of the rectangular defects, and to search for the corresponding color in the assigned color bar according to the color determination value of each pixel; The heat map generation module (404) is used to color the color corresponding to each pixel found to the canvas and generate a final defect heat map.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Storage tank bottom plate defect identification model training method, device, equipment and medium

    CN120070444A