Image recognition result optimization method, system, equipment and medium based on industrial Internet of Things
By extracting and processing image edge profiles in an industrial Internet of Things environment, denoising segmentation and enhancement processing technology are adopted, combined with the evaluation of clarity indicators and optimization indicators, the problem of image quality degradation in industrial environments is solved, and efficient and accurate image optimization processing is achieved.
Patent Information
- Application Number
- CN202411794603.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-09
AI Technical Summary
In complex industrial environments, image acquisition faces problems such as uneven light, shadow interference, and equipment jitter, resulting in a decline in image quality, especially the details and clarity of edge contour parts, affecting the accuracy of subsequent image analysis and recognition.
By acquiring the surface image of the image generation node in the industrial Internet of Things, the edge profile image is extracted, and the denoising segmentation technique is used to divide it into multiple consecutive first image blocks. Then, the image blocks are enhanced based on the enhancement model to generate a second image block. By evaluating the model to calculate the clarity indicators, obtain the fluctuation indicators and optimization indicators, and determine whether the image block needs to be optimized.
This method can accurately extract and process the image edge profile in the industrial Internet of Things, effectively remove noise interference, improve the clarity and contrast of image blocks, ensure the accuracy and efficiency of optimization processing, and avoid the waste of resources and insufficient accuracy caused by the "one-size-fits-all" strategy.
Smart Images

