CN117649357A - Ultrasonic image processing method based on image enhancement - Google Patents

Ultrasonic image processing method based on image enhancement Download PDF

Info

Publication number
CN117649357A
CN117649357A CN202410114811.8A CN202410114811A CN117649357A CN 117649357 A CN117649357 A CN 117649357A CN 202410114811 A CN202410114811 A CN 202410114811A CN 117649357 A CN117649357 A CN 117649357A
Authority
CN
China
Prior art keywords
pixel point
gray
image
value
reference block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410114811.8A
Other languages
Chinese (zh)
Other versions
CN117649357B (en
Inventor
刘林泉
张强
吴汉富
李华梅
刘奇
宋冬冬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN EMPEROR ELECTRONIC TECHNOLOGY CO LTD
Original Assignee
SHENZHEN EMPEROR ELECTRONIC TECHNOLOGY CO LTD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENZHEN EMPEROR ELECTRONIC TECHNOLOGY CO LTD filed Critical SHENZHEN EMPEROR ELECTRONIC TECHNOLOGY CO LTD
Priority to CN202410114811.8A priority Critical patent/CN117649357B/en
Publication of CN117649357A publication Critical patent/CN117649357A/en
Application granted granted Critical
Publication of CN117649357B publication Critical patent/CN117649357B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

The invention relates to the technical field of image enhancement, in particular to an ultrasonic image processing method based on image enhancement. The method comprises the steps of obtaining a gray level image of an ultrasonic image to be processed; constructing a reference block of the pixel point, acquiring peripheral gray scale difference values of the pixel point according to gray scale value distribution in the reference block, and adjusting the number of preset neighborhood blocks to acquire the number of initial neighborhood blocks of the pixel point; according to the gradient direction difference in the reference block, the position distribution of the pixel points with the same gray value is obtained, the noise possible value of the pixel points is obtained, the adjusting parameters are determined, the number of initial neighborhood blocks is adjusted, the number of final neighborhood blocks of the pixel points is obtained, and the ultrasonic image to be processed is enhanced through a non-local mean value filtering algorithm. According to the invention, the final neighborhood block number of each pixel point is obtained in a self-adaptive manner, so that the problem that edge details are lost due to a non-local mean value filtering algorithm is avoided, and the enhanced ultrasonic image to be processed is more accurate.

Description

Ultrasonic image processing method based on image enhancement
Technical Field
The invention relates to the technical field of image enhancement, in particular to an ultrasonic image processing method based on image enhancement.
Background
Ultrasound images are medical images acquired by ultrasound imaging techniques to assist a physician in analyzing various tissue structures of the human body. Noise pixels caused by thermal motion of the ultrasonic sensor and the electronic element may exist in the process of acquiring the ultrasonic image, that is, a noise point or a spot appears in the ultrasonic image, so that quality and contrast of the ultrasonic image are reduced, and a doctor cannot accurately analyze each tissue structure, so that the ultrasonic image needs to be enhanced, and interference of the noise pixels is removed.
In the existing method, noise pixel points in an ultrasonic image are removed through a non-local mean value filtering algorithm, but the retention degree of the non-local mean value filtering algorithm on edge details in the ultrasonic image is not high, because the non-local mean value filtering algorithm is easy to excessively smooth the edge in the denoising process, partial edge detail information is further lost, and accurate analysis on the ultrasonic image cannot be performed.
Disclosure of Invention
In order to solve the technical problems that the non-local mean filtering algorithm is easy to excessively smooth the edge in the denoising process, so that part of edge detail information is lost and an ultrasonic image cannot be accurately analyzed, the invention aims to provide an ultrasonic image processing method based on image enhancement, and the adopted technical scheme is as follows:
the invention provides an ultrasonic image processing method based on image enhancement, which comprises the following steps:
acquiring a gray level image of an ultrasonic image to be processed;
constructing a reference block of each pixel point in the gray image, and acquiring the peripheral gray difference value of each pixel point in the gray image according to the gray value distribution and the gray value difference in each reference block; adjusting the number of preset neighborhood blocks of each pixel according to the surrounding gray difference value of each pixel to obtain the number of initial neighborhood blocks of each pixel;
acquiring a noise possible value of each pixel point in the gray level image according to gradient direction difference between adjacent pixel points in a reference block of each pixel point in the gray level image and the distance between each pixel point in the gray level image and other pixel points with the same gray level value;
acquiring a noise ratio value in a reference block of each pixel point in the gray level image according to the noise possible value in each reference block and the total number of the pixel points; acquiring an adjusting parameter of each pixel point in the gray image according to the noise occupation ratio and the noise possible value of the corresponding pixel point;
the initial neighborhood block number of each pixel point in the gray level image is adjusted according to the adjustment parameters, and the final neighborhood block number of each pixel point in the gray level image is obtained;
and according to the number of the final neighborhood blocks of each pixel point, enhancing the ultrasonic image to be processed through a non-local mean filtering algorithm.
Further, the method for constructing the reference block of each pixel point in the gray image and obtaining the surrounding gray difference value of each pixel point in the gray image according to the gray value distribution and the gray value difference in each reference block comprises the following steps:
for any pixel point in the gray level image, acquiring the number of pixel points which are the same as the gray level value of the pixel point in a reference block of the pixel point as a first number;
acquiring gray value differences between each pixel point and the pixel point in a reference block of the pixel point as first differences;
and acquiring the peripheral gray scale difference value of the pixel point according to the first quantity, the first difference and the total quantity of the pixel points in the reference block of the pixel point.
Further, the calculation formula of the surrounding gray scale difference value is as follows:
in the method, in the process of the invention,the gray level difference value around the ith pixel point in the gray level image; />A first number in a reference block for an i-th pixel in the gray scale image; n is the number of rows of the reference block; m is the number of columns of the reference block; />The total number of pixels in the reference block; />The gray value of the ith pixel point in the gray image; />The gray value of the j pixel point in the reference block of the i pixel point in the gray image; />As a function of absolute value; exp is an exponential function based on a natural constant e; norm is a normalization function.
Further, the method for obtaining the number of the initial neighborhood blocks comprises the following steps:
taking the product of the peripheral gray difference value of each pixel point and the number of preset neighborhood blocks as a first value of each pixel point;
and taking the result of rounding up each first value as the initial neighborhood block number of the corresponding pixel point.
Further, the method for obtaining the noise possible value of each pixel point in the gray image according to the gradient direction difference between the adjacent pixel points in the reference block of each pixel point in the gray image and the distance between each pixel point in the gray image and other pixel points with the same gray value comprises the following steps:
for any pixel point in the gray level image, acquiring gradient direction difference between each pixel point in each row of a reference block of the pixel point and the adjacent next pixel point as direction difference;
acquiring Euclidean distance between the pixel point and each other pixel point with the same gray value in the gray level image as a first distance;
arranging the first distances from small to large to obtain a first distance sequence;
and acquiring a noise possible value of the pixel point according to the direction difference in the reference block of the pixel point and the first preset number of first distances of the first distance sequence.
Further, the calculation formula of the possible noise value is as follows:
in the method, in the process of the invention,the possible noise value of the ith pixel point in the gray level image; n is the number of rows of the reference block; m is the number of columns of the reference block; />The gradient direction of the s-th pixel point in the first row of the reference block of the i-th pixel point in the gray level image;the gradient direction of the (s+1) th pixel point in the first row of the reference block of the ith pixel point in the gray level image; w is a preset number; />Is the z first distance; />As a function of absolute value; norm is a normalization function.
Further, the calculation formula of the noise ratio is as follows:
in the method, in the process of the invention,the noise ratio in the reference block of the ith pixel point in the gray image; />Noise possible value of the kth pixel point in the reference block of the ith pixel point in the gray level image; n is the number of rows of the reference block; m is the number of columns of the reference block;the total number of pixels in the reference block; />Is a first preset positive integer.
Further, the method for acquiring the adjustment parameters comprises the following steps:
taking the product of the possible noise value of each pixel point in the gray image and the ratio of the noise to the reference block of the corresponding pixel point as a first characteristic value;
and normalizing the absolute value of each first characteristic value to obtain a result which is used as an adjusting parameter of a corresponding pixel point in the gray level image.
Further, the calculation formula of the final neighborhood block number is:
in the method, in the process of the invention,the number of the final neighborhood blocks of the ith pixel point in the gray level image; />The number of the initial neighborhood blocks of the ith pixel point in the gray level image; />The adjustment parameter of the ith pixel point in the gray level image; />The noise ratio in the reference block of the ith pixel point in the gray image; />Is a second preset constant; />Is in accordance with the upward rounding.
Further, the gradient direction obtaining method comprises the following steps: and acquiring the gradient direction of each pixel point in the gray image through a Scharr operator.
The invention has the following beneficial effects:
constructing a reference block of each pixel point in the gray level image, so as to accurately analyze each pixel point in the gray level image; according to the gray value distribution and gray value difference in each reference block, the surrounding gray value difference value of each pixel point in the gray image is obtained, and preparation is made for determining the number of neighborhood blocks of each pixel point in the gray image, so that the preset number of neighborhood blocks of each pixel point is adjusted according to the surrounding gray value difference value of each pixel point, the initial number of neighborhood blocks of each pixel point is obtained, and effective denoising of noise pixel points by a non-local mean value filtering algorithm is ensured; the local gray value around the pixel point is possibly noise pixel point and also possibly edge pixel point, so that the edge pixel point is mistakenly considered as the noise pixel point, in order to ensure that the noise pixel point is effectively removed, meanwhile, edge detail information in the gray image is accurately reserved, and the noise possible value of each pixel point in the gray image is obtained according to gradient direction difference between adjacent pixel points in a reference block of each pixel point in the gray image and the distance between each pixel point in the gray image and other pixel points with the same gray value, and the possibility that each pixel point in the gray image is noise pixel point is preliminarily determined; further, according to the possible noise value and the total number of the pixel points in each reference block, the noise ratio value in the reference block of each pixel point in the gray image is obtained, and the possibility that each pixel point in the gray image is a noise pixel point is further determined, so that according to the noise ratio value and the possible noise value of the corresponding pixel point, the adjusting parameter of each pixel point in the gray image is obtained, the initial neighborhood block number of each pixel point in the gray image is adjusted, and the final neighborhood block number of each pixel point in the gray image is obtained in a self-adaptive manner; the non-local mean filtering algorithm is guaranteed to effectively remove noise pixel points in the gray level image, and meanwhile more edge detail information is reserved, so that the display quality of an ultrasonic image to be processed is improved, and the ultrasonic image to be processed is analyzed more accurately.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of an ultrasound image processing method based on image enhancement according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the present invention to achieve the preset purposes, the following detailed description is given below of an image enhancement-based ultrasonic image processing method according to the present invention with reference to the accompanying drawings and the preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of an ultrasonic image processing method based on image enhancement provided by the invention with reference to the accompanying drawings.
The scene of the embodiment of the invention is as follows: the embodiment of the invention analyzes an ultrasonic image to be processed.
The aim of the embodiment of the invention is as follows: according to the embodiment of the invention, the gray level image of the ultrasonic image to be processed is subjected to denoising processing through the non-local mean value filtering algorithm, and the non-local mean value filtering algorithm possibly mistakes edge pixel points into noise pixel points in the denoising process, so that the edge pixel points are subjected to excessive filtering, partial edge lines in the gray level image are excessively smoothed, partial edge details are lost, and further accurate analysis cannot be performed on the ultrasonic image to be processed. Therefore, in the denoising process by using the non-local mean value filtering algorithm, each pixel point in the gray image is analyzed, the neighborhood block number of each pixel point is obtained in a self-adaptive mode, and edge details in the gray image are accurately reserved under the condition that accurate denoising of the gray image is guaranteed, so that the overall display quality of the to-be-processed ultrasonic image is improved. The non-local mean filtering algorithm is in the prior art, and will not be described in detail.
Referring to fig. 1, a flowchart of an image enhancement-based ultrasound image processing method according to an embodiment of the present invention is shown, and the method includes the following steps:
step S1: and acquiring a gray level image of the ultrasonic image to be processed.
Specifically, an ultrasonic image of each tissue of a human body is obtained through medical ultrasonic equipment, wherein the ultrasonic image is an RGB image. Noise pixels may be present when acquiring an ultrasound image, resulting in an inability to accurately analyze the ultrasound image. Thus, the ultrasound image to be processed, in which noise may be present, is subjected to denoising processing. In order to better enhance an ultrasonic image, the embodiment of the invention carries out graying treatment on the ultrasonic image to be treated, acquires the gray image of the ultrasonic image to be treated, analyzes the gray value, gradient direction and position of each pixel point in the gray image, and accurately denoises the gray image so as to improve the quality of the ultrasonic image to be treated. The graying process is the prior art, and will not be described in detail.
Step S2: constructing a reference block of each pixel point in the gray image, and acquiring the peripheral gray difference value of each pixel point in the gray image according to the gray value distribution and the gray value difference in each reference block; and adjusting the number of preset neighborhood blocks of each pixel according to the surrounding gray level difference value of each pixel, and obtaining the number of initial neighborhood blocks of each pixel.
Specifically, in the gray image, the noise pixel points roughen the gray image, and it is difficult to clearly display the structure of the tissue to be analyzed in the gray image. Therefore, denoising is required for noise pixels, so that the quality of a gray image is enhanced, and the quality of an ultrasonic image to be processed is further enhanced. The noise pixel points are randomly distributed in the gray image, gray value differences between the noise pixel points and other surrounding local pixel points are relatively large, and in order to ensure that the noise pixel points in the gray image are accurately denoised, and meanwhile, the normal pixel points are prevented from being excessively filtered, so that in the process of denoising the gray image, more neighborhood blocks are needed for the noise pixel points, and the noise pixel points can be accurately denoised. Therefore, the embodiment of the invention constructs one by taking each pixel point in the gray image as the centerThe size of the reference block is not limited herein, and the practitioner can construct the reference block for each pixel point in the gray image according to the actual situation and set the size of the reference block. It should be noted that, for the boundary pixel point in the gray image, the corresponding pixel point in the reference block is not in the gray image, and the embodiment of the invention only analyzes the pixel point in the reference block in the gray image. Further, the gray value distribution and the gray value difference in the reference block of each pixel point in the gray image are analyzed, the peripheral gray difference value of each pixel point in the gray image is obtained, when the peripheral gray difference value is larger, the more likely the corresponding pixel point is a noise pixel point, and when the peripheral gray difference value is larger, the non-local mean value is shown thatThe number of neighborhood blocks for the pixel in the filtering algorithm is large. And then the number of preset neighborhood blocks of each pixel point is adjusted through the surrounding gray scale difference value of each pixel point, the number of initial neighborhood blocks of each pixel point is obtained, and the accuracy of the non-local mean value filtering algorithm is primarily improved. In the embodiment of the present invention, the number of preset neighborhood blocks is set to 20, and the practitioner can set the size of the preset neighborhood blocks according to the actual situation, which is not limited herein. The method for specifically obtaining the number of the initial neighborhood blocks of each pixel point comprises the following steps:
(1) And acquiring a surrounding gray scale difference value.
Preferably, the method for obtaining the surrounding gray scale difference value is as follows: for any pixel point in the gray level image, acquiring the number of pixel points which are the same as the gray level value of the pixel point in a reference block of the pixel point as a first number; wherein the larger the first number, the less likely the pixel is a noise pixel. Acquiring gray value differences between each pixel point and the pixel point in a reference block of the pixel point as first differences; the smaller the first difference, the more similar the gray value of the pixel is to the gray values of other surrounding pixels, the less likely the pixel is to be a noisy pixel. And further, according to the first quantity, the first difference and the total quantity of the pixel points in the reference block of the pixel points, acquiring the peripheral gray scale difference value of the pixel points, indirectly judging the possibility that the pixel points are noise pixel points, and accurately adjusting the quantity of the neighborhood blocks of the pixel points.
As an example, taking the ith pixel point in the gray image as an example, a calculation formula for obtaining the peripheral gray difference value of the ith pixel point is as follows:
in the method, in the process of the invention,the gray level difference value around the ith pixel point in the gray level image; />A first number in a reference block for an i-th pixel in the gray scale image; n is the number of rows of the reference block, and the embodiment of the invention is set to 5; m is the number of columns of the reference block, and the embodiment of the invention is set to 5; />The total number of pixels in the reference block; />The gray value of the ith pixel point in the gray image; />The gray value of the j pixel point in the reference block of the i pixel point in the gray image; />Is the first difference; />As a function of absolute value; exp is an exponential function based on a natural constant e; norm is a normalization function.
It should be noted that the number of the substrates,the larger the i-th pixel, the denser the distribution of pixels with the same gray value around the i-th pixel,smaller (less)>The smaller; first difference->Smaller (less)>And->The more similar the gray value of the ith pixel point is to the gray value of other surrounding pixels, the more similar the i pixel point is,/>The smaller; thus (S)>The smaller the i-th pixel in the gray image, the less likely it is to be a noise pixel.
According to the method for acquiring the peripheral gray scale difference value of the ith pixel point in the gray scale image, acquiring the peripheral gray scale difference value of each pixel point in the gray scale image.
(2) An initial neighborhood block number is obtained.
According to the peripheral gray scale difference value of each pixel point in the gray scale image, noise pixel points in the gray scale image can be all found out, so that the embodiment of the invention adjusts the preset neighborhood block number of each pixel point according to the peripheral gray scale difference value of each pixel point, obtains the initial neighborhood block number of each pixel point in the gray scale image, and ensures that the non-local mean filtering algorithm effectively denoises the noise pixel points.
Preferably, the method for obtaining the initial neighborhood block number is as follows: taking the product of the peripheral gray difference value of each pixel point and the number of preset neighborhood blocks as a first value of each pixel point; and taking the result of rounding up each first value as the initial neighborhood block number of the corresponding pixel point.
Taking the ith pixel point in the gray level image as an example, the calculation formula for obtaining the initial neighborhood block number of the ith pixel point is as follows:
in the method, in the process of the invention,the number of the initial neighborhood blocks of the ith pixel point in the gray level image; />The gray level difference value around the ith pixel point in the gray level image; a is the preset number of neighborhood blocksThe method embodiment is 20; />Is in accordance with the upward rounding.
It should be noted that the number of the substrates,the larger the difference of gray values between the ith pixel point and the surrounding pixel points is, the larger +.>The larger. Thus (S)>The larger the i-th pixel is, the more likely it is a noise pixel, and the larger the number of neighborhood blocks needed.
And acquiring the initial neighborhood block number of each pixel point in the gray level image according to the method for acquiring the initial neighborhood block number of the ith pixel point.
Step S3: and acquiring a noise possible value of each pixel point in the gray level image according to the gradient direction difference between adjacent pixel points in the reference block of each pixel point in the gray level image and the distance between each pixel point in the gray level image and other pixel points with the same gray level value.
Specifically, in the actual situation, only according to the gray value distribution and the change situation in the reference block of each pixel point in the gray image, the number of neighborhood blocks of each pixel point is easy to deviate, because the edge pixel points in the tissue to be analyzed in the gray image can also cause the gray change of surrounding local pixel points, namely the surrounding gray difference values of the edge pixel points are larger, the situation that the edge pixel points are mistakenly regarded as noise pixel points exists, and then the edge pixel points are excessively filtered, so that the edge detail information in the tissue to be analyzed in the gray image is lost, and further the accurate analysis of the ultrasonic image to be analyzed cannot be performed. In order to ensure that noise pixels in a gray image are accurately denoised and avoid excessive filtering of edge pixels, the embodiment of the invention acquires possible noise values of each pixel in the gray image according to gradient direction differences between adjacent pixels in a reference block of each pixel in the gray image and distances between each pixel and other pixels with the same gray value in the gray image, and further distinguishes the noise pixels from the edge pixels because the noise pixels are randomly distributed and the edge pixels are continuously distributed and the gradient directions and the gray values of the edge pixels on the same edge line are the same, so that when the gradient direction differences between the adjacent pixels in the reference block are larger, the pixel corresponding to the reference block is more likely to be the noise pixel; when the distance between a certain pixel point and other pixel points with the same gray value is larger, the pixel point is more likely to be a noise pixel point. According to the embodiment of the invention, the gradient direction of each pixel point in the gray level image is obtained through the Scharr operator. The Scharr operator is a known technology, and will not be described in detail.
Preferably, the method for obtaining the possible noise value is as follows: for any pixel point in the gray level image, acquiring gradient direction difference between each pixel point in each row of a reference block of the pixel point and the adjacent next pixel point as direction difference; when the direction difference is smaller, the consistency of the gradient directions in the reference block of the pixel point is stronger, and the pixel point is more likely to be an edge pixel point. Acquiring Euclidean distance between the pixel point and each other pixel point with the same gray value in the gray level image as a first distance; when the minimum first distance is larger, the distribution of the pixel points is more discrete, and the pixel points are more likely to be noise pixel points. Arranging the first distances from small to large to obtain a first distance sequence; and acquiring a noise possible value of the pixel point according to the direction difference in the reference block of the pixel point and the first preset number of first distances of the first distance sequence. In the embodiment of the invention, the preset number is set to 10, and the operator can set the size of the preset number according to the actual situation, which is not limited herein.
As an example, taking the ith pixel point in the gray-scale image in step S2 as an example, a calculation formula for obtaining the noise possible value of the ith pixel point in the gray-scale image is as follows:
in the method, in the process of the invention,the possible noise value of the ith pixel point in the gray level image; n is the number of rows of the reference block, and the embodiment of the invention is set to 5; m is the number of columns of the reference block, and the embodiment of the invention is set to 5; />The gradient direction of the s-th pixel point in the first row of the reference block of the i-th pixel point in the gray level image; />The gradient direction of the (s+1) th pixel point in the first row of the reference block of the ith pixel point in the gray level image; />Is the direction difference; w is a preset number, and the embodiment of the invention is set to 10; />Is the z first distance; />As a function of absolute value; norm is a normalization function.
The difference in direction is to be notedThe bigger the->And->The greater the difference between the (s+1) th pixel and the (s+1) th pixel in the first row in the reference block of the (i) th pixel, the less likely the (s+1) th pixel and the (s+1) th pixel are to be edge pixels on the same edge line>The larger the gradient direction of the pixel point in the reference block of the ith pixel point is, the more inconsistent the gradient direction of the pixel point is, the more likely the ith pixel point in the gray scale image is a noise pixel point, and the more->The larger; />The larger the size of the container,the larger the position distribution of the ith pixel point is, the more discrete is described, and the more is the position distribution of the ith pixel point>The larger; thus (S)>The larger the i-th pixel in the gray image, the more likely it is a noise pixel.
According to the method for acquiring the possible noise value of the ith pixel point in the gray level image, the possible noise value of each pixel point in the gray level image is acquired.
Step S4: acquiring a noise ratio value in a reference block of each pixel point in the gray level image according to the noise possible value in each reference block and the total number of the pixel points; and acquiring the adjusting parameter of each pixel point in the gray level image according to the noise occupation ratio and the noise possible value of the corresponding pixel point.
Specifically, in the process of denoising a gray image through a non-local mean value filtering algorithm, in order to avoid excessive smoothing of edges in the gray image, more neighborhood blocks are needed for noise pixel points, accurate denoising of the noise pixel points is ensured, less neighborhood blocks are needed for edge pixel points, excessive filtering of the edge pixel points is avoided, and further loss of edge detail information in the gray image is avoided. According to the embodiment of the invention, the noise occupation ratio of the reference block of each pixel point in the gray image is obtained according to the noise possible value and the total number of the pixel points in each reference block, the noise degree contained in each reference block is accurately reflected, and the possibility that the pixel point corresponding to each reference block is noise is further determined. Therefore, the adjusting parameter of each pixel point in the gray image is obtained through the noise occupation ratio and the noise possible value of the corresponding pixel point, the initial neighborhood block number of each pixel point in the gray image is adjusted, the final neighborhood block number of each pixel point in the gray image is obtained in a self-adaptive mode, accurate denoising is carried out on the gray image, and meanwhile edge detail information in the gray image is reserved. The specific method for acquiring the adjustment parameters of each pixel point in the gray level image is as follows:
(1) And obtaining the noise occupation ratio.
As an example, taking the ith pixel point in the gray-scale image in step S2 as an example, the addition result of the noise possible value of each pixel point in the reference block of the ith pixel point is obtained, and as the noise integral value, the integral noise condition in the reference block of the ith pixel point is evaluated. The greater the overall noise value, the greater the likelihood that the i-th pixel point is noise is indirectly indicated. Therefore, according to the noise integral value of the reference block of the ith pixel point and the total number of the pixel points in the reference block, determining the noise occupation ratio in the reference block of the ith pixel point, wherein the calculation formula for obtaining the noise occupation ratio in the reference block of the ith pixel point is as follows:
in the method, in the process of the invention,the noise ratio in the reference block of the ith pixel point in the gray image; />Noise possible value of the kth pixel point in the reference block of the ith pixel point in the gray level image; n is the number of rows of the reference block, and the embodiment of the invention is set to 5; m is the number of columns of the reference block, and the embodiment of the invention is set to 5; />The total number of pixels in the reference block; />The method comprises the steps of setting a first preset positive integer; />Is the noise overall value.
Embodiments of the invention willSetting to 2 is possible for the practitioner to set according to the actual situation, and is not limited herein.
The overall noise value is as followsThe larger the noise level existing in the reference block indicating the ith pixel point in the gray image, the larger the noise level indirectly indicating that the ith pixel point is more likely to be a noise pixel point,/>The larger; known->The value of (2) is in the range of 0 to 1, thus the noise overall value +.>The value of (2) ranges from 0 to 25, and the embodiment of the invention is realized byNamely 12.5, as a criterion for the ratio of noise pixels in the reference block of the ith pixel, determining +.>Is of a size of (a) and (b). Wherein (1)>The larger the i-th pixel is, the more likely the noise pixel is. />The range of the values is as follows
And acquiring the noise ratio value in the reference block of each pixel point in the gray image according to the method for acquiring the noise ratio value in the reference block of the ith pixel point in the gray image.
(2) And obtaining the adjustment parameters.
As known, the noise occupation ratio and the noise possible value can both reflect the possible degree that each pixel point in the gray image is a noise pixel point, so that the product of the noise possible value of each pixel point in the gray image and the noise occupation ratio in the reference block of the corresponding pixel point is used as the first characteristic value in the embodiment of the invention; and (3) taking the result of normalizing the absolute value of each first characteristic value as an adjusting parameter of a corresponding pixel point in the gray image, adjusting the initial neighborhood block number of the pixel point, and accurately obtaining the final neighborhood block number of each pixel point in the gray image.
As an example, taking the ith pixel point in the gray-scale image in step S2 as an example, the calculation formula for obtaining the adjustment parameter of the ith pixel point in the gray-scale image is as follows:
in the method, in the process of the invention,the adjustment parameter of the ith pixel point in the gray level image; />The possible noise value of the ith pixel point in the gray level image; />The noise ratio in the reference block of the ith pixel point in the gray image; />Is absolute toA value-to-value function; norm is a normalization function.
It should be noted that the number of the substrates,the larger, i.e.)>The larger the initial neighborhood block number of the ith pixel point in the gray image, the larger the adjustment degree is.
According to the method for acquiring the adjustment parameters of the ith pixel point in the gray level image, the adjustment parameters of each pixel point in the gray level image are acquired.
Step S5: and adjusting the initial neighborhood block number of each pixel point in the gray image according to the adjustment parameters to obtain the final neighborhood block number of each pixel point in the gray image.
Specifically, in order to accurately acquire the number of neighborhood blocks of each pixel point in the gray level image, the initial neighborhood block number of each pixel point in the gray level image is adjusted according to the adjustment parameters of each pixel point in the gray level image, the final neighborhood block number of each pixel point in the gray level image is acquired, the gray level image is accurately denoised through a non-local mean value filtering algorithm, meanwhile, edge detail information in the gray level image is reserved, and further, the ultrasonic image to be analyzed is accurately analyzed.
Taking the ith pixel point in the gray-scale image in step S2 as an example, when the noise ratio in the reference block of the ith pixel point is greater than or equal to the preset noise ratio threshold, it is indicated that the greater the noise exists in the reference block of the ith pixel point, the more the number of neighborhood blocks is needed for the ith pixel point, so as to achieve a better filtering effect, therefore, the adjustment parameter of the ith pixel point is increased, and the actual adjustment parameter of the ith pixel point is obtainedThe method comprises the steps of carrying out a first treatment on the surface of the When the noise ratio in the reference block of the ith pixel point is smaller than the preset noise ratio threshold, the ith pixel point is less likely to be a noise pixel point and isThe situation that the ith pixel point is taken as an edge pixel point and is subjected to excessive filtering is avoided, so that the ith pixel point needs a smaller number of neighborhood blocks, and the excessive filtering is avoided, so that the loss of edge detail information is avoided, and therefore, the adjustment parameters of the ith pixel point are reduced to obtain the actual adjustment parameters of the ith pixel point. In the embodiment of the present invention, the preset noise ratio threshold is set to 0, and the practitioner can set the preset noise ratio threshold according to the actual situation, which is not limited herein. The method comprises the steps of adjusting the number of initial neighborhood blocks of an ith pixel point through actual adjustment parameters of the ith pixel point, and obtaining a calculation formula of the number of final neighborhood blocks of the ith pixel point, wherein the calculation formula is as follows:
in the method, in the process of the invention,the number of the final neighborhood blocks of the ith pixel point in the gray level image; />The number of the initial neighborhood blocks of the ith pixel point in the gray level image; />The adjustment parameter of the ith pixel point in the gray level image; />The noise ratio in the reference block of the ith pixel point in the gray image; />The second preset constant is the preset noise ratio threshold value in the embodiment of the invention; />Is in accordance with the upward rounding.
When the following is performedWhen passing->For->Make adjustments, and/or>The bigger the->The larger the i-th pixel is, the more likely it is a noise pixel, +.>The larger; when->When passing->For->Make adjustments, and/or>The larger the i-th pixel is, the less likely it is to be a noise pixel,/-the greater the likelihood of the i-th pixel being a noise pixel>The smaller the i-th pixel point needs less number of neighborhood blocks to filter, the detail possibly belonging to the edge pixel point is reserved, < ->The smaller.
And obtaining the final neighborhood block number of each pixel point in the gray level image according to the method for obtaining the final neighborhood block number of the ith pixel point in the gray level image.
Step S6: and according to the number of the final neighborhood blocks of each pixel point, enhancing the ultrasonic image to be processed through a non-local mean filtering algorithm.
Specifically, according to the number of final neighborhood blocks of each pixel point in the gray level image obtained in a self-adaptive manner, the gray level image is subjected to filtering treatment through a non-local mean filtering algorithm to obtain an enhanced gray level image, the enhanced gray level image is converted into an RGB image, namely, an ultrasonic image to be analyzed is enhanced, and a doctor can conveniently and accurately analyze the ultrasonic image to be analyzed. The gray level image is converted into an RGB image, which is known in the art and will not be described in detail.
The present invention has been completed.
In summary, the embodiment of the invention acquires the gray level image of the ultrasonic image to be processed; constructing a reference block of the pixel point, acquiring peripheral gray scale difference values of the pixel point according to gray scale value distribution in the reference block, and adjusting the number of preset neighborhood blocks to acquire the number of initial neighborhood blocks of the pixel point; according to the gradient direction difference in the reference block, the position distribution of the pixel points with the same gray value is obtained, the noise possible value of the pixel points is obtained, the adjusting parameters are determined, the number of initial neighborhood blocks is adjusted, the number of final neighborhood blocks of the pixel points is obtained, and the ultrasonic image to be processed is enhanced through a non-local mean value filtering algorithm. According to the invention, the final neighborhood block number of each pixel point is obtained in a self-adaptive manner, so that the problem that edge details are lost due to a non-local mean value filtering algorithm is avoided, and the enhanced ultrasonic image to be processed is more accurate.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.

