A method and system for detecting viewing angle

Through horizontal parallel correction and multiple imaging calculations, and combining Pythagorean theorem and triangle similarity principle to calculate the endoscopic visual angle, the problem of insufficient detection accuracy in the prior art is solved, and higher detection accuracy and operation simplicity is achieved.

CN119374870BActive Publication Date: 2025-04-18GUANGZHOU WEISHI OPTOELECTRONICS MEDICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411947796.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-18
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

In the prior art, the visual angle detection of the endoscope has complexity, and it is difficult to ensure that the endoscope spindle axis is perpendicular to the plane of the test map, resulting in insufficient detection accuracy.

Method used

By installing the endoscope to be tested and the test diagram card, the center of the spindle is collinear with the center of the card surface of the test diagram card, horizontally parallel correction is performed, and the offset is calculated through multiple imaging and rotation, and the viewing angle is calculated based on the Pythagorean theorem and the triangle similarity principle.

Benefits of technology

It improves the accuracy of endoscopic visual angle detection, solves the problem of perpendicularity of the spindle axis and the test card plane, and simplifies the operation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119374870B_ABST
    Figure CN119374870B_ABST
Patent Text Reader

Abstract

The invention discloses a viewing angle detection method and system. The method comprises the following steps: making the main axis center of an endoscope to be tested and the center of a card surface of a test chart collinear, installing the endoscope to be tested and the test chart, adjusting the endoscope to be tested so that a first horizontal line is parallel to a second horizontal line according to an image formed by the endoscope to be tested on the test chart, determining a test distance and a position of the endoscope to be tested, making the endoscope to be tested image the test chart, calculating an offset according to a straight-line distance between the visual axis center of the endoscope to be tested and the center of the card surface of the test chart in the image, and calculating the viewing angle of the endoscope to be tested by using the offset in combination with the Pythagorean theorem and the principle of triangle similarity. The invention solves the problem of the main axis of the endoscope being perpendicular to the plane of the test chart that is lacking in the prior art, and can calculate a more accurate viewing angle of the endoscope.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of endoscope detection, and in particular to a viewing angle detection method and system. Background Art

[0002] The viewing angle of an endoscope determines the direction and range that the endoscope can observe. The viewing angle of an endoscope is affected by many factors, including the design of the endoscope body, the configuration of the optical system, and the manufacturing process.

[0003] The Chinese patent publication number: CN117433753A discloses a method and system for measuring the viewing angle of an endoscope. The method includes: fixing the body of the endoscope to be tested on a fixture so that the main axis of the body is parallel to the axis of the fixture, and acquiring an image of a calibration surface through the endoscope to be tested, and the axis of the fixture is perpendicular to the calibration surface. When performing actual measurement operations in the prior art, due to factors such as the field of view, focal length and possible distortion of the endoscope, there is a certain technical difficulty in adjusting the position and angle of the endoscope to ensure that the axis of the fixture is completely perpendicular to the calibration surface, which increases the complexity of the operation.

[0004] The present invention solves the above-mentioned technical shortcomings of the prior art by:

[0005] The main axis center of the endoscope to be tested is aligned with the center of the card surface of the test chart, and the endoscope to be tested and the test chart are installed. According to the image formed by the endoscope to be tested on the test chart, the image center horizontal line of the endoscope to be tested is parallel to the center horizontal line of the card surface of the test chart. After determining the test distance and the endoscope position, the endoscope to be tested is imaged on the test chart to obtain a first image, the endoscope to be tested is rotated 180 degrees around its main axis to obtain a second image, the test chart is moved along the main axis of the endoscope to be tested by a second test distance D2 to obtain a third image, and the endoscope to be tested is rotated 180 degrees around its main axis to obtain a second image. The fourth image is obtained by rotating 180 degrees, and the first offset, the second offset, the third offset and the fourth offset are calculated respectively according to the first image, the second image, the third image and the fourth image, and one of the viewing angles of the endoscope to be tested is calculated by combining the first offset and the fourth offset, and another viewing angle of the endoscope to be tested is calculated by combining the second offset and the third offset, and the viewing angle actually measured is calculated by combining the two calculated viewing angles, which solves the problem in the prior art that the main axis of the endoscope is required to be perpendicular to the plane of the test chart, and improves the accuracy of endoscope viewing angle detection. Summary of the invention

[0006] In order to solve the above-mentioned technical problems, the present invention provides a viewing angle detection method.

[0007] The technical solution of the present invention is implemented as follows: A viewing angle detection method comprises:

[0008] S101, installing an endoscope to be tested, and installing a test chart at the front end of the imaging surface of the endoscope to be tested, so that the main axis center of the endoscope to be tested is collinear with the center of the card surface of the test chart;

[0009] S102, performing horizontal parallel correction on the image formed by the test chart according to the endoscope to be tested, wherein the horizontal parallel correction is specifically as follows: recording the central horizontal line of the image formed by the endoscope to be tested as a first horizontal line, recording the central horizontal line of the card surface of the test chart as a second horizontal line, and adjusting the endoscope to be tested so that the first horizontal line is parallel to the second horizontal line in the horizontal direction;

