CN113892967B - Ultrasonic image processing method and ultrasonic instrument - Google Patents

Ultrasonic image processing method and ultrasonic instrument Download PDF

Info

Publication number
CN113892967B
CN113892967B CN202111041389.0A CN202111041389A CN113892967B CN 113892967 B CN113892967 B CN 113892967B CN 202111041389 A CN202111041389 A CN 202111041389A CN 113892967 B CN113892967 B CN 113892967B
Authority
CN
China
Prior art keywords
tissue
image
target
preset
gray
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.)
Active
Application number
CN202111041389.0A
Other languages
Chinese (zh)
Other versions
CN113892967A (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.)
Qingdao Hisense Medical Equipment Co Ltd
Original Assignee
Qingdao Hisense Medical Equipment 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 Qingdao Hisense Medical Equipment Co Ltd filed Critical Qingdao Hisense Medical Equipment Co Ltd
Priority to CN202111041389.0A priority Critical patent/CN113892967B/en
Publication of CN113892967A publication Critical patent/CN113892967A/en
Application granted granted Critical
Publication of CN113892967B publication Critical patent/CN113892967B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B8/00Diagnosis using ultrasonic, sonic or infrasonic waves
    • A61B8/52Devices using data or image processing specially adapted for diagnosis using ultrasonic, sonic or infrasonic waves
    • A61B8/5215Devices using data or image processing specially adapted for diagnosis using ultrasonic, sonic or infrasonic waves involving processing of medical diagnostic data
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B8/00Diagnosis using ultrasonic, sonic or infrasonic waves
    • A61B8/52Devices using data or image processing specially adapted for diagnosis using ultrasonic, sonic or infrasonic waves
    • A61B8/5269Devices using data or image processing specially adapted for diagnosis using ultrasonic, sonic or infrasonic waves involving detection or reduction of artifacts

Abstract

The invention discloses a processing method of an ultrasonic image and an ultrasonic instrument, wherein a data acquisition unit of the device is configured to: acquiring an ultrasonic image; the processor is configured to: performing smoothing treatment on gradients of all pixel points in the obtained ultrasonic image in a preset direction to obtain a target gradient image corresponding to the ultrasonic image; determining a tissue segmentation threshold value based on the gray value of each pixel point in the target gradient image, a preset gray threshold value and a tissue occupation constant matched with tissue contained in the ultrasonic image; tissue segmentation is carried out on the ultrasonic image by applying a tissue segmentation threshold value to obtain a tissue image; and respectively determining the brightness errors of the tissue images corresponding to each group of imaging parameters according to each group of preset imaging parameters and the target tissue brightness values, and selecting one group of imaging parameters as the target imaging parameters according to the brightness errors. The target imaging parameters are configured into the ultrasonic instrument, so that the uniformity of the brightness of the ultrasonic image is realized, the operation is simple, and the accuracy is high.

Description

Ultrasonic image processing method and ultrasonic instrument
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method for processing an ultrasound image and an ultrasound apparatus.
Background
Ultrasonic wave is a mechanical wave with extremely short wavelength, is easy to obtain anisotropic acoustic energy, can be used for cleaning, crushing, sterilizing and disinfecting, and has a plurality of applications in medicine and industry. The principle of application is generally that an ultrasonic probe is used to transmit ultrasonic waves to an object, echo of the internal structure of the object is recorded, and the echo is processed to form a gray image so as to reflect the internal structure of the object.
In the medical field, ultrasound is commonly applied to reflect the state of structures, such as tissues or organs, inside the human body. Gain adjustment is an important link in the ultrasonic imaging process, and in general, an optimal gain and a dynamic range are set for each part or tissue in an ultrasonic system, and the optimal gain and the dynamic range are suitable for most patients, but in the actual detection process, due to large individual differences (such as different attenuation of acoustic energy), poor image uniformity of a part of people under default settings appears as uneven brightness of images, and at this time, a doctor is required to manually adjust the gain and the dynamic range.
In view of the complexity and low efficiency of the manual adjustment process of doctors, most of ultrasonic systems in the related art can automatically perform automatic gain adjustment according to ultrasonic images of patients so as to achieve the purpose of homogenizing the brightness of the images. However, the related art has the following problems: the method comprises the steps of adopting a mode of solving a structure tensor to judge a tissue region, judging a noise region, a non-noise region, a tissue region and a non-tissue region by constructing a function value on the structure tensor, wherein the method is complex in calculation, and the tissue region can not be completely judged by only using a characteristic value; the image is simply segmented by adopting a fixed threshold mode, so that errors exist in the judgment of the tissue areas, the brightness of all the tissue areas cannot be considered to the greatest extent, and errors exist in the ideal tissue brightness.
Disclosure of Invention
The invention provides an ultrasonic image processing method and an ultrasonic instrument, wherein the processed imaging parameters are configured to the ultrasonic instrument, so that the homogenization of the brightness of the ultrasonic image can be realized, the operation is simple, and the accuracy is high.
According to a first aspect in an exemplary embodiment, there is provided a method of processing an ultrasound image, comprising:
performing smoothing treatment on gradients of all pixel points in the obtained ultrasonic image in a preset direction to obtain a target gradient image corresponding to the ultrasonic image; wherein the ultrasound image is an image comprising human organs or tissues;
determining a tissue segmentation threshold based on gray values of all pixel points in the target gradient image, a preset gray threshold and tissue occupation constants of tissue matching contained in the ultrasonic image;
performing tissue segmentation on the ultrasonic image by applying the tissue segmentation threshold to obtain a tissue image;
respectively determining brightness errors of the tissue images corresponding to each group of imaging parameters according to each group of preset imaging parameters and target tissue brightness values, and selecting one group of imaging parameters as target imaging parameters according to the brightness errors; wherein each imaging parameter includes a dynamic range and a gain.
According to the embodiment of the application, the noise in each preset direction of the acquired ultrasonic image can be removed through smoothing treatment, so that the accuracy of tissue segmentation is improved; in addition, when the tissue segmentation threshold is determined, the tissue characteristics of different parts are considered, and the tissue occupation rate constant matched with the tissue contained in the current ultrasonic image is applied, so that the obtained tissue segmentation threshold is more accurate, and the accuracy of tissue segmentation is further improved; in addition, the target imaging parameters are determined by introducing the target tissue brightness value as the expected brightness value and comparing the brightness errors of tissue images under different imaging parameters, and then the target imaging parameters are used as parameters of an ultrasonic instrument to output an ultrasonic image, so that the homogenization of the brightness of the ultrasonic image is realized, the operation is simple, and the accuracy is high.
In some exemplary embodiments, the smoothing processing is performed on the gradient of each pixel point in the obtained ultrasound image in the preset direction to obtain a target gradient image corresponding to the ultrasound image, including:
aiming at each preset direction, adopting a neighborhood mean value smoothing mode to sequentially carry out smoothing treatment on the gradient of each pixel point in the preset direction in the horizontal direction and the vertical direction to obtain a smoothed gradient image in the preset direction;
Updating the maximum gray value of each position in the smoothed gradient image in the preset direction to the gray value of the pixel point for the pixel point of each position in the pixel matrix of the ultrasonic image;
and determining the image formed by each updated pixel point as a target gradient image.
In the above embodiment, in the smoothing process, a plurality of preset directions are considered, and smoothing processes in two directions, namely horizontal and vertical, are sequentially performed for the gradient of the pixel point in each preset direction, so that the smoothing process is more suitable for complex tissues than considering one direction; in addition, the maximum gray value in each preset direction is used as the gray value of the pixel point at the corresponding position of the target gradient image, so that the tissue segmentation threshold calculated by applying the target gradient image is more accurate, and the tissue segmentation is more accurate.
In some exemplary embodiments, the determining the tissue segmentation threshold based on the gray value of each pixel point in the target gradient image, a preset gray threshold, and a tissue-matched tissue duty cycle constant contained in the ultrasound image includes:
determining the product of the number of target pixel points and a tissue ratio constant matched with tissue contained in the ultrasonic image as a tissue ratio threshold; the target pixel points are pixel points with gray values larger than a preset gray threshold in the target gradient image;
Selecting a first target gray value from a gray value range larger than the preset gray threshold as a tissue segmentation threshold; in the target gradient image, the number of pixels corresponding to other gray values larger than the first target gray value is larger than or equal to the tissue duty ratio threshold, and the number of pixels corresponding to other gray values larger than the second target gray value is smaller than the tissue duty ratio threshold, and the second target gray value is adjacent to the first target gray value and larger than the first target gray value.
In the above embodiment, when determining the tissue segmentation threshold, the method of fixed threshold segmentation is not simply adopted, but different characteristics of tissues of different parts are considered, and tissue ratio constants of tissue matching contained in an ultrasound image are applied, and the constants are different; and then determining the tissue segmentation threshold according to the number of the pixel points which are larger than or equal to the tissue proportion threshold and the number of the pixel points which are smaller than the tissue proportion threshold, so that the determined tissue segmentation threshold is more accurate.
In some exemplary embodiments, the determining, according to the preset image parameters and the target tissue brightness value, the brightness error of the tissue image corresponding to each image parameter includes:
For any group of imaging parameters, carrying out parameter compression on each pixel point with a gray value larger than a first preset gray value in the tissue image according to the imaging parameters, and carrying out difference and square processing on the compressed value and a target tissue brightness value;
and adding the results of the difference and square processing of each pixel point to obtain the brightness error of the tissue image corresponding to the imaging parameter.
In the above embodiment, by calculating the brightness errors of the tissue images under different imaging parameters, the preferred imaging parameters can be determined, and the brightness of the ultrasound image obtained by applying the preferred imaging parameters is more uniform. The brightness error of the tissue image obtained by the processing mode is more accurate, and the determined tissue segmentation threshold value is more accurate.
In some exemplary embodiments, the applying the tissue segmentation threshold to tissue segment the ultrasound image comprises:
and keeping the gray level value of the pixel points larger than the tissue segmentation threshold value in each pixel point in the ultrasonic image unchanged, and setting the gray level value of the pixel points smaller than the tissue segmentation threshold value as a second preset gray level value.
In the above embodiment, in order to make the tissue area more obvious, when the ultrasound image is segmented, the gray values of the pixels smaller than the tissue segmentation threshold are uniformly set to the second preset gray value, so that the boundary of the tissue area is more obvious, and the tissue segmentation is more accurate.
In some exemplary embodiments, an ultrasound image is acquired by:
detecting an image adjustment operation of a user;
acquiring envelope data output in the first thread through a second thread started by the image adjusting operation; the first thread is a thread applied when outputting a preset ultrasonic image according to a preset mode;
parameter compression is carried out on the envelope data through the default setting parameters in the preset mode applied by the second thread;
and carrying out noise correction on the envelope data after compression processing through the second thread to obtain an ultrasonic image.
In the above embodiment, the two threads are started, the second thread is applied to acquire the data from the first thread, and processes such as compression, denoising and the like are performed, instead of directly applying the first thread to realize the processing process of imaging parameters, so that the influence of other operations performed by a user before parameter processing on the imaging effects is avoided.
In some exemplary embodiments, the selecting a set of imaging parameters as target imaging parameters according to the brightness error includes:
among the imaging parameters, the imaging parameter applied when the brightness error is minimum is determined as the target imaging parameter.
In the above embodiment, the smaller the brightness error is, the better the optimizing effect of the applied imaging parameter is, so that the imaging parameter applied when the brightness error is minimum is selected as the target imaging parameter, the target imaging parameter is configured into the ultrasonic instrument, and the brightness of the output ultrasonic image is more uniform.
In some exemplary embodiments, the gradient of each pixel point in the preset direction is determined by:
and carrying out convolution processing on each pixel point in the ultrasonic image according to a preset matrix matched with a preset direction to obtain the gradient of each pixel point in the preset direction.
In the embodiment, the gradient of each pixel point in each preset direction is determined by adopting a convolution mode, so that the operation is simple and the calculation is accurate.
According to a second aspect in an exemplary embodiment, there is provided an ultrasound instrument comprising a processor and a data acquisition unit, wherein:
the data acquisition unit is configured to:
acquiring an ultrasonic image; wherein the ultrasound image is an image comprising human organs or tissues;
the processor is configured to:
performing smoothing treatment on gradients of all pixel points in the obtained ultrasonic image in a preset direction to obtain a target gradient image corresponding to the ultrasonic image; determining a tissue segmentation threshold based on gray values of all pixel points in the target gradient image, a preset gray threshold and tissue occupation constants of tissue matching contained in the ultrasonic image;
Performing tissue segmentation on the ultrasonic image by applying the tissue segmentation threshold to obtain a tissue image;
respectively determining brightness errors of the tissue images corresponding to each group of imaging parameters according to each group of preset imaging parameters and target tissue brightness values, and selecting one group of imaging parameters as target imaging parameters according to the brightness errors; wherein each imaging parameter includes a dynamic range and a gain.
In some exemplary embodiments, the processor is configured to:
aiming at each preset direction, adopting a neighborhood mean value smoothing mode to sequentially carry out smoothing treatment on the gradient of each pixel point in the preset direction in the horizontal direction and the vertical direction to obtain a smoothed gradient image in the preset direction;
updating the maximum gray value of each position in the smoothed gradient image in the preset direction to the gray value of the pixel point for the pixel point of each position in the pixel matrix of the ultrasonic image;
and determining the image formed by each updated pixel point as a target gradient image.
In some exemplary embodiments, the processor is configured to:
Determining the product of the number of target pixel points and a tissue ratio constant matched with tissue contained in the ultrasonic image as a tissue ratio threshold; the target pixel points are pixel points with gray values larger than a preset gray threshold in the target gradient image;
selecting a first target gray value from a gray value range larger than the preset gray threshold as a tissue segmentation threshold; in the target gradient image, the number of pixels corresponding to other gray values larger than the first target gray value is larger than or equal to the tissue duty ratio threshold, and the number of pixels corresponding to other gray values larger than the second target gray value is smaller than the tissue duty ratio threshold, and the second target gray value is adjacent to the first target gray value and larger than the first target gray value.
In some exemplary embodiments, the processor is configured to:
for any group of imaging parameters, carrying out parameter compression on each pixel point with a gray value larger than a first preset gray value in the tissue image according to the imaging parameters, and carrying out difference and square processing on the compressed value and a target tissue brightness value;
And adding the results of the difference and square processing of each pixel point to obtain the brightness error of the tissue image corresponding to the imaging parameter.
In some exemplary embodiments, the processor is configured to:
and keeping the gray level value of the pixel points larger than the tissue segmentation threshold value in each pixel point in the ultrasonic image unchanged, and setting the gray level value of the pixel points smaller than the tissue segmentation threshold value as a second preset gray level value.
In some exemplary embodiments, the processor is configured to acquire the ultrasound image by:
detecting an image adjustment operation of a user;
acquiring envelope data output in the first thread through a second thread started by the image adjusting operation; the first thread is a thread applied when outputting a preset ultrasonic image according to a preset mode;
parameter compression is carried out on the envelope data through the default setting parameters in the preset mode applied by the second thread;
and carrying out noise correction on the envelope data after compression processing through the second thread to obtain an ultrasonic image.
In some exemplary embodiments, the processor is configured to:
Among the imaging parameters, the imaging parameter applied when the brightness error is minimum is determined as the target imaging parameter.
In some exemplary embodiments, the processor is configured to determine the gradient of each pixel point in the preset direction by:
and carrying out convolution processing on each pixel point in the ultrasonic image according to a preset matrix matched with a preset direction to obtain the gradient of each pixel point in the preset direction.
According to a third aspect in an exemplary embodiment, there is provided an ultrasound image processing apparatus, the apparatus comprising:
the smoothing processing module is used for carrying out smoothing processing on gradients of all pixel points in the obtained ultrasonic image in a preset direction to obtain a target gradient image corresponding to the ultrasonic image; wherein the ultrasound image is an image comprising human organs or tissues;
the segmentation threshold determining module is used for determining a tissue segmentation threshold based on the gray value of each pixel point in the target gradient image, a preset gray threshold and a tissue occupation constant matched with tissue contained in the ultrasonic image;
the tissue segmentation module is used for applying the tissue segmentation threshold value to carry out tissue segmentation on the ultrasonic image so as to obtain a tissue image;
The parameter determining module is used for respectively determining the brightness errors of the tissue images corresponding to each group of imaging parameters according to each group of preset imaging parameters and the target tissue brightness values, and selecting a group of imaging parameters as target imaging parameters according to the brightness errors; wherein each imaging parameter includes a dynamic range and a gain.
In some exemplary embodiments, the smoothing module is specifically configured to:
aiming at each preset direction, adopting a neighborhood mean value smoothing mode to sequentially carry out smoothing treatment on the gradient of each pixel point in the preset direction in the horizontal direction and the vertical direction to obtain a smoothed gradient image in the preset direction;
updating the maximum gray value of each position in the smoothed gradient image in the preset direction to the gray value of the pixel point for the pixel point of each position in the pixel matrix of the ultrasonic image;
and determining the image formed by each updated pixel point as a target gradient image.
In some exemplary embodiments, the segmentation threshold determination module is specifically configured to:
determining the product of the number of target pixel points and a tissue ratio constant matched with tissue contained in the ultrasonic image as a tissue ratio threshold; the target pixel points are pixel points with gray values larger than a preset gray threshold in the target gradient image;
Selecting a first target gray value from a gray value range larger than the preset gray threshold as a tissue segmentation threshold; in the target gradient image, the number of pixels corresponding to other gray values larger than the first target gray value is larger than or equal to the tissue duty ratio threshold, and the number of pixels corresponding to other gray values larger than the second target gray value is smaller than the tissue duty ratio threshold, and the second target gray value is adjacent to the first target gray value and larger than the first target gray value.
In some exemplary embodiments, the parameter determination module is specifically configured to:
for any group of imaging parameters, carrying out parameter compression on each pixel point with a gray value larger than a first preset gray value in the tissue image according to the imaging parameters, and carrying out difference and square processing on the compressed value and a target tissue brightness value;
and adding the results of the difference and square processing of each pixel point to obtain the brightness error of the tissue image corresponding to the imaging parameter.
In some exemplary embodiments, the tissue segmentation module is specifically configured to:
and keeping the gray level value of the pixel points larger than the tissue segmentation threshold value in each pixel point in the ultrasonic image unchanged, and setting the gray level value of the pixel points smaller than the tissue segmentation threshold value as a second preset gray level value.
In some exemplary embodiments, the apparatus further comprises an image acquisition module for acquiring an ultrasound image by:
detecting an image adjustment operation of a user;
acquiring envelope data output in the first thread through a second thread started by the image adjusting operation; the first thread is a thread applied when outputting a preset ultrasonic image according to a preset mode;
parameter compression is carried out on the envelope data through the default setting parameters in the preset mode applied by the second thread;
and carrying out noise correction on the envelope data after compression processing through the second thread to obtain an ultrasonic image.
In some exemplary embodiments, the parameter determination module is specifically configured to:
among the imaging parameters, the imaging parameter applied when the brightness error is minimum is determined as the target imaging parameter.
In some exemplary embodiments, the method further includes a gradient determining module, configured to determine a gradient of each pixel point in a preset direction by:
and carrying out convolution processing on each pixel point in the ultrasonic image according to a preset matrix matched with a preset direction to obtain the gradient of each pixel point in the preset direction.
According to a fourth aspect in an exemplary embodiment, a computer storage medium is provided, in which computer program instructions are stored which, when run on a computer, cause the computer to perform the method of processing an ultrasound image according to the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it will be apparent that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 schematically illustrates an ultrasonic instrument provided by an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a method for processing an ultrasound image according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an ultrasound image obtained using pre-treatment imaging parameters according to an embodiment of the present invention;
FIG. 4 schematically illustrates an ultrasound image obtained using processed imaging parameters according to an embodiment of the present invention;
FIG. 5 is a flow chart illustrating a method for processing an ultrasound image according to an embodiment of the present application;
fig. 6 schematically illustrates a structural diagram of an ultrasound image processing apparatus according to an embodiment of the present application;
fig. 7 schematically illustrates a structural diagram of an ultrasonic apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
Any number of elements in the figures are for illustration and not limitation, and any naming is used for distinction only and not for any limiting sense.
The ultrasonic wave types generally include a type, B type, D type and M type, and the ultrasonic wave types are different, and the application scenes thereof are generally different. In the embodiment of the application, the type of the ultrasonic wave is not particularly limited, and the type of the ultrasonic wave in the actual application process can be determined according to the actual situation.
In specific practice, such as in the medical field, ultrasound is commonly applied to reflect the state of structures, such as tissues or organs, within the human body. Gain adjustment is an important link in the ultrasonic imaging process, and in general, an optimal gain (in terms of image brightness) and a dynamic range (in terms of contrast) are set for each part in an ultrasonic system, and the optimal gain and dynamic range are suitable for most patients, that is, an image has good brightness and contrast, and the near field, the middle field and the far field in the image are kept uniform. However, in the actual detection process (when a doctor makes a picture), because of large individual differences (such as different attenuation of acoustic wave energy), there may be poor image uniformity of a part of people under default setting, which is represented by uneven brightness of the image, and bright and dark, at this time, in order to achieve uniformity of the image, the doctor needs to manually adjust gain and dynamic range. For example, a one-key operation button is displayed on the operation interface, and a user can adjust different gears according to the observation preference to achieve different contrast and brightness.
In view of the complexity and low efficiency of the manual adjustment process of doctors, most of ultrasonic systems in the related art can automatically perform automatic gain adjustment according to ultrasonic images of patients so as to achieve the purpose of homogenizing the brightness of the images. However, the related art mainly has the following methods: the method comprises the steps of adopting a mode of solving a structure tensor to judge a tissue region, judging a noise region, a non-noise region, a tissue region and a non-tissue region by constructing a function value on the structure tensor, wherein the method is complex in calculation, and the tissue region can not be completely judged by only using a characteristic value; the image is simply segmented by adopting a fixed threshold mode, so that errors exist in the judgment of the tissue areas, the brightness of all the tissue areas cannot be considered to the greatest extent, and errors exist in the ideal tissue brightness.
To this end, the present application provides a method of processing an ultrasound image, in which: performing smoothing treatment on gradients of all pixel points in the obtained ultrasonic image in a preset direction to obtain a target gradient image corresponding to the ultrasonic image; determining a tissue segmentation threshold based on gray values of all pixel points in the target gradient image, a preset gray threshold and tissue occupation constants of tissue matching contained in the ultrasonic image; performing tissue segmentation on the ultrasonic image by applying the tissue segmentation threshold to obtain a tissue image; respectively determining brightness errors of the tissue images corresponding to each group of imaging parameters according to each group of preset imaging parameters and target tissue brightness values, and selecting one group of imaging parameters as target imaging parameters according to the brightness errors; wherein each imaging parameter includes a dynamic range and a gain. The tissue characteristics of different human body parts are fully considered to obtain the processed dynamic range and gain, and the operation is simple; the ultrasonic image is generated by applying the processed dynamic range and gain, so that the uniformity of brightness is realized, the operation is simple, and the accuracy is high.
After the design idea of the embodiment of the present application is introduced, some simple descriptions are made below for application scenarios applicable to the technical solution of the embodiment of the present application, and it should be noted that the application scenarios described below are only used for illustrating the embodiment of the present application and are not limiting. In the specific implementation, the technical scheme provided by the embodiment of the application can be flexibly applied according to actual needs.
Referring to fig. 1, a schematic diagram of an ultrasonic apparatus according to an embodiment of the present application is provided, where the ultrasonic apparatus is a medical ultrasonic apparatus (such as a doctor) and includes an imaging display area 11 and an operation console 12, where the operation console includes a plurality of operation areas, and each operation area may include a plurality of operation buttons, and three operation buttons are illustrated in fig. 1. In the embodiment of the present application, a one-button operation button 121 is provided, and the one-button operation button 121 can trigger the execution of the method for processing an ultrasound image in the embodiment of the present application, in this process, the optimization of imaging parameters is achieved, and further, the processed dynamic range and gain are applied to adjust the ultrasound image, so that an image with uniform brightness is displayed to a doctor.
Of course, the method provided by the embodiment of the present application is not limited to the application scenario shown in fig. 1, but may be used in other possible application scenarios, and the embodiment of the present application is not limited. The functions that can be implemented by each device in the application scenario shown in fig. 1 will be described together in the following method embodiments, which are not described in detail herein.
In order to further explain the technical solution provided by the embodiments of the present application, the following details are described with reference to the accompanying drawings and the detailed description. Although embodiments of the present application provide the method operational steps shown in the following embodiments or figures, more or fewer operational steps may be included in the method based on routine or non-inventive labor. In steps where there is logically no necessary causal relationship, the execution order of the steps is not limited to the execution order provided by the embodiments of the present application.
The technical scheme provided by the embodiment of the application is described below by taking imaging of organs or tissues of a human body in the medical field as an example in combination with the application scenario shown in fig. 1.
Referring to fig. 2, an embodiment of the present application provides a method for processing an ultrasound image, including the steps of:
s201, performing smoothing treatment on gradients of all pixel points in an obtained ultrasonic image in a preset direction to obtain a target gradient image corresponding to the ultrasonic image; wherein the ultrasound image is an image comprising organs or tissues of the human body.
S202, determining a tissue segmentation threshold value based on gray values of all pixel points in the target gradient image, a preset gray threshold value and tissue proportion constants of tissue matching contained in the ultrasonic image.
And S203, performing tissue segmentation on the ultrasonic image by applying the tissue segmentation threshold value to obtain a tissue image.
S204, respectively determining brightness errors of the tissue images corresponding to each group of imaging parameters according to each group of preset imaging parameters and target tissue brightness values, and selecting a group of imaging parameters as target imaging parameters according to the brightness errors; wherein each imaging parameter includes a dynamic range and a gain.
According to the embodiment of the application, the noise in each preset direction of the acquired ultrasonic image can be removed through smoothing treatment, so that the accuracy of tissue segmentation is improved; in addition, when the tissue segmentation threshold is determined, the tissue characteristics of different parts are considered, and the tissue occupation rate constant matched with the tissue contained in the current ultrasonic image is applied, so that the obtained tissue segmentation threshold is more accurate, and the accuracy of tissue segmentation is further improved; in addition, the target imaging parameters are determined by introducing the target tissue brightness value as the expected brightness value and comparing the brightness errors of tissue images under different imaging parameters, and then the target imaging parameters are used as parameters of an ultrasonic instrument to output an ultrasonic image, so that the homogenization of the brightness of the ultrasonic image is realized, the operation is simple, and the accuracy is high.
Since the ultrasonic instrument has the preconfigured dynamic range and gain, the brightness and the contrast of the ultrasonic image output by applying the preconfigured dynamic range and gain are uniform under normal conditions, so that the ultrasonic image can be directly applied, and the process is completed in the first thread. For example, when the brightness and contrast of the output ultrasonic image are poor, the brightness and contrast adjusting process of the ultrasonic image can be realized by operating a key operation button on the ultrasonic instrument, and the adjusting process is the executing process of the ultrasonic image processing method of the embodiment of the application, so that the ultrasonic image with uniform brightness and contrast can be obtained by applying the processed dynamic range and gain. In an actual application, the processing may be performed in a second thread that is started after detecting a trigger operation by the user (e.g., the doctor operates a push button).
For parameter optimization, an ultrasound image is first acquired, and then a target imaging parameter is determined based on the acquired ultrasound image. Specifically, detecting an image adjustment operation of a user; acquiring envelope data output in the first thread through a second thread started by image adjustment operation; the first thread is a thread applied when outputting a preset ultrasonic image according to a preset mode; parameter compression is carried out on the envelope data through default setting parameters in a second thread application preset mode; and carrying out noise correction on the envelope data after compression processing through a second thread to obtain an ultrasonic image.
Specifically, the envelope data outputted in the first thread is obtained after the envelope is obtained in the first thread, and the data is envelope data under the default global gain and TGC (Time Gain Compensation ) and is not influenced by the user gain after adjustment. Since the second thread starts after the user's one-touch process, retrieving the envelope data from the first thread can avoid the problem of interference imaging caused by adjusting the global gain and TGC before the one-touch process is pressed.
Then, the second thread performs parameter compression, such as log compression, on the envelope data, and default setting parameters in a preset mode are selected during compression, so that the problem of interference imaging caused by other operations on the log compression parameters before one-key processing is avoided.
In addition, noise correction is performed on the compressed data to obtain an ultrasound image. In the noise correction process, for example, a noise curve is generated according to different probe types and acquired inspection positions, the noise curve is pre-stored in a file, and the noise curve can be set to be a fixed point number without being calculated again, so that time can be saved. If the depths are different, the noise curves in different depth directions under different examination positions can be obtained through interpolation or prestored.
As described above, the result obtained after the noise processing is an ultrasound image, that is, an object of the processing method of an ultrasound image according to the embodiment of the present application. The above-described process can avoid interference problems caused by other operations or adjustments performed prior to the one-touch process.
Referring to S201, when there is an edge in the image, there is generally a large gradient value, whereas when there is a relatively smooth portion in the image, the change in the gradation value is small, and the corresponding gradient is also small, and the image constituted by the gradients of the respective pixels in the image becomes a gradient image. Since the smoothing operation is to process the gradient, the calculation process of the gradient will be described first.
In order to improve accuracy, edge detection may be performed in four directions of the ultrasound image, for example, a horizontal direction, a vertical direction, a left diagonal direction, and a right diagonal direction, which may be collectively referred to as a preset direction, based on pixel points arrayed in a pixel matrix of the ultrasound image. Specifically, sobel templates in different directions can be used for edge detection, and the practical application formula is as follows:
i is an input image, namely an ultrasonic image obtained after denoising, and is a pixel matrix, wherein each element in the matrix is a gray value of each pixel point; * Representing a convolution; x represents a horizontal direction, y represents a vertical direction, xy represents a left diagonal direction, yx represents a right diagonal direction; sx is a gradient output result in the horizontal direction, sy is a gradient output result in the vertical direction, sxy is a gradient output result in the left diagonal direction, and Syx is a gradient output result in the right diagonal direction. Each gradient output result is in the form of a pixel matrix, and the elements are gradients of all pixel points. After the gradients of the pixel points in the preset direction are obtained, smoothing processing is carried out on the gradients, and a target gradient image corresponding to the ultrasonic image can be obtained. Specifically, the target gradient image can be obtained through the following three steps:
The first step, aiming at each preset direction, adopting a neighborhood mean value smoothing mode to sequentially carry out smoothing treatment on gradients of all pixel points in the preset direction in the horizontal direction and the vertical direction, and obtaining a smoothed gradient image in the preset direction.
And (3) smoothing the Sx, sy, sxy, syx in the horizontal direction (x direction) respectively so as to remove the influence of noise in the x direction, increase the accuracy of tissue segmentation, and adopt a neighborhood mean smoothing mode to realize the method by the following formula:
wherein radius is a filter radius, sx1 (x, y) is a smoothing result of Sx in the x direction, sy1 (x, y) is a smoothing result of Sy in the x direction; sxy1 (x, y) is the smoothing result of Sxy in the x direction; syx1 (x, y) is the smoothed result of Syx in the x direction; i is the serial number of the pixel point in the x direction.
Based on the smoothing result in the x direction, y-direction smoothing is respectively carried out, so that the influence of y-direction noise is removed, the accuracy of tissue segmentation is improved, and a neighborhood mean smoothing mode is adopted, and the method is realized through the following formula:
wherein radius is a filter radius, sx2 (x, y) is a smoothing result of Sx1 in the y direction, sy2 (x, y) is a smoothing result of Sy1 in the y direction; sxy2 (x, y) is the smoothing result of Sxy1 in the y direction; syx2 (x, y) is the smoothed result of Syx1 in the y direction; j is the serial number of the pixel point in the y direction.
Thus, each pixel point has four gradients in 4 preset directions.
And a second step of updating the maximum gray value of each position in the smoothed gradient image in each preset direction to the gray value of the pixel point for the pixel point of each position in the pixel matrix of the ultrasonic image.
In a specific example, for a pixel point of the 1 st row and the 1 st column, in the smoothed gradient result, taking the maximum gray value of the horizontal direction, the vertical direction, the left diagonal direction and the right diagonal direction as the gray value of the point; similarly, other pixels are processed in the same way, and thus the gray value of each pixel is updated.
And thirdly, determining an image formed by each updated pixel point as a target gradient image.
After the gray value of each pixel point is updated by the maximum value in the gradient in the preset direction, the image formed by each updated pixel point is the target gradient image.
Referring to S202, after obtaining the target gradient image, a tissue segmentation threshold is determined based on the gray value of each pixel point in the target gradient image, a preset gray threshold, and a tissue-matched tissue duty constant contained in the ultrasound image.
Wherein, in general, the preset gray threshold is determined according to the current tissue type; the tissue-matching tissue-specific constant included in the ultrasound image is a constant associated with the tissue, such as abdominal tissue, the constant being 0.1 and the preset gray-level threshold being 250.
Next, how the tissue segmentation threshold is determined by presetting a tissue duty constant for matching the tissue contained in the ultrasound image and the gray value of each pixel in the target gradient image is explained.
Specifically, pixels with gray values larger than a preset gray threshold in the target gradient image are called target pixels, and the number of the target pixels is counted; and determining the product of the number of target pixel points and the tissue ratio constant matched with the tissue contained in the ultrasonic image as a tissue ratio threshold value.
In a specific example, in the target gradient image, there are 280 pixels with gray values greater than 250, and the tissue ratio constant of tissue matching contained in the ultrasound image is 0.1, and the determined tissue ratio threshold is 28.
In this example, for example, the number of pixels having a gradation value of 255 is 9, the number of pixels having a gradation value of 254 is 10, the number of pixels having a gradation value of 253 is 12, the number of pixels having a gradation value of 252 is 7, and the number of pixels having a gradation value of 251 is 9. In this way, the number of pixels having a gradation value greater than 254 is 9, the number of pixels having a gradation value greater than 253 is 19, the number of pixels having a gradation value greater than 252 is 26, the number of pixels having a gradation value greater than 251 is 35, and the number of pixels having a gradation value greater than 250 is 48.
Selecting a first target gray value from a gray value range larger than a preset gray threshold as a tissue segmentation threshold; in the target gradient image, the number of the pixel points corresponding to other gray values larger than the first target gray value is larger than or equal to the tissue duty ratio threshold value, and the number of the pixel points corresponding to other gray values larger than the second target gray value is smaller than the tissue duty ratio threshold value, and the second target gray value is adjacent to the first target gray value and larger than the first target gray value.
In the above example, the gray value range greater than the preset gray value is 251-255, and the number of pixels corresponding to other gray values greater than the first target gray value is greater than or equal to 28, where the first target gray value may be 251 and 252; the number of pixels corresponding to other gray values greater than the second target gray value is less than 28, and the second target gray threshold may be 253, 254, and 255; the second target gray value is adjacent to and greater than the first target gray value, and then the first target gray value is determined to be 251, i.e., the tissue segmentation threshold is 251.
In an actual application process, the tissue segmentation threshold may be determined as follows:
And carrying out histogram statistics on the target gradient image according to the pixel values, wherein the obtained histogram is represented by Hist, the Hist counts the number of pixel points with each gray value of 0-255, the Hist is subjected to accumulated statistics, the sum of the number of each gray value larger than a preset gray threshold thr is counted, and a tissue segmentation threshold Thresh is determined according to a tissue occupation ratio threshold segthresh of each part.
segthresh=StructRatio*H(250);
Thresh=min(H>segthresh);
Wherein n represents a gray value, and k is the number of all pixel points; the preset gray threshold is used for eliminating the part with smaller gray value, and StructRatio is the tissue ratio constant of tissue matching contained in the ultrasonic image.
Referring to S203, after determining the tissue segmentation threshold, the tissue segmentation threshold is applied to perform tissue segmentation on the ultrasound image. Specifically, the gray value of the pixel point larger than the tissue segmentation threshold value in each pixel point in the ultrasonic image is kept unchanged, and the gray value of the pixel point smaller than the tissue segmentation threshold value is set to be a second preset gray value.
In a specific example, in order to improve accuracy of tissue image segmentation, the second preset gray value may be 0; the segmented image is the original input image, i.e. the ultrasound image, by:
Wherein G (x, y) is the segmented tissue, called tissue image; i (x, y) is the input ultrasound image. The above completes the segmentation of the tissue region, which can determine the gradient maximum from four directions. Here, the term "dividing into blocks" means separating a tissue region in an ultrasound image, and not dividing the ultrasound image into a plurality of images.
Referring to S204, after obtaining the tissue image, the brightness error of the tissue image can be determined by applying each set of imaging parameters (dynamic range and gain). Specifically, the brightness error of the tissue image is calculated by:
assuming that 10 imaging parameters are shared, performing parameter compression on pixel points of which each gray value is larger than a first preset gray value (for example, 0 can be taken) in the tissue image according to the imaging parameters for any imaging parameter (dynamic range D1 and gain G1), and performing difference and square processing on the compressed values and the target tissue brightness value; and adding the results of the difference and square processing of each pixel point to obtain the brightness error of the tissue image corresponding to the imaging parameter.
In a specific example, D log is applied 10 In the formula, aiming at each pixel point with gray value larger than 0 in the tissue image, the gray value of the pixel point is expressed as data as the input of the formula, D and G respectively take the values of imaging parameters of the current group, and the obtained out is the brightness value of the current pixel point; the brightness error of the tissue image is Wherein a is p The brightness value of the pixel point P is b, the target brightness value and P is the total number of the pixel points. Similarly, for each group of imaging parameters, a corresponding tissue brightness error can be obtained. And selecting a group of imaging parameters from a plurality of groups of imaging parameters as target imaging parameters according to the brightness errors. In the practical application process, the imaging parameter applied when the brightness error is minimum is generally selected as the target imaging parameter, wherein the smaller the brightness error is, the closer the brightness value of the selected imaging parameter is to the expected tissue brightness value.
In order to make the technical solution of the present application easier to understand, a specific example is used to illustrate a schematic view of tissue segmentation, wherein fig. 3 shows a schematic view of an ultrasound image obtained by applying imaging parameters before treatment; fig. 4 shows a schematic representation of an ultrasound image obtained by applying the processed imaging parameters. As can be seen from fig. 3 and 4, the brightness of the ultrasound image obtained by applying the processed imaging parameters is more uniform.
The method of processing an ultrasound image according to an embodiment of the present application is described with reference to fig. 5.
S501, detecting an image adjustment operation by a user.
S502, acquiring envelope data output in the first thread through a second thread triggered by the image adjusting operation.
The first thread is a thread applied when outputting a preset ultrasonic image according to a preset mode.
S503, parameter compression is carried out on the envelope data by applying default setting parameters in a preset mode.
S504, carrying out noise correction on the envelope data after compression processing to obtain an ultrasonic image.
S505, carrying out convolution processing on each pixel point in the ultrasonic image according to a preset matrix matched with the preset direction, and obtaining the gradient of each pixel point in the preset direction.
S506, aiming at each preset direction, adopting a neighborhood mean value smoothing mode to sequentially carry out smoothing treatment on the gradients of all pixel points in the preset direction in the horizontal direction and the vertical direction, and obtaining a smoothed gradient image in the preset direction.
S507, updating the maximum gray value of each position in the smoothed gradient image in each preset direction to the gray value of each pixel point in the pixel matrix of the ultrasonic image.
S508, determining the image formed by each updated pixel point as a target gradient image.
S509, determining that the product of the number of target pixel points and a tissue ratio constant matched with tissue contained in the ultrasonic image is a tissue ratio threshold; the target pixel points are pixel points with gray values larger than a preset gray threshold in the target gradient image.
S510, selecting a first target gray value from a gray value range larger than a preset gray threshold as a tissue segmentation threshold.
In the target gradient image, the number of the pixel points corresponding to other gray values larger than the first target gray value is larger than or equal to a tissue duty ratio threshold value, and the number of the pixel points corresponding to other gray values larger than the second target gray value is smaller than the tissue duty ratio threshold value, and the second target gray value is adjacent to the first target gray value and larger than the first target gray value;
s511, keeping the gray value of the pixel point larger than the tissue segmentation threshold value in each pixel point in the ultrasonic image unchanged, setting the gray value of the pixel point smaller than the tissue segmentation threshold value as a second preset gray value, and carrying out tissue segmentation to obtain a tissue image.
S512, for any group of imaging parameters, carrying out parameter compression on each pixel point with the gray value larger than the first preset gray value in the tissue image according to the imaging parameters, and carrying out difference and square processing on the compressed value and the target tissue brightness value.
Wherein each imaging parameter includes a dynamic range and a gain.
S513, summing the results of the difference and square processing of the pixel points to obtain brightness errors of the tissue images corresponding to the imaging parameters.
S514, determining the imaging parameter applied when the brightness value error is minimum as the target imaging parameter in the imaging parameters.
The method can realize automatic identification of tissue areas in the noise image, accurately judge tissues according to different parts, realize the purpose of continuously approaching the gain to the expected gain to reach the ideal dynamic range and gain by continuously approaching the brightness of the tissue image to the target brightness value.
As shown in fig. 6, based on the same inventive concept, an embodiment of the present invention provides an ultrasound image processing apparatus including a smoothing processing module 61, a segmentation threshold determining module 62, a tissue segmentation module 63, and a parameter determining module 64.
The smoothing module 61 is configured to perform smoothing on gradients of each pixel point in the acquired ultrasound image in a preset direction, so as to obtain a target gradient image corresponding to the ultrasound image; wherein the ultrasound image is an image comprising organs or tissues of the human body;
the segmentation threshold determining module 62 is configured to determine a tissue segmentation threshold based on a gray value of each pixel point in the target gradient image, a preset gray threshold, and a tissue occupancy constant of tissue matching contained in the ultrasound image;
A tissue segmentation module 63, configured to apply a tissue segmentation threshold to perform tissue segmentation on the ultrasound image, so as to obtain a tissue image;
the parameter determining module 64 is configured to determine, according to each preset imaging parameter and the target tissue brightness value, a brightness error of a tissue image corresponding to each imaging parameter, and select a set of imaging parameters as target imaging parameters according to the brightness error; wherein each imaging parameter includes a dynamic range and a gain.
In some exemplary embodiments, the smoothing module 61 is specifically configured to:
aiming at each preset direction, adopting a neighborhood mean value smoothing mode to sequentially carry out smoothing treatment on gradients of all pixel points in the preset direction in the horizontal direction and the vertical direction to obtain a smoothed gradient image in the preset direction;
for each pixel point at each position in the pixel matrix of the ultrasonic image, updating the maximum gray value at the position in the smoothed gradient image in each preset direction to be the gray value of the pixel point;
and determining an image formed by each updated pixel point as a target gradient image.
In some exemplary embodiments, the segmentation threshold determination module 62 is specifically configured to:
Determining the product of the number of target pixel points and a tissue ratio constant matched with tissue contained in an ultrasonic image as a tissue ratio threshold; the target pixel points are pixel points with gray values larger than a preset gray threshold in the target gradient image;
selecting a first target gray value from a gray value range larger than a preset gray threshold as a tissue segmentation threshold; in the target gradient image, the number of the pixel points corresponding to other gray values larger than the first target gray value is larger than or equal to the tissue duty ratio threshold value, and the number of the pixel points corresponding to other gray values larger than the second target gray value is smaller than the tissue duty ratio threshold value, and the second target gray value is adjacent to the first target gray value and larger than the first target gray value.
In some exemplary embodiments, the parameter determination module 64 is specifically configured to:
for any group of imaging parameters, carrying out parameter compression on each pixel point with a gray value larger than a first preset gray value in the tissue image according to the imaging parameters, and carrying out difference and square processing on the compressed value and a target tissue brightness value;
and adding the results of the difference and square processing of each pixel point to obtain the brightness error of the tissue image corresponding to the imaging parameter.
In some exemplary embodiments, the tissue segmentation module 63 is specifically configured to:
the gray value of the pixel point which is larger than the tissue segmentation threshold value in each pixel point in the ultrasonic image is kept unchanged, and the gray value of the pixel point which is smaller than the tissue segmentation threshold value is set to be a second preset gray value.
In some exemplary embodiments, the apparatus further comprises an image acquisition module for acquiring an ultrasound image by:
detecting an image adjustment operation of a user;
acquiring envelope data output in the first thread through a second thread started by image adjustment operation; the first thread is a thread applied when outputting a preset ultrasonic image according to a preset mode;
parameter compression is carried out on the envelope data through default setting parameters in a second thread application preset mode;
and carrying out noise correction on the envelope data after compression processing through a second thread to obtain an ultrasonic image.
In some exemplary embodiments, the parameter determination module 64 is specifically configured to:
among the imaging parameters, the imaging parameter applied when the brightness error is minimum is determined as the target imaging parameter.
In some exemplary embodiments, the method further includes a gradient determining module, configured to determine a gradient of each pixel point in a preset direction by:
And carrying out convolution processing on each pixel point in the ultrasonic image according to a preset matrix matched with the preset direction to obtain the gradient of each pixel point in the preset direction.
Since the device is the device in the method according to the embodiment of the present invention, and the principle of the device for solving the problem is similar to that of the method, the implementation of the device may refer to the implementation of the method, and the repetition is omitted.
As shown in fig. 7, based on the same inventive concept, an embodiment of the present invention provides an ultrasonic instrument including: a processor 701 and a data acquisition unit 702.
The data acquisition unit 702 is configured to:
acquiring an ultrasonic image;
the processor 701 is configured to:
performing smoothing treatment on gradients of all pixel points in the obtained ultrasonic image in a preset direction to obtain a target gradient image corresponding to the ultrasonic image;
determining a tissue segmentation threshold value based on the gray value of each pixel point in the target gradient image, a preset gray threshold value and a tissue occupation constant matched with tissue contained in the ultrasonic image;
tissue segmentation is carried out on the ultrasonic image by applying a tissue segmentation threshold value to obtain a tissue image;
respectively determining brightness errors of tissue images corresponding to each group of imaging parameters according to each group of preset imaging parameters and target tissue brightness values, and selecting one group of imaging parameters as target imaging parameters according to the brightness errors; wherein each imaging parameter includes a dynamic range and a gain.
In an alternative embodiment, processor 701 is configured to:
aiming at each preset direction, adopting a neighborhood mean value smoothing mode to sequentially carry out smoothing treatment on gradients of all pixel points in the preset direction in the horizontal direction and the vertical direction to obtain a smoothed gradient image in the preset direction;
for each pixel point at each position in the pixel matrix of the ultrasonic image, updating the maximum gray value at the position in the smoothed gradient image in each preset direction to be the gray value of the pixel point;
and determining an image formed by each updated pixel point as a target gradient image.
In an alternative embodiment, processor 701 is configured to:
determining the product of the number of target pixel points and a tissue ratio constant matched with tissue contained in an ultrasonic image as a tissue ratio threshold; the target pixel points are pixel points with gray values larger than a preset gray threshold in the target gradient image;
selecting a first target gray value from a gray value range larger than a preset gray threshold as a tissue segmentation threshold; in the target gradient image, the number of the pixel points corresponding to other gray values larger than the first target gray value is larger than or equal to the tissue duty ratio threshold value, and the number of the pixel points corresponding to other gray values larger than the second target gray value is smaller than the tissue duty ratio threshold value, and the second target gray value is adjacent to the first target gray value and larger than the first target gray value.
In an alternative embodiment, processor 701 is configured to:
for any group of imaging parameters, carrying out parameter compression on each pixel point with a gray value larger than a first preset gray value in the tissue image according to the imaging parameters, and carrying out difference and square processing on the compressed value and a target tissue brightness value;
and adding the results of the difference and square processing of each pixel point to obtain the brightness error of the tissue image corresponding to the imaging parameter.
In an alternative embodiment, processor 701 is configured to:
the gray value of the pixel point which is larger than the tissue segmentation threshold value in each pixel point in the ultrasonic image is kept unchanged, and the gray value of the pixel point which is smaller than the tissue segmentation threshold value is set to be a second preset gray value.
In an alternative embodiment, the processor 701 is configured to acquire an ultrasound image by:
detecting an image adjustment operation of a user;
acquiring envelope data output in the first thread through a second thread started by image adjustment operation; the first thread is a thread applied when outputting a preset ultrasonic image according to a preset mode;
parameter compression is carried out on the envelope data through default setting parameters in a second thread application preset mode;
And carrying out noise correction on the envelope data after compression processing through a second thread to obtain an ultrasonic image.
In an alternative embodiment, processor 701 is configured to:
among the imaging parameters, the imaging parameter applied when the brightness error is minimum is determined as the target imaging parameter.
In an alternative embodiment, the processor 701 is configured to determine the gradient of each pixel point in the preset direction by:
and carrying out convolution processing on each pixel point in the ultrasonic image according to a preset matrix matched with the preset direction to obtain the gradient of each pixel point in the preset direction.
The embodiment of the application also provides a computer storage medium, wherein the computer storage medium stores computer program instructions, and when the instructions run on a computer, the computer is caused to execute the steps of the network allocation method of the electronic home equipment.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (9)

1. An ultrasonic instrument comprising a processor and a data acquisition unit:
the data acquisition unit is configured to:
acquiring an ultrasonic image; wherein the ultrasound image is an image comprising human organs or tissues;
the processor is configured to:
performing smoothing treatment on gradients of all pixel points in the obtained ultrasonic image in a preset direction to obtain a target gradient image corresponding to the ultrasonic image;
Determining a tissue segmentation threshold based on gray values of all pixel points in the target gradient image, a preset gray threshold and tissue occupation constants of tissue matching contained in the ultrasonic image;
performing tissue segmentation on the ultrasonic image by applying the tissue segmentation threshold to obtain a tissue image;
respectively determining brightness errors of the tissue images corresponding to each group of imaging parameters according to each group of preset imaging parameters and target tissue brightness values, and selecting one group of imaging parameters as target imaging parameters according to the brightness errors; wherein each imaging parameter comprises a dynamic range and a gain;
the processor is specifically configured to:
determining the product of the number of target pixel points and a tissue ratio constant matched with tissue contained in the ultrasonic image as a tissue ratio threshold; the target pixel points are pixel points with gray values larger than a preset gray threshold in the target gradient image;
selecting a first target gray value from a gray value range larger than the preset gray threshold as a tissue segmentation threshold; in the target gradient image, the number of pixels corresponding to other gray values larger than the first target gray value is larger than or equal to the tissue duty ratio threshold, and the number of pixels corresponding to other gray values larger than the second target gray value is smaller than the tissue duty ratio threshold, and the second target gray value is adjacent to the first target gray value and larger than the first target gray value.
2. The ultrasonic instrument of claim 1, wherein the processor is configured to:
aiming at each preset direction, adopting a neighborhood mean value smoothing mode to sequentially carry out smoothing treatment on the gradient of each pixel point in the preset direction in the horizontal direction and the vertical direction to obtain a smoothed gradient image in the preset direction;
updating the maximum gray value of each position in the smoothed gradient image in the preset direction to the gray value of the pixel point for the pixel point of each position in the pixel matrix of the ultrasonic image;
and determining the image formed by each updated pixel point as a target gradient image.
3. The ultrasonic instrument of claim 1, wherein the processor is configured to:
for any group of imaging parameters, carrying out parameter compression on each pixel point with a gray value larger than a first preset gray value in the tissue image according to the imaging parameters, and carrying out difference and square processing on the compressed value and a target tissue brightness value;
and adding the results of the difference and square processing of each pixel point to obtain the brightness error of the tissue image corresponding to the imaging parameter.
4. The ultrasonic instrument of claim 1, wherein the processor is configured to:
and keeping the gray level value of the pixel points larger than the tissue segmentation threshold value in each pixel point in the ultrasonic image unchanged, and setting the gray level value of the pixel points smaller than the tissue segmentation threshold value as a second preset gray level value.
5. The ultrasonic instrument of claim 1, wherein the processor is configured to acquire the ultrasound image by:
detecting an image adjustment operation of a user;
acquiring envelope data output in the first thread through a second thread started by the image adjusting operation; the first thread is a thread applied when outputting a preset ultrasonic image according to a preset mode;
parameter compression is carried out on the envelope data through the default setting parameters in the preset mode applied by the second thread;
and carrying out noise correction on the envelope data after compression processing through the second thread to obtain an ultrasonic image.
6. The ultrasonic instrument of claim 1, wherein the processor is configured to:
among the imaging parameters, the imaging parameter applied when the brightness error is minimum is determined as the target imaging parameter.
7. The ultrasonic instrument of any one of claims 1 to 6, wherein the processor is configured to determine the gradient of each pixel in the preset direction by:
and carrying out convolution processing on each pixel point in the ultrasonic image according to a preset matrix matched with a preset direction to obtain the gradient of each pixel point in the preset direction.
8. A method of processing an ultrasound image, comprising:
performing smoothing treatment on gradients of all pixel points in the obtained ultrasonic image in a preset direction to obtain a target gradient image corresponding to the ultrasonic image; wherein the ultrasound image is an image comprising human organs or tissues;
determining a tissue segmentation threshold based on gray values of all pixel points in the target gradient image, a preset gray threshold and tissue occupation constants of tissue matching contained in the ultrasonic image;
performing tissue segmentation on the ultrasonic image by applying the tissue segmentation threshold to obtain a tissue image;
respectively determining brightness errors of the tissue images corresponding to each group of imaging parameters according to each group of preset imaging parameters and target tissue brightness values, and selecting one group of imaging parameters as target imaging parameters according to the brightness errors; wherein each imaging parameter comprises a dynamic range and a gain;
The determining a tissue segmentation threshold based on the gray value of each pixel point in the target gradient image, a preset gray threshold and a tissue occupation constant of tissue matching contained in the ultrasonic image comprises the following steps:
determining the product of the number of target pixel points and a tissue ratio constant matched with tissue contained in the ultrasonic image as a tissue ratio threshold; the target pixel points are pixel points with gray values larger than a preset gray threshold in the target gradient image;
selecting a first target gray value from a gray value range larger than the preset gray threshold as a tissue segmentation threshold; in the target gradient image, the number of pixels corresponding to other gray values larger than the first target gray value is larger than or equal to the tissue duty ratio threshold, and the number of pixels corresponding to other gray values larger than the second target gray value is smaller than the tissue duty ratio threshold, and the second target gray value is adjacent to the first target gray value and larger than the first target gray value.
9. The method according to claim 8, wherein the smoothing the gradient of each pixel point in the obtained ultrasound image in the preset direction to obtain a target gradient image corresponding to the ultrasound image includes:
Aiming at each preset direction, adopting a neighborhood mean value smoothing mode to sequentially carry out smoothing treatment on the gradient of each pixel point in the preset direction in the horizontal direction and the vertical direction to obtain a smoothed gradient image in the preset direction;
updating the maximum gray value of each position in the smoothed gradient image in the preset direction to the gray value of the pixel point for the pixel point of each position in the pixel matrix of the ultrasonic image;
and determining the image formed by each updated pixel point as a target gradient image.
CN202111041389.0A 2021-09-07 2021-09-07 Ultrasonic image processing method and ultrasonic instrument Active CN113892967B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111041389.0A CN113892967B (en) 2021-09-07 2021-09-07 Ultrasonic image processing method and ultrasonic instrument

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111041389.0A CN113892967B (en) 2021-09-07 2021-09-07 Ultrasonic image processing method and ultrasonic instrument

Publications (2)

Publication Number Publication Date
CN113892967A CN113892967A (en) 2022-01-07
CN113892967B true CN113892967B (en) 2023-10-27

Family

ID=79188540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111041389.0A Active CN113892967B (en) 2021-09-07 2021-09-07 Ultrasonic image processing method and ultrasonic instrument

Country Status (1)

Country Link
CN (1) CN113892967B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114947951B (en) * 2022-08-01 2022-10-25 深圳华声医疗技术股份有限公司 Ultrasonic imaging control method and device, ultrasonic equipment and storage medium
CN115393230B (en) * 2022-10-28 2023-02-03 武汉楚精灵医疗科技有限公司 Ultrasonic endoscope image standardization method and device and related device thereof

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1919144A (en) * 2005-08-26 2007-02-28 深圳迈瑞生物医疗电子股份有限公司 Ultrasonic image enhancement and spot inhibition method
CN101849240A (en) * 2007-05-21 2010-09-29 康奈尔大学 Method for segmenting objects in images
CN103845077A (en) * 2012-12-05 2014-06-11 深圳迈瑞生物医疗电子股份有限公司 Gain optimization method for ultrasound images and ultrasound imaging gain automatic optimization device
CN104367331A (en) * 2013-08-15 2015-02-25 深圳市蓝韵实业有限公司 Full-digital automatic exposure method for digital mammary gland X-ray machine
CN104574361A (en) * 2014-11-27 2015-04-29 沈阳东软医疗系统有限公司 Image processing method and device for mammary peripheral tissue equalization
CN111415308A (en) * 2020-03-13 2020-07-14 青岛海信医疗设备股份有限公司 Ultrasonic image processing method and communication terminal
CN113040878A (en) * 2021-03-25 2021-06-29 青岛海信医疗设备股份有限公司 Position information processing method of ultrasonic puncture needle, ultrasonic device and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030048931A1 (en) * 2001-03-23 2003-03-13 Peter Johnson Quantification and differentiation of tissue based upon quantitative image analysis
JP5632680B2 (en) * 2010-08-25 2014-11-26 日立アロカメディカル株式会社 Ultrasonic image processing device
WO2013183432A1 (en) * 2012-06-07 2013-12-12 日立アロカメディカル株式会社 Method for setting regions of interest and ultrasonic diagnostic device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1919144A (en) * 2005-08-26 2007-02-28 深圳迈瑞生物医疗电子股份有限公司 Ultrasonic image enhancement and spot inhibition method
CN101849240A (en) * 2007-05-21 2010-09-29 康奈尔大学 Method for segmenting objects in images
CN103845077A (en) * 2012-12-05 2014-06-11 深圳迈瑞生物医疗电子股份有限公司 Gain optimization method for ultrasound images and ultrasound imaging gain automatic optimization device
CN104367331A (en) * 2013-08-15 2015-02-25 深圳市蓝韵实业有限公司 Full-digital automatic exposure method for digital mammary gland X-ray machine
CN104574361A (en) * 2014-11-27 2015-04-29 沈阳东软医疗系统有限公司 Image processing method and device for mammary peripheral tissue equalization
CN111415308A (en) * 2020-03-13 2020-07-14 青岛海信医疗设备股份有限公司 Ultrasonic image processing method and communication terminal
CN113040878A (en) * 2021-03-25 2021-06-29 青岛海信医疗设备股份有限公司 Position information processing method of ultrasonic puncture needle, ultrasonic device and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SWI、DWI联合评价颈动脉斑块易损性的应用研究;周东晓等;《中国医学计算机成像杂志》;第23卷(第6期);第508-512页 *
基于人工神经网络的肝部CT图像识别方法;肖海慧等;《信息技术与信息化》(第11期);第28-31页 *
基于超声弹性成像的女性盆底肌肉定量评估方法;朱超超等;《中国生物医学工程学报》;第36卷(第4期);第401-409页 *

Also Published As

Publication number Publication date
CN113892967A (en) 2022-01-07

Similar Documents

Publication Publication Date Title
CN110505459B (en) Image color correction method, device and storage medium suitable for endoscope
CN113892967B (en) Ultrasonic image processing method and ultrasonic instrument
US10813595B2 (en) Fully automated image optimization based on automated organ recognition
JP6416582B2 (en) Method and apparatus for metal artifact removal in medical images
EP2267655A2 (en) Image processing method and image processing apparatus
JP5570373B2 (en) Endoscope system
US10217201B2 (en) Image processing method, image processing system, and imaging system
JPH11155834A (en) Medial imaging system and method for forming medical image
JP4938427B2 (en) Cerebral hemorrhage volume calculator
JP2014094036A (en) Image processor, control method thereof, and program
CN112508941A (en) Three-dimensional ultrasonic scanning integrity detection method and device
US20110305382A1 (en) Image processing method and radiographic apparatus using the same
CN109431584A (en) The method and system of ultrasonic imaging
JP7034120B2 (en) Automatic correction method of image data set acquired using X-ray equipment, computer program, data memory and X-ray equipment
CN109330594B (en) Method for obtaining parameters of saturation band, spectral imaging method, system and medium
EP2092484A1 (en) Noise reduction of an image signal
US11253219B2 (en) Image contrast enhancement of an x-ray image
Ee et al. Estimation of window width setting for CT scan brain images using mean of greyscale level to standard deviation ratio
JP6358244B2 (en) MEDICAL IMAGE PROCESSING DEVICE, MEDICAL IMAGE PROCESSING DEVICE CONTROL METHOD, AND PROGRAM
JP2009054013A (en) Image processor
JP5937286B1 (en) Image processing apparatus, image processing method, and image processing program
US20060062485A1 (en) Method and system for filtering in medical imaging
CN116883270B (en) Soft mirror clear imaging system for lithotripsy operation
JP2006000449A (en) Device and method for processing ultrasonic image
JP2017064248A (en) Ultrasonic diagnostic equipment

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