Figure CN119251607B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial Internet of Things data processing, and in particular to an industrial Internet of Things-based image recognition result optimization method, system, device and medium. Background Art
[0002] With the rapid development of the Industrial Internet of Things (IIoT), image recognition technology has become a key force in promoting intelligent and efficient industrial production. It not only enables real-time monitoring and precise control of the production process, but also significantly improves product quality and production efficiency.
[0003] However, in complex industrial environments, image acquisition faces many challenges, such as uneven lighting, shadow interference, and equipment jitter. These factors seriously affect image quality, especially the edge contour part in the surface image, whose details and clarity are easily damaged. The edge contour part is the basis for identifying key information such as object shape, size, and position. Once the edge contour image quality is damaged, it will seriously affect the accuracy of subsequent image analysis and recognition.
[0004] For example, in the field of precision manufacturing, slight edge deviations may cause the product to be unqualified; in the quality inspection process, blurred contours may cause defects to be misjudged or missed.
[0005] Existing image recognition processing methods adopt a "one-size-fits-all" strategy, namely, uniformly adjusting the brightness, enhancing the contrast, or denoising the entire image. Although this method can improve the overall appearance of the image to a certain extent, it ignores the particularity of different areas in the image, especially the edge contours. At the same time, this approach not only wastes a lot of computing power resources, but also often fails to fully optimize the edge contours, making it difficult to meet the high-precision and high-reliability requirements of industrial inspection. Summary of the Invention
[0006] In response to the deficiencies in the prior art, the present invention provides an image recognition result optimization method, system, device and medium based on the Industrial Internet of Things.
[0007] A method for optimizing image recognition results based on the industrial Internet of Things includes: obtaining a surface image of an image generation node in the industrial Internet of Things, and extracting an edge contour image from the surface image; performing denoising and segmentation processing on the edge contour image to generate a plurality of continuous first image blocks, and performing enhancement processing on the plurality of first image blocks based on an enhancement model to generate a plurality of second image blocks, wherein each of the first image blocks and the second image blocks includes a plurality of pixels; calculating a first clarity index and a second clarity index for the first image block and the second image block based on an evaluation model, and obtaining a plurality of fluctuation indexes for the plurality of continuous first image blocks based on the plurality of first clarity indexes, and obtaining an optimization index based on the first clarity index and the second clarity index; determining whether the fluctuation index exceeds a first threshold, and if so, obtaining a first image block to be processed based on the fluctuation index and performing optimization processing on the first image block to be processed; and determining whether the optimization index exceeds a second threshold if the fluctuation index does not exceed the first threshold, and if so, obtaining the first image block to be processed based on the optimization index and performing optimization processing on the first image block to be processed.
[0008] Furthermore, performing denoising and segmentation processing on the edge contour image and generating multiple continuous first image blocks includes: performing denoising processing on the edge contour image using a filter and generating a denoised image; performing continuity detection on the denoised image and obtaining a segmentation window based on the denoised image after the detection; and sequentially segmenting the denoised image according to the segmentation window and generating multiple continuous first image blocks.
[0009] Furthermore, based on the enhancement model, the plurality of first image blocks are enhanced respectively to generate the enhancement models of the plurality of second image blocks as follows: ;in, is the b-th second image block, is the bth first image block, is the mixing coefficient, is the neighborhood window, is the coordinate within the neighborhood window The pixel point at Represented as the b-th second image block in Separated The pixel value of the pixel point, is the number of pixels in the neighborhood window.
[0010] Furthermore, the evaluation model in calculating the first clarity index of the first image block based on the evaluation model is expressed as: The evaluation model in calculating the second clarity index of the second image block based on the evaluation model is expressed as: ;in, is the first definition index of the b-th first image block, is the second definition index of the b-th second image block, is the gradient value of the k-th pixel in the b-th first image block in the x direction, is the gradient value of the k-th pixel in the b-th first image block in the y direction, is the gradient value of the k-th pixel in the b-th second image block in the x direction, is the gradient value of the k-th pixel in the b-th second image block in the y direction, is the number of pixels in the first image block or the second image block.
[0011] Furthermore, multiple fluctuation indices of multiple consecutive first image blocks are obtained according to the multiple first clarity indices and are expressed as: ;in, For the The fluctuation index of the first image block, For the the number of adjacent first image blocks of a first image block, For the A first clarity indicator of a first image block.
[0012] Furthermore, obtaining the first image block to be processed based on the fluctuation index and optimizing the first image block to be processed includes: screening out the first image block whose fluctuation index exceeds the first threshold, and using the screened out first image block as the first image block to be processed; replacing the first image block to be processed with the corresponding second image block in the edge contour image.
[0013] Furthermore, obtaining the first image block to be processed according to the optimization index and optimizing the first image block to be processed includes: screening out the first image block whose optimization index exceeds the second threshold, and using the screened out first image block as the first image block to be processed; replacing the first image block to be processed with the corresponding second image block in the edge contour image.
[0014] Also provided is an image recognition result optimization system based on the industrial Internet of Things, the system includes a service platform, a management platform and a sensor network platform that are communicatively connected in sequence, the management platform includes: an image acquisition module for acquiring a surface image of an image generation node in the industrial Internet of Things and extracting an edge contour image in the surface image; an image processing module for performing denoising and segmentation processing on the edge contour image and generating a plurality of continuous first image blocks, and performing enhancement processing on the plurality of first image blocks based on an enhancement model and generating a plurality of second image blocks, wherein the first image blocks and the second image blocks each include a plurality of pixel points; a calculation management module for calculating a first clear image block and a second clear image block based on an evaluation model. a first judgment and optimization module for judging whether the fluctuation index exceeds a first threshold value, and if the fluctuation index exceeds the first threshold value, obtaining the first image block to be processed according to the fluctuation index and performing optimization processing on the first image block to be processed; a second judgment and optimization module for judging whether the optimization index exceeds a second threshold value when the fluctuation index does not exceed the first threshold value, and if the optimization index exceeds the second threshold value, obtaining the first image block to be processed according to the optimization index and performing optimization processing on the first image block to be processed.
[0015] An electronic device is also provided, comprising: a memory on which a computer program is stored; and a processor for executing the computer program in the memory to implement the above-mentioned image recognition result optimization method based on the industrial Internet of Things.
[0016] A non-temporary computer-readable storage medium is also provided, on which a computer program is stored. When the program is executed by a processor, the above-mentioned image recognition result optimization method based on the industrial Internet of Things is implemented.
[0017] The beneficial effects of the present invention are embodied in:
[0018] In the entire IIoT-based image recognition result optimization method, the surface image and edge contour image of the image generation node in the IIoT are accurately extracted, providing a solid foundation for subsequent image enhancement, quality assessment, and optimization, ensuring the accuracy and effectiveness of the processing object. Furthermore, denoising and segmentation technology is used to effectively remove noise interference in the image and divide the image into multiple manageable small blocks for subsequent processing. Furthermore, enhancement processing technology is used to perform preliminary improvements on the image blocks, mainly for more accurate subsequent optimization judgment. At the same time, it also improves the clarity and contrast of the image blocks to a certain extent, providing a better starting point for possible optimization processing. More importantly, by calculating the clarity index through the evaluation model and obtaining the fluctuation index and optimization index, the scheme can accurately evaluate the quality of the image blocks and their changes, providing a scientific judgment basis for optimization processing. Finally, based on the comparison results of the indicators, the scheme can selectively select the image blocks that need to be optimized and use the results of the previous enhancement processing to assist in further optimization. This not only avoids unnecessary resource waste, but also ensures the accuracy and efficiency of the optimization processing, avoiding the problems of resource waste and insufficient precision caused by the "one-size-fits-all" strategy. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly describes the drawings required for the specific embodiments or the description of the prior art. Similar elements or parts are generally identified by similar reference numerals throughout the drawings. Elements or parts in the drawings are not necessarily drawn to scale.
[0020] Figure 1 Schematic diagram of the steps of the method for optimizing image recognition results based on the Industrial Internet of Things of the present invention;
[0021] Figure 2 Schematic diagram of step S2 in the image recognition result optimization method based on the industrial Internet of Things of the present invention;
[0022] Figure 3 Schematic diagram of step S4 in the image recognition result optimization method based on the industrial Internet of Things of the present invention;
[0023] Figure 4 Schematic diagram of step S5 in the image recognition result optimization method based on the industrial Internet of Things of the present invention;
[0024] Figure 5 Schematic diagram of the composition of the image recognition result optimization system based on the industrial Internet of Things of the present invention;
[0025] Figure 6 This is a schematic diagram of the composition of the optimized industrial Internet of Things involved in the present invention;
[0026] Figure 7 The present invention is a block diagram of an electronic device according to an embodiment of the present invention.
[0027] Reference numerals:
[0028] 700 - electronic device, 701 - processor, 702 - memory, 703 - multimedia component, 704 - I / O interface, 705 - communication component. DETAILED DESCRIPTION
[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.
[0030] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are intended to fall within the scope of protection of the present invention.
[0031] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. In addition, the terms "first," "second," etc. are used only to distinguish the descriptions and are not to be understood as indicating or implying relative importance.
[0032] like Figure 1 As shown, a method for optimizing image recognition results based on the industrial Internet of Things is provided, including:
[0033] S1. Obtain a surface image of an image generation node in the industrial Internet of Things and extract an edge contour image from the surface image;
[0034] S2. Performing denoising and segmentation processing on the edge contour image to generate a plurality of continuous first image blocks, and performing enhancement processing on the plurality of first image blocks based on the enhancement model to generate a plurality of second image blocks, wherein each of the first image blocks and the second image blocks includes a plurality of pixels;
[0035] S3. Calculating a first clarity index and a second clarity index for the first image block and the second image block, respectively, based on the evaluation model, obtaining a plurality of fluctuation indices for a plurality of consecutive first image blocks according to the plurality of first clarity indices, and obtaining an optimization index according to the first clarity indices and the second clarity indices;
[0036] S4. Determine whether the fluctuation index exceeds a first threshold. If the fluctuation index exceeds the first threshold, obtain a first image block to be processed based on the fluctuation index and perform optimization processing on the first image block to be processed.
[0037] S5. If the fluctuation index does not exceed the first threshold, determine whether the optimization index exceeds the second threshold; if the optimization index exceeds the second threshold, obtain the first image block to be processed according to the optimization index and optimize the first image block to be processed.
[0038] In this embodiment, it should be noted that in S1, the image generation nodes of the industrial IoT environment may include various sensors, cameras, or other image acquisition devices. These are deployed on production lines, equipment, or work environments to capture real-time surface images. These images may contain important information about the product, equipment status, or production process. Edge contour image extraction is the core of S1. The goal is to accurately identify the edge contour regions of objects from the surface image. Edge detection is first performed to identify edge regions in the image, applying edge detection algorithms (such as Canny, Sobel, Prewitt, and other classic edge detection algorithms). Based on edge detection, region tracking algorithms (such as Freeman chain codes and Hough transforms) are then used to connect adjacent edge regions to form a complete edge contour image of sufficient size. In summary, S1 forms the foundation for subsequent image enhancement, quality assessment, and optimization.
[0039] In S2, first, the edge contour image is subjected to noise processing. Since image acquisition in industrial environments is often interfered with by various noises, such as equipment vibration and electromagnetic interference, these noises will affect the image quality and thus affect the accurate segmentation of the edge contour image. Therefore, the edge contour image needs to be denoised. There are many denoising methods, such as median filtering, Gaussian filtering, bilateral filtering, etc. These methods can effectively remove noise from the edge contour image while retaining the details of the edge contour image. Then, the denoised edge contour image is segmented. This is because the image needs to be processed more efficiently. Usually, the image is divided into multiple smaller areas or image blocks for processing. In S2, we divide the edge contour image into multiple continuous first image blocks. The size of these image blocks can be adjusted according to actual needs to ensure a balance between processing efficiency and image quality. Segmentation processing helps to simplify complex problems into smaller problems that are easier to manage, thereby improving the efficiency and accuracy of the entire processing flow.
[0040] Furthermore, in stage S2, each segmented first image block is enhanced using an enhancement model. The goal of the enhancement model is to improve key image block attributes such as clarity and contrast, making edge contours more prominent and accurate. Each first image block is input into the enhancement model, which outputs an enhanced image block, known as the second image block. The resulting multiple second image blocks are of improved quality, resulting in a higher-quality edge contour image.
[0041] In S3, an evaluation model is first required to calculate the clarity index of the image block. The goal of the evaluation model is to accurately measure the clarity of the image block and output a first clarity index and a second clarity index for subsequent quality evaluation and optimization. The first clarity index reflects the clarity level of the image block in its original state. By comparing the first clarity indexes of different first image blocks, we can understand the clarity distribution of different areas in the image. The second clarity index reflects the clarity level of the image block after enhancement processing. By comparing the first clarity index and the second clarity index, we can evaluate the impact of the enhancement processing on the clarity of the image block.
[0042] Furthermore, in order to measure the degree of change in clarity between image blocks, a fluctuation index is calculated based on the first clarity indexes of multiple consecutive first image blocks. The fluctuation index can reflect the unevenness of clarity in the image, that is, the clarity of some areas is significantly higher or lower than that of other areas. By calculating the fluctuation index, areas in the image with larger changes in clarity can be identified. These areas are the targets of subsequent optimization processing, providing strong support for subsequent optimization processing.
[0043] Furthermore, in order to evaluate the effect of enhancement processing on improving the overall clarity of the image, an optimization index is calculated based on the first clarity index and the second clarity index. The optimization index can reflect the degree of improvement of the image clarity caused by the enhancement processing. By comparing the optimization index, it can be determined whether the enhancement processing is necessary, providing strong support for subsequent optimization processing.
[0044] In S4, a first threshold is first set. This threshold can be adjusted according to the actual application scenario and image quality requirements. The first threshold is a benchmark value for judging whether the fluctuation index is too large. When the fluctuation index exceeds the first threshold, it means that there are areas in the image with large changes in clarity. These areas may be caused by uneven lighting, device jitter, changes in shooting angle, etc.
[0045] For each first image block's fluctuation index, we compare it with the first threshold. If the fluctuation index exceeds the first threshold, the first image block is marked as the first image block to be processed; if the fluctuation index does not exceed the first threshold, it is considered that the clarity change of the image block is within an acceptable range and no further optimization processing is required.
[0046] Furthermore, based on the judgment results of the fluctuation index, all the first image blocks to be processed can be obtained. These image blocks are areas with large changes in clarity and are also the focus of subsequent optimization processing. For the first image blocks to be processed, a variety of optimization processing strategies can be adopted, such as local enhancement, filtering processing, contrast adjustment, etc.; the specific optimization processing strategy can be selected according to the actual application scenario and image quality requirements. The goal of the optimization processing is to improve the clarity of the image block so that it is more consistent with the clarity of the surrounding area.
[0047] In S5, if the fluctuation index of the first image block does not exceed the set first threshold, this means that the change in clarity of the image block is relatively uniform and there is no significant fluctuation. A second threshold is then set. This threshold is set based on the optimization index and is used to determine whether the optimization process has achieved the expected improvement effect and whether optimization is necessary. The selection of the second threshold should take into account factors such as the actual application scenario, image quality requirements, and the cost of the optimization process.
[0048] The optimization index is then compared with the second threshold. If the optimization index exceeds the second threshold, it means that the enhancement processing has a significant improvement effect on the clarity of the image block, so it is necessary to optimize, and then these first image blocks are marked as first image blocks to be processed; if the optimization index does not exceed the second threshold, it is considered that the original first image block is clearer, or the optimization cost-effectiveness is low, the current enhancement processing is no longer necessary, and no further optimization is required.
[0049] For the first image block marked as to be processed, we can use an optimization processing strategy similar to that in the S4 stage for further processing, selecting multiple optimization processing strategies such as local enhancement, contrast adjustment, and filtering processing. The goal is to further improve the clarity of the image block and make it closer to the ideal image quality.
[0050] In summary, the entire image recognition result optimization method based on the Industrial Internet of Things accurately extracts the surface image and edge contour image of the image generation node in the Industrial Internet of Things, providing a solid foundation for subsequent image enhancement, quality assessment and optimization, ensuring the accuracy and effectiveness of the processing object. Furthermore, the denoising and segmentation technology is used to effectively remove the noise interference in the image and divide the image into multiple manageable small blocks for subsequent processing. Furthermore, the image blocks are initially improved using the enhancement processing technology, mainly for more accurate subsequent optimization judgment. At the same time, the clarity and contrast of the image blocks are also improved to a certain extent, providing a better starting point for possible optimization processing. More importantly, by calculating the clarity index through the evaluation model and obtaining the fluctuation index and optimization index, the scheme can accurately evaluate the quality of the image blocks and their changes, providing a scientific judgment basis for the optimization processing. Finally, based on the comparison results of the indicators, the scheme can selectively select the image blocks that need to be optimized and use the results of the previous enhancement processing to assist in further optimization, avoiding unnecessary resource waste and ensuring the accuracy and efficiency of the optimization processing, avoiding the problems of resource waste and insufficient precision caused by the "one-size-fits-all" strategy.
[0051] like Figure 2 As shown, in one embodiment, performing denoising and segmentation processing on the edge contour image and generating a plurality of continuous first image blocks in S2 includes:
[0052] S21, performing denoising on the edge contour image using a filter and generating a denoised image;
[0053] S22, performing continuity detection on the denoised image, and obtaining a segmentation window based on the detected denoised image;
[0054] S23 , sequentially segmenting the denoised image according to the segmentation windows and generating a plurality of continuous first image blocks.
[0055] In this embodiment, it should be noted that in S21, in the process of optimizing the image recognition results, the quality of the edge contour image is crucial. Therefore, it is necessary to perform denoising on the edge contour image before the segmentation process. In the denoising process, the selection of filters is key. Commonly used filters include mean filtering, Gaussian filtering, median filtering, bilateral filtering, etc. These filters each have their own advantages and disadvantages and are suitable for different noise types and image characteristics. The specific steps of the denoising process are: according to the characteristics of the edge contour image and the noise type, select the appropriate filter type and parameters. For example, if Gaussian filtering is selected, it is necessary to determine the size and standard deviation of the Gaussian kernel; apply the selected filter to the edge contour image to generate a denoised image. This step can usually be implemented by functions in an image processing library (such as OpenCV, MATLAB image processing toolbox, etc.); evaluate the denoised image to check whether the noise has been effectively removed while retaining the edge and detail information of the image. If the denoising effect is not ideal, it may be necessary to adjust the filter parameters or try other types of filters.
[0056] In S22, after denoising, the quality of the edge contour image is improved, but there may still be some discontinuous areas or edges in the image. These discontinuous parts may affect the subsequent image segmentation and optimization processing effects. Therefore, before image segmentation, it is necessary to perform continuity detection on the denoised image. Continuity detection is usually based on the similarity and connectivity between image pixels for analysis. Commonly used methods include gradient-based methods, region growing-based methods, morphology-based methods, etc. For example, by processing the image using morphological operations (such as dilation, erosion, opening operations, closing operations, etc.), the shape and structure in the image can be identified. By setting certain morphological parameters, the image can be divided into different regions and the continuous parts therein can be identified.
[0057] Furthermore, after the continuity test is completed, segmentation windows can be obtained based on the test results. Segmentation windows refer to rectangular frames that divide the image into multiple continuous regions or edges. The size and position of these rectangular frames can be determined based on the continuity test results. Specifically, the size and number of segmentation windows are determined based on the continuity test results and the requirements of subsequent processing. Generally, the size of the segmentation windows should be large enough to encompass a complete region or edge in the image, while the number of segmentation windows is determined based on the complexity of the image and the efficiency of subsequent processing.
[0058] In S23, the segmentation is based on the segmentation windows obtained previously. These windows have their sizes and positions determined according to the results of the continuity test. Therefore, during segmentation, we only need to cut the image according to the boundaries of these windows to obtain multiple continuous first image blocks.
[0059] The first image blocks generated will serve as input for subsequent image enhancement, quality assessment, and optimization processing. Since these image blocks have undergone denoising and continuity detection and are accurately cut according to the segmentation window, they have high continuity, which provides a good foundation for the generation of subsequent indicators, especially the generation of fluctuation indicators, and helps to improve the accuracy and reliability of optimization judgments.
[0060] In one embodiment, the enhancement model is expressed as follows:
[0061] ;in,
[0062] is the b-th second image block, is the bth first image block, is the mixing coefficient, is the neighborhood window, is the coordinate within the neighborhood window The pixel point at It is represented as the bth second image block adjacent to (x, y) The pixel value of the pixel point, is the number of pixels in the neighborhood window.
[0063] In this embodiment, it should be noted that represents the b-th second image block (i.e., the enhanced image block), and is therefore also the pixel value of the second image block at the coordinate (x, y). represents the bth first image block (i.e., the original image block), and is therefore also the pixel value of the first image block at the coordinate (x, y). is the blending coefficient used to adjust the weight of the original image block and the neighboring pixel information in the enhanced result. Its value range is usually between [0, 1]. L is the neighborhood window, which defines the range of surrounding pixels considered. It can be a 2x2, 3x3, or 2x3 window. is the number of pixels in the neighborhood window, for example, for a 2x3 window, N=6.
[0064] This part is the smoothing enhancement process, which aims to improve the clarity of unclear areas in the image. It means that the value of each pixel position (x, y) of the enhanced image is the average value of all pixel values within L of the original image at that pixel position (x, y). This makes the enhancement process more localized and can better adapt to the characteristics of different areas in the image. It is particularly suitable for processing images with complex textures or edges. is the original pixel value, so the entire enhancement model can not only enhance the unclear areas in the image (through the weighted average of the neighborhood pixels), but also enhance the details of the image (by retaining some of the original pixel information). This dual effect significantly improves the image enhancement processing effect.
[0065] In one embodiment, the evaluation model in calculating the first clarity index of the first image block based on the evaluation model is expressed as: ;
[0066] The evaluation model in calculating the second definition index of the second image block based on the evaluation model is expressed as: ;in,
[0067] is the first definition index of the b-th first image block, is the second definition index of the b-th second image block, is the gradient value of the k-th pixel in the b-th first image block in the x direction, is the gradient value of the k-th pixel in the b-th first image block in the y direction, is the gradient value of the k-th pixel in the b-th second image block in the x direction, is the gradient value of the k-th pixel in the b-th second image block in the y direction, is the number of pixels in the first image block or the second image block.
[0068] In this embodiment, it should be noted that image clarity is generally related to the details and edge information in the image. Gradient is an important indicator for measuring the rate of change of pixel values in an image and can reflect the edge and texture information of the image. Therefore, by calculating the gradient values of an image block in the x and y directions, the clarity of the image block can be evaluated. and represent the gradient values of the k-th pixel in the first image block in the x and y directions, respectively, and and It represents the gradient value of the corresponding pixel in the second image block (i.e. the enhanced image block). These gradient values reflect the degree of change of the image block in the horizontal and vertical directions. In order to obtain a comprehensive clarity index, the evaluation model uses the gradient amplitude of each pixel (i.e. and ) are averaged to obtain the clarity index of the entire image block (i.e. and ), a larger clarity index indicates more dramatic pixel value variations within the image block, meaning the block contains richer edge and texture information, leading to higher clarity. In summary, by calculating the clarity index for each image block, the evaluation model can objectively and quantitatively assess the clarity of the image block. This is of great significance for image quality assessment and image enhancement evaluation in image processing and computer vision tasks.
[0069] It should also be noted that the gradient value here is usually obtained by applying the gradient operator to the image. The gradient operator is a mathematical tool used to calculate the rate of change of a function at a certain point. In a two-dimensional image, the gradient is a vector containing components in the x-direction and the y-direction, which can be expressed as (Right now and )and (Right now and ). Commonly used gradient operators include the Sobel operator, Prewitt operator, and Roberts operator. These operators perform convolution operations with the image through a convolution kernel to calculate the gradient value of each pixel in the x and y directions.
[0070] In one embodiment, multiple fluctuation indices of multiple consecutive first image blocks are obtained according to the multiple first clarity indices and are expressed as:
[0071] ;in,
[0072] For the The fluctuation index of the first image block, For the the number of adjacent first image blocks of a first image block, For the A first clarity indicator of a first image block.
[0073] In this embodiment, it should be noted that It represents the fluctuation index of the bth first image block. The whole expression measures the degree of change in the clarity of the image block and its adjacent image blocks. (the first clarity index of the b-th image block) and The difference between the (first clarity index of the g-th image block) and taking the absolute value can quantify the difference in clarity between adjacent image blocks. It represents the number of adjacent image blocks of the b-th first image block, which determines how many adjacent image blocks are considered when calculating the fluctuation index. Introduce the formula and average the differences (i.e. divide by ), which can smooth the impact of the number of adjacent image blocks on the fluctuation index, making the evaluation results more stable and reliable. Fluctuation index It reflects the fluctuation of clarity between adjacent image blocks in the image. If the clarity difference between adjacent image blocks is large, the fluctuation index will be higher; conversely, if the clarity between adjacent image blocks is relatively consistent, the fluctuation index will be lower. Therefore, the fluctuation index can be used as an important basis for evaluating the overall stability and consistency of the image.
[0074] like Figure 3 As shown, in one embodiment, obtaining the first image block to be processed according to the fluctuation index and performing optimization processing on the first image block to be processed in S4 includes:
[0075] S41, screening out first image blocks whose fluctuation index exceeds a first threshold, and using the screened out first image blocks as first image blocks to be processed;
[0076] S42: Replace the first image block to be processed with the corresponding second image block in the edge contour image.
[0077] In this embodiment, it should be noted that, in S41, the fluctuation index of each first image block calculated previously is screened one by one, and the first image blocks whose fluctuation index exceeds the first threshold are screened out; when the fluctuation index of a first image block exceeds this first threshold, it means that there is a large difference between the image block and the surrounding image blocks, which may be caused by noise, blur, uneven lighting or other factors. Therefore, this image block is marked as the first image block to be processed and requires further optimization processing.
[0078] In S42, a replacement operation is performed on the first image block to be processed screened out in step S41, and it is directly replaced with the second image block. That is, the processing results in the optimization judgment process are utilized, which provides a better starting point for the optimization processing and greatly improves the efficiency of image result optimization.
[0079] like Figure 4 As shown, in one embodiment, obtaining the first image block to be processed according to the optimization index and performing optimization processing on the first image block to be processed in S5 includes:
[0080] S51, screening out first image blocks whose optimization index exceeds a second threshold, and using the screened out first image blocks as first image blocks to be processed;
[0081] S52: Replace the first image block to be processed with the corresponding second image block in the edge contour image.
[0082] In this embodiment, it should be noted that, similarly, in S51, the optimization index of each first image block is evaluated, and the optimization index and the second threshold are used to determine whether the optimization processing has achieved the expected improvement effect and whether there is a need for optimization. When the optimization index of a first image block does not exceed the second threshold, it means that although the image block has undergone preliminary processing, its optimization effect is not obvious, and there is no need to waste resources for optimization processing; therefore, the system will mark these first image blocks whose optimization index exceeds the second threshold as first image blocks to be processed.
[0083] S52 is similar to S42. In S52, the first image block to be processed screened out in step S51 is replaced directly with the second image block. That is, the processing results in the optimization judgment process are utilized, which provides a better starting point for the optimization processing and greatly improves the efficiency of image result optimization.
[0084] like Figure 5 As shown, an image recognition result optimization system based on the industrial Internet of Things is also provided. The system includes a service platform, a management platform, and a sensor network platform that are sequentially connected in communication. The management platform includes:
[0085] An image acquisition module is used to acquire the surface image of the image generation node in the industrial Internet of Things and extract the edge contour image in the surface image;
[0086] an image processing module, configured to perform denoising and segmentation processing on the edge contour image to generate a plurality of continuous first image blocks, and to perform enhancement processing on each of the plurality of first image blocks based on an enhancement model to generate a plurality of second image blocks, wherein each of the first image blocks and the second image blocks includes a plurality of pixels;
[0087] a calculation management module, configured to calculate a first clarity index and a second clarity index of the first image block and the second image block, respectively, based on the evaluation model, obtain a plurality of fluctuation indices of a plurality of consecutive first image blocks according to the plurality of first clarity indices, and obtain an optimization index according to the first clarity indices and the second clarity indices;
[0088] a first judgment and optimization module, configured to judge whether the fluctuation index exceeds a first threshold, and if so, to obtain a first image block to be processed based on the fluctuation index and perform optimization processing on the first image block to be processed;
[0089] The second judgment and optimization module is used to judge whether the optimization index exceeds the second threshold when the fluctuation index does not exceed the first threshold; if the optimization index exceeds the second threshold, the first image block to be processed is obtained according to the optimization index and the first image block to be processed is optimized.
[0090] In this embodiment, it should be noted that, regarding the above-mentioned image recognition result optimization system based on industrial Internet of Things, the specific method of performing operations has been described in detail in the implementation of the image recognition result optimization method based on industrial Internet of Things, and will not be elaborated here.
[0091] It should also be noted that the entire image recognition result optimization system based on industrial Internet of Things can be applied to the optimized industrial Internet of Things, such as Figure 6 As shown, the optimized industrial Internet of Things includes a user platform, a service platform, a management platform, a sensor network platform, and an object platform that establish communication in sequence;
[0092] The user platform is configured to provide front-end services to users; users obtain the required perception service information through the user platform, process the perception service information, and convert it into user perception information; users analyze the user perception information and make corresponding decisions based on their own wishes, and convert the user perception information into user control information through the corresponding information system and send it to the service platform, thereby expressing the user's corresponding service demand intention.
[0093] The physical entities of the user platform include various user terminals, such as mobile phones, computers, dedicated terminals, etc., which realize user-end services through integration with user information system software.
[0094] The service platform is configured as an API server or other server used to establish communication between the management platform and the user platform to implement corresponding functions; the physical entity of the service platform includes various servers.
[0095] The management platform is configured to perform at least one of equipment operation status monitoring and management, data monitoring and management, equipment parameter management, and life cycle management; the management platform is the operation coordination platform of the Internet of Things, which may include various management sub-platforms, and different management sub-platforms perform different management services; the physical entities of the management platform include various servers.
[0096] The sensor network platform is configured to perform at least one of the following: network management, command management, device status management, data protocol management, data parsing, data classification, data transmission monitoring, and data transmission security management. The sensor network platform provides data communication, parsing, identification, and classification, preventing data from various object platforms from being directly aggregated on the management platform, which would result in data redundancy and inefficient data processing. The physical entities of the object platforms include various gateways, edge computing devices, and other devices.
[0097] The object platform is configured to perform specific production tasks such as production control, detection, and measurement; the physical entities of the production objects include various production equipment, sensors, etc.
[0098] Figure 7 FIG is a block diagram of an electronic device showing an image recognition result optimization method based on the industrial Internet of Things according to an exemplary embodiment. Figure 7 As shown, the electronic device 700 may include: a processor 701 , a memory 702 , and may further include one or more of a multimedia component 703 , an I / O interface 704 , and a communication component 705 .
[0099] The processor 701 is used to control the overall operation of the electronic device 700 to complete all or part of the steps in the above-mentioned method for optimizing image recognition results based on the Industrial Internet of Things. The memory 702 is used to store various types of data to support the operation of the electronic device 700. This data may include, for example, instructions for any application or method operating on the electronic device 700, as well as application-related data such as contact information, sent and received messages, images, audio, video, etc. The memory 702 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 703 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 702 or transmitted via the communication component 705. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 704 provides an interface between the processor 701 and other interface modules, such as a keyboard, a mouse, and buttons. These buttons may be virtual or physical. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication may include Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G networks, or a combination thereof, without limitation. Accordingly, the communication component 705 may include a Wi-Fi module, a Bluetooth module, an NFC module, and the like.
[0100] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the above-mentioned industrial Internet of Things-based image recognition result optimization method.
[0101] In another exemplary embodiment, a computer-readable storage medium including program instructions is further provided. When executed by a processor, the program instructions implement the steps of the aforementioned method for optimizing image recognition results based on the Industrial Internet of Things. For example, the computer-readable storage medium may be the aforementioned memory 702 including the program instructions. The program instructions may be executed by the processor 701 of the electronic device 700 to implement the aforementioned method for optimizing image recognition results based on the Industrial Internet of Things.
[0102] In another exemplary embodiment, a computer program product is also provided, which includes a computer program that can be executed by a programmable device, and the computer program has a code portion for executing the above-mentioned image recognition result optimization method based on the industrial Internet of Things when executed by the programmable device.
[0103] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings. However, the present disclosure is not limited to the specific details of the above embodiments. Within the technical concept of the present disclosure, various simple modifications can be made to the technical solutions of the present disclosure, and these simple modifications all fall within the scope of protection of the present disclosure.
[0104] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.
[0105] In addition, the various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.
[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and description of the present invention.
Claims
1. A method for optimizing image recognition results based on industrial Internet of Things, characterized in that: include: Obtain the surface image of the image generation node in the industrial Internet of Things, and extract the edge contour image in the surface image; Performing denoising and segmentation processing on the edge contour image to generate a plurality of continuous first image blocks, and performing enhancement processing on the plurality of first image blocks based on the enhancement model to generate a plurality of second image blocks, wherein the first image blocks and the second image blocks each include a plurality of pixel points; Based on the evaluation model, respectively calculate a first clarity index and a second clarity index of the first image block and the second image block, respectively obtain a plurality of fluctuation indexes of a plurality of consecutive first image blocks according to the plurality of first clarity indexes, and obtain an optimization index according to the first clarity index and the second clarity index; The multiple fluctuation indices of the multiple continuous first image blocks respectively obtained according to the multiple first clarity indices are expressed as: ;in, For the The fluctuation index of the first image block, is the first definition index of the b-th first image block, For the The number of adjacent first image blocks of a first image block, For the a first definition indicator of a first image block; Determine whether the fluctuation index exceeds a first threshold value, and if the fluctuation index exceeds the first threshold value, obtain a first image block to be processed according to the fluctuation index and perform optimization processing on the first image block to be processed; If the fluctuation index does not exceed the first threshold, it is determined whether the optimization index exceeds the second threshold. If the optimization index exceeds the second threshold, the first image block to be processed is obtained according to the optimization index and the first image block to be processed is optimized.
2. The method for optimizing image recognition results based on industrial Internet of Things according to claim 1 is characterized in that: The performing denoising and segmentation processing on the edge contour image and generating a plurality of continuous first image blocks comprises: Using a filter to perform denoising on the edge contour image and generate a denoised image; Perform continuity detection on the denoised image, and obtain a segmentation window based on the denoised image after detection; The denoised image is segmented in sequence according to the segmentation window to generate a plurality of continuous first image blocks.
3. The method for optimizing image recognition results based on industrial Internet of Things according to claim 1, characterized in that: The enhancement model in which the plurality of first image blocks are enhanced respectively based on the enhancement model and the plurality of second image blocks are generated is expressed as: ;in, is the b-th second image block, is the bth first image block, is the mixing coefficient, is the neighborhood window, is the coordinate in the neighborhood window The pixel point at Represented as the b-th second image block in Separated The pixel value of the pixel point, is the number of pixels in the neighborhood window.
4. The method for optimizing image recognition results based on industrial Internet of Things according to claim 3 is characterized in that: The evaluation model in calculating the first definition index of the first image block based on the evaluation model is expressed as: ; The evaluation model in calculating the second definition index of the second image block based on the evaluation model is expressed as: ;in, is the second definition index of the b-th second image block, is the gradient value of the k-th pixel in the b-th first image block in the x direction, is the gradient value of the k-th pixel in the b-th first image block in the y direction, is the gradient value of the k-th pixel in the b-th second image block in the x direction, is the gradient value of the k-th pixel in the b-th second image block in the y direction, is the number of pixels in the first image block or the second image block.
5. The method for optimizing image recognition results based on industrial Internet of Things according to claim 1, characterized in that: The obtaining of the first image block to be processed according to the fluctuation index and performing optimization processing on the first image block to be processed comprises: Screening out a first image block whose fluctuation index exceeds a first threshold, and using the screened out first image block as a first image block to be processed; The first image block to be processed is replaced with the corresponding second image block in the edge contour image.
6. The method for optimizing image recognition results based on industrial Internet of Things according to claim 1, characterized in that: The obtaining of the first image block to be processed according to the optimization index and performing optimization processing on the first image block to be processed comprises: Screening out a first image block whose optimization index exceeds a second threshold, and using the screened out first image block as a first image block to be processed; The first image block to be processed is replaced with the corresponding second image block in the edge contour image.
7. An image recognition result optimization system based on industrial Internet of Things, characterized in that: The system includes a service platform, a management platform and a sensor network platform which are connected in sequence, and the management platform includes: An image acquisition module is used to acquire a surface image of an image generation node in the industrial Internet of Things and extract an edge contour image from the surface image; An image processing module, used to perform denoising and segmentation processing on the edge contour image and generate a plurality of continuous first image blocks, and to perform enhancement processing on the plurality of first image blocks based on the enhancement model and generate a plurality of second image blocks, wherein the first image blocks and the second image blocks each include a plurality of pixel points; A calculation management module, used to calculate the first clarity index and the second clarity index of the first image block and the second image block respectively based on the evaluation model, and obtain multiple fluctuation indexes of multiple consecutive first image blocks respectively according to the multiple first clarity indexes, and obtain the optimization index according to the first clarity index and the second clarity index; wherein, the multiple fluctuation indexes of the multiple consecutive first image blocks respectively obtained according to the multiple first clarity indexes are expressed as: ;in, For the The fluctuation index of the first image block, is the first definition index of the b-th first image block, For the The number of adjacent first image blocks of a first image block, For the a first definition indicator of a first image block; A first judgment and optimization module, used for judging whether the fluctuation index exceeds a first threshold value, and if the fluctuation index exceeds the first threshold value, obtaining a first image block to be processed according to the fluctuation index and performing optimization processing on the first image block to be processed; The second judgment and optimization module is used to judge whether the optimization index exceeds the second threshold when the fluctuation index does not exceed the first threshold. If the optimization index exceeds the second threshold, the first image block to be processed is obtained according to the optimization index and the first image block to be processed is optimized.
8. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the method for optimizing image recognition results based on the industrial Internet of Things as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for optimizing image recognition results based on the industrial Internet of Things as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Precious metal quality detection method and system based on visual identification
CN116188462A
OPC drum surface defect detection method and system, electronic equipment and storage medium
CN116721058A