Medical endoscope signal-to-noise ratio detection method, device and equipment and storage medium
By acquiring multiple frames of images and using interquartile range quantization for noise processing, the problem of signal-to-noise ratio (SNR) detection deviation in medical endoscopes under complex noise environments has been solved. This enables accurate SNR assessment in non-Gaussian noise scenarios, meets the YY/T1603-2018 standard, and improves the accuracy and compliance of endoscope imaging quality assessment.
Patent Information
- Application Number
- CN202511780141.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-02-27
AI Technical Summary
Existing signal-to-noise ratio (SNR) testing methods for medical endoscopes cannot accurately reflect the actual performance of the camera system in complex noise environments, especially in the event of sudden abnormal values and non-Gaussian noise during surgery. This leads to deviations in SNR calculation and fails to meet the compliance requirements of the YY/T1603-2018 standard.
By acquiring multiple frames of images and combining them with clinically adapted working distances and small grayscale areas with uniform brightness, noise is quantized using interquartile range, outliers are masked, and total noise is synthesized and fused from three channels to plot a signal-to-noise ratio curve, thus obtaining a signal-to-noise ratio that meets the standard requirements.
It improves the accuracy and compliance of signal-to-noise ratio detection, enables accurate assessment of endoscopic imaging quality in non-Gaussian noise environments, and provides reliable equipment quality control and clinical application support.
Smart Images

Figure CN121582223A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of signal-to-noise ratio (SNR) detection technology, specifically to a method, apparatus, device, and storage medium for detecting the SNR of a medical endoscope. Background Technology
[0002] The signal-to-noise ratio (SNR) of a medical endoscope imaging system is a core indicator for evaluating image quality and directly affects doctors' observation and judgment of lesions. The standard YY / T1603-2018 "Medical Endoscope Functional Supply Device Imaging System" clearly specifies the test method for signal-to-noise ratio.
[0003] In existing standards, noise signal calculations rely on the standard deviation (root mean square deviation), which is essentially a second-order statistic and can only effectively describe the dispersion of Gaussian-distributed, stationary noise. However, in actual clinical testing or equipment inspection scenarios, the noise environment of medical endoscopic camera systems is complex: surgical light reflections and the metallic sheen of instruments during surgery can generate sudden abnormal noise values; dead pixels from long-term sensor use can lead to fixed extreme deviations; and dark current noise during low-light imaging can exhibit a non-Gaussian right-skewed distribution. In these situations, the standard deviation is easily amplified by extreme values, leading to noise estimation bias and consequently affecting the accuracy of signal-to-noise ratio calculations, failing to truly reflect the actual performance of the camera system.
[0004] Therefore, there is an urgent need for a signal-to-noise ratio testing method that can resist outlier interference, adapt to non-Gaussian noise scenarios, and meet the compliance requirements of the YY / T1603-2018 standard. Summary of the Invention
[0005] In order to overcome the shortcomings of the prior art, the present invention aims to provide a method, device, equipment and storage medium for detecting the signal-to-noise ratio of a medical endoscope.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: This invention provides a signal-to-noise ratio (SNR) detection method for medical endoscopes, comprising: acquiring image data according to preset acquisition quantity, preset working distance, preset small grayscale block area, and preset brightness level acquisition conditions; obtaining average quartile difference data of the brightness channel, average quartile difference data of the first color difference channel, and average quartile difference data of the second color difference channel from the image data according to preset first percentile and preset second percentile; calculating the average quartile difference data of the brightness channel, the first color difference channel, and the second color difference channel according to a preset total noise synthesis formula to obtain total noise data; plotting a SNR curve based on the total noise data; and obtaining the corresponding SNR from the SNR curve based on preset brightness component values.
[0007] Further, the step of obtaining the average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel from the image data according to the preset first percentile and the preset second percentile includes: obtaining the Y value sequence, the original R value sequence, and the original B value sequence from the image data according to the preset pixel region and the preset color channel; calculating the Y value sequence, the original R value sequence, and the original B value sequence to obtain the Y value reordering sequence, the RY value reordering sequence, and the BY value reordering sequence; and calculating the arithmetic mean of the Y value reordering sequence, the RY value reordering sequence, and the BY value reordering sequence according to the first percentile and the second percentile to obtain the average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel.
[0008] Further, the step of obtaining the Y-value sequence, the original R-value sequence, and the original B-value sequence from the image data based on the preset pixel region and the preset color channel includes: performing white balance calibration on the image data to obtain calibrated image data; reading the calibrated image data based on the small grayscale block region, pixel region, and color channel to obtain output data; calculating the output data according to the preset weighting formula to obtain the Y-value sequence; and obtaining the original R-value sequence and the original B-value sequence from the output data.
[0009] Further, the calculation of the Y-value sequence, the original R-value sequence, and the original B-value sequence to obtain the Y-value reordered sequence, the RY-value reordered sequence, and the BY-value reordered sequence includes: performing a difference calculation based on the original R-value sequence and the Y-value sequence to obtain the RY-value sequence; performing a difference calculation based on the original B-value sequence and the Y-value sequence to obtain the BY-value sequence; reordering the Y-value sequence to obtain the Y-value reordered sequence; reordering the RY-value sequence to obtain the RY-value reordered sequence; and reordering the BY-value sequence to obtain the BY-value reordered sequence.
[0010] Further, the step of calculating the arithmetic mean of the Y-value reordered sequence, RY-value reordered sequence, and BY-value reordered sequence based on the first and second percentiles to obtain the average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel includes: calculating the quartile difference data of the luminance channel, the first color difference channel, and the second color difference channel based on the first and second percentiles; and calculating the arithmetic mean of the luminance channel quartile difference data, the first color difference channel quartile difference data, and the second color difference channel quartile difference data to obtain the average quartile difference data of the luminance channel, the first color difference channel, and the second color difference channel.
[0011] Further, the step of calculating the average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel according to the preset total noise synthesis formula to obtain the total noise data includes: converting the average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel based on the preset Gaussian distribution characteristics to obtain the first equivalent standard deviation data, the second equivalent standard deviation data, and the third equivalent standard deviation data; and calculating the first equivalent standard deviation data, the second equivalent standard deviation data, and the third equivalent standard deviation data according to the total noise synthesis formula to obtain the total noise data.
[0012] Further, the step of drawing the signal-to-noise ratio curve based on the total noise data includes: calculating the mean of the Y value sequence to obtain the luminance signal component sequence; calculating the total noise data and the luminance signal component sequence according to a preset standard formula to obtain the signal-to-noise ratio sequence; and drawing the signal-to-noise ratio curve based on the luminance signal component sequence and the signal-to-noise ratio sequence.
[0013] Furthermore, a medical endoscope signal-to-noise ratio (SNR) detection device includes: an image data acquisition module for acquiring image data according to preset acquisition quantity, preset working distance, preset small grayscale block area, and preset brightness level acquisition conditions; a quartile difference data acquisition module for acquiring average quartile difference data of the brightness channel, average quartile difference data of the first color difference channel, and average quartile difference data of the second color difference channel from the image data according to preset first percentile and preset second percentile; a noise data calculation module for calculating the average quartile difference data of the brightness channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel according to a preset total noise synthesis formula to obtain total noise data; a curve plotting module for plotting a SNR curve based on the total noise data; and a SNR acquisition module for acquiring the corresponding SNR from the SNR curve based on preset brightness component values.
[0014] Furthermore, a medical endoscope signal-to-noise ratio detection device includes: a memory and at least one processor, wherein the memory stores instructions; at least one processor invokes the instructions in the memory to cause the medical endoscope signal-to-noise ratio detection device to perform the various steps of a medical endoscope signal-to-noise ratio detection method as described in any one of the above descriptions.
[0015] Furthermore, a computer-readable storage medium stores instructions that, when executed by a processor, implement the steps of a medical endoscope signal-to-noise ratio detection method as described in any one of the preceding descriptions.
[0016] In the technical solution of this invention, multi-frame image acquisition is achieved by increasing the number of acquisitions. Combined with clinically suitable working distance and small grayscale block areas with uniform brightness, and slight focus blur, texture and high contrast interference are effectively avoided, ensuring the purity of noise data. Quartile quantization of noise is used to accurately shield abnormal values such as surgical reflections and sensor dead pixels. Non-Gaussian noise is adapted, and total noise is synthesized and fused into three-channel data to fully cover brightness and color noise, meeting the needs of human vision and lesion observation. The signal-to-noise ratio curve intuitively presents the stability of full brightness performance, assisting in fault diagnosis. The corresponding signal-to-noise ratio is extracted according to the preset brightness component value, which meets the standard requirements and the data is traceable, improving the accuracy and compliance of the assessment, and providing reliable support for equipment quality control and clinical application. Attached Figure Description
[0017] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is a first flowchart of a signal-to-noise ratio detection method for a medical endoscope provided in an embodiment of the present invention; Figure 2 This is a second flowchart of a signal-to-noise ratio detection method for a medical endoscope provided in an embodiment of the present invention; Figure 3 This is a third flowchart of a signal-to-noise ratio detection method for a medical endoscope provided in an embodiment of the present invention; Figure 4 This is a fourth flowchart of a signal-to-noise ratio detection method for a medical endoscope provided in an embodiment of the present invention; Figure 5 The fifth flowchart of a signal-to-noise ratio detection method for a medical endoscope provided in an embodiment of the present invention; Figure 6 The sixth flowchart of a signal-to-noise ratio detection method for a medical endoscope provided in an embodiment of the present invention; Figure 7 The seventh flowchart of a signal-to-noise ratio detection method for a medical endoscope provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of the structure of a medical endoscope signal-to-noise ratio detection device provided in an embodiment of the present invention; Figure 9 This is a schematic diagram of the structure of a medical endoscope signal-to-noise ratio detection device provided in an embodiment of the present invention. Detailed Implementation
[0018] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0019] Preparatory work for signal-to-noise ratio testing of medical endoscopes includes: Equipment setup: Use standard test templates (background B and small grayscale block A), simulated D65 light source, non-destructive image acquisition device, and luminance meter with an accuracy of not less than level 1; Test conditions: ambient temperature (23±2)℃, relative humidity (50±20)%, illuminance ≤1lx, power supply stability of light source ±2%, and full preheating.
[0020] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1One embodiment of a signal-to-noise ratio detection method for medical endoscopes according to the present invention includes: 101. Image data is acquired based on preset acquisition quantity, preset working distance, preset small grayscale block area, and preset brightness level acquisition conditions; In this embodiment, the number of images collected is greater than or equal to eight. The small grayscale block area is small grayscale block area A. The brightness level collection conditions are: adjusting the brightness of background B to the manufacturer's specified value, taking pictures at the specified working distance (500mm for the visual endoscope), and slightly blurring the focus to reduce texture noise, which is in line with the actual clinical use scenario. ≥10 uniform brightness levels are selected in small grayscale block area A, and ≥8 images are collected for each level. Areas with uniform brightness and simple textures are selected as test objects to avoid interference from high contrast and complex textures on noise calculation and improve the purity of noise quantization. 102. Obtain the average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel from the image data based on the preset first percentile and the preset second percentile. In this embodiment, the first percentile is the 75th percentile (Q3), and the second percentile is the 25th percentile (Q1). Image data is taken based on the 75th percentile (Q3) and the 25th percentile (Q1). The interquartile range (IQR) is a commonly used measurement method in statistics to describe the dispersion of a dataset. It refers to dividing the data into four equal parts after arranging the data in order of size, and then calculating the difference between the first quartile and the third quartile. The IQR can help us understand the distribution of the data, judge the dispersion of the data and the degree of existence of outliers. The IQR (which only reflects the dispersion of the middle 50% of the data) is selected as the core parameter for noise quantification to specifically solve the pain points of outliers and non-Gaussian noise, and to overcome the shortcomings of the traditional standard deviation (second-order statistic) which is sensitive to extreme values and depends on the Gaussian distribution assumption. 103. Calculate the average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel according to the preset total noise synthesis formula to obtain the total noise data. In this embodiment, the three-channel average quartile difference data are fused by the total noise synthesis formula to cover the brightness and red and blue difference noise. Relying on the quartile difference to resist extreme values, the synthesized total noise data is accurate and reliable, which conforms to the visual characteristics of the human eye and the clinical lesion observation needs. It provides high-quality noise input for subsequent signal-to-noise ratio calculation and improves the accuracy of endoscopic imaging quality assessment. 104. Draw the signal-to-noise ratio curve based on the total noise data; In this embodiment, by plotting the signal-to-noise ratio curve, the performance stability of the device under different brightness levels is presented intuitively, providing a basis for subsequent troubleshooting (such as a sudden drop in SNR in a certain brightness range); 105. Obtain the corresponding signal-to-noise ratio from the signal-to-noise ratio curve based on the preset luminance component values; In this embodiment, the curve is found =0.707 corresponds to an SNR signal-to-noise ratio. When interpolation is required, piecewise linear interpolation should be used to ensure that the results are consistent with the core evaluation nodes required by the standard, while preserving the integrity of the curve and data traceability. In this embodiment, multi-frame image acquisition is achieved by increasing the number of images collected. Combined with clinically suitable working distance and small grayscale areas with uniform brightness, and slight focus blur, texture and high contrast interference are effectively avoided, ensuring the purity of noise data. Quartile quantization of noise is used to accurately shield abnormal values such as surgical reflections and sensor dead pixels. Non-Gaussian noise is adapted, and total noise is synthesized and fused into three-channel data to comprehensively cover brightness and color noise, meeting the needs of human vision and lesion observation. The signal-to-noise ratio curve intuitively presents the stability of full brightness performance, aiding in fault diagnosis. The corresponding signal-to-noise ratio is extracted according to the preset brightness component value, meeting standard requirements and ensuring data traceability, thereby improving the accuracy and compliance of the assessment and providing reliable support for equipment quality control and clinical application.
[0021] Please see Figure 2 In a second embodiment of the signal-to-noise ratio detection method for a medical endoscope according to the present invention, step 102 specifically includes: 201. Obtain the Y value sequence, the original R value sequence, and the original B value sequence from the image data based on the preset pixel region and preset color channel; In this embodiment, the pixel area is a 32×32 pixel area, and the color channels are red (R), green (G), and blue (B) three channels; 202. Calculate the Y value sequence, the original R value sequence, and the original B value sequence to obtain the Y value reordering sequence, the RY value reordering sequence, and the BY value reordering sequence; In this embodiment, reordering makes the data more regular, adapts to subsequent quantile calculations, and ensures resistance to extreme values. This solution provides orderly and accurate multi-channel data for noise quantification, which meets the needs of clinical observation and improves the reliability of endoscopic imaging quality assessment. 203. Calculate the arithmetic mean of the Y value reordered sequence, RY value reordered sequence, and BY value reordered sequence based on the first percentile and the second percentile to obtain the average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel. In this embodiment, the purpose of calculating the interquartile range is to eliminate the extreme deviation of a single pixel, reflect the overall noise level of the region, reflect the overall noise level of the lesion region, and cover the brightness and red and blue difference noise of the multi-channel data, providing stable data for subsequent equivalent standard deviation conversion, and improving the accuracy and clinical reference value of endoscopic imaging quality assessment. In this embodiment, R, G, and B channel data are extracted from a 32×32 pixel region to generate a Y value sequence, ensuring that the data is focused on the core area. Sequence reordering makes the data regular, laying a solid foundation for subsequent quantile calculations and enhancing the ability to resist extreme values. Combining percentile calculation with quartile difference and arithmetic mean effectively eliminates single-pixel deviation, accurately reflects the overall noise level of the lesion area, and multi-channel data covers brightness and red and blue difference noise, providing stable input for subsequent conversions and improving the accuracy of imaging quality assessment and clinical reference value.
[0022] Please see Figure 3 In a third embodiment of the signal-to-noise ratio detection method for a medical endoscope according to the present invention, step 201 specifically includes: 301. Perform white balance calibration on the image data to obtain calibrated image data; In this embodiment, white balance calibration is the benchmark step in image preprocessing. By adjusting the gain of the R, G, and B channels, the pixel values of the three channels in the white area of the image are made to be consistent. Essentially, this eliminates the systematic color shift caused by the characteristics of the light source and the difference in the sensitivity of the device, ensuring that the three-channel data read later only reflects the device noise and the real imaging information, without containing systematic deviations, thus laying a solid foundation for the accuracy of color and brightness data. 302. Read the calibration image data based on the small grayscale block area, pixel area, and color channel to obtain the output data; In this embodiment, a 32×32 pixel area is selected in the small grayscale block A region, and the output data of the red (R), green (G), and blue (B) channels of each image are read. The small grayscale block A region has the characteristics of uniform brightness and simple texture. The brightness change in the grayscale area is gradual, avoiding the interference of brightness abrupt changes in high contrast areas (such as the boundary between light and dark) on noise calculation. The simple texture can reduce the risk of texture signals being misjudged as noise signals, ensuring that the extracted data is mainly device noise. 303. Calculate the output data according to the preset weighting formula to obtain the Y value sequence; In this embodiment, the luminance signal component Y (Y value sequence) is calculated by weighting according to the manufacturer's coding method (e.g., ITU-R BT.709: Y=0.2125R+0.7154G+0.0721B) to obtain the Y value sequence of each pixel in n images. The weighting formula is derived from the luminance perception characteristics of the human visual system. The human eye is most sensitive to green luminance, followed by red, and least sensitive to blue. This weighting allocation enables the calculated Y value to accurately match the human eye's subjective perception of image brightness, avoiding the disconnect between luminance data and clinical observation experience. 304. Obtain the original R value sequence and the original B value sequence from the output data; In this embodiment, lesions in clinical scenarios (such as mucosal congestion and microbleeds) often manifest as abnormal red and blue colors. Extracting the original data from the two channels, the original R value sequence and the original B value sequence, can provide an accurate carrier for subsequent capture of color noise related to diagnosis. In this embodiment, white balance calibration eliminates systematic color shifts caused by light sources and equipment, ensuring that the three-channel data only reflects true imaging information and equipment noise, avoiding pseudo-noise interference. A 32×32 pixel area is selected in a small grayscale block A region with uniform brightness and simple texture to read the three-channel data. This avoids interference from high contrast and complex textures while ensuring that the data is primarily composed of equipment noise. The Y-value sequence is calculated based on the characteristics of human visual perception, making the brightness data consistent with clinical observation experience. The original R-value sequence and the original B-value sequence are extracted to accurately adapt to clinical scenarios with abnormal red and blue colors in lesions, providing high-quality basic data for subsequent noise quantification and signal-to-noise ratio calculation.
[0023] Please see Figure 4 In the fourth embodiment of the signal-to-noise ratio detection method for a medical endoscope according to the present invention, step 202 specifically includes: 401. Calculate the difference between the original R value sequence and the Y value sequence to obtain the RY value sequence; 402. Calculate the difference between the original B value sequence and the Y value sequence to obtain the BY value sequence; In this embodiment, the color difference channel signal is calculated as follows: for each pixel (i,j) within a 32×32 pixel area, the Y value sequence, RY sequence, and BY sequence of its n images are extracted; 403. Reorder the Y-value sequence to obtain a reordered Y-value sequence; 404. Reorder the RY value sequence to obtain the RY value reordered sequence; 405. Reorder the BY sequence value sequence to obtain the BY value reordered sequence; In this embodiment, each sequence is arranged in ascending or descending order of numerical value to make the data distribution regular and ensure that the 25th percentile (Q1) and 75th percentile (Q3) can be accurately located later. If the data is unordered, there may be deviations in the extraction of quantiles, which will directly affect the accuracy of IQR calculation. In this embodiment, the R-value sequence and B-value sequence are subtracted from the Y-value to generate RY and BY sequences, respectively, accurately separating luminance and color signals. This allows color noise to be freed from luminance redundancy masking, focusing on clinically critical red and blue color abnormality-related noise. 32×32 pixel-level multi-frame sequence extraction provides sufficient samples for noise analysis, reducing random interference in single frames. Sequence reordering regularizes the data, ensuring accurate positioning of Q1 and Q3 in subsequent quartile difference calculations and avoiding quantile extraction bias. This solution comprehensively covers both luminance and color noise dimensions, and lays a solid data foundation for IQR quantification against extreme values, meeting the clinical needs of lesion observation and providing reliable data support for endoscopic imaging quality assessment.
[0024] Please see Figure 5 The fifth embodiment of a signal-to-noise ratio detection method for a medical endoscope according to the present invention, step 203 specifically includes: 501. Calculate the Y value reordering sequence, RY value reordering sequence, and BY value reordering sequence based on the first percentile and the second percentile to obtain the luminance channel quartile difference data, the first color difference channel quartile difference data, and the second color difference channel quartile difference data. In this embodiment, after sorting each reordered sequence, the interquartile range (IQR) of each channel of each pixel is calculated. The 75th percentile (Q3) and 25th percentile (Q1) of each pixel are taken, and the interquartile range is calculated as: IQR = Q3 - Q1. This yields the luminance channel interquartile range IQR(Y), the first color difference channel interquartile range IQR(RY), and the second color difference channel interquartile range IQR(BY) for each pixel. The essence of the interquartile range IQR = Q3 - Q1 is that it only reflects the dispersion of the middle part of the data. Its anti-interference advantage is reflected in the natural shielding of extreme values. Through this calculation, each pixel obtains three independent noise characterization values for each channel: IQR(Y), IQR(RY), and IQR(BY), which correspond to the noise intensity of the luminance and the two color difference dimensions, respectively. 502. Calculate the arithmetic mean of the quartile difference data of the luminance channel, the quartile difference data of the first color difference channel, and the quartile difference data of the second color difference channel to obtain the average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel. In this embodiment, the aim is to eliminate extreme deviations of individual pixels and reflect the overall noise level of the region. The arithmetic mean of the IQR(Y), IQR(RY), and IQR(BY) of all pixels within a 32×32 pixel region is taken to obtain the region's average interquartile range: IQR_avg(Y) (average interquartile range of the luminance channel), IQR_avg(RY) (average interquartile range of the first chrominance channel), and IQR_avg(BY) (average interquartile range of the second chrominance channel). These IQR_avg(Y), IQR_avg(RY), and IQR_avg(BY) data form the average interquartile range data for the luminance channel, the first chrominance channel, and the second chrominance channel. The IQR data after regional averaging is closer to actual clinical needs and can reflect the overall noise level of the lesion area. In this embodiment, the interquartile range reflects the dispersion of the middle part of the data, which can naturally shield extreme values such as surgical reflections and sensor dead pixels, adapt to non-Gaussian noise, and provide independent noise characterization of brightness and red and blue difference dimensions for each pixel. The arithmetic mean of the pixel area further eliminates the extreme deviation of individual pixels, making the average interquartile range data fit the clinical reality, accurately reflect the overall noise level of the lesion area, and provide stable and reliable basic data for subsequent noise conversion and signal-to-noise ratio calculation, thereby improving the accuracy and applicability of endoscopic imaging quality assessment.
[0025] Please see Figure 6 In the sixth embodiment of a signal-to-noise ratio detection method for a medical endoscope according to the present invention, step 103 specifically includes: 601. Based on the preset Gaussian distribution characteristics, the average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel are converted to obtain the first equivalent standard deviation data, the second equivalent standard deviation data, and the third equivalent standard deviation data. In this embodiment, based on the characteristics of the Gaussian distribution (the fixed relationship between the interquartile range and the standard deviation: IQR≈1.35),... The average interquartile range is converted into the equivalent standard deviation to ensure consistency with the standard noise calculation logic. , and In the formula, The first equivalent standard deviation, For the second equivalent standard deviation and The third equivalent standard deviation is derived from all the first equivalent standard deviations. Second equivalent standard deviation and the third equivalent standard deviation The system generates first, second, and third equivalent standard deviation data. It adopts Gaussian equivalent conversion logic, which not only retains the advantages of quartile difference in resisting surgical glare, sensor dead pixels and other outliers, and adapting to non-Gaussian noise such as dark current right bias, but also ensures that it does not deviate from the signal-to-noise ratio definition by using conversion coefficients that are compatible with standard noise calculation logic. 602. Calculate the first equivalent standard deviation data, the second equivalent standard deviation data, and the third equivalent standard deviation data according to the total noise synthesis formula to obtain the total noise data; In this embodiment, the expression for the total noise synthesis formula is as follows: , The formula, representing the total noise, fuses the noise from the three channels using a weighted sum of squares and square roots. Its core logic aligns with the characteristics of human vision, achieving comprehensive and accurate noise quantification. The weighting coefficients in the formula (for the brightness channel, ...) are... Channel 0.279 The channel 0.088 originates from the difference in color sensitivity of the human visual system. The human eye perceives changes in brightness much more strongly than changes in color, and is more sensitive to differences in the red series than to the blue series. In this embodiment, the average interquartile range of multiple channels is converted into an equivalent standard deviation through a conversion factor. This fully preserves the interquartile range's ability to resist abnormal values such as surgical reflections and sensor dead pixels, as well as its ability to adapt to non-Gaussian noise such as dark current right bias. It is also seamlessly compatible with standard noise calculation logic, ensuring that the signal-to-noise ratio assessment does not deviate from the industry definition. The total noise synthesis formula conforms to the characteristics of human vision, and noise is fused in a weighted manner with the highest weight for the luminance channel, followed by the red color difference, and the lowest weight for the blue color difference. This comprehensively captures luminance and color noise information, and the generated total noise data can accurately match the clinical observation experience, providing a reliable basis for the assessment of endoscopic imaging quality, while taking into account both applicability and compliance.
[0026] Please see Figure 7 In the seventh embodiment of the signal-to-noise ratio detection method for a medical endoscope according to the present invention, step 104 specifically includes: 701. Calculate the mean of the Y value sequence to obtain the luminance signal component sequence; In this embodiment, the mean value of the Y value sequence under the same brightness level is calculated, and the average brightness signal component (S) of the corresponding brightness level is output. The brightness signal component sequence is composed of multiple brightness levels of S. The random noise in the single frame image is canceled by the arithmetic mean, and the standardized brightness gradient is covered, providing a data basis for the subsequent full dynamic range SNR evaluation. 702. Calculate the total noise data and luminance signal component sequence according to the preset standard formula to obtain the signal-to-noise ratio sequence; In this embodiment, the signal-to-noise ratio sequence is calculated according to the standard formula SNR=20lg(S / N), where S is the average luminance signal component at that luminance level ( (A single luminance signal component in the luminance signal component sequence), where N is the total noise obtained. (D) (Single total noise in total noise data), SNR is the signal-to-noise ratio. By calculating the signal-to-noise ratio sequence, we ensure that each SNR value can accurately reflect the imaging quality at that brightness. 703. The signal-to-noise ratio curve is obtained by plotting the luminance signal component sequence and the signal-to-noise ratio sequence; In this embodiment, the vertical axis represents the signal-to-noise ratio (SNR), and the horizontal axis represents the normalized luminance signal component. Each test point is marked, and a signal-to-noise ratio (SNR) curve is plotted. By plotting the SNR curve, the acquired images and noise data at that brightness level can be traced back to check whether it is a device malfunction or acquisition error. The trend of the SNR curve can reflect the performance stability of the device under different brightness levels. For example, the SNR curve of a high-quality endoscope should show a steady increase in SNR as brightness increases, and a stable SNR after brightness saturation. If the curve shows that the SNR fluctuates drastically as brightness increases, it indicates that the device has insufficient noise control capability in that brightness range. In this embodiment, averaging the Y-value sequence at the same brightness level effectively cancels out random noise in a single frame, generating a stable brightness signal component sequence. This lays a reliable data foundation for full dynamic range SNR evaluation. The signal-to-noise ratio is calculated using a standard formula, which conforms to industry standards and ensures that each SNR value truly reflects the imaging quality at the corresponding brightness. The plotted signal-to-noise ratio curve and marked test points can quickly trace the source of abnormal data, helping to troubleshoot equipment failures or acquisition errors. The curve trend intuitively presents the stability of equipment performance and can clearly identify brightness ranges with weak noise control. The overall solution balances accuracy, applicability, and compliance, providing strong support for clinicians to judge imaging quality, engineers to inspect equipment, and enterprises to conduct quality control. It is also compatible with different types of endoscopes and has strong scalability.
[0027] The above describes a method for detecting the signal-to-noise ratio of a medical endoscope according to an embodiment of the present invention. The following describes a device for detecting the signal-to-noise ratio of a medical endoscope according to an embodiment of the present invention. Please refer to [link to relevant documentation]. Figure 8 One embodiment of the signal-to-noise ratio detection device for a medical endoscope according to the present invention includes: Image data acquisition module 1 is used to acquire image data according to preset acquisition quantity, preset working distance, preset small grayscale block area and preset brightness level acquisition conditions; The quartile difference data acquisition module 2 is used to obtain the average quartile difference data of the brightness channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel from the image data according to the preset first percentile and the preset second percentile. The noise data calculation module 3 is used to calculate the average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel according to the preset total noise synthesis formula, so as to obtain the total noise data. Curve plotting module 4 is used to plot the signal-to-noise ratio curve based on the total noise data; The signal-to-noise ratio acquisition module 5 is used to obtain the corresponding signal-to-noise ratio from the signal-to-noise ratio curve based on the preset luminance component values.
[0028] In this embodiment, multi-frame image acquisition is achieved by increasing the number of images collected. Combined with clinically suitable working distance and small grayscale areas with uniform brightness, and slight focus blur, texture and high contrast interference are effectively avoided, ensuring the purity of noise data. Quartile quantization of noise is used to accurately shield abnormal values such as surgical reflections and sensor dead pixels. Non-Gaussian noise is adapted, and total noise is synthesized and fused into three-channel data to comprehensively cover brightness and color noise, meeting the needs of human vision and lesion observation. The signal-to-noise ratio curve intuitively presents the stability of full brightness performance, aiding in fault diagnosis. The corresponding signal-to-noise ratio is extracted according to the preset brightness component value, meeting standard requirements and ensuring data traceability, thereby improving the accuracy and compliance of the assessment and providing reliable support for equipment quality control and clinical application.
[0029] Figure 9 This is a schematic diagram of the structure of a medical endoscope signal-to-noise ratio (SNR) detection device 900 provided in an embodiment of the present invention. This medical endoscope SNR detection device 900 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 910 (e.g., one or more processors) and a memory 920, and one or more storage media 930 (e.g., one or more mass storage devices) storing application programs 933 or data 932. The memory 920 and storage media 930 can be temporary or persistent storage. The program stored in the storage media 930 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the medical endoscope SNR detection device 900. Furthermore, the processor 910 may be configured to communicate with the storage media 930 and execute a series of instruction operations in the storage media 930 on the medical endoscope SNR detection device 900 to implement the steps of the medical endoscope SNR detection method provided in the above-described method embodiments.
[0030] A medical endoscope signal-to-noise ratio testing device 900 may further include one or more power supplies 940, one or more wired or wireless network interfaces 950, one or more input / output interfaces 960, and / or one or more operating devices 931, such as Windows Server, MacOSX, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 9 The structure of the medical endoscope signal-to-noise ratio testing device 900 shown does not constitute a limitation on the medical endoscope signal-to-noise ratio testing device 900. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0031] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of a medical endoscope signal-to-noise ratio detection method.
[0032] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0033] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0034] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for detecting the signal-to-noise ratio of a medical endoscope, characterized in that, include: Image data is acquired based on preset acquisition quantity, preset working distance, preset small grayscale block area, and preset brightness level acquisition conditions; The average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel are obtained from the image data based on the preset first percentile and the preset second percentile. The total noise data is calculated based on the preset total noise synthesis formula, which includes the average interquartile range data of the luminance channel, the average interquartile range data of the first color difference channel, and the average interquartile range data of the second color difference channel. The signal-to-noise ratio curve was plotted based on the total noise data. The corresponding signal-to-noise ratio is obtained from the signal-to-noise ratio curve based on the preset luminance component value.
2. The method for detecting the signal-to-noise ratio of a medical endoscope as described in claim 1, characterized in that, The step of obtaining the average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel from the image data based on the preset first percentile and the preset second percentile includes: Based on the preset pixel region and preset color channel, the Y value sequence, the original R value sequence and the original B value sequence are obtained from the image data; The Y-value sequence, the original R-value sequence, and the original B-value sequence are calculated to obtain the Y-value reordered sequence, the RY-value reordered sequence, and the BY-value reordered sequence; Arithmetic mean calculations were performed on the Y value reordered sequence, RY value reordered sequence, and BY value reordered sequence based on the first and second percentiles to obtain the average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel.
3. The method for detecting the signal-to-noise ratio of a medical endoscope as described in claim 2, characterized in that, The step of obtaining the Y-value sequence, the original R-value sequence, and the original B-value sequence from the image data based on the preset pixel region and preset color channel includes: Perform white balance calibration on the image data to obtain calibrated image data; The calibration image data is read based on the small grayscale block area, pixel area, and color channel to obtain the output data; The output data is calculated according to a preset weighting formula to obtain a sequence of Y values; The original R-value sequence and the original B-value sequence are obtained from the output data.
4. The method for detecting the signal-to-noise ratio of a medical endoscope as described in claim 2, characterized in that, The calculation of the Y-value sequence, the original R-value sequence, and the original B-value sequence to obtain the Y-value reordered sequence, the RY-value reordered sequence, and the BY-value reordered sequence includes: The difference between the original R value sequence and the Y value sequence is calculated to obtain the RY value sequence; The difference between the original B value sequence and the Y value sequence is calculated to obtain the BY value sequence; Reorder the Y-value sequence to obtain the Y-value reordered sequence; Reorder the RY value sequence to obtain the RY value reordered sequence; Reorder the BY sequence value sequence to obtain the BY value reordered sequence.
5. The method for detecting the signal-to-noise ratio of a medical endoscope as described in claim 2, characterized in that, The arithmetic mean calculation of the Y-value reordered sequence, RY-value reordered sequence, and BY-value reordered sequence based on the first and second percentiles is performed respectively to obtain the average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel, including: The Y value reordering sequence, RY value reordering sequence, and BY value reordering sequence are calculated based on the first and second percentiles to obtain the luminance channel quartile difference data, the first chromatic difference channel quartile difference data, and the second chromatic difference channel quartile difference data. The arithmetic mean of the quartile difference data of the luminance channel, the quartile difference data of the first chromatic difference channel, and the quartile difference data of the second chromatic difference channel is calculated to obtain the average quartile difference data of the luminance channel, the average quartile difference data of the first chromatic difference channel, and the average quartile difference data of the second chromatic difference channel.
6. The method for detecting the signal-to-noise ratio of a medical endoscope as described in claim 1, characterized in that, The total noise data is calculated based on a preset total noise synthesis formula using the average quartile difference data of the luminance channel, the average quartile difference data of the first chromatic difference channel, and the average quartile difference data of the second chromatic difference channel, to obtain the total noise data, including: Based on the preset Gaussian distribution characteristics, the average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel are converted to obtain the first equivalent standard deviation data, the second equivalent standard deviation data, and the third equivalent standard deviation data. The total noise data is obtained by calculating the first equivalent standard deviation data, the second equivalent standard deviation data, and the third equivalent standard deviation data according to the total noise synthesis formula.
7. The method for detecting the signal-to-noise ratio of a medical endoscope as described in claim 2, characterized in that, The signal-to-noise ratio curve obtained from the total noise data includes: The mean of the Y-value sequence is calculated to obtain the luminance signal component sequence; The total noise data and the luminance signal component sequence are calculated according to a preset standard formula to obtain the signal-to-noise ratio sequence. The signal-to-noise ratio curve is obtained by plotting the luminance signal component sequence and the signal-to-noise ratio sequence.
8. A signal-to-noise ratio detection device for a medical endoscope, characterized in that, include: The image data acquisition module is used to acquire image data according to preset acquisition quantity, preset working distance, preset small grayscale block area and preset brightness level acquisition conditions; The quartile difference data acquisition module is used to obtain the average quartile difference data of the brightness channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel from the image data based on the preset first percentile and the preset second percentile. The noise data calculation module is used to calculate the average quartile difference data of the luminance channel, the average quartile difference data of the first color difference channel, and the average quartile difference data of the second color difference channel according to the preset total noise synthesis formula, so as to obtain the total noise data. The curve plotting module is used to plot the signal-to-noise ratio curve based on the total noise data. The signal-to-noise ratio (SNR) acquisition module is used to obtain the corresponding SNR from the SNR curve based on the preset luminance component values.
9. A signal-to-noise ratio testing device for medical endoscopes, characterized in that, include: A memory and at least one processor, wherein the memory stores instructions; At least one of the processors invokes the instructions in the memory to cause the medical endoscope signal-to-noise ratio detection device to perform the steps of the medical endoscope signal-to-noise ratio detection method as claimed in any one of claims 1-7.
10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the various steps of the medical endoscope signal-to-noise ratio detection method as described in any one of claims 1-7.