Claims (10)

1. An ultrasonic image processing method based on image enhancement, which is characterized by comprising the following steps:
acquiring a gray level image of an ultrasonic image to be processed;
constructing a reference block of each pixel point in the gray image, and acquiring the peripheral gray difference value of each pixel point in the gray image according to the gray value distribution and the gray value difference in each reference block; adjusting the number of preset neighborhood blocks of each pixel according to the surrounding gray difference value of each pixel to obtain the number of initial neighborhood blocks of each pixel;
acquiring a noise possible value of each pixel point in the gray level image according to gradient direction difference between adjacent pixel points in a reference block of each pixel point in the gray level image and the distance between each pixel point in the gray level image and other pixel points with the same gray level value;
acquiring a noise ratio value in a reference block of each pixel point in the gray level image according to the noise possible value in each reference block and the total number of the pixel points; acquiring an adjusting parameter of each pixel point in the gray image according to the noise occupation ratio and the noise possible value of the corresponding pixel point;
the initial neighborhood block number of each pixel point in the gray level image is adjusted according to the adjustment parameters, and the final neighborhood block number of each pixel point in the gray level image is obtained;
and according to the number of the final neighborhood blocks of each pixel point, enhancing the ultrasonic image to be processed through a non-local mean filtering algorithm.
2. The method for processing an ultrasonic image based on image enhancement according to claim 1, wherein the method for constructing a reference block of each pixel point in a gray image and obtaining the surrounding gray difference value of each pixel point in the gray image according to the gray value distribution and the gray value difference in each reference block comprises the following steps:
for any pixel point in the gray level image, acquiring the number of pixel points which are the same as the gray level value of the pixel point in a reference block of the pixel point as a first number;
acquiring gray value differences between each pixel point and the pixel point in a reference block of the pixel point as first differences;
and acquiring the peripheral gray scale difference value of the pixel point according to the first quantity, the first difference and the total quantity of the pixel points in the reference block of the pixel point.
3. The method for processing an ultrasonic image based on image enhancement according to claim 2, wherein the calculation formula of the peripheral gray scale difference value is:
in the method, in the process of the invention,the gray level difference value around the ith pixel point in the gray level image; />A first number in a reference block for an i-th pixel in the gray scale image; n is the number of rows of the reference block; m is the number of columns of the reference block; />The total number of pixels in the reference block; />The gray value of the ith pixel point in the gray image; />The gray value of the j pixel point in the reference block of the i pixel point in the gray image; />As a function of absolute value; exp is an exponential function based on a natural constant e; norm isNormalizing the function.
4. The method for processing an ultrasonic image based on image enhancement as claimed in claim 1, wherein the method for obtaining the number of the initial neighborhood blocks is as follows:
taking the product of the peripheral gray difference value of each pixel point and the number of preset neighborhood blocks as a first value of each pixel point;
and taking the result of rounding up each first value as the initial neighborhood block number of the corresponding pixel point.
5. The method for processing an ultrasonic image based on image enhancement according to claim 1, wherein the method for obtaining the noise possible value of each pixel point in the gray image according to the gradient direction difference between adjacent pixel points in the reference block of each pixel point in the gray image and the distance between each pixel point in the gray image and other pixel points with the same gray value comprises the following steps:
for any pixel point in the gray level image, acquiring gradient direction difference between each pixel point in each row of a reference block of the pixel point and the adjacent next pixel point as direction difference;
acquiring Euclidean distance between the pixel point and each other pixel point with the same gray value in the gray level image as a first distance;
arranging the first distances from small to large to obtain a first distance sequence;
and acquiring a noise possible value of the pixel point according to the direction difference in the reference block of the pixel point and the first preset number of first distances of the first distance sequence.
6. The image-enhancement-based ultrasound image processing method of claim 5, wherein the noise probability value is calculated by the formula:
in the method, in the process of the invention,the possible noise value of the ith pixel point in the gray level image; n is the number of rows of the reference block; m is the number of columns of the reference block; />The gradient direction of the s-th pixel point in the first row of the reference block of the i-th pixel point in the gray level image;the gradient direction of the (s+1) th pixel point in the first row of the reference block of the ith pixel point in the gray level image; w is a preset number; />Is the z first distance; />As a function of absolute value; norm is a normalization function.
7. The method for processing an ultrasonic image based on image enhancement according to claim 1, wherein the calculation formula of the noise ratio is:
in the method, in the process of the invention,the noise ratio in the reference block of the ith pixel point in the gray image; />Noise possible value of the kth pixel point in the reference block of the ith pixel point in the gray level image; n is the number of rows of the reference block; m is the number of columns of the reference block;the total number of pixels in the reference block; />Is a first preset positive integer.
8. The method for processing an ultrasonic image based on image enhancement according to claim 1, wherein the method for acquiring the adjustment parameters is as follows:
taking the product of the possible noise value of each pixel point in the gray image and the ratio of the noise to the reference block of the corresponding pixel point as a first characteristic value;
and normalizing the absolute value of each first characteristic value to obtain a result which is used as an adjusting parameter of a corresponding pixel point in the gray level image.
9. The method for processing an ultrasound image based on image enhancement as claimed in claim 1, wherein the calculation formula of the number of the final neighborhood blocks is:
in the method, in the process of the invention,the number of the final neighborhood blocks of the ith pixel point in the gray level image; />The number of the initial neighborhood blocks of the ith pixel point in the gray level image; />The adjustment parameter of the ith pixel point in the gray level image; />Reference to the ith pixel point in the gray scale imageA noise fraction in the block; />Is a second preset constant; />Is in accordance with the upward rounding.
10. The method for processing an ultrasonic image based on image enhancement according to claim 1, wherein the gradient direction obtaining method comprises the following steps: and acquiring the gradient direction of each pixel point in the gray image through a Scharr operator.
CN202410114811.8A 2024-01-29 2024-01-29 Ultrasonic image processing method based on image enhancement Active CN117649357B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410114811.8A CN117649357B (en) 2024-01-29 2024-01-29 Ultrasonic image processing method based on image enhancement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410114811.8A CN117649357B (en) 2024-01-29 2024-01-29 Ultrasonic image processing method based on image enhancement

