CN114051135A - Method and device for testing color reduction degree of medical endoscope - Google Patents
Method and device for testing color reduction degree of medical endoscope Download PDFInfo
- Publication number
- CN114051135A CN114051135A CN202111572261.7A CN202111572261A CN114051135A CN 114051135 A CN114051135 A CN 114051135A CN 202111572261 A CN202111572261 A CN 202111572261A CN 114051135 A CN114051135 A CN 114051135A
- Authority
- CN
- China
- Prior art keywords
- color
- card
- medical endoscope
- image
- block
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 167
- 230000009467 reduction Effects 0.000 title claims abstract description 69
- 238000000034 method Methods 0.000 title claims abstract description 54
- 230000008569 process Effects 0.000 claims abstract description 34
- 238000012545 processing Methods 0.000 claims abstract description 21
- 230000007246 mechanism Effects 0.000 claims description 38
- 238000006073 displacement reaction Methods 0.000 claims description 12
- 238000000605 extraction Methods 0.000 claims description 6
- 238000010606 normalization Methods 0.000 claims description 6
- 238000010998 test method Methods 0.000 claims 1
- 230000009286 beneficial effect Effects 0.000 abstract description 3
- 238000005286 illumination Methods 0.000 description 5
- 238000003384 imaging method Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000000877 morphologic effect Effects 0.000 description 2
- 239000003086 colorant Substances 0.000 description 1
- 230000007797 corrosion Effects 0.000 description 1
- 238000005260 corrosion Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000013100 final test Methods 0.000 description 1
- 238000007670 refining Methods 0.000 description 1
- 238000002310 reflectometry Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01M—TESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
- G01M11/00—Testing of optical apparatus; Testing structures by optical methods not otherwise provided for
- G01M11/02—Testing optical properties
- G01M11/0285—Testing optical properties by measuring material or chromatic transmission properties
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01J—MEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
- G01J3/00—Spectrometry; Spectrophotometry; Monochromators; Measuring colours
- G01J3/46—Measurement of colour; Colour measuring devices, e.g. colorimeters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
- H04N17/002—Diagnosis, testing or measuring for television systems or their details for television cameras
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
- H04N17/02—Diagnosis, testing or measuring for television systems or their details for colour television signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/50—Constructional details
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Spectroscopy & Molecular Physics (AREA)
- General Physics & Mathematics (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Endoscopes (AREA)
- Image Processing (AREA)
Abstract
The invention relates to a method and a device for testing color reduction degree of a medical endoscope, wherein the method comprises the following steps: taking a gray card mask and a standard color card; fixing a medical endoscope to be detected, and overlapping the gray card mask and the standard color card to expose a first color block of the standard color card at the through hole; illuminating the gray card mask and the standard color card by using a light source of the medical endoscope; shooting to obtain a test image, and moving the standard color card to expose the next color block of the standard color card at the through hole; repeating the step, namely acquiring the test images of all color blocks on the standard color card one by one until the test images of all the color blocks on the standard color card are acquired; and processing and calculating the test image, and evaluating the color reduction degree of the medical endoscope to be tested. The device is used for realizing the method. The testing process disclosed by the invention is more suitable for the actual use environment of the medical endoscope, can accurately test the color reduction degree of the medical endoscope, and is beneficial to improving the product quality, safety and reliability of the medical endoscope.
Description
Technical Field
The disclosure relates to the technical field of medical endoscope detection, in particular to a method and a device for testing color reduction degree of a medical endoscope.
Background
The degree of color reduction is one of the important parameters for evaluating the performance of a camera/camera system, and for a medical endoscope, the degree of color reduction also affects the safety and effectiveness of the device, so that for the medical endoscope, a color reduction test is required. The commonly used method for testing the color reduction degree of the camera at present comprises the following steps: under an external light sourceShooting a complete standard 24 color card, calculating the color reduction error value of each color block EAnd the difference in chromaticity CThen, the error value is restored by the color of 24 color blocks EAnd the difference in chromaticity CThe average value and the maximum value of the color difference are used for evaluating the color reduction degree of the camera.
When the conventional camera color reduction degree testing method is applied to the testing process of the medical endoscope, the following defects exist:
firstly, due to the particularity of the use scene of the medical endoscope, a light source carried by the endoscope is a unique illumination way when the medical endoscope is used in a human body cavity, and an external light source is used for illumination in the process of testing the color reduction degree of the endoscope, so that the difference with the actual use scene of the endoscope exists, and the accuracy of a test result is influenced;
secondly, after a single complete color card is shot, each color block is calculated, the problem of nonuniformity of a light source can exist, particularly, an endoscope using an LED as the light source has obvious flashlight effect due to the fact that light spots are obvious due to the characteristics of the LED light source, namely, the color temperature of an illumination center area is different from the color temperature of other areas, and therefore when the whole color card image is shot subsequently for analysis and calculation, due to the fact that the illuminance of the center area is different from that of an edge area, in the calculation process of converting an XYZ color space into a CIELad color space, the used reference white points are different, and the accuracy of a test result is greatly influenced;
thirdly, because the practical use scene of medical endoscope is mostly the macro-shooting, so its depth of field and best working distance are all nearer, in order to guarantee the accuracy of test result, also should make the endoscope near with the distance of colour chip when carrying out the color reduction degree test, but relatively, when the endoscope is near apart from the colour chip distance, the endoscope can't shoot complete colour chip, therefore the distance of endoscope and colour chip is generally far away during the actual test, this accuracy that can influence the test result.
In summary, the existing color reduction testing method for the conventional camera cannot be well applied to the color reduction testing process of the medical endoscope, so that the testing result of the medical endoscope is poor in accuracy, and the product quality of the medical endoscope and the safety and reliability of the using process are affected.
Disclosure of Invention
In order to solve the above problems of the prior art, it is an object of the present disclosure to provide a method for testing color rendition of a medical endoscope, and it is another object of the present disclosure to provide a device for testing color rendition of a medical endoscope. The testing process disclosed by the invention is more suitable for the actual use environment of the medical endoscope, can accurately test the color reduction degree of the medical endoscope, and is beneficial to improving the product quality, safety and reliability of the medical endoscope.
The color reduction degree testing method for the medical endoscope comprises the following steps:
s01, taking a gray card mask and a standard color card, wherein the standard color card is provided with a plurality of color blocks, the gray card mask is provided with a through hole for exposing one of the color blocks of the standard color card, and a white block for reference contrast is formed beside the through hole;
s02, fixing a medical endoscope to be tested, stacking the gray card mask and the standard color card to expose a first color block of the standard color card at the through hole, fixing the gray card mask and the standard color card right in front of the lens end of the medical endoscope, and enabling the gray card mask to be positioned on one side close to the medical endoscope;
s03, illuminating the gray card mask and the standard color card by using a light source of the medical endoscope;
s04, enabling the medical endoscope to shoot the gray card mask and the standard color card, acquiring a test image, and then moving the standard color card to enable the next color block of the standard color card to be exposed at the through hole; repeating the step, and acquiring the test images of all color blocks on the standard color card one by one until the test images of all the color blocks on the standard color card are acquired;
s05, processing and operating each test image, and calculating to obtain the color reduction error value of each color block EAnd the difference in chromaticity CRestoring error values according to the color of each color block EAnd the difference in chromaticity CAnd evaluating the color reduction degree of the medical endoscope to be tested.
Preferably, in step S05, the test images are processed to calculate color reduction error values of each color block EAnd the difference in chromaticity CThe method comprises the following steps:
s051, acquiring RGB value of white block image in the test image, recording as first RGB value, converting the first RGB value into XYZ color space, recording as first XYZ value、;
S052, obtaining RGB value of color block image in the test image, recording as second RGB value, converting the second RGB value into XYZ color space, recording as second XYZ value、;
S053, combining the first XYZ values、The second XYZ value、Converting the color space into CIELad color space, and recording the color space values as L, a and b;
s054, calculating and obtaining the color reduction error value of each color block according to the color space values L, a and b EAnd the difference in chromaticity C。
Preferably, in steps S051 and S052, the corresponding relationship between the RGB values and the XYZ values is:
in the step S053, the first XYZ values are combined、The second XYZ value、Converting into a CIELad color space, and converting according to the following formula:
in the step S054, a color reduction error value of each color block is calculated and obtained according to the color space values L, a, and b EAnd the difference in chromaticity CThe color reduction error value EThe calculation formula of (2) is as follows:
preferably, in the step S01, the area of the white block is smaller than the area of the color block on the standard color card;
in step S05, the processing operation performed on the test image includes:
converting the test image into a grey-scale map;
performing edge extraction on the obtained gray level image, and then thinning and extracting a unique edge;
traversing and searching each vertex coordinate of two square graphs in the test image, respectively calculating the areas of the two square graphs and recording the areas as the first graph areaAnd a second pattern areaComparing the area of the first graphAnd the second pattern areaThe square block graph with large area is marked as a color block image, and the square block graph with small area is marked as a white block image.
Preferably, in the step S052, the acquiring RGB values of the patch image in the test image includes:
selecting 70% of the area of the color block image as a region of interest (ROI);
obtaining the average values of r, g and b in the ROI;
normalizing the obtained average values of r, g and b according to a normalization formula to obtain RGB values of the ROI, wherein the normalization formula is as follows:
preferably, in step S04, the obtaining of the test image and the moving of the standard color card to expose the next color card of the standard color card at the through hole specifically include:
the next time the standard color card is moved by the displacement amount(ii) a The displacement amountThe calculation process of (2) is as follows:
acquiring a test image containing a current color block, and converting the test image into a gray map;
performing edge extraction on the obtained gray level image, and then thinning and extracting a unique edge;
traversing and searching each vertex coordinate of the color block image in the test image, and calculating to obtain the center point coordinate of the color block image according to each vertex coordinate;
Obtaining the coordinates of the central point of the test imageCalculating the coordinate difference between the central points of the color block image and the test imageWherein, in the step (A),,;
according to the horizontal side length of color blocks on a standard color cardAnd vertical side lengthAnd horizontal side length of color block imageNumber of corresponding pixel pointsLength of vertical sideNumber of corresponding pixel pointsCalculating to obtain image K values in the x direction and the y direction of the color lump image;
according to the image K values and the coordinate difference of the central point in the x direction and the y direction of the obtained color block imageCalculating the displacement for moving the standard color card next time。
Preferably, the number of color blocks on the standard color card is k; in step S04, repeating the above steps, and acquiring the test images of each color patch on the standard color card one by one until the test images of all the color patches on the standard color card are acquired, includes:
when a test image is shot and obtained for the first time, the counting is started to be 1, the counting is increased by 1 when the standard color card is moved and shot each time, and when the counting is accumulated to be equal to k, the test images of all color blocks on the standard color card are obtained.
Preferably, the gray tone value of the gray card mask is 18%.
The present disclosure also provides a medical endoscope color reduction degree testing device, including:
the clamp is used for clamping the medical endoscope to be tested;
the first traveling mechanism is linked with the clamp and is used for driving the clamp to travel along X, Y, Z directions;
the mask fixing mechanism is arranged in front of the clamp and used for fixing the gray card mask;
the color card fixing mechanism is arranged in front of the mask plate fixing mechanism and used for fixing a standard color card;
the second travelling mechanism is linked with the color card fixing mechanism and is used for driving the color card fixing mechanism to travel along the direction Y, Z so as to adjust the relative position of the standard color card and the gray card mask;
the processing module is in signal connection with the first travelling mechanism and the second travelling mechanism respectively and is used for controlling the first travelling mechanism and the second travelling mechanism to run, the processing module is also used for being in signal connection with a medical endoscope to be tested and is used for controlling the medical endoscope to shoot a gray card mask and a standard color card so as to obtain a test image, the obtained test image is processed and operated, and the color reduction error value of each color block is obtained through calculation EAnd the difference in chromaticity CRestoring error values according to the color of each color block EAnd the difference in chromaticity CAnd evaluating the color reduction degree of the medical endoscope to be tested.
Preferably, the medical endoscope color reduction degree testing device further comprises:
the distance measuring assembly is arranged between the clamp and the mask fixing mechanism and used for detecting the relative distance between the medical endoscope and the gray card mask, and the distance measuring assembly is in signal connection with the processing module.
The method and the device for testing the color reduction degree of the medical endoscope have the advantages that:
1. the self-contained light source of the medical endoscope is adopted for illumination in the test process, the self-contained light source is more attached to the actual use environment of the medical endoscope in a human body cavity, and the accuracy of the color reduction test result of the medical endoscope can be improved;
2. the test image is obtained by shooting the color block images one by one, so that the problem of non-uniformity of a light source existing when the whole color block is shot is avoided, the obtained test image has uniform illumination, the problem of shooting distance is solved, the color block can be shot within the optimal imaging distance of the medical endoscope, and the accuracy of the color reduction degree test result of the medical endoscope can be improved;
3. the method uses the image of the same white block as a reference white point, so that the reference values used in the calculation process of converting the color block image from an XYZ color space to a CIELad color space are uniform, and the accuracy of the color reduction degree test result of the medical endoscope can be improved;
4. the problem that when the color block images are shot one by one, due to the fact that the mainboard gains are different due to different color block brightness is solved through the gray card mask, conditions are consistent when the color blocks are shot, and accuracy of a color reduction degree test result of the medical endoscope is improved.
Drawings
FIG. 1 is a flow chart illustrating the steps of a method for testing color rendition of a medical endoscope according to the present disclosure;
FIG. 2 is a schematic diagram of a gray card mask and a standard color card in the color rendition testing method for a medical endoscope according to the disclosure;
fig. 3 is a schematic structural diagram of a medical endoscope color reduction degree testing device according to the present disclosure.
Description of reference numerals: FOV-test image imaging area, A-color block, B-white block, 1-clamp, 2-first walking mechanism, 3-mask fixing mechanism, 4-color card fixing mechanism and 5-second walking mechanism.
Detailed Description
As shown in fig. 1 and 2, the method for testing color reduction of a medical endoscope according to the present disclosure includes the following steps:
and S01, taking a gray card mask and a standard color card, wherein the standard color card is provided with a plurality of color blocks with different colors, and the gray card mask is provided with a through hole for exposing one color block of the standard color card. The color block is a square color block, the through hole is also a square, and the size of the through hole is slightly larger than that of a single color block, so that when the gray card mask is stacked with the standard color card, one color block of the standard color card can be exposed at the through hole. And white blocks for reference comparison are formed beside the through holes, specifically, the white blocks are square white cards with the reflectivity of 100%, and the white blocks are arranged closely to the through holes so as to be compared with color blocks in the through holes.
S02, taking the medical endoscope to be tested, fixing the medical endoscope, stacking the gray card mask and the standard color card to expose the first color block of the standard color card at the through hole, fixing the gray card mask and the standard color card in front of the lens end of the medical endoscope, and enabling the gray card mask to be positioned at one side close to the medical endoscope, specifically, enabling the through hole of the gray card mask to be positioned at the positive center of the image of the medical endoscope, and enabling the color block in the through hole to be positioned at the positive center of the image.
S03, testing in a darkroom or making the illumination of the testing environment less than 1lx to reduce the influence of external light on the testing result, and illuminating the gray card mask and the standard color card by using the self-contained light source of the medical endoscope to make the testing process closer to the actual use process of the medical endoscope;
s04, enabling the medical endoscope to shoot the gray card mask and the standard color card, obtaining a test image of a current color block, storing the obtained test image, and then moving the standard color card to enable the next color block of the standard color card to be exposed at the through hole, wherein usually, a plurality of color blocks of the standard color card are arranged in a matrix, so that when the standard color card is moved, usually, the standard color card moves in two directions X, Y, and then all the color blocks can be sequentially moved to the through hole. And repeating the step, namely acquiring the test images of all color blocks on the standard color card one by one until the test images of all the color blocks on the standard color card are acquired, and finishing the acquisition process of the test images.
S05, after the test images are collected, processing operation is carried out on each test image, and the color reduction error value of each color block is obtained through calculation EAnd the difference in chromaticity CRestoring error values according to the color of each color block EAnd the difference in chromaticity CEvaluating the color reduction degree of the medical endoscope to be tested, specifically, reducing the error value by color EAnd the difference in chromaticity CThe average value and the maximum value of the color reduction rate of the medical endoscope are used for evaluating the color reduction rate of the medical endoscope, and the smaller the numerical value is, the better the color reduction rate performance of the medical endoscope is.
The system combines the actual use environment of the medical endoscope, adopts the self-contained light source of the medical endoscope to illuminate in the test process, is more fit for the actual use environment of the medical endoscope in the human body cavity, and can improve the accuracy of the color reduction test result of the medical endoscope.
Based on the problems of non-uniformity of a light source and the problem that the imaging position in the test process is not the optimal working distance of the medical endoscope in the prior art, a whole shooting mode is not adopted, but a mode of shooting color blocks one by one is adopted, so that the problem of non-uniformity of the light source caused by a large image width can be avoided firstly, and meanwhile, the requirement of micro-distance shooting can be met, so that the medical endoscope images at the optimal working distance during the test, and the accuracy of the color reduction degree test result of the medical endoscope can be improved.
On the other hand, considering the problem that the accuracy of the test result is affected by the difference of the reference white points of the test images with different color blocks, the white blocks are arranged beside the through holes to serve as the reference white points, and when the test images are obtained by moving different color blocks, the reference white points of a plurality of test images are uniform, so that the reference values used in the calculation process of converting the color block images from the XYZ color space to the CIELad color space are uniform, and the accuracy of the color reduction degree test result of the medical endoscope can be improved.
Finally, in the actual verification process, the applicant finds that the problem of uniformity and optimal working distance of a light source can be solved by shooting color blocks one by one to obtain a plurality of test images, but the problem of automatic gain of the main board caused by the color blocks also influences the final test result, the automatic gain of the main board means that the brightness of the shooting area sensed by the medical endoscope is different due to different brightness among different color blocks, so that the endoscope main board can automatically gain according to the brightness of the shooting area when the medical endoscope shoots and images, parameters of the automatic gain of the main board among different color blocks are different, and the accuracy of the test result is influenced. In order to solve the problem, the standard color card and the gray card mask are stacked during testing, so that the overall brightness of a plurality of test images of the medical endoscope is relatively close during imaging, the problem of different mainboard gains among different test images is effectively solved, the shooting conditions of all color blocks are consistent, and the accuracy of the color reduction degree test result of the medical endoscope is improved.
Further, in this embodiment, in the step S05, the processing operation is performed on each test image, and the color reduction error value of each color block is calculated and obtained EAnd the difference in chromaticity CThe method comprises the following steps:
s051, acquiring RGB value of white block image in the test image, recording as first RGB value, converting the first RGB value into XYZ color space, recording as first XYZ value、;
S052, obtaining RGB value of color block image in the test image, recording as second RGB value, converting the second RGB value into XYZ color space, recording as second XYZ value、;
S053, combining the first XYZ values、The second XYZ value、Converting the color space into CIELad color space, and recording the color space values as L, a and b;
s054, calculating and obtaining the color reduction error value of each color block according to the color space values L, a and b EAnd the difference in chromaticity C;
More specifically, in step S051 and step S052, the corresponding relationship between the RGB values and the XYZ values is:
in the step S053, the first XYZ values are combined、The second XYZ value、Converting into a CIELad color space, and converting according to the following formula:
in the step S054, a color reduction error value of each color block is calculated and obtained according to the color space values L, a, and b EAnd the difference in chromaticity CThe color reduction error value EThe calculation formula of (2) is as follows:
in the calculation process, the white block image is converted into the RGB space, the first RGB value of the white block image is obtained, and the first RGB value is converted into the first XYZ value、At the first XYZ value、As a reference value, the second XYZ value、Converting into CIELad color space, and calculating to obtain color reduction error value according to obtained color space values L, a, b EAnd the difference in chromaticity C. The calculation process has the advantages of accurate calculation result and simple operation process.
Further, in this embodiment, in the step S01, the area of the white block is smaller than the area of the color block on the standard color card;
in step S05, the processing operation performed on the test image includes:
converting the test image into a grey-scale map;
performing edge extraction on the obtained gray level image, and refining and extracting a unique edge through morphological expansion, Gaussian filtering, closed operation and morphological corrosion;
traversing and searching each vertex coordinate of two square graphs in the test image, respectively calculating the areas of the two square graphs and recording the areas as the first graph areaAnd a second pattern areaComparing the first graph area with the second graph areaThe square block graph with large area is marked as a color block image, and the square block graph with small area is marked as a white block image.
The area of the white block is smaller than that of the color block, so that the white block image and the color block image can be distinguished conveniently and rapidly and accurately in the image processing process, and the large area of the color block is beneficial to analyzing and calculating the color block image.
Further, in this embodiment, in the step S052, the acquiring RGB values of the color block image in the test image includes:
selecting 70% of the area of the color block image as a region of interest (ROI);
obtaining the average values of r, g and b in the ROI;
normalizing the obtained average values of r, g and b according to a normalization formula to obtain RGB values of the ROI, wherein the normalization formula is as follows:
in the process, 70% of the area of the color block image is selected as the ROI, so that the image data processing amount can be reduced, and the operation speed is improved.
Further, in this embodiment, when the standard color card needs to be moved in the test process, for example, the standard color card is manually moved, on one hand, the efficiency and the automation degree of the test process are reduced, and on the other hand, the manual movement also has the problem that positioning and fixing are inaccurate, which causes influence on the obtained test image and finally influences on the test result. And adopt motor drive standard color chip to remove, then relate to the calculation problem of motor displacement volume, in order to make the motor all can accurately move next target color lump to the through-hole when moving at every turn, the following displacement volume calculation process has been designed to this embodiment:
acquiring a test image containing a current color block, and converting the test image into a gray map;
performing edge extraction on the obtained gray level image, and then thinning and extracting a unique edge;
traversing and searching each vertex coordinate of the color block image in the test image, and calculating to obtain the center point coordinate of the color block image according to each vertex coordinate;
Obtaining the coordinates of the central point of the test imageCalculating the coordinate difference between the central points of the color block image and the test imageWherein, in the step (A),,;
according to the horizontal side length of color blocks on a standard color cardAnd vertical side lengthAnd horizontal side length of color block imageNumber of corresponding pixel pointsLength of vertical sideNumber of corresponding pixel pointsCalculating to obtain image K values in the x direction and the y direction of the color lump image;
according toThe obtained color block image has image K values in the x direction and the y direction and the coordinate difference of the central pointCalculating the displacement for moving the standard color card next timeSpecifically, the K values of the image in the x direction and the y direction of the color patch image are respectively(ii) a The calculation formula of the displacement x and y is=*,=*y。
The above process can calculate the displacement for moving the standard color card next time according to the test image obtained each timeThe displacement can be input into the motor to enable the motor to drive the standard color chip to move a specified distance, and the next color block is accurately moved into the through hole, so that manual labor is not needed, the efficiency and the automation degree of the test process are improved, meanwhile, the position of the standard color chip can be accurately moved, the accuracy of a color reduction test result is improved, and the color reduction degree test result can be accurately tested according to the position of each timeThe obtained test image is calculated and adjusted, and the moving distance of the next standard color card can be calculated by combining the position of the last color block and the size of the standard color card, so that the moving distance is closer to the actual test process, and the color card can be accurately aligned with the through hole every time.
Further, in this embodiment, the number of color blocks on the standard color card is k, for example, k =24 of a 24-color standard color card; in step S04, repeating the above steps, and acquiring the test images of each color patch on the standard color card one by one until the test images of all the color patches on the standard color card are acquired, includes:
when a test image is shot and obtained for the first time, the counting is started to be 1, the counting is increased by 1 when the standard color card is moved and shot each time, and when the counting is accumulated to be equal to k, the test images of all color blocks on the standard color card are obtained.
The judgment process can realize automatic cycle control of the moving times of the standard color card, does not need manual operation, and can improve the efficiency and the automation degree of the test process.
Furthermore, in this embodiment, the gray scale value of the gray card mask is 18%, and the 18% gray card mask can effectively solve the problem of the main board gain difference between different test images, and can improve the accuracy of the color rendition degree test result of the medical endoscope.
As shown in fig. 3, the present disclosure also provides a medical endoscope color reduction degree testing apparatus, including:
the clamp 1 is used for clamping a medical endoscope to be tested, and the clamp 1 can be a conventional pneumatic or electric clamp 1 and is used for clamping the outer side of the medical endoscope to fix the medical endoscope.
The first traveling mechanism 2 is linked with the clamp 1 and used for driving the clamp 1 to travel along X, Y, Z directions, and the first traveling mechanism 2 is a three-way traveling mechanism, so that the position of the clamp 1 can be adjusted in three directions, and the position of the medical endoscope can be flexibly adjusted. In some specific embodiments, X, Y two-directional walking can adopt a conventional driving transmission mode of a motor + a screw rod + a guide rail, and Z-directional walking can be realized by a telescopic cylinder so as to realize three-directional adjustment of the medical endoscope.
Mask fixed establishment 3, mask fixed establishment 3 sets up in the place ahead of anchor clamps 1 for fixed grey card mask, it is specific, mask fixed establishment 3 can be for the mechanical tong, puts into the upper portion of grey card mask between two arm lock of mechanical tong, then exerts fastening force through the bolt and presss from both sides tight grey card mask. The structure can effectively fix the gray card mask, and has simple structure and convenient operation.
The color card fixing mechanism 4 is arranged in front of the mask fixing mechanism 3 and used for fixing a standard color card, and considering the stacking structure of the standard color card and the gray card mask, if the standard color card is fixed in a clamping mode, the clamping hand may interfere with the gray card mask in the moving process of the standard color card.
The second running gear 5, the second running gear 5 links with colour chip fixed establishment 4, a through hole department that is used for driving colour chip fixed establishment 4 and walks along Y, Z direction, the second running gear 5 is two-way running gear, combine the characteristic of the color lump matrix arrangement of standard colour chip, the walking of two directions of second running gear 5X, Z can adopt the drive transmission mode of conventional motor + lead screw + guide rail, can drive standard colour chip through second running gear 5 and move along horizontal and perpendicular two directions, in order to remove the color lump on the standard colour chip one by one to grey card mask.
A processing module (not shown in the figure), which can be an MCU (micro controller Unit), and is in signal connection with the first running mechanism 2 and the second running mechanism 5 respectively, and is used for controlling the first running mechanism 2 and the second running mechanism 5 to run, and is also used for being in signal connection with a medical endoscope to be tested, and is used for controlling the medical endoscope to shoot a gray card mask and a standard color card to obtain a test image, and performing processing operation on the obtained test image, and calculating to obtain the test imageColor reduction error value of each color block EAnd the difference in chromaticity CRestoring error values according to the color of each color block EAnd the difference in chromaticity CAnd evaluating the color reduction degree of the medical endoscope to be tested.
The color reduction degree testing device for the medical endoscope is used for realizing the color reduction degree testing method for the medical endoscope, and the specific implementation process can be understood by referring to the description above, and is not described herein again.
The color reduction degree testing device for the medical endoscope is more attached to the actual use environment of the medical endoscope in the testing process, can accurately test the color reduction degree of the medical endoscope, and is favorable for improving the product quality, safety and reliability of the medical endoscope.
Further, in this embodiment, the color rendition degree testing apparatus for a medical endoscope further includes:
the distance measuring assembly (not shown in the figure) is arranged between the clamp 1 and the mask fixing mechanism 3 and used for detecting the relative distance between the medical endoscope and the gray card mask, and the distance measuring assembly is in signal connection with the processing module. Specifically, the range finding subassembly can be infrared range finding subassembly, including assorted transmitting terminal and receiving terminal, the transmitting terminal is installed in anchor clamps 1 department, the receiving terminal is installed in mask fixed establishment 3 departments, the transmitting terminal is corresponding with the receiving terminal, the transmitting terminal sends infrared signal and is received the response by the receiving terminal, the receiving terminal is with signal input to processing module, calculate and obtain anchor clamps 1 and mask fixed establishment 3's relative distance, and then obtain the relative distance of medical endoscope and grey card mask, can adjust the relative distance of medical endoscope and grey card mask according to the best working distance of medical endoscope, make medical endoscope test in best working distance department, with the accuracy that improves the test result.
In the description of the present disclosure, it is to be understood that the orientation or positional relationship indicated by the directional terms such as "front, rear, upper, lower, left, right", "lateral, vertical, horizontal" and "top, bottom", etc., are generally based on the orientation or positional relationship shown in the drawings, and are used for convenience in describing and simplifying the present disclosure, and in the absence of a contrary explanation, these directional terms are not intended to indicate and imply that the device or element being referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore, should not be considered as limiting the scope of the present disclosure.
Various other modifications and changes may be made by those skilled in the art based on the above-described technical solutions and concepts, and all such modifications and changes should fall within the scope of the claims of the present disclosure.
Claims (10)
1. A color reduction degree testing method for a medical endoscope is characterized by comprising the following steps:
s01, taking a gray card mask and a standard color card, wherein the standard color card is provided with a plurality of color blocks, the gray card mask is provided with a through hole for exposing one of the color blocks of the standard color card, and a white block for reference contrast is formed beside the through hole;
s02, fixing a medical endoscope to be tested, stacking the gray card mask and the standard color card to expose a first color block of the standard color card at the through hole, fixing the gray card mask and the standard color card right in front of the lens end of the medical endoscope, and enabling the gray card mask to be positioned on one side close to the medical endoscope;
s03, illuminating the gray card mask and the standard color card by using a light source of the medical endoscope;
s04, enabling the medical endoscope to shoot the gray card mask and the standard color card, acquiring a test image, and then moving the standard color card to enable the next color block of the standard color card to be exposed at the through hole; repeating the step, and acquiring the test images of all color blocks on the standard color card one by one until the test images of all the color blocks on the standard color card are acquired;
s05, processing and operating each test image, and calculating to obtain the color reduction error value of each color block EAnd the difference in chromaticity CRestoring error values according to the color of each color block EAnd the difference in chromaticity CAnd evaluating the color reduction degree of the medical endoscope to be tested.
2. The method for testing color rendition of a medical endoscope as claimed in claim 1, wherein in step S05, the processing operation is performed on each test image, and the color rendition error value of each color block is calculated EAnd the difference in chromaticity CThe method comprises the following steps:
s051, acquiring RGB value of white block image in the test image, recording as first RGB value, converting the first RGB value into XYZ color space, recording as first XYZ value、;
S052, obtaining RGB value of color block image in the test image, recording as second RGB value, converting the second RGB value into XYZ color space, recording as second XYZ value、;
S053, combining the first XYZ values、The second XYZ value、Converting the color space into CIELad color space, and recording the color space values as L, a and b;
3. The method for testing color rendition of a medical endoscope according to claim 2, wherein in steps S051 and S052, the corresponding relationship between RGB values and XYZ values is:
in the step S053, the first XYZ values are combined、The second XYZ value、Converting into a CIELad color space, and converting according to the following formula:
in the step S054, a color reduction error value of each color block is calculated and obtained according to the color space values L, a, and b EAnd the difference in chromaticity CThe color reduction error value EThe calculation formula of (2) is as follows:
4. the method for testing color rendition of a medical endoscope according to claim 3, wherein in step S01, the area of the white block is smaller than the area of the color block on the standard color chart;
in step S05, the processing operation performed on the test image includes:
converting the test image into a grey-scale map;
performing edge extraction on the obtained gray level image, and then thinning and extracting a unique edge;
traversing and searching each vertex coordinate of two square graphs in the test image, respectively calculating the areas of the two square graphs and recording the areas as the first graph areaAnd a second pattern areaComparing the area of the first graphAnd the second pattern areaThe square block graph with large area is marked as a color block image, and the square block graph with small area is marked as a white block image.
5. The color rendition degree testing method of the medical endoscope according to claim 4, wherein in the step S052, the obtaining of the RGB values of the color block image in the test image comprises:
selecting 70% of the area of the color block image as a region of interest (ROI);
obtaining the average values of r, g and b in the ROI;
normalizing the obtained average values of r, g and b according to a normalization formula to obtain RGB values of the ROI, wherein the normalization formula is as follows:
6. the method for testing color rendition of a medical endoscope according to claim 1, wherein in step S04, the step of obtaining a test image and moving the standard color chart to expose a next color chart of the standard color chart at the through hole includes:
the next time the standard color card is moved by the displacement amount(ii) a The displacement amountThe calculation process of (2) is as follows:
acquiring a test image containing a current color block, and converting the test image into a gray map;
performing edge extraction on the obtained gray level image, and then thinning and extracting a unique edge;
traversing and searching each vertex coordinate of the color block image in the test image, and calculating to obtain the center point coordinate of the color block image according to each vertex coordinate;
Obtaining the coordinates of the central point of the test imageCalculating the coordinate difference between the central points of the color block image and the test imageWherein, in the step (A),,;
according to the horizontal side length of color blocks on a standard color cardAnd vertical side lengthAnd horizontal side length of color block imageNumber of corresponding pixel pointsLength of vertical sideNumber of corresponding pixel pointsCalculating to obtain image K values in the x direction and the y direction of the color lump image;
7. The color reduction degree test method for the medical endoscope, according to the claim 6, characterized in that the number of color blocks on the standard color card is k; in step S04, repeating the above steps, and acquiring the test images of each color patch on the standard color card one by one until the test images of all the color patches on the standard color card are acquired, includes:
when a test image is shot and obtained for the first time, the counting is started to be 1, the counting is increased by 1 when the standard color card is moved and shot each time, and when the counting is accumulated to be equal to k, the test images of all color blocks on the standard color card are obtained.
8. The method for testing color rendition of a medical endoscope as claimed in claim 1, wherein the gray tone of the gray card mask is 18%.
9. A medical endoscope color reduction degree testing device is characterized by comprising:
the clamp is used for clamping the medical endoscope to be tested;
the first traveling mechanism is linked with the clamp and is used for driving the clamp to travel along X, Y, Z directions;
the mask fixing mechanism is arranged in front of the clamp and used for fixing the gray card mask;
the color card fixing mechanism is arranged in front of the mask plate fixing mechanism and used for fixing a standard color card;
the second travelling mechanism is linked with the color card fixing mechanism and is used for driving the color card fixing mechanism to travel along the direction Y, Z so as to adjust the relative position of the standard color card and the gray card mask;
the processing module is in signal connection with the first travelling mechanism and the second travelling mechanism respectively and is used for controlling the first travelling mechanism and the second travelling mechanism to run, the processing module is also used for being in signal connection with a medical endoscope to be tested and is used for controlling the medical endoscope to shoot a gray card mask and a standard color card so as to obtain a test image, the obtained test image is processed and operated, and the color reduction error value of each color block is obtained through calculation EAnd the difference in chromaticity CRestoring error values according to the color of each color block EAnd the difference in chromaticity CAnd evaluating the color reduction degree of the medical endoscope to be tested.
10. The medical endoscope color rendition degree testing apparatus according to claim 9, further comprising:
the distance measuring assembly is arranged between the clamp and the mask fixing mechanism and used for detecting the relative distance between the medical endoscope and the gray card mask, and the distance measuring assembly is in signal connection with the processing module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111572261.7A CN114051135B (en) | 2021-12-21 | 2021-12-21 | Method and device for testing color reduction degree of medical endoscope |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111572261.7A CN114051135B (en) | 2021-12-21 | 2021-12-21 | Method and device for testing color reduction degree of medical endoscope |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114051135A true CN114051135A (en) | 2022-02-15 |
CN114051135B CN114051135B (en) | 2022-06-14 |
Family
ID=80213156
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111572261.7A Active CN114051135B (en) | 2021-12-21 | 2021-12-21 | Method and device for testing color reduction degree of medical endoscope |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114051135B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4831437A (en) * | 1987-08-11 | 1989-05-16 | Olympus Optical Co., Ltd. | Video endoscope system provided with color balance adjusting means |
CN101404776A (en) * | 2007-08-14 | 2009-04-08 | 三星电机株式会社 | Auto white balance method |
CN103431843A (en) * | 2013-08-06 | 2013-12-11 | 上海道生医疗科技有限公司 | Traditional Chinese medicine facial color and tongue picture detecting device with image correction function |
CN111179362A (en) * | 2019-12-14 | 2020-05-19 | 西安交通大学 | Test paper color uniformity detection method based on dynamic illumination correction algorithm |
CN112150955A (en) * | 2019-06-27 | 2020-12-29 | 钰纬科技开发股份有限公司 | Display correction system applied to endoscope and correction method thereof |
-
2021
- 2021-12-21 CN CN202111572261.7A patent/CN114051135B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4831437A (en) * | 1987-08-11 | 1989-05-16 | Olympus Optical Co., Ltd. | Video endoscope system provided with color balance adjusting means |
CN101404776A (en) * | 2007-08-14 | 2009-04-08 | 三星电机株式会社 | Auto white balance method |
CN103431843A (en) * | 2013-08-06 | 2013-12-11 | 上海道生医疗科技有限公司 | Traditional Chinese medicine facial color and tongue picture detecting device with image correction function |
CN112150955A (en) * | 2019-06-27 | 2020-12-29 | 钰纬科技开发股份有限公司 | Display correction system applied to endoscope and correction method thereof |
CN111179362A (en) * | 2019-12-14 | 2020-05-19 | 西安交通大学 | Test paper color uniformity detection method based on dynamic illumination correction algorithm |
Non-Patent Citations (2)
Title |
---|
姬军 等: "CIELAB色空间内窥镜色彩还原能力对比分析", 《中国测试》 * |
姬军 等: "CIELAB色空间内窥镜色彩还原能力对比分析", 《中国测试》, vol. 41, no. 05, 31 May 2015 (2015-05-31), pages 13 - 16 * |
Also Published As
Publication number | Publication date |
---|---|
CN114051135B (en) | 2022-06-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110428762B (en) | OLED panel aging test luminescence characteristic detection method based on pixel brightness | |
CN111624203B (en) | Relay contact point alignment non-contact measurement method based on machine vision | |
CN110966956A (en) | Binocular vision-based three-dimensional detection device and method | |
CN107545550B (en) | Cell image color cast correction method | |
CN112966571B (en) | Standing long jump flight height measurement method based on machine vision | |
CN110769229A (en) | Method, device and system for detecting color brightness of projection picture | |
US20180059398A1 (en) | Image processing device, imaging device, microscope system, image processing method, and computer-readable recording medium | |
CN114051135B (en) | Method and device for testing color reduction degree of medical endoscope | |
CN111203881B (en) | On-line feedback hand-eye calibration method based on weighted least square method | |
JP2009134591A (en) | Vehicle color determination device, vehicle color determination system, and vehicle color determination method | |
CN110913182B (en) | Device and method for rapidly evaluating image signal-to-noise ratio of laparoscopic imaging system | |
CN115631432B (en) | Sea surface target searching device and method | |
CN116883323A (en) | Multiple immunofluorescence image analysis system based on computer vision | |
JP2001311666A (en) | Colorimetric conversion coefficient calculating method and colorimetric image converting method, colorimetric conversion coefficient computing device and colorimetric image converting device, and computer-readable information recording medium with colorimetric conversion coefficient computing program or colorimetric image pickup program recorded thereon | |
CN108550144B (en) | Laser light bar sequence image quality evaluation method based on gray scale reliability | |
CN113762122B (en) | Raindrop detection algorithm based on stroboscopic photo | |
CN106546196A (en) | A kind of optical axis real-time calibration method and system | |
KR102226943B1 (en) | Detection method and detection pad | |
CN114998624A (en) | Image searching method and device | |
KR20210021499A (en) | Detection method and detection pad | |
CN112945125A (en) | Non-contact type tire rolling deformation characteristic testing method | |
CN109087290B (en) | Optical element surface defect detection method based on spectral estimation and electronic beam splitting technology | |
CN111007020A (en) | Double-frame four-spectrum imaging method and application | |
CN110595364B (en) | Space displacement and strain measuring device and method based on CCD camera | |
WO2019140430A1 (en) | Pattern detection at low signal-to-noise ratio with multiple data capture regimes |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |