Ultrasonic image transformation method and device, computer equipment and storage medium
Simplifying the ultrasound image transformation process by merging transformation matrices solves the problems of low ultrasound image transformation efficiency and poor robustness in the existing technology, and achieves efficient and accurate image transformation and restoration operations.
Patent Information
- Application Number
- CN202410852491.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-10-25
AI Technical Summary
Existing ultrasound image transformation methods have high processing difficulty, low efficiency and poor robustness, and cannot effectively simplify the image processing process after multiple transformation operations by users.
By obtaining the pixel coordinates and transformation operation instructions in the ultrasound image, merging the matrices of each transformation operation to obtain the target transformation matrix, the ultrasound image is directly transformed, avoiding multiple calls to the image transformation algorithm for calculation and confirmation, simplifying the transformation process and Improve robustness.
It improves the efficiency and accuracy of ultrasound image transformation, reduces the processing difficulty and algorithm complexity, enhances the robustness of the image transformation algorithm, and supports efficient processing of multiple transformation and restoration operations.
Smart Images

Figure CN118840255A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of ultrasonic image processing, and in particular to an ultrasonic image transformation method, device, computer equipment and storage medium. Background Art
[0002] As the core component of ultrasound imaging, the digital scan converter can improve the image quality of ultrasound images after ultrasound imaging. Generally speaking, after the ultrasound image is digitally scanned and converted, the user can also perform transformation operations such as rotation, left-right flipping, up-down flipping, zooming in and translating on the ultrasound image.
[0003] Conventional transformation methods for ultrasound images mainly use image transformation algorithms to execute each transformation operation of the user and finally obtain the transformed ultrasound image. However, since the user's transformation operation process is large and the order is not fixed, in order to correctly obtain the ultrasound image after a series of transformation operations, the conventional transformation method needs to consider many scenarios, which is difficult to process, inefficient and prone to errors. In addition, the image transformation algorithm is complex and has poor robustness.
[0004] Therefore, how to improve the efficiency of ultrasound image transformation and at the same time improve the robustness of the image transformation algorithm has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] In view of this, the present application provides an ultrasonic image transformation method, apparatus, computer device and storage medium to solve the problem of how to improve the efficiency of ultrasonic image transformation and at the same time improve the robustness of the image transformation algorithm.
[0006] In a first aspect, the present application provides a method for transforming an ultrasound image, the method comprising:
[0007] Obtaining the coordinates of all pixel points in the ultrasound image to be transformed;
[0008] receiving an instruction to perform a transformation operation on the ultrasound image to be transformed;
[0009] In response to the instruction, determining a number of transformation operations;
[0010] If a transformation operation is received, a transformation matrix corresponding to the transformation operation is determined as a target transformation matrix of the ultrasound image to be transformed;
[0011] If multiple transformation operations are received, the transformation matrices corresponding to each transformation operation are merged according to the order of the transformation operations to obtain the target transformation matrix;
[0012] The ultrasonic image to be transformed is transformed according to the acquired coordinates and the target transformation matrix to obtain a transformed ultrasonic image.
[0013] Specifically, when it is necessary to perform multiple transformation operations on the ultrasonic image to be transformed, the transformation matrices corresponding to each transformation operation are directly merged in the order of the transformation operations to obtain the target transformation matrix. And the ultrasonic image to be transformed is generally transformed according to the target transformation matrix. Compared with the conventional transformation method of executing each transformation operation of the user, it is no longer necessary to call the image transformation algorithm for transformation for each transformation operation, nor is it necessary to perform the next transformation based on the previous transformation. It can greatly simplify the consideration of the complex intermediate process in the implementation of ultrasonic image transformation, improve the processing efficiency of ultrasonic image transformation, simplify the ultrasonic image transformation process, greatly reduce the processing difficulty of ultrasonic image transformation, and improve the accuracy of ultrasonic image transformation. Moreover, the transformation of the ultrasonic image can be realized by simple matrix merging, and it is no longer necessary to call the image transformation algorithm multiple times to calculate and confirm the results of each transformation operation. Simplifying the transformation process of the image transformation algorithm greatly reduces the complexity of the image transformation algorithm and thus improves the robustness of the image transformation algorithm.
[0014] In some optional embodiments, the method further comprises:
[0015] When the transformation operation is an upside-down transformation, the transformation matrix corresponding to the transformation operation is as follows: Wherein dUdFilpM represents the up-down flip transformation matrix, and s32LUd is the distance of the preset first flip axis relative to the x-axis in the Cartesian coordinate system where the ultrasound image to be transformed is located.
[0016] In some optional embodiments, the method further comprises:
[0017] When the transformation operation is a left-right flip transformation, the transformation matrix corresponding to the transformation operation is as follows: Wherein, dLrFilpM represents the up-down flip transformation matrix, and s32LLr is the distance of the preset second flip axis relative to the y-axis in the Cartesian coordinate system where the ultrasound image to be transformed is located.
[0018] In some optional embodiments, the method further comprises:
[0019] When the transformation operation is a rotation transformation, the transformation matrix corresponding to the transformation operation is as follows:
[0020]
[0021] , where fRotateM represents the rotation transformation matrix, fRAngle represents the rotation angle, s32CSy and s32CSx respectively represent the ordinate value and abscissa value of any point in the Cartesian coordinate system where the ultrasound image to be transformed is located.
[0022] In some optional embodiments, before determining the number of transformation operations in response to the instruction, the method further includes:
[0023] In response to the instruction, a transformation matrix corresponding to the transformation operation is obtained.
[0024] Specifically, the transformation matrix corresponding to the transformation operation is first obtained to facilitate the subsequent determination of the target transformation matrix based on the transformation matrix to transform the ultrasound image to be transformed. The ultrasound image can be transformed through the matrix without using a conventional image transformation algorithm to match and map pixel points multiple times to simplify the transformation process, improve the efficiency and accuracy of ultrasound image transformation, and reduce the complexity of the image transformation algorithm, thereby improving the robustness of the image transformation algorithm.
[0025] In some optional embodiments, if multiple transformation operations are received, the transformation matrices corresponding to each transformation operation are merged according to the order of the transformation operations to obtain a target transformation matrix, including:
[0026] According to the order of transformation operations, the transformation matrices corresponding to each transformation operation are multiplied to obtain the target transformation matrix.
[0027] Specifically, the target transformation matrix can be obtained by multiplying the transformation matrices corresponding to each transformation operation in the order of the transformation operations, so as to facilitate the subsequent transformation of the ultrasound image according to the target transformation matrix. There is no need to use a conventional image transformation algorithm to perform complex interpolation or coordinate detection operations for each transformation operation, which simplifies the processing flow of the image transformation algorithm, reduces the complexity of the image transformation algorithm, thereby improving the robustness of the image transformation algorithm, and improving the efficiency and accuracy of ultrasound image transformation.
[0028] In some optional embodiments, after transforming the ultrasound image to be transformed according to the acquired coordinates and the target transformation matrix to obtain the transformed ultrasound image, the method further includes:
[0029] receiving a restoration request for the transformed ultrasound image and determining an inverse matrix of a target transformation matrix;
[0030] The transformed ultrasonic image is restored to the ultrasonic image to be transformed according to the inverse matrix.
[0031] Specifically, after the ultrasonic image is transformed, the transformation operation of the ultrasonic image can be restored by the inverse matrix of the target transformation matrix to obtain the ultrasonic image before the transformation. The transformation and restoration of the ultrasonic image can be achieved only by the matrix, avoiding the use of conventional image transformation algorithms to perform target detection and matching calculations to map each pixel point to the original image when restoring the transformed ultrasonic image, thereby greatly simplifying the process of ultrasonic image transformation and restoration and improving the efficiency of ultrasonic image transformation and restoration.
[0032] In a second aspect, the present application provides an ultrasonic image transformation device, the device comprising:
[0033] An acquisition module, used to acquire the coordinates of all pixel points in the ultrasound image to be transformed;
[0034] A receiving module, used for receiving an instruction to perform a transformation operation on the ultrasound image to be transformed;
[0035] A first determination module, configured to determine the number of transformation operations in response to an instruction;
[0036] A second determination module is configured to determine, if a transformation operation is received, a transformation matrix corresponding to the transformation operation as a target transformation matrix of the ultrasound image to be transformed;
[0037] A third determination module is used to merge the transformation matrices corresponding to each transformation operation according to the order of the transformation operations if multiple transformation operations are received to obtain a target transformation matrix;
[0038] The transformation module is used to transform the ultrasound image to be transformed according to the acquired coordinates and the target transformation matrix to obtain a transformed ultrasound image.
[0039] In a third aspect, the present application provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the ultrasound image transformation method of any of the above-mentioned embodiments by executing the computer instructions.
[0040] In a fourth aspect, the present application provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the ultrasound image transformation method of any of the above-mentioned embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 is a schematic diagram of an application scenario of the ultrasound image transformation method according to an embodiment of the present application;
[0043] Figure 2 is a flow chart of a method for transforming an ultrasonic image according to an embodiment of the present application;
[0044] Figure 3is a flowchart of another ultrasound image transformation method according to an embodiment of the present application;
[0045] Figure 4 is a flowchart of another ultrasound image transformation method according to an embodiment of the present application;
[0046] Figure 5 is a structural block diagram of an ultrasonic image conversion device according to an embodiment of the present application;
[0047] Figure 6 It is a schematic diagram of the hardware structure of the computer device of an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.
[0049] Figure 1 It is a schematic diagram of an application scenario of the ultrasound image transformation method of an embodiment of the present application. The application scenario includes an ultrasound imaging device 110. The ultrasound imaging device 110 may include a device host 111 and an ultrasound probe 112.
[0050] The device host 111 can process the signal received by the ultrasonic probe 112 to obtain an ultrasonic image and display the ultrasonic image. The ultrasonic probe 112 can transmit and receive ultrasound, perform electroacoustic signal conversion, convert the electrical signal sent by the device host 111 into a high-frequency oscillating ultrasonic signal, and convert the ultrasonic signal reflected from the target object into an electrical signal.
[0051] When the user displays an ultrasonic image on the device host 111, the user can perform transformation operations such as translation and rotation on the ultrasonic image on the display interface. The device host 111 will receive the instruction to perform the transformation operation on the ultrasonic image, place the ultrasonic image in the Cartesian coordinate system to obtain the coordinates of each pixel in the ultrasonic image, and create a transformation matrix corresponding to the transformation operation. Each pixel in the ultrasonic image is transformed according to the transformation matrix to obtain the transformed ultrasonic image. When the user performs multiple transformation operations on the ultrasonic image on the display interface, the device host 111 will merge the transformation matrices corresponding to each transformation operation in the order of the transformation operations when receiving the transformation operation, and finally transform the ultrasonic image according to the merged transformation operation.
[0052] Optionally, the device host 111 may further include a data storage module, which is used to store multiple ultrasound images. When a display request for a target ultrasound image is received, the target ultrasound image may be searched from the multiple ultrasound images stored in the data storage module and displayed, and then when a user's transformation operation on the target ultrasound image is received, the target ultrasound image is transformed.
[0053] Optionally, the device host 111 can also display multiple ultrasound images at one time and provide a service for batch transformation of multiple ultrasound images. The user can input instructions for transformation operations on multiple ultrasound images on the display interface of the device host 111, and the device host 111 can transform each ultrasound image in parallel and display the transformed ultrasound images.
[0054] Optionally, the device host 111 may also receive a user's request for restoring the transformed ultrasonic image, restore the transformed ultrasonic image to the ultrasonic image before the transformation and display it. The specific method will be introduced in subsequent embodiments.
[0055] According to an embodiment of the present application, an embodiment of a method for transforming an ultrasound image is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0056] In this embodiment, a method for transforming an ultrasound image is provided, which can be used in a computer device, for example Figure 1 The device host 111 of the embodiment shown, Figure 2 is a flow chart of a method for transforming an ultrasound image according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0057] Step 201: Obtain the coordinates of all pixels in the ultrasound image to be transformed.
[0058] The ultrasound image to be transformed is a two-dimensional ultrasound image. The computer device will construct a Cartesian coordinate system (a general term for a rectangular coordinate system and an oblique coordinate system) based on the ultrasound image to be transformed, and calculate the coordinates of each pixel point in the ultrasound image to be transformed in the Cartesian coordinate system. For example, the upper left corner of the ultrasound image to be transformed can be used as the origin of the coordinates, the x-axis to the right is the positive direction, and the y-axis downward is the positive direction.
[0059] Step 202: receiving an instruction for performing a transformation operation on the ultrasound image to be transformed.
[0060] The instruction may include at least one transformation operation on the ultrasound image to be transformed, and each transformation operation may be any one of translation transformation, rotation transformation, scaling transformation, upside-down transformation, and left-right flip transformation. The user inputs the instruction for performing the transformation operation on the ultrasound image to be transformed to the computer device, or selects the transformation operation on the ultrasound image to be transformed on the display interface of the computer device displaying the ultrasound image to be transformed, and the computer device receives the instruction for performing the transformation operation on the ultrasound image to be transformed.
[0061] Step 203, in response to the instruction, determining the number of transformation operations.
[0062] The computer device determines the number of transformation operations included in the received instruction as the number of transformation operations.
[0063] Step 204: If a transformation operation is received, a transformation matrix corresponding to the transformation operation is determined as a target transformation matrix of the ultrasound image to be transformed.
[0064] If the computer device determines that the number of transformation operations is one, it determines that one transformation operation is received, and determines the transformation matrix corresponding to the transformation operation obtained in advance as the target transformation matrix.
[0065] Step 205: If multiple transformation operations are received, then according to the order of the transformation operations, the transformation matrices corresponding to each transformation operation are merged to obtain a target transformation matrix.
[0066] The instruction will specify the order of multiple transformation operations in the current instruction. The computer device reads the order of multiple transformation operations from the instruction, and merges the transformation matrices corresponding to each transformation operation according to the order of the transformation operations to obtain a target transformation matrix.
[0067] Step 206 : transform the ultrasound image to be transformed according to the acquired coordinates and the target transformation matrix to obtain a transformed ultrasound image.
[0068] In the Cartesian coordinate system where the ultrasonic image to be transformed is located, the computer device will multiply the target transformation matrix with the coordinate value of each pixel point in the ultrasonic image to be transformed, so that the new position of each pixel point in the ultrasonic image to be transformed in the Cartesian coordinate system after the transformation operation in the instruction can be obtained, thus obtaining the transformed ultrasonic image.
[0069] In the embodiment of the present application, when it is necessary to perform multiple transformation operations on the ultrasonic image to be transformed, the transformation matrices corresponding to each transformation operation are directly merged in the order of the transformation operations to obtain the target transformation matrix. And the ultrasonic image to be transformed is generally transformed according to the target transformation matrix. Compared with the conventional transformation method of executing each transformation operation of the user, it is no longer necessary to call the image transformation algorithm for transformation for each transformation operation, nor is it necessary to perform the next transformation based on the previous transformation. It can greatly simplify the consideration of the intermediate complex process in the implementation of ultrasonic image transformation, improve the processing efficiency of ultrasonic image transformation, simplify the ultrasonic image transformation process, greatly reduce the processing difficulty of ultrasonic image transformation, and improve the accuracy of ultrasonic image transformation. Moreover, the transformation of the ultrasonic image can be achieved through simple matrix merging, and it is no longer necessary to call the image transformation algorithm multiple times to calculate and confirm the results of each transformation operation. Simplifying the transformation process of the image transformation algorithm greatly reduces the complexity of the image transformation algorithm and thus improves the robustness of the image transformation algorithm.
[0070] Figure 3 FIG. 1 is a flow chart of another ultrasound image transformation method according to an embodiment of the present application. The method can be used in a computer device, for example, Figure 1 The device host 111 of the embodiment shown, such as Figure 3 As shown, the process includes the following steps:
[0071] Step 301: Obtain the coordinates of all pixels in the ultrasound image to be transformed.
[0072] Step 302: receiving an instruction for performing a transformation operation on the ultrasound image to be transformed.
[0073] Steps 301 to 302 are described in detail. Figure 2 Step 201 and step 202 in the illustrated embodiment are not described in detail here.
[0074] Optionally, the ultrasonic image to be transformed may be one or more. When there are multiple ultrasonic images to be transformed, steps 301 to 307 may be performed in parallel for each ultrasonic image to be transformed, and each ultrasonic image to be transformed may be transformed in parallel. In this way, when there are multiple ultrasonic images to be transformed, the multiple ultrasonic images may be transformed at one time to speed up the transformation of the ultrasonic images.
[0075] Step 303: In response to the instruction, obtain the transformation matrix corresponding to the transformation operation.
[0076] For each transformation operation in the instruction, the computer device can convert the operation formula corresponding to the transformation operation into a homogeneous matrix representation, and determine the matrix used to indicate the transformation operation in the homogeneous matrix representation as the transformation matrix corresponding to the transformation operation. Specifically, the translation operation formula corresponding to the translation transformation operation is shown in Formula 1:
[0077]
[0078] Where x and y represent the horizontal and vertical coordinate values of any pixel point i in the ultrasound image to be transformed, respectively; x1 and y1 represent the horizontal and vertical coordinate values of the pixel point i after the transformation operation, respectively; s32Tx and s32Ty represent the translation distances of the x-axis and y-axis in the Cartesian coordinate system of the ultrasound image to be transformed, respectively. Converting formula 1 into a homogeneous matrix, we get the matrix representation shown in formula 2 below:
[0079]
[0080] Then, the translation transformation matrix fTransM corresponding to the translation transformation operation can be expressed as:
[0081] For the rotation transformation operation, the rotation operation formula corresponding to the rotation of any pixel point i (x, y) in the ultrasound image to be transformed around an arbitrary point C (s32CSx, s32CSy) in the 2D space by an angle fRAngle is shown in Formula 3:
[0082]
[0083] Wherein, s32CSx and s32CSy represent the horizontal coordinate value and the vertical coordinate value of any point in the Cartesian coordinate system of the ultrasound image to be transformed, respectively, and fRAngle represents the rotation angle. Converting Formula 3 into a homogeneous matrix, the matrix representation shown in Formula 4 is obtained:
[0084]
[0085] Then, the rotation transformation matrix fRotateM corresponding to the rotation transformation operation can be expressed as:
[0086] For the scaling transformation operation, the scaling operation formula corresponding to scaling any pixel point i (x, y) in the ultrasound image to be transformed around any point C (s32CSx, s32CSy) in the 2D space (scaling factor is fScaleCoef) is shown in Formula 5:
[0087]
[0088] Converting formula 5 into a homogeneous matrix, we get the matrix representation shown in formula 6 below:
[0089]
[0090] Then, the scaling transformation matrix dScaleM corresponding to the scaling transformation operation can be expressed as:
[0091] For the upside-down transformation operation, the upside-down transformation formula corresponding to any pixel point i (x, y) in the ultrasound image to be transformed is upside down around any flip axis L1 (that is, the preset first flip axis) in the 2D space is as shown in Formula 7:
[0092]
[0093] Wherein, s32LUd represents the distance of the first flip axis relative to the x-axis in the Cartesian coordinate system where the ultrasound image to be transformed is located. Formula 7 is converted into a homogeneous matrix to obtain the matrix representation shown in the following formula 8:
[0094]
[0095] Then, the upside-down flip transformation matrix DUdFilpM corresponding to the upside-down flip transformation operation can be expressed as:
[0096] For the left-right flip transformation operation, the corresponding left-right flip operation formula when any pixel point i (x, y) in the ultrasound image to be transformed is flipped left-right around any flip axis L2 (that is, the preset second flip axis) in the 2D space is as shown in Formula 9:
[0097]
[0098] Wherein, s32LLr represents the distance of the second flip axis relative to the y-axis in the Cartesian coordinate system where the ultrasound image to be transformed is located. Formula 9 is converted into a homogeneous matrix to obtain the matrix representation shown in the following formula 10:
[0099]
[0100] Then, the left-right flip transformation matrix dLrFilpM corresponding to the left-right flip transformation operation can be expressed as: Through the above operations, the computer device can obtain the transformation matrix corresponding to each transformation operation in the instruction.
[0101] Step 304, in response to the instruction, determining the number of transformation operations.
[0102] Steps 304 to 307 are described in detail in Figure 2Steps 203 to 206 of the illustrated embodiment are not described in detail here.
[0103] Step 305: If a transformation operation is received, a transformation matrix corresponding to the transformation operation is determined as a target transformation matrix of the ultrasound image to be transformed.
[0104] Step 306: If multiple transformation operations are received, then according to the order of the transformation operations, the transformation matrices corresponding to each transformation operation are merged to obtain a target transformation matrix.
[0105] Further, step 306 may include multiplying the transformation matrices corresponding to each transformation operation according to the order of the transformation operations to obtain the target transformation matrix. The computer device will multiply the transformation matrices corresponding to each transformation operation according to the order of reading the multiple transformation operations from the instruction, and finally determine the multiplied matrix as the target transformation matrix. For example, when the instruction contains five transformation operations, and the order of the five transformation operations is translation transformation, rotation transformation, scaling transformation, left-right flip transformation, and up-down flip transformation, the computer device will multiply the five transformation matrices in order, and determine the multiplication result fTransM×fRotateM×fScaleM×dLrFilpM×dUdFilpM as the target transformation matrix fTotalM.
[0106] Step 307 : transform the ultrasound image to be transformed according to the acquired coordinates and the target transformation matrix to obtain a transformed ultrasound image.
[0107] In the embodiment of the present application, different transformation matrices are constructed, and when multiple transformation operations are received, the already created transformation matrices are merged into a target transformation matrix that records multiple transformation operations in the order of the transformation operations to transform the ultrasound image to be transformed. There is no need to use an image transformation algorithm to calculate the rotation and translation components of the ultrasound image in this transformation based on the results of the previous transformation as in conventional image transformation methods to determine the result of this transformation to determine the final transformed ultrasound image, which greatly reduces the amount of calculation and complexity of the image transformation algorithm and improves the robustness of the image transformation algorithm. It also greatly simplifies the consideration of the intermediate complex process in the implementation of ultrasound image transformation, improves the processing efficiency of ultrasound image transformation, and improves the accuracy of ultrasound image transformation.
[0108] Figure 4 FIG. 1 is a flow chart of another ultrasound image transformation method according to an embodiment of the present application. The method can be used in a computer device, for example Figure 1 The device host 111 of the embodiment shown, such as Figure 4 As shown, the process includes the following steps:
[0109] Step 401: Obtain the coordinates of all pixels in the ultrasound image to be transformed.
[0110] Step 402: receiving an instruction for performing a transformation operation on the ultrasound image to be transformed.
[0111] Step 403, in response to the instruction, determining the number of transformation operations.
[0112] Step 404: If a transformation operation is received, a transformation matrix corresponding to the transformation operation is determined as a target transformation matrix of the ultrasound image to be transformed.
[0113] Step 405: If multiple transformation operations are received, then according to the order of the transformation operations, the transformation matrices corresponding to each transformation operation are merged to obtain a target transformation matrix.
[0114] Step 406: transform the ultrasound image to be transformed according to the acquired coordinates and the target transformation matrix to obtain a transformed ultrasound image.
[0115] Steps 401 to 406 are described in detail in Figure 3 Steps 301 to 302 and steps 304 to 307 of the illustrated embodiment are not described in detail here.
[0116] Step 407: receiving a restoration request for the transformed ultrasound image, and determining an inverse matrix of the target transformation matrix.
[0117] After transforming the ultrasound image to be transformed according to the target transformation matrix, the computer device will associate and store the transformed ultrasound image with the target transformation matrix (for example, recording different transformed ultrasound images and the target transformation matrix corresponding to the transformed ultrasound images in the form of a list). The user will input a restoration request for the transformed ultrasound image in the computer device, or select a restoration component on the display interface of the computer device displaying the transformed ultrasound image. At this time, the computer device receives the restoration request for the transformed ultrasound image, and the computer device will read the target transformation matrix corresponding to the transformed ultrasound image from the storage space, and calculate the inverse matrix of the target transformation matrix using a commonly used inverse matrix solving algorithm such as the Gauss-Jordan elimination method or the SVD (Singular Value Decomposition) algorithm.
[0118] Step 408 restores the transformed ultrasonic image to the ultrasonic image to be transformed according to the inverse matrix.
[0119] In the Cartesian coordinate system where the transformed ultrasound image is located, the computer device will multiply the calculated inverse matrix with the coordinate value of each pixel point in the transformed ultrasound image, so as to obtain the position of each pixel point in the transformed ultrasound image before the transformation in the Cartesian coordinate system, thereby restoring the transformed ultrasound image to the ultrasound image to be transformed before the transformation.
[0120] It can be understood that the Cartesian coordinate system where the transformed ultrasonic image is located is the same coordinate system as the Cartesian coordinate system where the ultrasonic image to be transformed is located.
[0121] Optionally, a restoration request for multiple transformed ultrasound images may be received, and steps 407 to 408 may be performed in parallel for each transformed ultrasound image, so that each transformed ultrasound image is restored to the ultrasound image to be transformed before the transformation in parallel.
[0122] In the embodiment of the present application, after the ultrasonic image is transformed, the transformation operation of the ultrasonic image can be restored by the inverse matrix of the target transformation matrix to obtain the ultrasonic image before the transformation. The transformation and restoration of the ultrasonic image can be realized only by the matrix, avoiding the use of conventional image transformation algorithms to perform target detection and matching calculations when restoring the transformed ultrasonic image to map each pixel point to the original image, greatly simplifying the process of ultrasonic image transformation and restoration, and improving the efficiency of ultrasonic image transformation and restoration. Moreover, when multiple ultrasonic images need to be transformed and restored, each ultrasonic image can also be transformed and restored in parallel, overcoming the defect that conventional image transformation algorithms cannot be processed in parallel due to complex logic.
[0123] In this embodiment, a device for transforming an ultrasonic image is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0124] This embodiment provides an ultrasonic image conversion device, such as Figure 5 As shown, including:
[0125] An acquisition module 510 is used to acquire the coordinates of all pixels in the ultrasound image to be transformed;
[0126] A receiving module 520, configured to receive an instruction for performing a transformation operation on the ultrasound image to be transformed;
[0127] A first determination module 530, for determining the number of transformation operations in response to the instruction;
[0128] A second determination module 540 is configured to determine, if a transformation operation is received, a transformation matrix corresponding to the transformation operation as a target transformation matrix of the ultrasound image to be transformed;
[0129] A third determination module 550 is configured to, if multiple transformation operations are received, merge the transformation matrices corresponding to each transformation operation according to the order of the transformation operations to obtain a target transformation matrix;
[0130] The transformation module 560 is used to transform the ultrasound image to be transformed according to the acquired coordinates and the target transformation matrix to obtain a transformed ultrasound image.
[0131] In some optional embodiments, the ultrasound image transformation device further includes:
[0132] The acquisition module is further used to obtain the transformation matrix corresponding to the transformation operation in response to the instruction.
[0133] In some optional embodiments, the third determining module includes:
[0134] The multiplication unit is used to multiply the transformation matrices corresponding to each transformation operation according to the order of the transformation operations to obtain a target transformation matrix.
[0135] In some optional embodiments, the ultrasound image transformation device further includes:
[0136] A fourth determination module is used to receive a restoration request for the transformed ultrasound image and determine an inverse matrix of a target transformation matrix;
[0137] The restoration module is used to restore the transformed ultrasonic image to the ultrasonic image to be transformed according to the inverse matrix.
[0138] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0139] The ultrasound image conversion device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0140] The present application also provides a computer device having the above Figure 5 The ultrasound image transformation device is shown.
[0141] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present application, such as Figure 6As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0142] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0143] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0144] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0145] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0146] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0147] The embodiment of the present application also provides a computer-readable storage medium. The above method according to the embodiment of the present application can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0148] Although the embodiments of the present application are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for transforming an ultrasonic image, characterized in that: The method comprises: Obtaining the coordinates of all pixel points in the ultrasound image to be transformed; receiving an instruction to perform a transformation operation on the ultrasound image to be transformed; In response to the instruction, determining a number of the transformation operations; If a transformation operation is received, determining a transformation matrix corresponding to the transformation operation as a target transformation matrix of the ultrasound image to be transformed; If multiple transformation operations are received, merging the transformation matrices corresponding to each transformation operation according to the order of the transformation operations to obtain the target transformation matrix; The ultrasonic image to be transformed is transformed according to the acquired coordinates and the target transformation matrix to obtain a transformed ultrasonic image.
2. The method according to claim 1, characterized in that The method further comprises: When the transformation operation is an upside-down transformation, the transformation matrix corresponding to the transformation operation is as follows: Wherein dUdFilpM represents the up-down flip transformation matrix, and s32LUd is the distance of the preset first flip axis relative to the x-axis in the Cartesian coordinate system where the ultrasound image to be transformed is located.
3. The method according to claim 1, characterized in that The method further comprises: When the transformation operation is a left-right flip transformation, the transformation matrix corresponding to the transformation operation is as follows: Wherein, dLrFilpM represents the up-and-down flip transformation matrix, and s32LLr is the distance of the preset second flip axis relative to the y-axis in the Cartesian coordinate system where the ultrasound image to be transformed is located.
4. The method according to claim 1, characterized in that: The method further comprises: When the transformation operation is a rotation transformation, the transformation matrix corresponding to the transformation operation is as follows: Wherein fRotateM represents the rotation transformation matrix, fRAngle represents the rotation angle, s32CSy and s32CSx respectively represent the ordinate value and the abscissa value of any point in the Cartesian coordinate system where the ultrasonic image to be transformed is located.
5. The method according to any one of claims 1 to 4, characterized in that: Before determining the number of transformation operations in response to the instruction, the method further includes: In response to the instruction, a transformation matrix corresponding to the transformation operation is obtained.
6. The method according to any one of claims 1 to 4, characterized in that: If multiple transformation operations are received, the transformation matrices corresponding to each transformation operation are merged according to the order of the transformation operations to obtain the target transformation matrix, including: According to the order of transformation operations, the transformation matrices corresponding to each transformation operation are multiplied to obtain the target transformation matrix.
7. The method according to any one of claims 1 to 4, characterized in that: After transforming the ultrasonic image to be transformed according to the acquired coordinates and the target transformation matrix to obtain a transformed ultrasonic image, the method further includes: receiving a restoration request for the transformed ultrasound image, and determining an inverse matrix of the target transformation matrix; The transformed ultrasonic image is restored to the ultrasonic image to be transformed according to the inverse matrix.
8. An ultrasonic image conversion device, characterized in that: The device comprises: An acquisition module, used to acquire the coordinates of all pixel points in the ultrasound image to be transformed; A receiving module, used for receiving an instruction for performing a transformation operation on the ultrasonic image to be transformed; A first determining module, configured to determine the number of the transformation operation in response to the instruction; A second determination module is configured to, if a transformation operation is received, determine a transformation matrix corresponding to the transformation operation as a target transformation matrix of the ultrasound image to be transformed; A third determination module is configured to, if multiple transformation operations are received, merge the transformation matrices corresponding to each transformation operation according to the order of the transformation operations to obtain the target transformation matrix; The transformation module is used to transform the ultrasonic image to be transformed according to the acquired coordinates and the target transformation matrix to obtain a transformed ultrasonic image.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the ultrasound image transformation method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the ultrasound image transformation method according to any one of claims 1 to 7.