Publications (2)

Publication Number Publication Date
CN117649357A true CN117649357A (en) 2024-03-05
CN117649357B CN117649357B (en) 2024-04-12

Family

ID=90049836

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410114811.8A Active CN117649357B (en) 2024-01-29 2024-01-29 Ultrasonic image processing method based on image enhancement

Country Status (1)

Country Link
CN (1) CN117649357B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117974652A (en) * 2024-03-29 2024-05-03 大连智驱科技有限公司 Ultrasonic image auxiliary positioning method based on machine vision
CN118096581A (en) * 2024-04-23 2024-05-28 中国人民解放军空军军医大学 Image processing method for vital sign monitoring of critical patient
CN118115415A (en) * 2024-04-29 2024-05-31 陕西省核工业二一五医院 Ultrasonic image optimization processing method and system based on artificial intelligence
CN118154599A (en) * 2024-05-10 2024-06-07 安达斯科技(大连)有限公司 Rubber and metal material bonding surface treatment quality identification method
CN118212145A (en) * 2024-05-16 2024-06-18 大连锦辉盛世科技有限公司 Enhancement method for pathological examination medical image

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030097069A1 (en) * 2001-11-21 2003-05-22 Ge Medical Systems Global Technology Company, Llc Computationally efficient noise reduction filter for enhancement of ultrasound images
CN113379607A (en) * 2020-02-25 2021-09-10 深圳市恩普电子技术有限公司 Method and device for adaptively adjusting image
CN116309579A (en) * 2023-05-19 2023-06-23 惠州市宝惠电子科技有限公司 Transformer welding seam quality detection method using image processing
CN116664457A (en) * 2023-08-02 2023-08-29 聊城市洛溪信息科技有限公司 Image processing method for enhancing denoising

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030097069A1 (en) * 2001-11-21 2003-05-22 Ge Medical Systems Global Technology Company, Llc Computationally efficient noise reduction filter for enhancement of ultrasound images
CN113379607A (en) * 2020-02-25 2021-09-10 深圳市恩普电子技术有限公司 Method and device for adaptively adjusting image
CN116309579A (en) * 2023-05-19 2023-06-23 惠州市宝惠电子科技有限公司 Transformer welding seam quality detection method using image processing
CN116664457A (en) * 2023-08-02 2023-08-29 聊城市洛溪信息科技有限公司 Image processing method for enhancing denoising

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117974652A (en) * 2024-03-29 2024-05-03 大连智驱科技有限公司 Ultrasonic image auxiliary positioning method based on machine vision
CN118096581A (en) * 2024-04-23 2024-05-28 中国人民解放军空军军医大学 Image processing method for vital sign monitoring of critical patient
CN118115415A (en) * 2024-04-29 2024-05-31 陕西省核工业二一五医院 Ultrasonic image optimization processing method and system based on artificial intelligence
CN118154599A (en) * 2024-05-10 2024-06-07 安达斯科技(大连)有限公司 Rubber and metal material bonding surface treatment quality identification method
CN118212145A (en) * 2024-05-16 2024-06-18 大连锦辉盛世科技有限公司 Enhancement method for pathological examination medical image