[0010] S103, record the straight-line distance between the endoscope to be tested and the test chart as the first test distance D1, make the endoscope to be tested image the test chart for the first time, and obtain the first image; rotate the endoscope to be tested 180 degrees around its main axis, make the endoscope to be tested image the test chart for the second time, and obtain the second image; move the test chart along the main axis of the endoscope to be tested by a second test distance D2, make the endoscope to be tested image the test chart for the third time, and obtain the third image; rotate the endoscope to be tested 180 degrees around its main axis, make the endoscope to be tested image the test chart for the fourth time, and obtain the fourth image;

[0011] S104, respectively calculating the offsets of the first image, the second image, the third image, and the fourth image, and recording them as a first offset P1, a second offset P2, a third offset P3, and a fourth offset P4, respectively, recording the point corresponding to the center of the card surface of the test chart in the image formed by the endoscope to be tested as a reference point, and the offset is the straight-line distance between the center of the visual axis of the endoscope to be tested and the reference point in the image formed by the endoscope to be tested on the test chart;

[0012] S105. Calculate the first viewing angle θ1 of the endoscope to be tested according to the first offset P1 and the fourth offset P4, calculate the second viewing angle θ2 of the endoscope to be tested according to the second offset P2 and the third offset P3, and calculate the viewing angle θ of the endoscope to be tested by combining the first viewing angle θ1 and the second viewing angle θ2.

[0013] Further, in step S101, a first fixing member and a second fixing member are provided, wherein the first fixing member has an installation position for installing the endoscope to be tested, and the second fixing member is used for installing a test chart;

[0014] A calibration object is set at the axis position of the installation station, the calibration object is colinear with the axis of the installation station, a test card is installed at the second fixing part, the calibration object is made to abut against the center of the card surface of the test card, the calibration object is removed, and the endoscope to be tested is installed on the first fixing part.

[0015] Further, in step S102, when making the first horizontal line parallel to the second horizontal line in the horizontal direction, if the image formed by the endoscope to be tested has an image center auxiliary horizontal line, the image center auxiliary horizontal line is made parallel to the second horizontal line by rotating the endoscope to be tested. At this time, the first horizontal line is parallel to the second horizontal line in the horizontal direction; otherwise, the endoscope to be tested is rotated so that the second horizontal line coincides with or is parallel to the row pixels of the image center. At this time, the first horizontal line is parallel to the second horizontal line in the horizontal direction.

[0016] Furthermore, in step S103, a horizontal parallel correction is performed after each rotation of the endoscope to be tested and before the endoscope to be tested forms an image on the test chart.

[0017] Further, in step S104, calculating the offset of the image includes: using an image processing tool to identify the visual axis center of the endoscope to be tested in the image formed by the endoscope to be tested on the test chart, and obtaining the straight-line distance between the visual axis center of the endoscope to be tested and the reference point by reading the scale on the card surface of the test chart;

[0018] Alternatively, in the image of the endoscope to be tested formed by the test chart, an image processing tool is used to identify the visual axis center of the endoscope to be tested, the pixel value of the interval between the visual axis center of the endoscope to be tested and a reference point is obtained, and the straight-line distance between the visual axis center of the endoscope to be tested and the reference point is calculated based on the pixel value of the interval obtained.

[0019] Further, in step S105, according to the calculated first offset P1 and fourth offset P4, in combination with the Pythagorean theorem and the principle of triangle similarity, as well as the first test distance D1 and the second test distance D2, a first viewing angle θ1 of the endoscope to be tested is calculated;

[0020] According to the calculated second offset P2 and third offset P3, in combination with the Pythagorean theorem and the principle of triangle similarity, as well as the first test distance D1 and the second test distance D2, a second viewing angle θ2 of the endoscope to be tested is calculated;

[0021] In combination with the first viewing angle θ1 and the second viewing angle θ2, the viewing angle θ of the endoscope to be tested is calculated, including: calculating the average value of the first viewing angle θ1 and the second viewing angle θ2, taking the larger value or taking the smaller value.

[0022] The system solution of the present invention is implemented as follows: a viewing angle detection system, comprising:

[0023] The installation module is used to install the endoscope to be tested, and install the test chart at the front end of the imaging surface of the endoscope to be tested, so that the main axis center of the endoscope to be tested is collinear with the center of the card surface of the test chart; the image formed by the test chart is horizontally corrected according to the endoscope to be tested, and the horizontal parallel correction is specifically as follows: the central horizontal line of the image formed by the endoscope to be tested is recorded as the first horizontal line, the central horizontal line of the card surface of the test chart is recorded as the second horizontal line, and the endoscope to be tested is adjusted so that the first horizontal line is parallel to the second horizontal line in the horizontal direction;

[0024] The detection module is used to record the straight-line distance between the endoscope to be tested and the test chart as a first test distance D1, and make the endoscope to be tested image the test chart for the first time to obtain a first image; rotate the endoscope to be tested 180 degrees around its main axis, and make the endoscope to be tested image the test chart for the second time to obtain a second image; move the test chart along the main axis of the endoscope to be tested by a second test distance D2, and make the endoscope to be tested image the test chart for the third time to obtain a third image; rotate the endoscope to be tested 180 degrees around its main axis, and make the endoscope to be tested image the test chart for the fourth time to obtain a fourth image;

[0025] The detection module is also used to calculate the offsets of the first image, the second image, the third image, and the fourth image, and record them as the first offset P1, the second offset P2, the third offset P3, and the fourth offset P4 respectively, and record the point corresponding to the center of the card surface of the test chart in the image formed by the endoscope to be tested as the reference point, and the offset is the straight-line distance between the center of the visual axis of the endoscope to be tested and the reference point in the image formed by the endoscope to be tested on the test chart;

[0026] According to the first offset P1 and the fourth offset P4, the first viewing angle θ1 of the endoscope to be tested is calculated, and according to the second offset P2 and the third offset P3, the second viewing angle θ2 of the endoscope to be tested is calculated. In combination with the first viewing angle θ1 and the second viewing angle θ2, the viewing angle θ of the endoscope to be tested is calculated.

[0027] The viewing angle detection method and system described in the present application have the advantages that after adjusting the main axis center of the endoscope to be tested and the center of the card surface of the test chart to be collinear, the endoscope to be tested is installed and the test chart is installed at the front end of the imaging surface of the endoscope to be tested. According to the image formed by the endoscope to be tested on the test chart, the center horizontal line of the image is made parallel to the center horizontal line of the card surface of the test chart. After determining the test distance and the position of the endoscope to be tested, the present invention obtains a first image, rotates the endoscope to be tested 180 degrees around its main axis, obtains a second image, moves the test chart along the main axis of the endoscope to be tested by a second test distance, obtains a third image, keeps the second test distance unchanged, rotates the endoscope to be tested 180 degrees around its main axis, and After the endoscope returns to the initial position for acquiring the first image, a fourth image is acquired, and the first offset, second offset, third offset and fourth offset in the image are calculated respectively according to the respectively acquired first image, second image, third image and fourth image, and the first viewing angle θ1 of the endoscope to be tested is calculated in combination with the first offset and the fourth offset, and the second viewing angle θ2 of the endoscope to be tested is calculated in combination with the second offset and the third offset, and the actually measured viewing angle θ of the endoscope to be tested is obtained in combination with the first viewing angle θ1 and the second viewing angle θ2 of the endoscope to be tested, which solves the problem that the main shaft axis of the endoscope cannot be guaranteed to be perpendicular to the plane of the test chart in the prior art, and improves the accuracy of endoscope viewing angle detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 is a structural block diagram of a viewing angle detection method in an embodiment of the present invention;

[0029] Figure 2 A flowchart of a method for detecting a viewing angle according to an embodiment of the present invention;

[0030] Figure 3 A pattern of a test chart 1 of a viewing angle detection method in an embodiment of the present invention;

[0031] Figure 4 A pattern of a test chart 2 of a viewing angle detection method in an embodiment of the present invention;

[0032] Figure 5 is a relationship diagram for calculating a first viewing angle θ1 of an endoscope to be tested established in a viewing angle detection method in an embodiment of the present invention;

[0033] Figure 6 is a relationship diagram for calculating a second viewing angle θ2 of an endoscope to be tested established in a viewing angle detection method in an embodiment of the present invention;

[0034] Figure 7 A structural block diagram of a viewing angle detection system in an embodiment of the present invention;

[0035] Description of reference numerals:

[0036] 1-working platform, 2-casing, 3-fixture, 4-marking card, 5-endoscope to be tested, 6-slide rail. DETAILED DESCRIPTION

[0037] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0038] The preferred implementation methods of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these implementation methods are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0039] It can be understood that the terms "first", "second", etc. used in the present application can be used in this article to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.

[0040] When used herein, the singular forms "a", "an", and "said / the" may also include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "include / comprise" or "have" and the like specify the presence of stated features, wholes, steps, operations, components, parts, or combinations thereof, but do not exclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof. At the same time, the term "and / or" used in this specification includes any and all combinations of the relevant listed items.

[0041] See also Figure 1-Figure 6 As shown, a viewing angle detection method includes:

[0042] S101, installing an endoscope to be tested, and installing a test chart at the front end of the imaging surface of the endoscope to be tested, so that the main axis center of the endoscope to be tested is collinear with the center of the card surface of the test chart;

[0043] S102, performing horizontal parallel correction on the image formed by the test chart according to the endoscope to be tested, wherein the horizontal parallel correction is specifically as follows: recording the central horizontal line of the image formed by the endoscope to be tested as a first horizontal line, recording the central horizontal line of the card surface of the test chart as a second horizontal line, and adjusting the endoscope to be tested so that the first horizontal line is parallel to the second horizontal line in the horizontal direction;

[0044] S103, record the straight-line distance between the endoscope to be tested and the test chart as the first test distance D1, make the endoscope to be tested image the test chart for the first time, and obtain the first image; rotate the endoscope to be tested 180 degrees around its main axis, make the endoscope to be tested image the test chart for the second time, and obtain the second image; move the test chart along the main axis of the endoscope to be tested by a second test distance D2, make the endoscope to be tested image the test chart for the third time, and obtain the third image; rotate the endoscope to be tested 180 degrees around its main axis, make the endoscope to be tested image the test chart for the fourth time, and obtain the fourth image;

[0045] S104, respectively calculating the offsets of the first image, the second image, the third image, and the fourth image, and recording them as a first offset P1, a second offset P2, a third offset P3, and a fourth offset P4, respectively, recording the point corresponding to the center of the card surface of the test chart in the image formed by the endoscope to be tested as a reference point, and the offset is the straight-line distance between the center of the visual axis of the endoscope to be tested and the reference point in the image formed by the endoscope to be tested on the test chart;

