Image enhancement method based on dynamic data distribution

By processing images at the block and pixel level, combined with dynamic analysis and enhanced accuracy detection, the problems of large calculations and image quality deviations in the existing technology are solved, and efficient and accurate image enhancement effects are achieved.

CN113344810BActive Publication Date: 2024-10-22NEW VISION MICROELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110598628.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-31
Publication Date
2024-10-22
Estimated Expiration
2041-05-31

AI Technical Summary

Technical Problem

The existing multi-scale Retinex image enhancement algorithm requires multiple convolution operations when processing images, resulting in a large amount of calculation, and is prone to image edge blur when there are illumination changes at the image edge, and insufficient image detail enhancement, while binarizing and segmenting Processing increases system resource consumption and processing time, resulting in image quality deviations.

Method used

By dividing the image to be processed into blocks, further dividing it into blocks according to the areas that need to be enhanced, using pixel-based image enhancement algorithms to operate on the areas that need to be enhanced, and ensuring the accuracy of image enhancement through dynamic analysis and enhancement accuracy detection. performance and quality.

Benefits of technology

It achieves precise positioning of image enhancement, reduces system resource consumption and processing time, improves image quality and enhancement effects, and ensures enhanced image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113344810B_ABST
    Figure CN113344810B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of image enhancement technology, and specifically relates to an image enhancement method and device based on dynamic data distribution. The present invention divides the image to be processed into blocks, finds the part of the image to be processed that needs to be enhanced, and then divides the result of the block processing into blocks again to find the area that needs to be enhanced, thereby realizing the precise positioning of image enhancement; on the one hand, the system resources required for image enhancement can be reduced, because only the area that needs to be enhanced needs to be enhanced; on the other hand, because excessive enhancement of the area that does not need to be enhanced is avoided, the image quality is reduced; at the same time, the present invention uses a pixel-based image enhancement algorithm to operate each pixel in the area that needs to be enhanced to improve the effect of image enhancement; finally, the present invention also ensures the accuracy of image enhancement through dynamic analysis and enhancement accuracy detection, thereby further improving the quality of the enhanced image.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] During the image acquisition process, the image may be affected by factors such as the dynamic range of the imaging device and the intensity of the ambient light, resulting in low image contrast, unclear image information, color distortion, and insufficient clarity of the target's outline or boundary information. This brings difficulties to human visual observation and machine analysis and processing, and therefore the image needs to be enhanced.

[0003] Image enhancement is to emphasize the overall or local characteristics of a given image in a purposeful manner, make the originally unclear image clear or emphasize certain features of interest, expand the differences between the features of different objects in the image, suppress features of no interest, improve image quality, enrich information, enhance image interpretation and recognition effects, and meet the needs of certain special analysis. It can highlight certain areas of interest, reduce the impact of some useless information, improve the visual effect of the image, and increase the use value of the image. Image recognition has been widely used in the fields of medical diagnosis, face recognition, remote sensing images, etc. The classic image enhancement algorithms mainly include: histogram equalization, wavelet transform, homomorphic filtering, and Retinex algorithm.

[0004] Retinex is a model proposed by Land et al. about how the human visual system adjusts the color and brightness of perceived objects. It indicates that the color of the same object remains constant under different light sources or lights. It divides the image I(x, y) into two parts, namely the brightness image (low-frequency part) and the reflection image (high-frequency part), represented by L(x, y) and R(x, y) respectively. The purpose of enhancing the image is achieved by changing the ratio of the brightness image and the reflection image in the original image. However, the existing multi-scale Retinex image enhancement algorithm requires multiple convolution operations, resulting in a large amount of calculation, and assumes that the initial illumination image is slowly changing. When the illumination changes greatly at the edge of the image in actual situations, it is easy to produce image edge blur and insufficient image detail enhancement.

[0005] Patent No. CN201710545556.2A discloses an image enhancement method, including: binarizing the original image to divide the original image into a background image and a target image; calculating and processing the segmented image using a retinex algorithm of a corresponding scale according to the type of the segmented image; performing bilateral filtering on the brightness image included in the calculated image, and performing wavelet denoising on the reflection image included in the calculated image; synthesizing the image after bilateral filtering and the image after wavelet denoising and performing gamma correction to obtain an enhanced image.

[0006] Although it helps to reduce the amount of convolution calculation by transforming the two scales of the image, performs bilateral filtering on the brightness image, and performs wavelet denoising on the reflection image, it helps to remove image noise with less loss of image details. By performing gamma correction on the synthesized image, it helps to enhance the overall image.

[0007] However, during processing, the image needs to be binarized and segmented, so that the entire image enhancement process consumes more system resources and requires more processing time. At the same time, since bilateral filtering is performed on the brightness image included in the calculated image, but wavelet denoising is performed on the reflection image included in the calculated image, the use of different algorithms results in obvious deviations in the display effect of the final processed image, thereby reducing the image quality. Summary of the invention

[0008] In view of this, the main purpose of the present invention is to provide an image enhancement method based on dynamic data distribution. The present invention divides the image to be processed into blocks, finds the part of the image to be processed that needs to be enhanced, and then divides the result of the block processing into blocks again to find the area that needs to be enhanced, thereby achieving precise positioning of image enhancement; on the one hand, the system resources required for image enhancement can be reduced, because only the area that needs to be enhanced needs to be enhanced; on the other hand, excessive enhancement of the area that does not need to be enhanced is avoided, thereby reducing the image quality; at the same time, the present invention uses a pixel-based image enhancement algorithm to operate on each pixel in the area that needs to be enhanced to improve the image enhancement effect; finally, the present invention also ensures the accuracy of image enhancement through dynamic analysis and enhancement accuracy detection, thereby further improving the quality of the enhanced image.

[0009] To achieve the above object, the technical solution of the present invention is achieved as follows:

[0010] An image enhancement method based on dynamic data distribution, the method performs the following steps:

[0011] Step 1: Divide the image to be processed into blocks according to the set image block size in the rectangular coordinate system to obtain a number of pixel blocks; number each pixel block according to the position of the geometric center of each pixel block in the rectangular coordinate system to generate a pixel block ID;

[0012] Step 2: Perform image enhancement detection on each pixel block to determine whether the pixel block needs to be enhanced; if it is determined that the pixel block needs to be enhanced, perform regional enhancement detection on the pixel block to obtain the area in the pixel block that needs to be enhanced, and obtain the number of areas that need to be enhanced; execute step 3;

[0013] Step 3: Perform image enhancement detection accuracy judgment, specifically including: Step 3.1: According to the number of areas of the pixel block that need to be image enhanced obtained in step 2, perform a marking value operation at the position where the geometric center of the pixel block is located in the rectangular coordinate system. If the number of areas of the pixel block that need to be image enhanced is 0, then no value is marked; if the number of areas of the pixel block that need to be image enhanced is 2, then the marking value is: 2; after the corresponding marking value operation is performed on all pixel blocks, perform data analysis on the marked values ​​in the rectangular coordinate system to determine whether the distribution of the marked values ​​meets the preset conditions. If so, it is determined that the image enhancement detection accuracy meets the requirements, and step 4 is executed; if it is determined that the image enhancement detection accuracy does not meet the requirements, return to re-execute step 2;

[0014] Step 4: Use a preset image enhancement model to perform image enhancement on the image to be processed; if the image enhancement model receives a parameter adjustment command, the parameters of the image enhancement model are adjusted before performing image enhancement on the image to be processed;

[0015] Step 5: Perform dynamic data analysis on the enhanced image. If the result of the dynamic data analysis meets the preset constraints, the image enhancement is terminated. If the result of the dynamic data analysis does not meet the preset constraints, a parameter adjustment command is generated and sent to the image enhancement model, and step 4 is re-executed. The dynamic data analysis includes: summing the RGB pixel values ​​of the pixels in each pixel block to obtain a total RGB value: (R 总 ,G 总 ,B 总 );Then perform arithmetic average operation on the total RGB to obtain the average RGB value: (R 平 , G 平 , B 平 );Then use the following formula to calculate the pixel value and: Pixel value and = R 平 +G 平 +B 平 ; According to the pixel block ID of each pixel block and its corresponding pixel value sum, a pixel block ID-pixel value sum curve is drawn in a rectangular coordinate system, with the X-axis being the pixel block ID and the vertical axis being the pixel value sum; a curve fitting calculation is performed on the pixel block ID-pixel value sum curve and a preset curve to determine whether the result of the curve fitting calculation meets the preset constraints.

[0016] Furthermore, in step 2, image enhancement detection is performed on each pixel block to determine whether the pixel block needs to be enhanced, specifically including: calculating the pixel difference of the pixel block to obtain the area with the largest pixel difference in the pixel block, and performing fast Fourier transform on the three RGB channels of the area with the largest pixel difference in the pixel block, reducing the size of the complex data obtained by the transformation, and constructing a new pixel block with the complex data after the size reduction, and then using the blur detection model to judge the blurred image of the newly constructed pixel block; the pixel difference is defined as: if the minimum value of the difference between the RGB value of the pixel and the RGB value of any adjacent pixel; if the blur detection model detects a blurred image in the newly constructed pixel block, it is determined that the pixel block needs to be enhanced, otherwise it is determined that the pixel block does not need to be enhanced.

[0017] Furthermore, in the step 2, while judging that the pixel block needs to be enhanced, the pixel block is subjected to regional enhancement detection to obtain the area in the pixel block that needs to be enhanced, and the number of areas that need to be enhanced is obtained, which specifically includes: detecting the blurred area, including: dividing the pixel block according to the set pixel block size, and each pixel block is divided into a plurality of sub-pixel blocks; calculating the pixel difference of each sub-pixel block in the pixel block to obtain the area with the largest pixel difference in the sub-pixel block, and performing fast Fourier transform on the three RGB channels of the area with the largest pixel difference in the sub-pixel block, reducing the size of the complex data obtained by the transformation, and constructing a new sub-pixel block with the complex data after the size reduction, and then using the blur detection model to identify the blurred image of the newly constructed sub-pixel block; performing the step of edge contour delineation: if the blur detection model detects a blurred image in the newly constructed sub-pixel block, edge detection is performed around the blurred image to find the edge of the blurred image and delineate the edge contour of the blurred image; performing the step of statistics: counting the number of edge contours of the blurred image delineated in the sub-pixel block as the number of areas that need to be enhanced;

[0018] Furthermore, the step of delineating the edge contour includes: performing a convolution operation on the sub-pixel block to be processed according to the grayscale values ​​of each sub-pixel block in the neighborhood of the sub-pixel block to be processed and the logarithm operation of the template in each preset direction of the edge detection operator, so as to obtain the brightness difference approximation of the sub-pixel block to be processed in the preset directions; obtaining the gradient amplitude of the sub-pixel block to be processed according to the brightness difference approximation of the sub-pixel block to be processed in the preset directions; comparing the gradient amplitude of the sub-pixel block to be processed with the gradient amplitude threshold, and taking the sub-pixel block to be processed whose gradient amplitude is greater than or equal to the gradient amplitude threshold as an edge point; and extracting the contour of the target in the image according to the obtained edge point.

[0019] Furthermore, in step 4, a preset image enhancement model is used to perform image enhancement on the image to be processed, specifically including: obtaining the area that needs to be image enhanced in the pixel block obtained in step 2, and using the image enhancement model to perform image enhancement on the area that needs to be image enhanced in the pixel block.

[0020] Furthermore, the image enhancement model is expressed using the following formula:

[0021] Among them, G is the result obtained after image enhancement; S(R new , G new , B new ) is the RGB value of the enhanced pixel obtained by enhancing each pixel in the area requiring image enhancement using the image enhancement model; in, Among them, R new is the R value in the RGB value of the pixel after image enhancement, G new is the G value in the RGB value of the pixel after image enhancement; B new is the B value in the RGB value of the pixel after image enhancement; A, B and C are adjustment parameters, the initial value of A is: 5; the initial value of B is: 10; the initial value of C is: 15.

[0022] Furthermore, when the image enhancement model receives a parameter adjustment command and needs to adjust the parameters of the image enhancement model, A, B and C are adjusted using the following formulas: 调 =A+2;B 调 =B*1.2;C 调 =C*1.5; where A 调 is the adjusted A value, B 调 is the adjusted B value, C 调 is the adjusted C value.

[0023] Furthermore, in step 5, a curve fitting calculation is performed on the pixel block ID-pixel value and the curve with a preset curve, specifically including: separating the pixel block ID-pixel value and the curve into an edge boundary curve by a boundary separation method; removing protrusions on the edge boundary curve; removing interfering small boundaries on the edge boundary curve, and extracting a continuous part of the edge boundary curve; then merging edge boundary curves with similar features, and then performing circle fitting on the merged edge boundary curve using the least squares method to obtain a fitting circle; taking the pixel points on the diameter of the fitting circle as the object, using the regional growing algorithm to extract the pixel block ID-pixel value and the pixel point set at the location of the curve; then performing least squares fitting on the pixel point set and the preset curve to calculate the similarity coefficient.

[0024] Furthermore, in step 5, determining whether the result of the curve fitting calculation satisfies the preset constraint conditions specifically includes: comparing the calculated similarity coefficient with a preset similarity coefficient threshold; if the calculated similarity coefficient is within the preset similarity coefficient threshold range, determining that the preset constraint conditions are satisfied; otherwise, determining that the preset constraint conditions are not satisfied.

[0025] Image enhancement device based on dynamic data distribution.

[0026] The image processing method and device based on blur detection of the present invention have the following beneficial effects:

[0027] 1. High efficiency of image enhancement: Before performing image enhancement, the present invention first divides the image into blocks twice; during the first block processing, it is used to determine whether the pixel block needs to be enhanced; during the second block processing, the area in the pixel block that needs to be enhanced is obtained; through these two block processing, accurate positioning of image enhancement can be achieved, and the system can enhance the part of the image to be processed that needs to be enhanced without enhancing other parts that do not need to be enhanced, thereby saving system resources and reducing the time required for image enhancement.

[0028] 2. High image quality: When performing image enhancement, the present invention uses an image enhancement algorithm based on pixel enhancement for enhancement; compared with the algorithm that enhances the image as a whole, the quality of the enhanced image is higher; at the same time, during the image enhancement process, a dynamic analysis method based on curve fitting is used to determine whether the result after image enhancement meets the requirements. If not, the parameters are adjusted for a second image enhancement until the result after image enhancement meets the requirements, thereby greatly improving the quality of image enhancement; on the other hand, when determining the image enhancement area, the present invention still uses a data analysis method based on point value distribution to determine whether the area that needs to be enhanced is accurate, thereby further improving the accuracy of image enhancement and improving image quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A schematic diagram of a method flow of an image processing method based on blur detection provided by an embodiment of the present invention;

[0030] Figure 2 A schematic diagram of the principle of image segmentation of the image processing method and device based on blur detection provided by an embodiment of the present invention;

[0031] Figure 3 A schematic diagram of the principle of obtaining the area in a pixel block that needs to be image enhanced by the image processing method and device based on blur detection according to an embodiment of the present invention;

[0032] Figure 4 It is a schematic diagram of the principle of dynamic analysis of the image processing method and device based on blur detection according to an embodiment of the present invention;

[0033] Figure 5 A schematic diagram of an experimental curve showing how image quality varies with image difference in the image processing method and device based on blur detection provided in an embodiment of the present invention is provided, and a schematic diagram of the comparative experimental effect of the corresponding experimental curve for image enhancement using histogram equalization and gamma transform in the prior art. DETAILED DESCRIPTION

[0034] The method of the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments of the present invention.

[0035] Example 1

[0036] like Figure 1 and Figure 2 As shown, the image enhancement method based on dynamic data distribution performs the following steps:

[0037] Step 1: Divide the image to be processed into blocks according to the set image block size in the rectangular coordinate system to obtain a number of pixel blocks; number each pixel block according to the position of the geometric center of each pixel block in the rectangular coordinate system to generate a pixel block ID;

[0038] Step 2: Perform image enhancement detection on each pixel block to determine whether the pixel block needs to be enhanced; if it is determined that the pixel block needs to be enhanced, perform regional enhancement detection on the pixel block to obtain the area in the pixel block that needs to be enhanced, and obtain the number of areas that need to be enhanced; execute step 3;

[0039] Step 3: Perform image enhancement detection accuracy judgment, specifically including: Step 3.1: According to the number of areas of the pixel block that need to be image enhanced obtained in step 2, perform a marking value operation at the position where the geometric center of the pixel block is located in the rectangular coordinate system. If the number of areas of the pixel block that need to be image enhanced is 0, then no value is marked; if the number of areas of the pixel block that need to be image enhanced is 2, then the marking value is: 2; after the corresponding marking value operation is performed on all pixel blocks, perform data analysis on the marked values ​​in the rectangular coordinate system to determine whether the distribution of the marked values ​​meets the preset conditions. If so, it is determined that the image enhancement detection accuracy meets the requirements, and step 4 is executed; if it is determined that the image enhancement detection accuracy does not meet the requirements, return to re-execute step 2;

[0040] Step 4: Use a preset image enhancement model to perform image enhancement on the image to be processed; if the image enhancement model receives a parameter adjustment command, the parameters of the image enhancement model are adjusted before performing image enhancement on the image to be processed;

[0041] Step 5: Perform dynamic data analysis on the enhanced image. If the result of the dynamic data analysis meets the preset constraints, the image enhancement is terminated. If the result of the dynamic data analysis does not meet the preset constraints, a parameter adjustment command is generated and sent to the image enhancement model, and step 4 is re-executed. The dynamic data analysis includes: summing the RGB pixel values ​​of the pixels in each pixel block to obtain a total RGB value: (R 总 , G 总 , b 总 );Then perform arithmetic average operation on the total RGB to obtain the average RGB value: (R 平 ,G 平 , B 平 );Then use the following formula to calculate the pixel value and: Pixel value and = R 平 +G 平 +B 平 ; According to the pixel block ID of each pixel block and its corresponding pixel value sum, a pixel block ID-pixel value sum curve is drawn in a rectangular coordinate system, with the X-axis being the pixel block ID and the vertical axis being the pixel value sum; a curve fitting calculation is performed on the pixel block ID-pixel value sum curve and a preset curve to determine whether the result of the curve fitting calculation meets the preset constraints.

[0042] refer to Figure 5 When the present invention performs image enhancement on an image to be processed with a pixel difference ranging from 4 to 10, the image quality is much higher than that of the method in the prior art.

[0043] Example 2

[0044] On the basis of the previous embodiment, in step 2, image enhancement detection is performed on each pixel block to determine whether the pixel block needs to be enhanced, specifically including: performing pixel difference calculation on the pixel block to obtain the area with the largest pixel difference in the pixel block, and performing fast Fourier transform on the RGB three channels of the area with the largest pixel difference in the pixel block, reducing the size of the complex data obtained by the transformation, and constructing a new pixel block with the complex data after the size reduction, and then using the blur detection model to distinguish the blurred image of the newly constructed pixel block; the pixel difference is defined as: if the minimum value of the difference between the RGB value of the pixel and the RGB value of any adjacent pixel; if the blur detection model detects a blurred image in the newly constructed pixel block, it is determined that the pixel block needs to be enhanced, otherwise it is determined that the pixel block does not need to be enhanced.

[0045] Example 3

[0046] On the basis of the previous embodiment, in the step 2, while judging that the pixel block needs to be enhanced, the pixel block is subjected to regional enhancement detection to obtain the area in the pixel block that needs to be enhanced, and the number of areas that need to be enhanced is obtained, which specifically includes: detecting the blurred area, including: dividing the pixel block according to the set pixel block size, and each pixel block is divided into a plurality of sub-pixel blocks; calculating the pixel difference of each sub-pixel block in the pixel block to obtain the area with the largest pixel difference in the sub-pixel block, and performing fast Fourier transform on the three RGB channels of the area with the largest pixel difference in the sub-pixel block, reducing the size of the complex data obtained by the transformation, and constructing a new sub-pixel block with the complex data after the size reduction, and then using the blur detection model to identify the blurred image of the newly constructed sub-pixel block; performing the step of edge contour delineation: if the blur detection model detects a blurred image in the newly constructed sub-pixel block, edge detection is performed around the blurred image to find the edge of the blurred image and delineate the edge contour of the blurred image; performing the step of statistics: counting the number of edge contours of the blurred image delineated in the sub-pixel block as the number of areas that need to be enhanced.

[0047] Example 4

[0048] like Figure 3As shown, on the basis of the previous embodiment, the step of performing edge contour delineation includes: performing a convolution operation on the sub-pixel block to be processed according to the template in each preset direction of the edge detection operator and the grayscale value of each sub-pixel block in the neighborhood of the sub-pixel block to be processed after logarithm operation, so as to obtain the brightness difference approximation of the sub-pixel block to be processed in the preset directions; obtaining the gradient amplitude of the sub-pixel block to be processed according to the brightness difference approximation of the sub-pixel block to be processed in the preset directions; comparing the gradient amplitude of the sub-pixel block to be processed with the gradient amplitude threshold, and taking the sub-pixel block to be processed whose gradient amplitude is greater than or equal to the gradient amplitude threshold as an edge point; and extracting the outline of the target in the image according to the obtained edge point.

[0049] Specifically, edge detection is a fundamental problem in image processing and computer vision. The purpose of edge detection is to identify points in a digital image where brightness changes significantly. Significant changes in image properties usually reflect important events and changes in the properties. These include (i) discontinuities in depth, (ii) surface orientation discontinuities, (iii) changes in material properties, and (iv) changes in scene illumination. Edge detection is a research area in image processing and computer vision, especially in feature extraction.

[0050] Image edge detection greatly reduces the amount of data and removes information that can be considered irrelevant, retaining the important structural properties of the image. There are many methods for edge detection, most of which can be divided into two categories: search-based and zero-crossing-based. Search-based methods detect boundaries by finding the maximum and minimum values ​​in the first-order derivative of the image, usually locating the boundary in the direction of the maximum gradient. Zero-crossing-based methods find boundaries by finding zero crossings of the second-order derivative of the image, usually the zero crossings of the Laplacian or the zero crossings of the nonlinear differential representation.

[0051] Example 5

[0052] Based on the previous embodiment, the preset image enhancement model is used in step 4 to perform image enhancement on the image to be processed, specifically including: obtaining the area that needs to be image enhanced in the pixel block obtained in step 2, and using the image enhancement model to perform image enhancement on the area that needs to be image enhanced in the pixel block.

[0053] Specifically, image enhancement can be divided into two categories: frequency domain method and spatial domain method.

[0054] The former regards the image as a two-dimensional signal and performs signal enhancement based on two-dimensional Fourier transform. The low-pass filtering method (that is, only low-frequency signals are allowed to pass) can remove the noise in the image; the high-pass filtering method can enhance high-frequency signals such as edges to make blurred images clear.

[0055] Representative algorithms in the latter spatial domain method include local averaging method and median filtering (taking the middle pixel value in the local neighborhood), which can be used to remove or reduce noise.

[0056] The method of image enhancement is to add some information or transform data to the original image through certain means, selectively highlight the features of interest in the image or suppress (mask) some unnecessary features in the image, so that the image matches the visual response characteristics.

[0057] In the process of image enhancement, if the reasons for image degradation are not analyzed, the processed image may not be close to the original image. Image enhancement technology can be divided into two categories: algorithms based on spatial domain and algorithms based on frequency domain, depending on the space where the enhancement process is located.

[0058] Example 6

[0059] Based on the previous embodiment, the image enhancement model is expressed using the following formula: Among them, G is the result obtained after image enhancement; S(R new , G new ,B new ) is the RGB value of the enhanced pixel obtained by enhancing each pixel in the area requiring image enhancement using the image enhancement model; in, Among them, R new is the R value in the RGB value of the pixel after image enhancement, G new is the G value in the RGB value of the pixel after image enhancement; B new is the B value in the RGB value of the pixel after image enhancement; A, B and C are adjustment parameters, the initial value of A is: 5; the initial value of B is: 10; the initial value of C is: 15.

[0060] Example 7

[0061] On the basis of the previous embodiment, when the image enhancement model receives a parameter adjustment command and needs to adjust the parameters of the image enhancement model, A, B and C are adjusted using the following formulas: 调 =A+2;B 调 =B*1.2;C 调 =C*1.5; where A 调 is the adjusted A value, B 调 is the adjusted B value, C 调 is the adjusted C value.

[0062] Example 8

[0063] like Figure 4 As shown, on the basis of the previous embodiment, in step 5, the pixel block ID-pixel value and the curve are subjected to a curve fitting calculation with a preset curve, specifically including: separating the pixel block ID-pixel value and the curve into an edge boundary curve by a boundary separation method; removing protrusions on the edge boundary curve; removing interfering small boundaries on the edge boundary curve, and extracting a continuous part of the edge boundary curve; then merging edge boundary curves with similar features, and then performing circle fitting on the merged edge boundary curve by the least squares method to obtain a fitting circle; taking the pixel points on the diameter of the fitting circle as the object, using the regional growing algorithm to extract the pixel block ID-pixel value and the pixel point set at the location of the curve; then performing least square fitting on the pixel point set and the preset curve to calculate the similarity coefficient.

[0064] Specifically, in actual work, variables may not always have a linear relationship, such as the relationship between blood drug concentration and time after taking a drug; the relationship between disease efficacy and the length of treatment; the relationship between poison dose and mortality, etc., which often present a curve relationship. Curve fitting refers to selecting an appropriate curve type to fit the observed data, and using the fitted curve equation to analyze the relationship between two variables.

[0065] Example 9

[0066] On the basis of the previous embodiment, the step 5 determines whether the result of the curve fitting calculation satisfies the preset constraint conditions, specifically including: comparing the calculated similarity coefficient with the preset similarity coefficient threshold value; if the calculated similarity coefficient is within the preset similarity coefficient threshold range, it is determined that the preset constraint conditions are met; otherwise, it is determined that the preset constraint conditions are not met.

[0067] Specifically, it is a data processing method that uses continuous curves to approximate or compare the functional relationship between coordinates represented by a group of discrete points on a plane. A method of approximating discrete data with analytical expressions. In scientific experiments or social activities, a set of data pairs (xi, yi) (i = 1, 2, ...m) of quantities x and y are obtained through experiments or observations, where each xi is different from each other. People hope to use a type of analytical expression that is consistent with the background material rules of the data, y = f(x, c) to reflect the dependence between quantities x and y, that is, to "best" approximate or fit known data in a certain sense. f(x, c) is often called a fitting model, where c = (c1, c2, ...cn) are some unknown parameters. When c appears linearly in f, it is called a linear model, otherwise it is called a nonlinear model. There are many criteria for measuring the goodness of fit. The most commonly used approach is to select the parameter c so that the fitting model is consistent with the actual observations in

[0068] The weighted sum of squares of the residuals (or deviations) ek = yk - f (xk, c) of each point reaches a minimum. At this time, the curve sought is called the fitting curve of the data in the sense of weighted least squares. There are many successful methods for solving fitting curves. For linear models, it is generally

[0069] The fitting curve is obtained by establishing and solving a set of equations to determine the parameters. As for nonlinear models, the fitting curve can only be obtained by solving a set of nonlinear equations or using optimization methods to obtain the required parameters, which is sometimes called nonlinear least squares fitting.

[0070] Example 10

[0071] Image enhancement device based on dynamic data distribution.

[0072] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process and related instructions of the system described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0073] It should be noted that the system provided in the above embodiment is only illustrated by the division of the above functional units. In practical applications, the above functions can be assigned to different functional units as needed, that is, the units or steps in the embodiments of the present invention can be decomposed or combined. For example, the units in the above embodiments can be combined into one unit, or further divided into multiple sub-units to complete all or unit functions described above. The names of the units and steps involved in the embodiments of the present invention are only for distinguishing the various units or steps and are not regarded as improper limitations of the present invention.

[0074] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process and related instructions of the storage device and processing device described above can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0075] Those skilled in the art should be able to appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two, and the programs corresponding to the software units and method steps can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the technical field. In order to clearly illustrate the interchangeability of electronic hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but this implementation should not be considered to exceed the scope of the present invention.

[0076] The terms “first”, “another part” and the like are used to distinguish similar objects but are not used to describe or indicate a specific sequence or order.

[0077] The term "comprise" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or unit / apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or also includes elements inherent to such process, method, article, or unit / apparatus.

[0078] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical marks, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

[0079] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention.

Claims

1. Image enhancement method based on dynamic data distribution, It is characterized in that The method performs the following steps: Step 1: Divide the image to be processed into blocks according to the set image block size in the rectangular coordinate system to obtain a number of pixel blocks; number each pixel block according to the position of the geometric center of each pixel block in the rectangular coordinate system to generate a pixel block ID; Step 2: Perform image enhancement detection on each pixel block to determine whether the pixel block needs image enhancement; If it is determined that the pixel block needs to be enhanced, a region enhancement detection is performed on the pixel block to obtain a region in the pixel block that needs to be enhanced, and the number of regions that need to be enhanced is obtained; Execute step 3; Step 3: Perform image enhancement detection accuracy judgment, specifically including: Step 3.1: According to the number of areas of the pixel block that need to be image enhanced obtained in step 2, perform a marking value operation at the position where the geometric center of the pixel block is located in the rectangular coordinate system. If the number of areas of the pixel block that need to be image enhanced is 0, then no value is marked; if the number of areas of the pixel block that need to be image enhanced is 2, then the marking value is: 2; after the corresponding marking value operation is performed on all pixel blocks, perform data analysis on the marked values ​​in the rectangular coordinate system to determine whether the distribution of the marked values ​​meets the preset conditions. If so, it is determined that the image enhancement detection accuracy meets the requirements, and step 4 is executed; if it is determined that the image enhancement detection accuracy does not meet the requirements, return to re-execute step 2; Step 4: Use a preset image enhancement model to perform image enhancement on the image to be processed; if the image enhancement model receives a parameter adjustment command, the parameters of the image enhancement model are adjusted before performing image enhancement on the image to be processed; Step 5: Perform dynamic data analysis on the enhanced image. If the result of the dynamic data analysis meets the preset constraints, the image enhancement is terminated. If the result of the dynamic data analysis does not meet the preset constraints, a parameter adjustment command is generated and sent to the image enhancement model, and step 4 is re-executed. The dynamic data analysis includes: summing the RGB pixel values ​​of the pixels in each pixel block to obtain a total RGB value: (R 总 ,G 总 ,B 总 );Then perform arithmetic average operation on the total RGB to obtain the average RGB value: (R 平 ,G 平 ,B 平 );Then use the following formula to calculate the pixel value and: Pixel value and = R 平 +G 平 +B 平 ; According to the pixel block ID of each pixel block and its corresponding pixel value sum, a pixel block ID-pixel value sum curve is drawn in a rectangular coordinate system, where the X-axis is the pixel block ID and the vertical axis is the pixel value sum; a curve fitting calculation is performed on the pixel block ID-pixel value sum curve and a preset curve, and it is determined whether the result of the curve fitting calculation meets the preset constraint conditions; In step 2, image enhancement detection is performed on each pixel block to determine whether the pixel block needs to be enhanced, specifically including: performing pixel difference calculation on the pixel block to obtain the area with the largest pixel difference in the pixel block, performing fast Fourier transform on the RGB three channels of the area with the largest pixel difference in the pixel block, reducing the size of the complex data obtained by the transformation, and constructing a new pixel block with the complex data after the size reduction, and then using a blur detection model to discriminate the blurred image of the newly constructed pixel block; the pixel difference is defined as: if the minimum value of the difference between the RGB value of the pixel and the RGB value of any adjacent pixel; if the blur detection model detects a blurred image in the newly constructed pixel block, it is determined that the pixel block needs to be enhanced, otherwise it is determined that the pixel block does not need to be enhanced; In the step 2, when it is determined that the pixel block needs to be enhanced, the pixel block is subjected to regional enhancement detection to obtain the area in the pixel block that needs to be enhanced, and the number of areas that need to be enhanced is obtained, which specifically includes: detecting the blurred area, including: dividing the pixel block according to the set pixel block size, and each pixel block is divided into a plurality of sub-pixel blocks; calculating the pixel difference of each sub-pixel block in the pixel block to obtain the area with the largest pixel difference in the sub-pixel block, and performing fast Fourier transform on the RGB three channels of the area with the largest pixel difference in the sub-pixel block, reducing the size of the complex data obtained by the transformation, and constructing a new sub-pixel block with the complex data after the size reduction, and then using the blur detection model to identify the blurred image of the newly constructed sub-pixel block; performing the step of edge contour delineation: if the blur detection model detects a blurred image in the newly constructed sub-pixel block, edge detection is performed around the blurred image to find the edge of the blurred image and delineate the edge contour of the blurred image; performing the step of statistics: counting the number of edge contours of the blurred image delineated in the sub-pixel block as the number of areas that need to be enhanced; In step 5, the pixel block ID-pixel value and the curve are subjected to curve fitting calculation with the preset curve, specifically including: separating the pixel block ID-pixel value and the curve into the edge boundary curve by the boundary separation method; removing the protrusion on the edge boundary curve; removing the interfering small boundary on the edge boundary curve, and extracting the continuous part of the edge boundary curve; then merging the edge boundary curves with similar features, and then performing circle fitting on the merged edge boundary curve by the least square method to obtain a fitting circle; taking the pixel points on the diameter of the fitting circle as the object, using the regional growing algorithm to extract the pixel block ID-pixel value and the pixel point set at the position of the curve; then performing least square fitting on the pixel point set and the preset curve to calculate the similarity coefficient; In the step 5, whether the result of the curve fitting calculation satisfies the preset constraint condition is judged, specifically including: comparing the calculated similarity coefficient with the preset similarity coefficient threshold value; if the calculated similarity coefficient is within the preset similarity coefficient threshold range, it is judged that the preset constraint condition is met; otherwise, it is judged that the preset constraint condition is not met.

2. The method according to claim 1, It is characterized in that The step of delineating the edge contour includes: performing a convolution operation on the sub-pixel block to be processed according to the template in each preset direction of the edge detection operator and the grayscale value of each sub-pixel block in the neighborhood of the sub-pixel block to be processed after logarithm operation, so as to obtain the brightness difference approximate value of the sub-pixel block to be processed in the preset directions; obtaining the gradient amplitude of the sub-pixel block to be processed according to the brightness difference approximate value of the sub-pixel block to be processed in the preset directions; comparing the gradient amplitude of the sub-pixel block to be processed with the gradient amplitude threshold, and taking the sub-pixel block to be processed whose gradient amplitude is greater than or equal to the gradient amplitude threshold as an edge point; and extracting the contour of the target in the image according to the obtained edge point.

3. The method according to claim 2, It is characterized in that In step 4, a preset image enhancement model is used to perform image enhancement on the image to be processed, specifically including: obtaining the area that needs to be image enhanced in the pixel block obtained in step 2, and using the image enhancement model to perform image enhancement on the area that needs to be image enhanced in the pixel block.

4. The method according to claim 3, It is characterized in that The image enhancement model is expressed using the following formula: Among them, G is the result obtained after image enhancement; S(R new ,G new ,B new ) is the RGB value of the enhanced pixel obtained by enhancing each pixel in the area requiring image enhancement using the image enhancement model; in, Among them, R new is the R value in the RGB value of the pixel after image enhancement, G new is the G value in the RGB value of the pixel after image enhancement; B new is the B value in the RGB value of the pixel after image enhancement; A, B and C are adjustment parameters, the initial value of A is: 5; the initial value of B is: 10; the initial value of C is:

15.

5. The method according to claim 4, It is characterized in that When the image enhancement model receives a parameter adjustment command and needs to adjust the parameters of the image enhancement model, A, B and C are adjusted using the following formulas: 调 =A+2;B 调 =B*1.2;C 调 =C*1.5; where A 调 is the adjusted A value, B 调 is the adjusted B value, C 调 is the adjusted C value.