Medical magnetic resonance image signal-to-noise ratio testing method
Patent Information
- Application Number
- CN202510245018.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-07-25
AI Technical Summary
[0005]本发明所解决的技术问题为:如何将YY/T 0482标准中复杂的手动测试方法进行步骤简化,提高测试效率
[0027]The present invention automatically integrates the encapsulated algorithm, converts the cumbersome and complex manual testing process into an automatic testing process, and displays the test results in the form of numbers and graphs. Moreover, the entire test is reflected through the interface, which is clear and straightforward, greatly improving the testing efficiency.
Smart Images

Figure CN120374499A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of magnetic resonance image processing, and specifically to a method for testing the signal-to-noise ratio of medical magnetic resonance images. Background Art
[0002] Magnetic resonance imaging (MRI), as an important clinical examination method, plays an important role in clinical examinations. To ensure the accuracy of image diagnosis, it is necessary to conduct scientific acceptance tests on the image quality of magnetic resonance imaging equipment. As one of the important performance indicators of the radiofrequency receiving coil, the signal-to-noise ratio is related to the clinical effectiveness of magnetic resonance imaging and is a core indicator of image quality.
[0003] The standard "YY / T 0482-2022 Determination of Main Image Quality Parameters of Medical Magnetic Resonance Imaging Equipment" provides a standard test method for the determination of the main image quality parameters of magnetic resonance equipment. However, according to the signal-to-noise ratio test method in the YY / T 0482 standard, manual testing is relatively cumbersome and complex, time-consuming, and affects the test efficiency. For this reason, we propose a method for testing the signal-to-noise ratio of medical magnetic resonance images. Summary of the Invention
[0004] The purpose of the present invention is to provide a method for testing the signal-to-noise ratio of medical magnetic resonance images.
[0005] The technical problem solved by the present invention is: how to simplify the steps of the complex manual test method in the YY / T 0482 standard and improve the test efficiency.
[0006] The present invention can be realized through the following technical solutions: A method for testing the signal-to-noise ratio of medical magnetic resonance images, including the following steps:
[0007] Step 1: Construct a python image processing library based on the OpenCV vision library and the NumPy numerical calculation library;
[0008] Step 2: Draw an ROI region of a certain shape and size on the UI interface and label it as image C;
[0009] Step 3: Import two dcm images A and B collected by two scans under the same conditions and subtract the pixel values at the corresponding pixel coordinate positions to obtain a new image D;
[0010] Step 4: Calculate the pixel mean of all pixel points in the ROI region on image A;
[0011] Step 5: Calculate the standard variance of the pixel values of all pixel points in the ROI region on image D;
[0012] Step 6: Calculate the signal-to-noise ratio of the initially imported images according to the pixel mean and the standard variance;
[0013] Step 7: Display the above four images, pixel mean, standard deviation, and ROI area on the UI interface.
[0014] A further technical improvement of the present invention is that when drawing the ROI region, the area of this region is not less than 85% of the action region of the radio frequency coil; otherwise, redraw it.
[0015] A further technical improvement of the present invention is that the formula for calculating the pixel mean in Step 4 is:
[0016]
[0017] where I(i,j) represents the pixel value of the i-th row and j-th column in the image, and m and n respectively represent the height and width of the image to calculate the height and width of image D.
[0018] A further technical improvement of the present invention is that the calculation method of the standard deviation in Step 5 is:
[0019]
[0020] where x ij represents the pixel value of each pixel point in the image, μ represents the average value of all pixel values in this region of image D, and N is the number of pixel points in the ROI region.
[0021] A further technical improvement of the present invention is that the calculation method of the signal-to-noise ratio is:
[0022] A further technical improvement of the present invention is that the shape of the ROI region includes a circle, a rectangle, and other irregular shapes. When drawing the contour of the ROI region, the tester operates and draws through mouse gestures.
[0023] A further technical improvement of the present invention is that when the ROI region is a circular region, input the radius of the circular region and determine the center position by clicking on the image with the mouse;
[0024] When the ROI region is a rectangular region, drag the mouse on the region of interest in the image to draw the rectangle diagonal;
[0025] When the ROI region is an irregular shape region, click on the contour position of the region of interest in the image, and the points clicked multiple times are connected in sequence to form a closed region.
[0026] Compared with the prior art, the present invention has the following beneficial effects:
[0027] The present invention automatically integrates the encapsulated algorithm, converts the cumbersome and complex manual testing process into an automatic testing process, and displays the test results in the form of numbers and graphs. Moreover, the entire test is reflected through the interface, which is clear and straightforward, greatly improving the testing efficiency. Description of the Drawings
[0028] For the convenience of those skilled in the art to understand, the present invention will be further described below in conjunction with the accompanying drawings.
[0029] Figure 1 It is a schematic flowchart of the method of the present invention;
[0030] Figure 2 It is a schematic diagram of the signal-to-noise ratio test result status of the circular ROI region of the present invention;
[0031] Figure 3 It is a schematic diagram of the signal-to-noise ratio test result status of the rectangular ROI region of the present invention;
[0032] Figure 4 It is a schematic diagram of the signal-to-noise ratio test result status of the irregular-shaped ROI region of the present invention. Detailed Embodiment
[0033] To further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following will, in conjunction with the accompanying drawings and preferred embodiments, describe in detail the specific embodiments, structures, features, and their effects according to the present invention.
[0034] Please refer to Figures 1-4 As shown, a method for testing the signal-to-noise ratio of medical magnetic resonance images includes the following steps:
[0035] Step 1: Construct a Python image processing library
[0036] Use the OpenCV vision library and the NumPy numerical calculation library to construct a Python image processing library. Among them, the OpenCV vision library is used for image reading, display, saving, and image processing; the NumPy numerical calculation library is used for processing the array representation and mathematical operations of images;
[0037] Step 2: Import dcm images
[0038] Use the interface provided by the UI to import two dcm images obtained by scanning the same region twice under the same parameters, and mark them as Figure A and Figure B respectively, and display them in the upper left corner and upper right corner of the UI respectively;
[0039] Step 3: Draw and mark the ROI region
[0040] Input the ROI region parameter values using the UI interface. The interface automatically draws the ROI region according to the parameter values, and marks it with a red line and displays it as Image C in the lower right corner of the UI interface;
[0041] After drawing, the ROI area and signal-to-noise ratio, etc. are immediately displayed in the lower left corner of the UI interface; when the area of the ROI region is less than 85% of the area of the signal region, redraw the ROI region; among them, the signal region is specifically the area where the radio frequency coil acts.
[0042] Step Four: Perform a subtraction operation on the two initially imported images
[0043] Perform a subtraction operation on the pixel values of Image A and Image B at the corresponding pixel coordinate positions, that is, the pixel value of Image A - the pixel value of Image B, to generate a new image and mark it as Image D;
[0044] Step Five: Calculate the pixel mean of Image A
[0045] Within the ROI region in Image A, calculate the pixel mean S of all pixel points:
[0046]
[0047] where I(i,j) represents the pixel value of the i-th row and j-th column in the image, and m and n represent the height and width of the image respectively to calculate the height and width of Image D;
[0048] Step Six: Calculate the standard deviation of the pixel points of Image D
[0049] Within the ROI region in Image D, calculate the standard deviation σ of all pixel values of the pixel points:
[0050]
[0051] where, x ij represents the pixel value of each pixel point in the image, μ represents the average value of all pixel values in this region of Image D, and N is the number of pixel points in the ROI region.
[0052] Step Seven: Calculate the signal-to-noise ratio of the initially imported images
[0053] According to the pixel mean of Image A and the standard deviation of the pixels of Image D calculated in Step Five and Step Six, calculate the signal-to-noise ratio SNR; specifically,
[0054] Step Eight: Automatically display the data and measurement results during the test (including Image A, Image B, Image C, Image D, signal-to-noise ratio, pixel mean, standard deviation, and ROI area, etc.) on the UI interface.
[0055] It should be noted that the placement positions of the above-mentioned multiple images and data on the UI interface can be set arbitrarily according to needs;
[0056] The ROI region can be set to a circular shape, a rectangular shape, or any other arbitrary shape:
[0057] When the ROI region is a circular region, the tester sets the radius of the circular region, and the center of the circle is determined by the tester clicking on any position of the image with the left mouse button;
[0058] When the ROI region is a rectangular region, the tester drags with the left mouse button on the image to manually draw the diagonal of the rectangle of the region of interest;
[0059] When the ROI region is any other arbitrary shape region, the tester clicks on the image with the left mouse button to determine each point of the contour of the region of interest, clicks on any position on the image multiple times, and connects the multiple clicked points in sequence to finally form a closed region.
[0060] Explanation of related terms:
[0061] Signal-to-noise ratio SNR: The ratio of the signal intensity to the noise intensity of a magnetic resonance image.
[0062] Region of interest ROI: The image region to be processed extracted from the image.
[0063] Pixel mean S: An image is composed of pixels, and each pixel has a specific brightness value. The pixel mean reflects the image brightness. The larger the mean, the brighter the image.
[0064] Standard deviation σ: The standard deviation reflects the degree of dispersion of the image pixel values from the mean. The smaller the standard deviation, the more concentrated the image pixels.
[0065] The above are only the preferred embodiments of the present invention and do not impose any formal limitations on the present invention. Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art, without departing from the scope of the technical solution of the present invention, can make some changes or modifications to the above-disclosed technical content to obtain equivalent embodiments of equivalent changes. However, as long as it does not depart from the content of the technical solution of the present invention, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. A method for testing the signal-to-noise ratio of medical magnetic resonance images, characterized in that: It includes the following steps: Step 1: Build a Python image processing library based on the OpenCV vision library and the NumPy numerical calculation library; Step 2: Draw an ROI region of a certain shape and size on the UI interface and label it as image C; Step 3: Import two dcm images A and B collected by two scans under the same conditions and subtract the pixel values at the corresponding pixel coordinate positions to obtain a new image D; Step 4: Calculate the pixel mean of all pixel points in the ROI region on image A; Step 5: Calculate the standard deviation of the pixel values of all pixel points in the ROI region on image D; Step 6: Calculate the signal-to-noise ratio of the initially imported image based on the pixel mean and the standard deviation; Step 7: Display the above four images, the pixel mean, the standard deviation, and the ROI area on the UI interface.
2. The method for testing the signal-to-noise ratio of a medical magnetic resonance image according to claim 1, wherein When drawing the ROI region, the area of this region shall not be less than 85% of the radio frequency coil action region, otherwise redraw it.
3. A method for testing the signal-to-noise ratio of a medical magnetic resonance image according to claim 1, characterized in that, The formula for calculating the pixel mean in Step 4 is: where I(i,j) represents the pixel value at the i-th row and j-th column in the image, and m and n respectively represent the height and width of the image to calculate the height and width of image D; 4. A method for testing the signal-to-noise ratio of a medical magnetic resonance image according to claim 3, characterized in that, The calculation method of the standard deviation in Step 5 is: where x ij represents the pixel value of each pixel in the image, μ represents the average value of all pixel values in this area of image D, and N is the number of pixels in the ROI area.
5. A method for testing the signal-to-noise ratio of medical magnetic resonance images according to claim 1, characterized in that, The calculation method of the signal-to-noise ratio is as follows:
6. A method for testing the signal-to-noise ratio of medical magnetic resonance images according to claim 2, characterized in that, The shape of the ROI region includes a circle, a rectangle, and other irregular shapes. When drawing the ROI region contour, the tester operates and draws through mouse gestures.
7. A method for testing the signal-to-noise ratio of medical magnetic resonance images according to claim 6, characterized in that, When the ROI region is a circular region, input the radius of the circular region and click on the image with the mouse to determine the center position; When the ROI region is a rectangular region, drag the mouse on the region of interest in the image to draw the rectangle diagonal; When the ROI region is an irregular shape region, click on the contour position of the region of interest in the image, and the points clicked multiple times are connected in sequence to form a closed region.