Also Published As

Publication number Publication date
CN117649357B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
CN117649357B (en) Ultrasonic image processing method based on image enhancement
CN116269467B (en) Information acquisition system before debridement of wounded patient
CN116993628B (en) CT image enhancement system for tumor radio frequency ablation guidance
CN111667467A (en) Clustering algorithm-based lower limb vascular calcification index multi-parameter accumulation calculation method
CN117422628B (en) Optimized enhancement method for cardiac vascular ultrasonic examination data
CN117408929A (en) Tumor CT image area dynamic enhancement method based on image characteristics
CN112883824A (en) Finger vein feature recognition device for intelligent blood sampling and recognition method thereof
CN116385436B (en) Cholelithiasis auxiliary detection system based on CT image
CN116703784B (en) Heart ultrasonic image vision enhancement method
CN117094917B (en) Cardiovascular 3D printing data processing method
CN112396565A (en) Method and system for enhancing and segmenting blood vessels of images and videos of venipuncture robot
CN111145155A (en) Meibomian gland recognition method
CN111340773A (en) Retinal image blood vessel segmentation method
CN113892967A (en) Ultrasonic image processing method and ultrasonic instrument
CN113450340A (en) Skin texture detecting system
CN115994870B (en) Image processing method for enhancing denoising
Kalhor et al. Assessment of histogram-based medical image contrast enhancement techniques; an implementation
CN114820678B (en) Automatic extraction method and system for inner contour of blood vessel wall based on OCT image
CN116612032A (en) Sonar image denoising method and device based on self-adaptive wiener filtering and 2D-VMD
CN114677713A (en) Near-infrared light-based arm vein blood sampling point identification method and system
CN112560808B (en) In-vivo vein identification method and device based on gray information
CN106937864B (en) Skin tissue estimation method and system using same
CN117557587B (en) Endoscope cold light source brightness automatic regulating system
CN110647843A (en) Face image processing method
CN110674681A (en) Identity verification method and device based on attention mechanism

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant