Disclosure of Invention
The technical problem to be solved by the invention is to provide the automatic determination method and the device for the special-shaped region of the ultrasonic image, which can improve the reliability and the accuracy of processing the ultrasonic image, and further facilitate the accurate acquisition of the special-shaped region of the ultrasonic image to be analyzed, thereby facilitating the realization of the accurate analysis operation of the special-shaped region.
In order to solve the technical problem, the first aspect of the invention discloses an automatic determination method for an ultrasonic image special-shaped region, which comprises the following steps:
determining a multi-frame ultrasonic image to be processed from a preset ultrasonic video;
Performing histogram equalization operation on each frame of the ultrasonic image to obtain all equalized ultrasonic images, and performing gradient enhancement operation on each frame of the equalized ultrasonic image to obtain all enhanced ultrasonic images;
Performing image morphological expansion operation on each frame of the enhanced ultrasonic image to obtain all expanded ultrasonic images, and performing superposition processing operation on each frame of the expanded ultrasonic image to obtain all superposed ultrasonic images;
And carrying out connected domain identification operation on each frame of the superimposed ultrasonic image to obtain a special-shaped region of each frame of the superimposed ultrasonic image to be analyzed.
In an optional implementation manner, in a first aspect of the present invention, the performing a histogram equalization operation on the ultrasound image of each frame to obtain all equalized ultrasound images includes:
For each ultrasonic image, determining a pixel value of each first pixel in the ultrasonic image, and determining a pixel parameter corresponding to each gray level in the ultrasonic image according to the pixel values of all the first pixels;
For each ultrasonic image, determining a pixel accumulation probability parameter corresponding to each gray level according to pixel parameters corresponding to all the gray levels, and calculating a gray level mapping value corresponding to each gray level according to the pixel accumulation probability parameter corresponding to each gray level and a gray level value of a target gray level in the ultrasonic image;
And for each ultrasonic image, carrying out gray mapping processing on all the gray scales according to the gray mapping values corresponding to all the gray scales to obtain an equalized ultrasonic image corresponding to the ultrasonic image.
In an optional implementation manner, in the first aspect of the present invention, the performing a gradient enhancement operation on the equalized ultrasound image for each frame to obtain all enhanced ultrasound images includes:
For each equalized ultrasonic image, determining a gradient calculation direction parameter of the equalized ultrasonic image according to a preset edge detection requirement parameter of the equalized ultrasonic image, and determining a pixel gradient calculation template matched with the equalized ultrasonic image and associated pixels corresponding to each second pixel in the equalized ultrasonic image according to the gradient calculation direction parameter;
for each second pixel in the equalized ultrasonic image, calculating a pixel gradient parameter corresponding to the second pixel according to the pixel value of the second pixel and the pixel value of an associated pixel corresponding to the second pixel, and executing pixel convolution operation on the pixel value of the second pixel according to the pixel gradient parameter corresponding to the second pixel and the pixel gradient operation template to obtain an enhanced pixel value corresponding to the second pixel;
And for each equalized ultrasonic image, determining an enhanced ultrasonic image corresponding to the equalized ultrasonic image according to enhanced pixel values corresponding to all the second pixels in the equalized ultrasonic image.
In an optional implementation manner, in the first aspect of the present invention, performing an image morphological dilation operation on each frame of the enhanced ultrasound image to obtain all the dilated ultrasound images includes:
For each enhanced ultrasonic image, determining an image quality parameter of the enhanced ultrasonic image, and determining an image expansion template of the enhanced ultrasonic image according to the image quality parameter;
For each enhanced ultrasonic image, determining a first binary parameter corresponding to each third pixel according to the pixel value of each third pixel in the enhanced ultrasonic image, and executing expansion convolution operation on the first binary parameter corresponding to each third pixel according to the first binary parameter corresponding to each third pixel and the image expansion template to obtain a target binary parameter corresponding to each third pixel;
and for each enhanced ultrasonic image, determining an expanded ultrasonic image corresponding to the enhanced ultrasonic image according to target binary parameters corresponding to all the third pixels.
As an optional implementation manner, in the first aspect of the present invention, before the determining the image expansion template of the enhanced ultrasound image according to the image quality parameter, the method further includes:
Determining the image corrosion demand corresponding to the enhanced ultrasonic image according to the image quality parameter, and judging whether the image corrosion demand is greater than a preset corrosion demand threshold;
When the judgment result is negative, triggering and executing the operation of determining the image expansion template of the enhanced ultrasonic image according to the image quality parameter;
And according to the pixel value of each third pixel in the enhanced ultrasonic image, determining a second binary parameter corresponding to each third pixel, and according to the second binary parameter corresponding to each third pixel and the image corrosion template, performing corrosion convolution operation on the second binary parameter corresponding to each third pixel to obtain a third binary parameter corresponding to each third pixel, determining a corroded ultrasonic image corresponding to the enhanced ultrasonic image and determining a reference image quality parameter of the corroded ultrasonic image, and according to the reference image quality parameter, updating the image quality parameter and triggering the operation of determining the image expansion template of the enhanced ultrasonic image according to the image quality parameter.
In an optional implementation manner, in the first aspect of the present invention, the performing a superposition processing operation on the inflated ultrasound image for each frame to obtain all superimposed ultrasound images includes:
For each expanded ultrasonic image, determining a multi-frame associated ultrasonic image associated with the expanded ultrasonic image from all other expanded ultrasonic images except the expanded ultrasonic image in all the expanded ultrasonic images, and determining an effective image area of the expanded ultrasonic image according to a pixel binary parameter corresponding to the expanded ultrasonic image and a pixel binary parameter corresponding to all the associated ultrasonic images;
and for each expanded ultrasonic image, determining an ultrasonic image to be superimposed, which is matched with the effective image area, from all the associated ultrasonic images according to the effective image area of the expanded ultrasonic image, and performing image superimposing operation on the expanded ultrasonic image according to the ultrasonic image to be superimposed to obtain a superimposed ultrasonic image corresponding to the expanded ultrasonic image.
In an optional implementation manner, in a first aspect of the present invention, the performing a connected domain identification operation on each frame of the superimposed ultrasound image to obtain a special-shaped region of each frame of the superimposed ultrasound image to be analyzed includes:
For each superimposed ultrasonic image, determining a communication mark parameter corresponding to each fourth pixel according to a fourth binary parameter corresponding to each fourth pixel in the superimposed ultrasonic image;
for each superimposed ultrasonic image, determining a plurality of connected areas in the superimposed ultrasonic image according to the connected mark parameters corresponding to all the fourth pixels and preset connected area identification parameters, and determining a target connected area from all the connected areas according to the area parameters corresponding to each connected area as a special-shaped area of the superimposed ultrasonic image to be analyzed, wherein the area parameters comprise at least one of area parameters, area pixel number parameters and area content parameters.
The invention discloses an automatic determination device for an ultrasonic image special-shaped region, which comprises the following components:
the determining module is used for determining a multi-frame ultrasonic image to be processed from a preset ultrasonic video;
the equalization module is used for carrying out histogram equalization operation on each frame of ultrasonic image to obtain all equalized ultrasonic images;
The gradient enhancement module is used for carrying out gradient enhancement operation on each frame of the equalized ultrasonic image to obtain all the enhanced ultrasonic images;
the image expansion module is used for carrying out image morphological expansion operation on each frame of the enhanced ultrasonic image to obtain all expanded ultrasonic images;
the superposition processing module is used for carrying out superposition processing operation on each frame of the expanded ultrasonic image to obtain all superimposed ultrasonic images;
and the region determining module is used for carrying out connected region identification operation on each frame of the superimposed ultrasonic image to obtain a special-shaped region of each frame of the superimposed ultrasonic image to be analyzed.
In a second aspect of the present invention, as an optional implementation manner, the method for performing, by the equalization module, a histogram equalization operation on each frame of the ultrasound image to obtain all equalized ultrasound images specifically includes:
For each ultrasonic image, determining a pixel value of each first pixel in the ultrasonic image, and determining a pixel parameter corresponding to each gray level in the ultrasonic image according to the pixel values of all the first pixels;
For each ultrasonic image, determining a pixel accumulation probability parameter corresponding to each gray level according to pixel parameters corresponding to all the gray levels, and calculating a gray level mapping value corresponding to each gray level according to the pixel accumulation probability parameter corresponding to each gray level and a gray level value of a target gray level in the ultrasonic image;
And for each ultrasonic image, carrying out gray mapping processing on all the gray scales according to the gray mapping values corresponding to all the gray scales to obtain an equalized ultrasonic image corresponding to the ultrasonic image.
In a second aspect of the present invention, the gradient enhancing module performs gradient enhancing operation on the equalized ultrasound image for each frame, and the manner of obtaining all the enhanced ultrasound images specifically includes:
For each equalized ultrasonic image, determining a gradient calculation direction parameter of the equalized ultrasonic image according to a preset edge detection requirement parameter of the equalized ultrasonic image, and determining a pixel gradient calculation template matched with the equalized ultrasonic image and associated pixels corresponding to each second pixel in the equalized ultrasonic image according to the gradient calculation direction parameter;
for each second pixel in the equalized ultrasonic image, calculating a pixel gradient parameter corresponding to the second pixel according to the pixel value of the second pixel and the pixel value of an associated pixel corresponding to the second pixel, and executing pixel convolution operation on the pixel value of the second pixel according to the pixel gradient parameter corresponding to the second pixel and the pixel gradient operation template to obtain an enhanced pixel value corresponding to the second pixel;
And for each equalized ultrasonic image, determining an enhanced ultrasonic image corresponding to the equalized ultrasonic image according to enhanced pixel values corresponding to all the second pixels in the equalized ultrasonic image.
As an alternative embodiment, in a second aspect of the present invention, the image expansion module includes:
A determining sub-module, configured to determine, for each of the enhanced ultrasound images, an image quality parameter of the enhanced ultrasound image, and determine an image expansion template of the enhanced ultrasound image according to the image quality parameter;
A computing sub-module, configured to determine, for each enhanced ultrasound image, a first binary parameter corresponding to each third pixel according to a pixel value of each third pixel in the enhanced ultrasound image, and perform an expansion convolution operation on the first binary parameter corresponding to each third pixel according to the first binary parameter corresponding to each third pixel and the image expansion template, so as to obtain a target binary parameter corresponding to each third pixel;
And the determination submodule is further used for determining an expanded ultrasonic image corresponding to the enhanced ultrasonic image according to the target binary parameters corresponding to all the third pixels for each enhanced ultrasonic image.
As an alternative embodiment, in the second aspect of the present invention, the determining submodule is further configured to:
before the image expansion template of the enhanced ultrasonic image is determined according to the image quality parameters, determining the image corrosion demand corresponding to the enhanced ultrasonic image according to the image quality parameters, and judging whether the image corrosion demand is greater than a preset corrosion demand threshold;
When the judgment result is negative, triggering and executing the operation of determining the image expansion template of the enhanced ultrasonic image according to the image quality parameter;
And according to the pixel value of each third pixel in the enhanced ultrasonic image, determining a second binary parameter corresponding to each third pixel, and according to the second binary parameter corresponding to each third pixel and the image corrosion template, performing corrosion convolution operation on the second binary parameter corresponding to each third pixel to obtain a third binary parameter corresponding to each third pixel, determining a corroded ultrasonic image corresponding to the enhanced ultrasonic image and determining a reference image quality parameter of the corroded ultrasonic image, and according to the reference image quality parameter, updating the image quality parameter and triggering the operation of determining the image expansion template of the enhanced ultrasonic image according to the image quality parameter.
In a second aspect of the present invention, as an optional implementation manner, the stacking processing module performs a stacking processing operation on the inflated ultrasound image for each frame, and a manner of obtaining all the stacked ultrasound images specifically includes:
For each expanded ultrasonic image, determining a multi-frame associated ultrasonic image associated with the expanded ultrasonic image from all other expanded ultrasonic images except the expanded ultrasonic image in all the expanded ultrasonic images, and determining an effective image area of the expanded ultrasonic image according to a pixel binary parameter corresponding to the expanded ultrasonic image and a pixel binary parameter corresponding to all the associated ultrasonic images;
and for each expanded ultrasonic image, determining an ultrasonic image to be superimposed, which is matched with the effective image area, from all the associated ultrasonic images according to the effective image area of the expanded ultrasonic image, and performing image superimposing operation on the expanded ultrasonic image according to the ultrasonic image to be superimposed to obtain a superimposed ultrasonic image corresponding to the expanded ultrasonic image.
In a second aspect of the present invention, the method for obtaining the abnormal region of each frame of the superimposed ultrasound image to be analyzed by the region determining module through performing the connected region identifying operation on each frame of the superimposed ultrasound image specifically includes:
For each superimposed ultrasonic image, determining a communication mark parameter corresponding to each fourth pixel according to a fourth binary parameter corresponding to each fourth pixel in the superimposed ultrasonic image;
for each superimposed ultrasonic image, determining a plurality of connected areas in the superimposed ultrasonic image according to the connected mark parameters corresponding to all the fourth pixels and preset connected area identification parameters, and determining a target connected area from all the connected areas according to the area parameters corresponding to each connected area as a special-shaped area of the superimposed ultrasonic image to be analyzed, wherein the area parameters comprise at least one of area parameters, area pixel number parameters and area content parameters.
The third aspect of the invention discloses another automatic determination device for an ultrasonic image special-shaped area, which comprises the following components:
A memory storing executable program code;
a processor coupled to the memory;
The processor invokes the executable program code stored in the memory to execute the method for automatically determining the ultrasound image special-shaped area disclosed in the first aspect of the invention.
A fourth aspect of the present invention discloses a computer storage medium storing computer instructions for executing the method for automatically determining an ultrasound image profiled region disclosed in the first aspect of the present invention when the computer instructions are called.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
In the embodiment of the invention, histogram equalization operation is carried out on each frame of ultrasonic image to obtain all equalized ultrasonic images, gradient enhancement is carried out on each frame of equalized ultrasonic image to obtain all enhanced ultrasonic images, image expansion is carried out on each frame of enhanced ultrasonic image to obtain all expanded ultrasonic images, superposition processing is carried out on each frame of expanded ultrasonic image to obtain all superposed ultrasonic images, connected domain identification operation is carried out on each frame of superposed ultrasonic image to obtain a special-shaped region of each frame of superposed ultrasonic image to be analyzed, thus, the processing reliability and accuracy of the ultrasonic image can be improved by carrying out histogram equalization, gradient enhancement, image expansion, superposition processing and connected domain identification operation on the ultrasonic image, and further, the special-shaped region of the ultrasonic image to be analyzed can be obtained accurately, thereby being beneficial to realizing accurate analysis operation on the special-shaped region.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms first, second and the like in the description and in the claims and in the above-described figures are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, apparatus, article, or article that comprises a list of steps or elements is not limited to only those listed but may optionally include other steps or elements not listed or inherent to such process, method, article, or article.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The invention discloses an automatic determination method and device for an ultrasonic image special-shaped region, which can improve the reliability and accuracy of processing an ultrasonic image, and further is beneficial to accurately obtaining the special-shaped region of the ultrasonic image to be analyzed, so that the accurate analysis operation of the special-shaped region is beneficial to be realized.
Example 1
Referring to fig. 1, fig. 1 is a schematic flow chart of an automatic determination method for an ultrasound image abnormal region according to an embodiment of the present invention. The method for automatically determining the abnormal region of the ultrasonic image described in fig. 1 can be applied to extracting abnormal regions of various types of ultrasonic images, such as a heart ultrasonic image, a thyroid ultrasonic image, an abdominal organ ultrasonic image, and the like, and the embodiment of the invention is not limited. Optionally, the method may be implemented by an ultrasound image processing apparatus, where the ultrasound image processing apparatus may be an ultrasound image detection device, or may be a local server or a cloud server for monitoring an ultrasound image processing procedure, and the embodiment of the present invention is not limited. As shown in fig. 1, the method for automatically determining the ultrasound image abnormal region may include the following operations:
101. and determining a multi-frame ultrasonic image to be processed from the preset ultrasonic video.
In an embodiment of the present invention, the ultrasound video is composed of a plurality of frames of original ultrasound images. Alternatively, the multi-frame ultrasonic image to be processed, of which the image quality parameters meet preset processing conditions, may be determined from all the original ultrasonic images according to the image quality parameters corresponding to all the original ultrasonic images in the preset ultrasonic video, or the image change parameters corresponding to every two original ultrasonic images in the preset ultrasonic video may be determined, and all the ultrasonic images to be processed, of which the image change parameters are greater than or equal to a preset change parameter threshold value, may be determined from all the original ultrasonic images according to the image change parameters corresponding to every two original ultrasonic images.
102. And carrying out histogram equalization operation on each frame of ultrasonic image to obtain all equalized ultrasonic images, and carrying out gradient enhancement operation on each frame of equalized ultrasonic image to obtain all enhanced ultrasonic images.
In the embodiment of the invention, further, histogram equalization operation is carried out on each frame of ultrasonic image to obtain all equalized ultrasonic images, which can comprise the steps of determining object parameters of objects to be analyzed corresponding to all ultrasonic images, determining analysis demand parameters corresponding to all ultrasonic images according to the object parameters of the objects to be analyzed, and carrying out histogram equalization operation on each frame of ultrasonic image according to the analysis demand parameters to obtain all equalized ultrasonic images.
In this alternative embodiment, optionally, the object parameters of the object to be analyzed may include a position parameter, an operation parameter, a size parameter, etc. of the object to be analyzed, such as a position parameter of the four cavities of the apex, an operation parameter of the parasternal short axis apex, a size parameter of the parasternal short axis central chamber, etc. Further optionally, the analysis requirement parameters corresponding to all the ultrasound images may include a labeling requirement parameter for a labeling point of the object to be analyzed, an analysis definition requirement parameter, and so on.
103. And performing image morphological expansion operation on each frame of the enhanced ultrasonic image to obtain all the expanded ultrasonic images, and performing superposition processing operation on each frame of the expanded ultrasonic image to obtain all the superposed ultrasonic images.
In the embodiment of the invention, further, the noise parameters corresponding to the enhanced ultrasonic images of each frame can be determined first, and then the morphological expansion operation of the image is carried out on the enhanced ultrasonic images of each frame according to the noise parameters corresponding to all the enhanced ultrasonic images, so as to obtain all the expanded ultrasonic images. Alternatively, the noise parameters may include a noise size parameter, a noise type parameter, and the like.
104. And carrying out connected domain identification operation on each frame of superimposed ultrasonic image to obtain a special-shaped region of each frame of superimposed ultrasonic image to be analyzed.
In the embodiment of the invention, the obtained special-shaped region of the superimposed ultrasonic image can be understood as the most important image region needing analysis in the superimposed ultrasonic image. Alternatively, the shaped area may be a sector area, a rectangular area, or other types of areas, which are not limited in the embodiment of the present invention.
Therefore, by carrying out histogram equalization, gradient enhancement, image expansion, superposition processing and connected domain identification operation on the ultrasonic image, the embodiment of the invention can improve the processing reliability and accuracy of the ultrasonic image, thereby being beneficial to accurately obtaining the special-shaped region of the ultrasonic image to be analyzed, and further being beneficial to realizing the accurate analysis operation on the special-shaped region.
Example two
Referring to fig. 2, fig. 2 is a flowchart of another method for automatically determining an ultrasound image abnormal region according to an embodiment of the present invention. The method for automatically determining the abnormal region of the ultrasonic image described in fig. 2 may be applied to extracting abnormal regions of various types of ultrasonic images, such as a heart ultrasonic image, a thyroid ultrasonic image, an abdominal organ ultrasonic image, and the like, which is not limited in the embodiment of the present invention. Optionally, the method may be implemented by an ultrasound image processing apparatus, where the ultrasound image processing apparatus may be an ultrasound image detection device, or may be a local server or a cloud server for monitoring an ultrasound image processing procedure, and the embodiment of the present invention is not limited. As shown in fig. 2, the method for automatically determining the ultrasound image abnormal region may include the following operations:
201. And determining a multi-frame ultrasonic image to be processed from the preset ultrasonic video.
202. For each ultrasonic image, determining the pixel value of each first pixel in the ultrasonic image, and determining the pixel parameter corresponding to each gray level in the ultrasonic image according to the pixel values of all the first pixels.
In this embodiment of the present invention, optionally, the pixel parameter corresponding to each gray level may include a pixel number parameter corresponding to the gray level, or may include a pixel contribution parameter corresponding to the gray level, where the pixel number parameter is a non-negative integer (i.e., there is no decimal type parameter), and the pixel contribution parameter is a parameter greater than or equal to 0 (i.e., there is a decimal type parameter).
203. For each ultrasonic image, determining a pixel accumulation probability parameter corresponding to each gray according to the pixel parameters corresponding to all the gray, and calculating a gray mapping value corresponding to each gray according to the pixel accumulation probability parameter corresponding to each gray and the gray value of the target gray in the ultrasonic image.
In the embodiment of the present invention, further, according to the pixel cumulative probability parameter corresponding to each gray level and the gray level value of the target gray level in the ultrasound image, calculating the gray level mapping value corresponding to each gray level may include:
The method comprises the steps of calculating the product parameter between the pixel accumulation probability parameter corresponding to each gray level and the gray level value of the target gray level in the ultrasonic image, determining the gray level mapping tone curve aiming at all gray levels according to the preset analysis demand parameter, and calculating the gray level mapping value corresponding to each gray level according to the product parameter between the pixel accumulation probability parameter corresponding to all gray levels and the gray level value of the target gray level in the ultrasonic image and the gray level mapping tone curve.
204. And for each ultrasonic image, carrying out gray mapping processing on all gray scales according to gray mapping values corresponding to all gray scales to obtain an equalized ultrasonic image corresponding to the ultrasonic image.
In the embodiment of the invention, the gray value corresponding to each gray is replaced by the gray mapping value corresponding to the gray, so that the equalized ultrasonic image corresponding to the ultrasonic image is obtained.
205. And carrying out gradient enhancement operation on each frame of the equalized ultrasonic image to obtain all the enhanced ultrasonic images.
206. And performing image morphological expansion operation on each frame of the enhanced ultrasonic image to obtain all the expanded ultrasonic images, and performing superposition processing operation on each frame of the expanded ultrasonic image to obtain all the superposed ultrasonic images.
207. And carrying out connected domain identification operation on each frame of superimposed ultrasonic image to obtain a special-shaped region of each frame of superimposed ultrasonic image to be analyzed.
In the embodiment of the present invention, for other descriptions of step 201 and step 205-step 207, please refer to the detailed descriptions of step 101-step 104 in the first embodiment, and the description of the embodiment of the present invention is omitted.
Therefore, the embodiment of the invention can determine the pixel parameter corresponding to each gray level in the ultrasonic image according to the pixel values of all the first pixels in the ultrasonic image, then determine the pixel accumulation probability parameter corresponding to each gray level, and calculate the gray level mapping value corresponding to each gray level to realize the gray level mapping operation, thus being beneficial to improving the reliability and accuracy of the gray level mapping operation in the ultrasonic image, further being beneficial to improving the image contrast effect of the obtained equalized ultrasonic image, and further being beneficial to improving the reliability and accuracy of the subsequent gradient enhancement operation of the equalized ultrasonic image.
In an alternative embodiment, the gradient enhancing operation is performed on the equalized ultrasound image of each frame in step 205, so as to obtain all the enhanced ultrasound images, including:
for each equalized ultrasonic image, determining gradient calculation direction parameters of the equalized ultrasonic image according to preset edge detection requirement parameters of the equalized ultrasonic image, and determining a pixel gradient operation template matched with the equalized ultrasonic image and associated pixels corresponding to each second pixel in the equalized ultrasonic image according to the gradient calculation direction parameters;
For each second pixel in each equalized ultrasonic image, calculating a pixel gradient parameter corresponding to the second pixel according to the pixel value of the second pixel and the pixel value of the associated pixel corresponding to the second pixel, and executing pixel convolution operation on the pixel value of the second pixel according to the pixel gradient parameter corresponding to the second pixel and the pixel gradient operation template to obtain an enhanced pixel value corresponding to the second pixel;
And for each equalized ultrasonic image, determining the reinforced ultrasonic image corresponding to the equalized ultrasonic image according to the reinforced pixel values corresponding to all the second pixels in the equalized ultrasonic image.
In this alternative embodiment, the gradient calculation direction parameters may alternatively be 0 °, 45 °, 90 °, 135 °, and so on. Further optionally, the pixel gradient operation template may be a sobel operator type pixel gradient operation template, or may be a pixel gradient operation template of another operator type, and specifically may be further determined according to a noise sensitivity parameter and a noise processing requirement parameter of the corresponding operator type.
Therefore, according to the method, the gradient calculation direction parameters of the equalized ultrasonic image can be determined according to the edge detection requirement parameters of the equalized ultrasonic image, then the pixel gradient operation template of the equalized ultrasonic image and the associated pixels corresponding to the second pixels are determined, and the pixel convolution operation is carried out on the second pixels according to the pixel gradient operation template and the associated pixels so as to realize gradient enhancement operation on the equalized ultrasonic image.
In another alternative embodiment, the image morphological dilation operation is performed on each frame of the enhanced ultrasound image in step 206, to obtain all of the dilated ultrasound images, including:
For each enhanced ultrasonic image, determining an image quality parameter of the enhanced ultrasonic image, and determining an image expansion template of the enhanced ultrasonic image according to the image quality parameter;
For each enhanced ultrasonic image, determining a first binary parameter corresponding to each third pixel according to the pixel value of each third pixel in the enhanced ultrasonic image, and executing expansion convolution operation on the first binary parameter corresponding to each third pixel according to the first binary parameter corresponding to each third pixel and the image expansion template to obtain a target binary parameter corresponding to each third pixel;
and for each enhanced ultrasonic image, determining an expanded ultrasonic image corresponding to the enhanced ultrasonic image according to the target binary parameters corresponding to all the third pixels.
In this alternative embodiment, the image quality parameters may optionally include image noise conditions, image target area continuity conditions, and the like. Further alternatively, the expansion convolution operation may be 1 time or a plurality of times.
Therefore, the optional embodiment can perform corresponding expansion convolution operation on the third pixel in the enhanced ultrasonic image according to the image quality parameter of the enhanced ultrasonic image, so as to obtain the expanded ultrasonic image corresponding to the enhanced ultrasonic image, and thus, the image morphological expansion operation can be flexibly performed on the enhanced ultrasonic image, further, the reliability and accuracy of the obtained expanded ultrasonic image can be improved, the image noise in the enhanced ultrasonic image is reduced, the continuity of the image is ensured, and the subsequent accurate superposition processing of the expanded ultrasonic image is facilitated.
In yet another alternative embodiment, the method further comprises, prior to determining the image dilation template of the enhanced ultrasound image in accordance with the image quality parameters in the step above:
Determining the image corrosion demand corresponding to the enhanced ultrasonic image according to the image quality parameters, and judging whether the image corrosion demand is greater than a preset corrosion demand threshold;
when the judgment result is negative, triggering and executing the operation of determining the image expansion template of the enhanced ultrasonic image according to the image quality parameters in the steps;
when the judgment result is yes, an image corrosion template of the enhanced ultrasonic image is determined according to the image quality parameters, a second binary parameter corresponding to each third pixel is determined according to the pixel value of each third pixel in the enhanced ultrasonic image, corrosion convolution operation is carried out on the second binary parameter corresponding to each third pixel according to the second binary parameter corresponding to each third pixel and the image corrosion template to obtain third binary parameters corresponding to each third pixel, the corroded ultrasonic image corresponding to the enhanced ultrasonic image is determined according to the third binary parameters corresponding to all the third pixels, the reference image quality parameters of the corroded ultrasonic image are determined, the image quality parameters are updated according to the reference image quality parameters, and the operation of determining the image expansion template of the enhanced ultrasonic image according to the image quality parameters in the steps is triggered and executed.
In the alternative embodiment, whether the image erosion operation is needed to be performed on the enhanced ultrasonic image is judged based on the image quality parameters, if yes, the image erosion operation is performed on the enhanced ultrasonic image, then the image morphological dilation operation is performed on the enhanced ultrasonic image based on the obtained image quality parameters of the eroded ultrasonic image, and if not, the image dilation operation is performed on the enhanced image directly. It should be noted that, by corroding the enhanced ultrasound image, image noise can be removed, but the image is compressed, so that the image noise can be removed and the original image content of the enhanced ultrasound image can be maintained at the same time by performing the expansion processing on the corroded ultrasound image.
Therefore, the optional embodiment can perform corrosion requirement judging operation on the enhanced ultrasonic image according to the image quality parameters of the enhanced ultrasonic image, then perform image corrosion operation on the enhanced ultrasonic image when the image corrosion requirement exists, and perform image expansion processing on the corroded ultrasonic image, so that the image noise is removed, the image content of the original enhanced ultrasonic image is maintained, the processing reliability and accuracy of the enhanced ultrasonic image are improved, and the follow-up accurate superposition processing of the expanded ultrasonic image is better realized.
In yet another alternative embodiment, the step 206 performs a superposition processing operation on the inflated ultrasound image for each frame to obtain all superimposed ultrasound images, including:
For each expanded ultrasonic image, determining a multi-frame associated ultrasonic image associated with the expanded ultrasonic image from all other expanded ultrasonic images except the expanded ultrasonic image in all expanded ultrasonic images, and determining an effective image area of the expanded ultrasonic image according to a pixel binary parameter corresponding to the expanded ultrasonic image and a pixel binary parameter corresponding to all associated ultrasonic images;
And for each expanded ultrasonic image, determining an ultrasonic image to be superimposed, which is matched with the effective image area, from all the associated ultrasonic images according to the effective image area of the expanded ultrasonic image, and performing image superimposing operation on the expanded ultrasonic image according to the ultrasonic image to be superimposed to obtain a superimposed ultrasonic image corresponding to the expanded ultrasonic image.
In this alternative embodiment, the image overlaying operation may be understood as an exclusive or overlaying operation between the inflated ultrasound image and its corresponding ultrasound image to be overlaid. Alternatively, the multi-frame associated ultrasound image associated with the inflated ultrasound image may be a multi-frame adjacent ultrasound image adjacent to the inflated ultrasound image, or may be a multi-frame similar ultrasound image having an image similarity greater than or equal to a preset similarity threshold with the inflated ultrasound image. Further, the ultrasound image to be superimposed that matches the effective image area may be understood as an ultrasound image to be superimposed that may compensate for an incomplete defect area in the effective image area.
Therefore, the optional embodiment can determine the effective image area of the expanded ultrasonic image based on the pixel binary parameters corresponding to the expanded ultrasonic image and the pixel binary parameters corresponding to all the associated ultrasonic images, then determine the ultrasonic image to be superimposed which is matched with the effective image area from all the associated ultrasonic images, so as to realize the operation of superimposing the expanded ultrasonic image, thus, the pixels of the effective image area in the expanded ultrasonic image can be accurately superimposed, the incomplete defect area in the effective image area can be effectively compensated, and the reliability and the accuracy of the superimposing processing of the expanded ultrasonic image can be improved, so that the follow-up operation of identifying the precise connected domain of the superimposed ultrasonic image can be realized.
In yet another optional embodiment, the performing the connected domain identification operation on each frame of the superimposed ultrasound image in step 207 to obtain the shaped region of each frame of the superimposed ultrasound image to be analyzed includes:
For each superimposed ultrasonic image, determining a communication mark parameter corresponding to each fourth pixel according to a fourth binary parameter corresponding to each fourth pixel in the superimposed ultrasonic image;
for each superimposed ultrasonic image, determining a plurality of connected areas in the superimposed ultrasonic image according to the connected mark parameters corresponding to all fourth pixels and preset connected area identification parameters, and determining a target connected area from all connected areas according to the area parameters corresponding to each connected area, wherein the target connected area is used as a special-shaped area of the superimposed ultrasonic image to be analyzed.
In this optional embodiment, the connected domain identification operation may be understood as performing frame selection on a block or a region containing important information in the superimposed ultrasound image, so as to obtain a special-shaped region to be analyzed, so that a subsequent technician performs an analysis operation of the ultrasound image on the special-shaped region. Optionally, the connected region identification parameter may be a 4-neighborhood identification parameter, an 8-neighborhood identification parameter, a D-neighborhood identification parameter, or the like. Further optionally, the region parameters include at least one of a region area parameter, a region pixel number parameter, and a region content parameter.
Therefore, according to the optional embodiment, a plurality of connected areas in the superimposed ultrasonic image can be determined according to the connected mark parameter corresponding to each fourth pixel in the superimposed ultrasonic image and the preset connected area identification parameter, and the special-shaped areas of the superimposed ultrasonic image to be analyzed are determined from all the connected areas, so that the determination reliability and accuracy of the special-shaped areas to be analyzed can be improved, and further, the accurate analysis on the blocks or the ultrasonic image areas containing important information can be improved, and the smooth performance of ultrasonic imaging research work is facilitated.
Example III
Referring to fig. 3, fig. 3 is a schematic structural diagram of an automatic determination device for an ultrasound image abnormal region according to an embodiment of the present invention. As shown in fig. 3, the automatic determination device for the ultrasound image abnormal region may include:
A determining module 301, configured to determine a multi-frame ultrasound image to be processed from a preset ultrasound video;
the equalization module 302 is configured to perform histogram equalization operation on each frame of ultrasonic image, so as to obtain all equalized ultrasonic images;
The gradient enhancing module 303 is configured to perform gradient enhancing operation on each frame of the equalized ultrasonic image, so as to obtain all enhanced ultrasonic images;
the image expansion module 304 is configured to perform an image morphological expansion operation on each frame of the enhanced ultrasound image, so as to obtain all expanded ultrasound images;
The superposition processing module 305 is configured to perform superposition processing operation on each frame of the expanded ultrasound image, so as to obtain all superimposed ultrasound images;
The region determining module 306 is configured to perform connected region identification operation on each frame of superimposed ultrasound image, so as to obtain a special-shaped region of each frame of superimposed ultrasound image to be analyzed.
Therefore, the automatic determination device for the special-shaped region of the ultrasonic image described in fig. 3 can improve the processing reliability and accuracy of the ultrasonic image by performing histogram equalization, gradient enhancement, image expansion, superposition processing and connected domain identification operation on the ultrasonic image, and is further beneficial to accurately obtaining the special-shaped region of the ultrasonic image to be analyzed, so that the accurate analysis operation on the special-shaped region is facilitated.
In an alternative embodiment, the method for performing the histogram equalization operation on each frame of the ultrasound image by the equalization module 302 to obtain all the equalized ultrasound images specifically includes:
for each ultrasonic image, determining a pixel value of each first pixel in the ultrasonic image, and determining a pixel parameter corresponding to each gray level in the ultrasonic image according to the pixel values of all the first pixels;
For each ultrasonic image, determining a pixel accumulation probability parameter corresponding to each gray according to pixel parameters corresponding to all gray, and calculating a gray mapping value corresponding to each gray according to the pixel accumulation probability parameter corresponding to each gray and the gray value of the target gray in the ultrasonic image;
And for each ultrasonic image, carrying out gray mapping processing on all gray scales according to gray mapping values corresponding to all gray scales to obtain an equalized ultrasonic image corresponding to the ultrasonic image.
Therefore, the automatic determining device for implementing the special-shaped region of the ultrasonic image described in fig. 4 can determine the pixel parameter corresponding to each gray level in the ultrasonic image according to the pixel values of all the first pixels in the ultrasonic image, then determine the pixel cumulative probability parameter corresponding to each gray level, and calculate the gray level mapping value corresponding to each gray level to realize the gray level mapping operation, so that the reliability and the accuracy of the gray level mapping operation in the ultrasonic image are improved, the image contrast effect of the obtained equalized ultrasonic image is improved, and the reliability and the accuracy of the subsequent gradient enhancement operation on the equalized ultrasonic image are improved.
In another alternative embodiment, the gradient enhancing module 303 performs gradient enhancing operation on each frame of the equalized ultrasonic image, and the manner of obtaining all the enhanced ultrasonic images specifically includes:
for each equalized ultrasonic image, determining gradient calculation direction parameters of the equalized ultrasonic image according to preset edge detection requirement parameters of the equalized ultrasonic image, and determining a pixel gradient operation template matched with the equalized ultrasonic image and associated pixels corresponding to each second pixel in the equalized ultrasonic image according to the gradient calculation direction parameters;
For each second pixel in each equalized ultrasonic image, calculating a pixel gradient parameter corresponding to the second pixel according to the pixel value of the second pixel and the pixel value of the associated pixel corresponding to the second pixel, and executing pixel convolution operation on the pixel value of the second pixel according to the pixel gradient parameter corresponding to the second pixel and the pixel gradient operation template to obtain an enhanced pixel value corresponding to the second pixel;
And for each equalized ultrasonic image, determining the reinforced ultrasonic image corresponding to the equalized ultrasonic image according to the reinforced pixel values corresponding to all the second pixels in the equalized ultrasonic image.
Therefore, the automatic determining device for the special-shaped area of the ultrasonic image described in fig. 4 can determine the gradient calculation direction parameter of the ultrasonic image after equalization according to the edge detection requirement parameter of the ultrasonic image after equalization, then determine the pixel gradient operation template of the ultrasonic image after equalization and the associated pixel corresponding to the second pixel, and perform the pixel convolution operation on the second pixel according to the pixel gradient operation template and the associated pixel so as to realize the gradient enhancement operation on the ultrasonic image after equalization, so that the gradient enhancement can be flexibly performed on the ultrasonic image after equalization based on the edge detection requirement parameter, the reliability and the accuracy of the obtained enhanced ultrasonic image can be improved, and the effectiveness of the gradient enhancement operation on the ultrasonic image after equalization can be improved so as to enhance the image change degree of the ultrasonic image after equalization.
In yet another alternative embodiment, image expansion module 304 includes:
A determining submodule 3041, configured to determine, for each enhanced ultrasound image, an image quality parameter of the enhanced ultrasound image, and determine an image expansion template of the enhanced ultrasound image according to the image quality parameter;
a calculation submodule 3042, configured to determine, for each enhanced ultrasound image, a first binary parameter corresponding to each third pixel according to a pixel value of each third pixel in the enhanced ultrasound image, and perform an expansion convolution operation on the first binary parameter corresponding to each third pixel according to the first binary parameter corresponding to each third pixel and the image expansion template, so as to obtain a target binary parameter corresponding to each third pixel;
the determining submodule 3041 is further configured to determine, for each enhanced ultrasound image, an inflated ultrasound image corresponding to the enhanced ultrasound image according to the target binary parameters corresponding to all the third pixels.
Therefore, the automatic determination device for the special-shaped region of the ultrasonic image described in fig. 4 can perform corresponding expansion convolution operation on the third pixel in the enhanced ultrasonic image according to the image quality parameter of the enhanced ultrasonic image, so as to obtain the expanded ultrasonic image corresponding to the enhanced ultrasonic image, and thus, the image morphological expansion operation can be flexibly performed on the enhanced ultrasonic image, the reliability and accuracy of the obtained expanded ultrasonic image can be improved, the image noise in the enhanced ultrasonic image is reduced, the continuity of the image is ensured, and the subsequent accurate superposition processing of the expanded ultrasonic image is facilitated.
In yet another alternative embodiment, the determining submodule 3041 is further configured to:
before an image expansion template of the enhanced ultrasonic image is determined according to the image quality parameters, determining the image corrosion demand corresponding to the enhanced ultrasonic image according to the image quality parameters, and judging whether the image corrosion demand is greater than a preset corrosion demand threshold;
When the judgment result is negative, triggering the operation of executing the image expansion template for determining the enhanced ultrasonic image according to the image quality parameter;
When the judgment result is yes, an image corrosion template of the enhanced ultrasonic image is determined according to the image quality parameters, a second binary parameter corresponding to each third pixel is determined according to the pixel value of each third pixel in the enhanced ultrasonic image, corrosion convolution operation is carried out on the second binary parameter corresponding to each third pixel according to the second binary parameter corresponding to each third pixel and the image corrosion template to obtain a third binary parameter corresponding to each third pixel, the corroded ultrasonic image corresponding to the enhanced ultrasonic image is determined according to the third binary parameters corresponding to all the third pixels, the reference image quality parameter of the corroded ultrasonic image is determined, and the image quality parameter is updated according to the reference image quality parameter, and the operation of the image expansion template of the enhanced ultrasonic image is determined according to the image quality parameter.
Therefore, the automatic determination device for the special-shaped region of the ultrasonic image described in fig. 4 can perform corrosion requirement determination operation on the enhanced ultrasonic image according to the image quality parameter of the enhanced ultrasonic image, then perform image corrosion operation on the enhanced ultrasonic image when the image corrosion requirement exists, and perform image expansion processing on the corroded ultrasonic image, so that image noise can be removed, the image content of the original enhanced ultrasonic image can be maintained, the processing reliability and accuracy of the enhanced ultrasonic image can be improved, and the follow-up accurate superposition processing of the expanded ultrasonic image can be better realized.
In yet another alternative embodiment, the superposition processing module 305 performs a superposition processing operation on each frame of the inflated ultrasound image, and the manner of obtaining all the superimposed ultrasound images specifically includes:
For each expanded ultrasonic image, determining a multi-frame associated ultrasonic image associated with the expanded ultrasonic image from all other expanded ultrasonic images except the expanded ultrasonic image in all expanded ultrasonic images, and determining an effective image area of the expanded ultrasonic image according to a pixel binary parameter corresponding to the expanded ultrasonic image and a pixel binary parameter corresponding to all associated ultrasonic images;
And for each expanded ultrasonic image, determining an ultrasonic image to be superimposed, which is matched with the effective image area, from all the associated ultrasonic images according to the effective image area of the expanded ultrasonic image, and performing image superimposing operation on the expanded ultrasonic image according to the ultrasonic image to be superimposed to obtain a superimposed ultrasonic image corresponding to the expanded ultrasonic image.
Therefore, the automatic determination device for the special-shaped region of the ultrasonic image described in fig. 4 can determine the effective image region of the expanded ultrasonic image based on the pixel binary parameters corresponding to the expanded ultrasonic image and the pixel binary parameters corresponding to all the related ultrasonic images, then determine the ultrasonic image to be superimposed which is matched with the effective image region from all the related ultrasonic images, so as to realize the operation of superimposing the expanded ultrasonic image, thus, the pixels of the effective image region in the expanded ultrasonic image can be accurately superimposed, and the incomplete defect region in the effective image region can be effectively compensated, thereby improving the reliability and accuracy of the superimposing treatment of the expanded ultrasonic image, and realizing the follow-up operation of identifying the precise connected domain of the superimposed ultrasonic image.
In yet another alternative embodiment, the region determining module 306 performs the connected domain identification operation on each frame of the superimposed ultrasound image, and the manner of obtaining the special-shaped region of each frame of the superimposed ultrasound image to be analyzed specifically includes:
For each superimposed ultrasonic image, determining a communication mark parameter corresponding to each fourth pixel according to a fourth binary parameter corresponding to each fourth pixel in the superimposed ultrasonic image;
for each superimposed ultrasonic image, determining a plurality of connected areas in the superimposed ultrasonic image according to the connected mark parameters corresponding to all fourth pixels and preset connected area identification parameters, and determining a target connected area from all connected areas according to the area parameters corresponding to each connected area, wherein the target connected area is used as a special-shaped area of the superimposed ultrasonic image to be analyzed.
In this alternative embodiment, the region parameters include at least one of a region area parameter, a region pixel number parameter, and a region content parameter.
Therefore, the automatic determining device for the special-shaped area of the ultrasonic image described in fig. 4 can determine a plurality of connected areas in the superimposed ultrasonic image according to the connected mark parameter corresponding to each fourth pixel in the superimposed ultrasonic image and the preset connected area identification parameter, and determine the special-shaped area of the superimposed ultrasonic image to be analyzed from all the connected areas, so that the determination reliability and accuracy of the special-shaped area to be analyzed can be improved, and further, the accurate analysis for the block or the ultrasonic image area containing important information can be improved, thereby being beneficial to the smooth performance of ultrasonic imaging research work.
Example IV
Referring to fig. 5, fig. 5 is a schematic structural diagram of an automatic determination device for an ultrasound image abnormal region according to another embodiment of the present invention. As shown in fig. 5, the automatic determination device for the ultrasound image abnormal region may include:
a memory 401 storing executable program codes;
A processor 402 coupled with the memory 401;
the processor 402 invokes executable program codes stored in the memory 401 to perform the steps in the method for automatically determining the ultrasound image special-shaped area described in the first embodiment or the second embodiment of the present invention.
Example five
The embodiment of the invention discloses a computer storage medium which stores computer instructions for executing the steps in the automatic determination method of the ultrasonic image special-shaped area described in the first embodiment or the second embodiment of the invention when the computer instructions are called.
Example six
An embodiment of the present invention discloses a computer program product comprising a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps in the method for automatically determining an ultrasound image profiled region described in embodiment one or embodiment two.
The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate components may or may not be physically separate, and the components shown as modules may or may not be physical, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above detailed description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product that may be stored in a computer-readable storage medium including Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), one-time programmable Read-Only Memory (OTPROM), electrically erasable programmable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM) or other optical disc Memory, magnetic disc Memory, tape Memory, or any other medium that can be used for computer-readable carrying or storing data.
Finally, it should be noted that the method and the device for automatically determining the abnormal region of the ultrasonic image disclosed by the embodiment of the invention are disclosed as the preferred embodiment of the invention, and are only used for illustrating the technical scheme of the invention, but not limiting the technical scheme; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that modifications may be made to the technical solutions described in the foregoing embodiments or equivalents may be substituted for some of the technical features thereof, and that these modifications or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention in essence of the corresponding technical solutions.