[0046] S105. Calculate the first viewing angle θ1 of the endoscope to be tested according to the first offset P1 and the fourth offset P4, calculate the second viewing angle θ2 of the endoscope to be tested according to the second offset P2 and the third offset P3, and calculate the viewing angle θ of the endoscope to be tested by combining the first viewing angle θ1 and the second viewing angle θ2.

[0047] like Figure 1-Figure 4 As shown, in step S101, an endoscope to be tested is installed, and a test chart is installed at the front end of the imaging surface of the endoscope to be tested, so that the main axis center of the endoscope to be tested is collinear with the center of the card surface of the test chart.

[0048] Specifically, a first fixing member and a second fixing member are provided, wherein the first fixing member has an installation position for installing the endoscope to be tested, and the second fixing member is used for installing the test chart.

[0049] A calibration object is set at the axis position of the installation station, the calibration object is colinear with the axis of the installation station, a test card is installed at the second fixing part, the calibration object is made to abut against the center of the card surface of the test card, the calibration object is removed, and the endoscope to be tested is installed on the first fixing part.

[0050] The method of setting a correction object at the axis position of the installation station is as follows: a pin adapted to the installation station is inserted at the axis position of the installation station, or a straight line laser is emitted with the axis of the installation station as a path.

[0051] In a feasible embodiment, the first fixing member and the second fixing member are installed on the working platform 1, the first fixing member includes a clamp 3 and a sleeve 2, the clamp 3 is used to clamp the sleeve 2 and adjust the focusing position, the sleeve 2 is a circular hollow sleeve made of a hard material, the inner diameter size is consistent with the outer diameter size of the endoscope 5 to be tested, and is used to place the endoscope 5 to be tested and ensure that the endoscope 5 to be tested is coaxial with the sleeve 2, the second fixing member includes a mark card 4 and a guide rail, the mark card 4 is used to place the test chart, the guide rail extends from a position close to the first fixing member to a direction away from the first fixing member, the mark card 4 is slidably installed on the guide rail, so that the mark card 4 can move along the guide rail to approach or move away from the first fixing member, thereby adjusting the distance between the test chart and the endoscope 5 to be tested.

[0052] In a feasible embodiment, the test chart includes test chart 1 or test chart 2, the card surface of the test chart 1 is composed of equally spaced grids, and the smaller the spacing of the grids on the card surface of the test chart 1 is, the more accurate the reading is; the card surface of the test chart 2 is composed of equally spaced cross marks, and the smaller the spacing of the cross marks on the card surface of the test chart 2 is, the more accurate the reading is.

[0053] like Figure 1-Figure 4 As shown, in step S102, a horizontal parallel correction is performed on the image formed by the test chart according to the endoscope to be tested, and the horizontal parallel correction is specifically as follows: the central horizontal line of the image formed by the endoscope to be tested is recorded as the first horizontal line, and the central horizontal line of the card surface of the test chart is recorded as the second horizontal line, and the endoscope to be tested is adjusted so that the first horizontal line is parallel to the second horizontal line in the horizontal direction.

[0054] Specifically, when making the first horizontal line parallel to the second horizontal line in the horizontal direction, if the image formed by the endoscope to be tested has an image center auxiliary horizontal line, the endoscope to be tested is rotated around its main axis so that the image center auxiliary horizontal line is parallel to the second horizontal line. At this time, the first horizontal line is parallel to the second horizontal line in the horizontal direction; otherwise, the endoscope to be tested is rotated around its main axis so that the second horizontal line coincides with or is parallel to the row pixels of the image center. At this time, the first horizontal line is parallel to the second horizontal line in the horizontal direction.

[0055] like Figure 1-Figure 6As shown, in step S103, the straight-line distance between the endoscope to be tested and the test chart is recorded as the first test distance D1, and the endoscope to be tested is imaged with the test chart for the first time to obtain a first image; the endoscope to be tested is rotated 180 degrees around its main axis, and the endoscope to be tested is imaged with the test chart for the second time to obtain a second image; the test chart is moved along the main axis of the endoscope to be tested by a second test distance D2, and the endoscope to be tested is imaged with the test chart for the third time to obtain a third image; the endoscope to be tested is rotated 180 degrees around its main axis, and the endoscope to be tested is imaged with the test chart for the fourth time to obtain a fourth image.

[0056] Specifically, after each rotation of the endoscope to be tested and before the endoscope to be tested images the test chart, horizontal parallel correction is performed. The specific process is as follows:

[0057] The straight-line distance between the endoscope to be tested and the test chart is recorded as a first test distance D1, and the endoscope to be tested is imaged for the first time to obtain a first image;

[0058] Keeping the first test distance D1 unchanged, the endoscope to be tested is rotated 180 degrees around its main axis, and after the image formed by the endoscope to be tested on the test chart is horizontally paralleled, the endoscope to be tested is imaged on the test chart for the second time to obtain a second image;

[0059] The test chart is moved along the main axis of the endoscope to be tested by a second test distance D2, and the endoscope to be tested is imaged for the third time to obtain a third image;

[0060] Keeping the second test distance D2 unchanged, rotate the endoscope to be tested 180 degrees around its main axis to return the endoscope to be tested to the position when the first image was obtained, perform horizontal parallel correction on the image formed by the endoscope to be tested on the test chart, and then make the endoscope to be tested image the test chart for the fourth time to obtain the fourth image.

[0061] like Figure 1-Figure 6 As shown, in step S104, the offsets of the first image, the second image, the third image, and the fourth image are calculated respectively and recorded as a first offset P1, a second offset P2, a third offset P3, and a fourth offset P4, respectively. The point corresponding to the center of the card surface of the test chart in the image formed by the endoscope to be tested is recorded as a reference point. The offset is the straight-line distance between the center of the visual axis of the endoscope to be tested and the reference point in the image formed by the endoscope to be tested on the test chart.

[0062] Specifically, calculating the offset of the image includes: using image processing tools to identify the visual axis center of the endoscope to be tested in the image formed by the endoscope to be tested on the test chart, and obtaining the straight-line distance between the visual axis center of the endoscope to be tested and the reference point by reading the scale on the card surface of the test chart.

[0063] Alternatively, in the image of the endoscope to be tested formed by the test chart, an image processing tool is used to identify the visual axis center of the endoscope to be tested, the pixel value of the interval between the visual axis center of the endoscope to be tested and a reference point is obtained, and the straight-line distance between the visual axis center of the endoscope to be tested and the reference point is calculated based on the pixel value of the interval obtained.

[0064] The specific calculation of the image offset is: the image offset is equal to the offset pixel value of the interval between the visual axis center of the endoscope to be tested and the reference point in the image multiplied by the length of the test chart occupied by a unit pixel in the image.

[0065] In a feasible embodiment, the offset of the image is calculated as:

[0066] The following contents are preset: In the image formed by the endoscope to be tested on the test chart, and in the pixel coordinate system of the image, the x-coordinate and y-coordinate of the visual axis center point of the endoscope to be tested are preset as follows: and , the x- and y-coordinates of the reference point are and , the length of the test chart occupied by a unit pixel in the image is S, and the horizontal and vertical offsets Pl and Pv from the visual axis center of the endoscope to be tested to the reference point are calculated as follows:

[0067] ;

[0068] ;

[0069] Then the calculation of the image offset P is:

[0070] P^2 = (Pl)^2 + (Pv)^2;

[0071] Take the square root of P^2 to get the offset P of the image.

[0072] like Figure 1-Figure 6 As shown, in step S105, the first viewing angle θ1 of the endoscope to be tested is calculated according to the first offset P1 and the fourth offset P4, the second viewing angle θ2 of the endoscope to be tested is calculated according to the second offset P2 and the third offset P3, and the viewing angle θ of the endoscope to be tested is calculated by combining the first viewing angle θ1 and the second viewing angle θ2.

[0073] Specifically, the first viewing angle θ1 of the endoscope to be tested is calculated according to the first offset P1 and the fourth offset P4 of the first image and the fourth image, and combined with the Pythagorean theorem and the principle of triangle similarity. The specific calculation formula includes:

[0074] (P1)^2 = (L3 + a1)^2 + (y1)^2;

[0075] (P4)^2 = (L1 + a1)^2 + (x1)^2;

[0076] (D1 + D2 - x1) / L1 = (D1 - y1) / L3;

[0077] (L1 + a1) / x1 = (L3 + a1) / y1;

[0078] tan(θ1) = L3 / (D1 - y1) or tan(θ1) = L1 / (D1 + D2 - x1);

[0079] θ1 = arctan(L3 / (D1 - y1)) or θ1 = arctan(L1 / (D1 + D2 - x1));

[0080] Among them, P1 and P4 are the first offset and the fourth offset respectively, x1 and y1 are the vertical inclinations of the fourth image and the first image respectively when the test chart is assumed to be not perpendicular to the main axis of the endoscope to be tested, a1 is the horizontal offset of the main axis of the endoscope to be tested relative to the starting point of the visual axis of the endoscope to be tested, D1 is the first test distance, D2 is the second test distance, L1 and L3 are the horizontal distances from the center of the visual axis of the endoscope to be tested in the fourth image and the first image to the reference point respectively, and θ1 is the first viewing angle of the endoscope to be tested.

[0081] The first offset P1 of the first image, the fourth offset P4 of the fourth image, the first test distance D1 between the endoscope to be tested and the test chart, and the second test distance D2 of the test chart moving along the main axis of the endoscope to be tested are known. After calculating the values ​​of L1 or L3, a1, x1 or y1 according to the specific calculation formula for calculating the first viewing angle θ1 of the endoscope to be tested, the tangent value of the first viewing angle θ1 of the endoscope to be tested is calculated using the tangent theorem of a right triangle, and the angle value of the first viewing angle θ1 of the endoscope to be tested is calculated using the inverse tangent value.

[0082] The second viewing angle θ2 of the endoscope to be tested is calculated according to the second offset P2 and the third offset P3 of the second image and the third image, and in combination with the Pythagorean theorem and the principle of triangle similarity. The specific calculation formula includes:

[0083] (P2)^2 = (L4 + a2)^2 + (y2)^2;

[0084] (P3)^2 = (L2 + a2)^2 + (x2)^2;

[0085] (D1 + D2 + x2) / L2 = (D1 + y2) / L4;

[0086] (L2 + a2) / x2= (L4 + a2) / y2;

[0087] tan(θ2)= L4 / (D1 + y2) or tan(θ2)= L2 / (D1 + D2 + x2);

[0088] θ2= arctan(L4 / (D1 + y2)) or (θ2)= arctan(L2 / (D1 + D2 + x2));

[0089] Among them, P2 and P3 are the second offset and the third offset respectively, x2 and y2 are the vertical inclinations of the third image and the second image respectively when the test chart is assumed to be not perpendicular to the main axis of the endoscope to be tested, a2 is the horizontal offset of the main axis of the endoscope to be tested relative to the starting point of the visual axis of the endoscope to be tested, D1 is the first test distance, D2 is the second test distance, L2 and L4 are the horizontal distances from the center of the visual axis of the endoscope to be tested to the reference point in the third image and the second image respectively, and θ2 is the second viewing angle of the endoscope to be tested.

[0090] The second offset P2 of the second image, the third offset P3 of the third image, the first test distance D1 between the endoscope to be tested and the test chart, and the second test distance D2 of the test chart moved along the main axis of the endoscope to be tested are known. After calculating the values ​​of L2 or L4, a2, x2 or y2 according to the specific calculation formula for calculating the second viewing angle θ2 of the endoscope to be tested, the tangent value of the second viewing angle θ2 of the endoscope to be tested is calculated using the tangent theorem of a right triangle, and the angle value of the second viewing angle θ2 of the endoscope to be tested is calculated using the inverse tangent value.

[0091] In combination with the first viewing angle θ1 and the second viewing angle θ2, the viewing angle θ of the endoscope to be tested is calculated, including: calculating the average value of the first viewing angle θ1 and the second viewing angle θ2, taking the larger value or taking the smaller value.

[0092] In a feasible embodiment, when the main axis of the endoscope to be tested is perpendicular to the card surface of the test chart, and it is ensured that the main axis of the endoscope to be tested does not change when the endoscope to be tested rotates around its main axis, the angle values ​​of the calculated first viewing angle θ1 and the second viewing angle θ2 are equal, but in the actual measurement process or in the actual calibration process, it cannot be ensured that the main axis of the endoscope to be tested is perpendicular to the card surface of the test chart, and it cannot be ensured that the main axis of the endoscope to be tested does not change when the endoscope to be tested rotates around its main axis. Then, by calculating the average value of the first viewing angle θ1 and the second viewing angle θ2 of the endoscope to be tested, the actual measurement value of the viewing angle θ of the endoscope to be tested is obtained, and the specific calculation formula is:

[0093] θ = (θ1 + θ2) / 2;

[0094] Wherein, θ represents the viewing angle of the endoscope to be tested, θ1 represents the first viewing angle of the endoscope to be tested, and θ2 represents the second viewing angle of the endoscope to be tested.

[0095] In a feasible embodiment, the viewing angle θ of the endoscope to be tested takes the larger value or the smaller value of the first viewing angle θ1 and the second viewing angle θ2;

[0096] Among them, the viewing angle θ of the endoscope to be tested takes the larger value of the first viewing angle θ1 and the second viewing angle θ2, which can specifically include: according to the actual needs of the test, selecting a larger viewing angle value between the first viewing angle θ1 and the second viewing angle θ2 as the actual measured value of the viewing angle θ of the endoscope to be tested.

[0097] Exemplarily, when the first viewing angle θ1 is less than and equal to 30 degrees and the second viewing angle θ2 is less than and equal to 30 degrees, the larger viewing angle value of the first viewing angle θ1 and the second viewing angle θ2 is selected as the actual measurement value of the viewing angle θ of the endoscope to be tested.

[0098] The viewing angle θ of the endoscope to be tested takes the smaller value of the first viewing angle θ1 and the second viewing angle θ2, which can specifically include: according to the actual requirements of the test, selecting a smaller viewing angle value between the first viewing angle θ1 and the second viewing angle θ2 as the actual measured value of the viewing angle θ of the endoscope to be tested.

[0099] Exemplarily, when the first viewing angle θ1 is greater than 30 degrees and the second viewing angle θ2 is greater than 30 degrees, the smaller viewing angle value of the first viewing angle θ1 and the second viewing angle θ2 is selected as the actual measurement value of the viewing angle θ of the endoscope to be tested.

[0100] See also Figure 7 As shown, a viewing angle detection system includes:

[0101] An installation module is used to install the endoscope to be tested, and install a test chart at the front end of the imaging surface of the endoscope to be tested, so that the main axis center of the endoscope to be tested is collinear with the center of the card surface of the test chart; according to the endoscope to be tested, the image formed by the test chart is horizontally corrected, and the horizontal correction is specifically as follows: the center horizontal line of the image formed by the endoscope to be tested is recorded as a first horizontal line, the center horizontal line of the card surface of the test chart is recorded as a second horizontal line, and the endoscope to be tested is adjusted so that the first horizontal line is parallel to the second horizontal line in the horizontal direction;

[0102] A detection module, which is used to record the straight-line distance between the endoscope to be tested and the test chart as a first test distance D1, and make the endoscope to be tested image the test chart for the first time to obtain a first image; rotate the endoscope to be tested 180 degrees around its main axis, and make the endoscope to be tested image the test chart for the second time to obtain a second image; move the test chart along the main axis of the endoscope to be tested by a second test distance D2, and make the endoscope to be tested image the test chart for the third time to obtain a third image; rotate the endoscope to be tested 180 degrees around its main axis, and make the endoscope to be tested image the test chart for the fourth time to obtain a fourth image;

[0103] The detection module is also used to calculate the offsets of the first image, the second image, the third image, and the fourth image, respectively, and record them as the first offset P1, the second offset P2, the third offset P3, and the fourth offset P4, respectively, and record the point corresponding to the center of the card surface of the test chart in the image formed by the endoscope to be tested as the reference point, and the offset is the straight-line distance between the center of the visual axis of the endoscope to be tested and the reference point in the image formed by the endoscope to be tested on the test chart;

[0104] According to the first offset P1 and the fourth offset P4, the first viewing angle θ1 of the endoscope to be tested is calculated, according to the second offset P2 and the third offset P3, the second viewing angle θ2 of the endoscope to be tested is calculated, and the viewing angle θ of the endoscope to be tested is calculated by combining the first viewing angle θ1 and the second viewing angle θ2.

[0105] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

[0106] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and rules of the present invention shall be included in the protection scope of the present invention.

Claims

1. A viewing angle detection method, characterized in that: The following steps are involved: S101, installing an endoscope to be tested, and installing a test chart at the front end of the imaging surface of the endoscope to be tested, so that the main axis center of the endoscope to be tested is collinear with the center of the card surface of the test chart; S102, performing horizontal parallel correction on the image formed by the test chart according to the endoscope to be tested, wherein the horizontal parallel correction is specifically as follows: recording the central horizontal line of the image formed by the endoscope to be tested as a first horizontal line, recording the central horizontal line of the card surface of the test chart as a second horizontal line, and adjusting the endoscope to be tested so that the first horizontal line is parallel to the second horizontal line in the horizontal direction; S103, record the straight-line distance between the endoscope to be tested and the test chart as the first test distance D1, make the endoscope to be tested image the test chart for the first time, and obtain the first image; rotate the endoscope to be tested 180 degrees around its main axis, make the endoscope to be tested image the test chart for the second time, and obtain the second image; move the test chart along the main axis of the endoscope to be tested by a second test distance D2, make the endoscope to be tested image the test chart for the third time, and obtain the third image; rotate the endoscope to be tested 180 degrees around its main axis, make the endoscope to be tested image the test chart for the fourth time, and obtain the fourth image; S104, respectively calculating the offsets of the first image, the second image, the third image, and the fourth image, and recording them as a first offset P1, a second offset P2, a third offset P3, and a fourth offset P4, respectively, recording the point corresponding to the center of the card surface of the test chart in the image formed by the endoscope to be tested as a reference point, and the offset is the straight-line distance between the center of the visual axis of the endoscope to be tested and the reference point in the image formed by the endoscope to be tested on the test chart; S105. Calculate the first viewing angle θ1 of the endoscope to be tested according to the first offset P1 and the fourth offset P4, calculate the second viewing angle θ2 of the endoscope to be tested according to the second offset P2 and the third offset P3, and calculate the viewing angle θ of the endoscope to be tested by combining the first viewing angle θ1 and the second viewing angle θ2.

2. A viewing angle detection method according to claim 1, characterized in that: Step S101 specifically includes setting a first fixing member and a second fixing member, wherein the first fixing member has an installation position for installing the endoscope to be tested, and the second fixing member is used for installing the test chart; A calibration object is arranged at the axis position of the installation station, the calibration object is colinear with the axis of the installation station, the test chart is installed at the second fixing part, the calibration object is made to abut against the center of the card surface of the test chart, the calibration object is removed, and the endoscope to be tested is installed on the first fixing part.

3. A viewing angle detection method according to claim 2, characterized in that: The method of setting a correction object at the axis position of the installation station specifically includes: inserting a pin adapted to the installation station at the axis position of the installation station, or emitting a straight line laser with the axis of the installation station as a path.

4. A viewing angle detection method according to claim 1, characterized in that: In step S102, when making the first horizontal line parallel to the second horizontal line in the horizontal direction, if the image formed by the endoscope to be tested has an image center auxiliary horizontal line, then the image center auxiliary horizontal line is made parallel to the second horizontal line. At this time, the first horizontal line is parallel to the second horizontal line in the horizontal direction; otherwise, the second horizontal line is made to coincide with or be parallel to the row pixels of the image center. At this time, the first horizontal line is parallel to the second horizontal line in the horizontal direction.

5. A viewing angle detection method according to claim 4, characterized in that: In step S103, a horizontal parallel calibration is performed after each rotation of the endoscope to be tested and before the endoscope to be tested forms an image on the test chart.

6. A viewing angle detection method according to claim 1, characterized in that: In step S104, calculating the offset of the image includes: using an image processing tool to identify the visual axis center of the endoscope to be tested in the image formed by the endoscope to be tested on the test chart, and obtaining the straight-line distance between the visual axis center of the endoscope to be tested and the reference point by reading the scale on the card surface of the test chart; Alternatively, in the image of the endoscope to be tested formed by the test chart, an image processing tool is used to identify the visual axis center of the endoscope to be tested, the pixel value of the interval between the visual axis center of the endoscope to be tested and the reference point is obtained, and the straight-line distance between the visual axis center of the endoscope to be tested and the reference point is calculated based on the pixel value of the interval obtained.

7. A viewing angle detection method according to claim 1, characterized in that: In step S105, the first viewing angle θ1 of the endoscope to be tested is calculated according to the first offset P1 and the fourth offset P4, the first test distance D1 and the second test distance D2 in combination with the Pythagorean theorem and the principle of triangle similarity. The calculation formula includes: (P1)^2 = (L3 + a1)^2 + (y1)^2; (P4)^2 = (L1 + a1)^2 + (x1)^2; (D1 + D2 - x1) / L1 = (D1 - y1) / L3; (L1 + a1) / x1 = (L3 + a1) / y1; tan(θ1) = L3 / (D1 - y1) or tan(θ1) = L1 / (D1 + D2 - x1); θ1= arctan(L3 / (D1 - y1)) or θ1= arctan(L1 / (D1 + D2 - x1)); Wherein, P1 and P4 are the first offset and the fourth offset respectively, x1 and y1 are the vertical tilts of the fourth image and the first image respectively when the test chart is assumed to be not perpendicular to the main axis of the endoscope to be tested, a1 is the horizontal offset of the main axis of the endoscope to be tested relative to the starting point of the visual axis of the endoscope to be tested, D1 is the first test distance, D2 is the second test distance, L1 and L3 are the horizontal distances from the center of the visual axis of the endoscope to be tested in the fourth image and the first image to the reference point respectively, and θ1 is the first viewing angle of the endoscope to be tested; In combination with the Pythagorean theorem and the principle of triangle similarity, the second viewing angle θ2 of the endoscope to be tested is calculated according to the second offset P2 and the third offset P3, as well as the first test distance D1 and the second test distance D2. The calculation formula includes: (P2)^2 = (L4 + a2)^2 + (y2)^2; (P3)^2 = (L2 + a2)^2 + (x2)^2; (D1 + D2 - x1) / L1 = (D1 - y1) / L3; (L1 + a1) / x1 = (L3 + a1) / y1; tan(θ2) = L4 / (D1 + y2) or tan(θ2) = L2 / (D1 + D2 + x2); θ2= arctan(L4 / (D1 + y2)) or θ2= arctan(L2 / (D1 + D2 + x2)); Wherein, P2 and P3 are the second offset and the third offset respectively, x2 and y2 are the vertical tilts of the third image and the second image respectively when the test chart is assumed to be not perpendicular to the main axis of the endoscope to be tested, a2 is the horizontal offset of the main axis of the endoscope to be tested relative to the starting point of the visual axis of the endoscope to be tested, D1 is the first test distance, D2 is the second test distance, L2 and L4 are the horizontal distances from the center of the visual axis of the endoscope to be tested in the third image and the second image to the reference point respectively, and θ2 is the second viewing angle of the endoscope to be tested; In combination with the first viewing angle θ1 and the second viewing angle θ2, the viewing angle θ of the endoscope to be tested is calculated, including: calculating the average value of the first viewing angle θ1 and the second viewing angle θ2, taking the larger value, or taking the smaller value.

8. A viewing angle detection system, using a viewing angle detection method as claimed in any one of claims 1 to 7, characterized in that: include: An installation module is used to install the endoscope to be tested, and install a test chart at the front end of the imaging surface of the endoscope to be tested, so that the main axis center of the endoscope to be tested is collinear with the center of the card surface of the test chart; according to the endoscope to be tested, the image formed by the test chart is horizontally corrected, and the horizontal correction is specifically as follows: the center horizontal line of the image formed by the endoscope to be tested is recorded as a first horizontal line, the center horizontal line of the card surface of the test chart is recorded as a second horizontal line, and the endoscope to be tested is adjusted so that the first horizontal line is parallel to the second horizontal line in the horizontal direction; A detection module, which is used to record the straight-line distance between the endoscope to be tested and the test chart as a first test distance D1, and make the endoscope to be tested image the test chart for the first time to obtain a first image; rotate the endoscope to be tested 180 degrees around its main axis, and make the endoscope to be tested image the test chart for the second time to obtain a second image; move the test chart along the main axis of the endoscope to be tested by a second test distance D2, and make the endoscope to be tested image the test chart for the third time to obtain a third image; rotate the endoscope to be tested 180 degrees around its main axis, and make the endoscope to be tested image the test chart for the fourth time to obtain a fourth image; The detection module is also used to calculate the offsets of the first image, the second image, the third image, and the fourth image, respectively, and record them as the first offset P1, the second offset P2, the third offset P3, and the fourth offset P4, respectively, and record the point corresponding to the center of the card surface of the test chart in the image formed by the endoscope to be tested as the reference point, and the offset is the straight-line distance between the center of the visual axis of the endoscope to be tested and the reference point in the image formed by the endoscope to be tested on the test chart; According to the first offset P1 and the fourth offset P4, the first viewing angle θ1 of the endoscope to be tested is calculated, according to the second offset P2 and the third offset P3, the second viewing angle θ2 of the endoscope to be tested is calculated, and the viewing angle θ of the endoscope to be tested is calculated by combining the first viewing angle θ1 and the second viewing angle θ2.

Citation Information

Patent Citations

  • Method and system for measuring viewing angle of endoscope

    CN117433753A

  • Detection device for viewing angle of endoscope

    CN219624671U