CN117433753A - Endoscope view angle measuring method and system - Google Patents

Endoscope view angle measuring method and system Download PDF

Info

Publication number
CN117433753A
CN117433753A CN202311402407.2A CN202311402407A CN117433753A CN 117433753 A CN117433753 A CN 117433753A CN 202311402407 A CN202311402407 A CN 202311402407A CN 117433753 A CN117433753 A CN 117433753A
Authority
CN
China
Prior art keywords
coordinate system
endoscope
axis
vector
image
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.)
Pending
Application number
CN202311402407.2A
Other languages
Chinese (zh)
Inventor
孙楠
伍超杰
周帅骏
王圣运
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Electron Microscope Medical Technology Co ltd
Original Assignee
Shanghai Electron Microscope Medical Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Electron Microscope Medical Technology Co ltd filed Critical Shanghai Electron Microscope Medical Technology Co ltd
Priority to CN202311402407.2A priority Critical patent/CN117433753A/en
Publication of CN117433753A publication Critical patent/CN117433753A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M11/00Testing of optical apparatus; Testing structures by optical methods not otherwise provided for
    • G01M11/02Testing optical properties
    • G01M11/0207Details of measuring devices
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/26Measuring arrangements characterised by the use of optical techniques for measuring angles or tapers; for testing the alignment of axes
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M11/00Testing of optical apparatus; Testing structures by optical methods not otherwise provided for
    • G01M11/02Testing optical properties
    • G01M11/0242Testing optical properties by measuring geometrical properties or aberrations
    • G01M11/0257Testing optical properties by measuring geometrical properties or aberrations by analyzing the image formed by the object to be tested
    • G01M11/0264Testing optical properties by measuring geometrical properties or aberrations by analyzing the image formed by the object to be tested by using targets or reference patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10068Endoscopic image

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Endoscopes (AREA)

Abstract

The invention discloses a method and a system for measuring an endoscope viewing angle, wherein the method comprises the following steps: the method comprises the steps of fixing a mirror body of an endoscope to be detected on a clamp, enabling a main shaft of the mirror body to be parallel to an axis of the clamp, obtaining an image of a calibration surface through the endoscope to be detected, enabling the axis of the clamp to be perpendicular to the calibration surface, obtaining position data of a plurality of preset points on the calibration surface in an image coordinate system according to the image, obtaining position data of a measuring coordinate system, wherein the measuring coordinate system is established by taking the axis of the clamp as a Cz axis, obtaining a rotation matrix representing an object image relationship when the endoscope to be detected is imaged according to the position data of the plurality of preset points in the measuring coordinate system and in the image coordinate system, rotating a preset vector in the measuring coordinate system according to the rotation matrix, obtaining an included angle between the rotated vector and the Cz axis, and obtaining a view angle of the endoscope to be detected, wherein the preset vector is a vector parallel to the Cz axis of the measuring coordinate system. The invention does not need to adjust a measuring system in the measuring process, has high measuring efficiency and can improve measuring precision.

Description

Endoscope view angle measuring method and system
Technical Field
The invention relates to the technical field of endoscopes, in particular to a method and a system for measuring an endoscope viewing angle.
Background
Endoscopes are novel optical, mechanical and electrical integrated medical detection equipment, and the ratio of the endoscopes used in the daily medical diagnosis process is increasingly high. Endoscopes exist in a variety of view angle specifications to meet the different use needs of medical personnel. However, due to the influence of errors introduced during the production process, there is a certain deviation between the actual view angle and the design value of the endoscope, and the actual view field image and the target view field image of the endoscope are deviated. If the deviation of the view angle is too large, the quality requirement of the endoscope cannot be met, and the inspection operation of medical staff can be directly influenced, so that the medical staff needs to do more additional operations to adjust the view field, and the medical diagnosis efficiency and accuracy are influenced. Therefore, it is necessary to measure the actual viewing angle of the endoscope.
In the patent with publication number CN113945365B, the endoscope and the measuring plate are moved and rotated by a plurality of motors, so that the viewing axis of the endoscope is perpendicular to the right wall surface of the measuring plate and faces the center of the measuring plate, and the rotation angle value of the measuring plate measured by the angle displacement sensor is the viewing angle. In the patent with publication number CN114061918B, by adjusting two targets, when the centers of the two targets and the view center of the endoscope are substantially collinear, the included angle between the vertical plane and the middle plane where the center mark point of the first target, the center mark point of the second target and the rotation axis of the target bracket are located on the target bracket is the view angle.
According to the measuring method, the endoscope or the measuring plate is required to be rotated and adjusted, the view angle measuring result is obtained in a mode of reading the included angle, the system complexity is high, an additional high-precision rotating mechanism and angle reading equipment are required to be added, the measuring efficiency is low, the measuring system is required to be continuously adjusted to meet the measuring requirement, and alignment deviation is easy to introduce, so that the measuring precision of the view angle is reduced.
Disclosure of Invention
The invention aims to provide an endoscope view angle measuring method and system, which have high measuring efficiency and can improve measuring precision compared with the existing method.
In order to achieve the above purpose, the present invention provides the following technical solutions:
an endoscopic view angle measurement method, comprising:
fixing a lens body of an endoscope to be tested on a clamp, enabling a main shaft of the lens body to be parallel to the axis of the clamp, and obtaining an image of a calibration surface through the endoscope to be tested, wherein the axis of the clamp is perpendicular to the calibration surface;
according to the image, acquiring position data of a plurality of preset points on the calibration surface in an image coordinate system of the endoscope to be detected, and acquiring position data of the plurality of preset points on the calibration surface in a measurement coordinate system, wherein the measurement coordinate system is a three-dimensional coordinate system established by taking the axis of the clamp as a Cz axis;
according to the position data of the preset points in the measurement coordinate system and the position data of the preset points in the image coordinate system, a rotation matrix representing the object-image relationship during the imaging of the endoscope to be detected is obtained, wherein the rotation matrix represents the condition that the object points correspond to image points and rotate around all coordinate axes of the measurement coordinate system;
and rotating a preset vector in the measurement coordinate system according to the rotation matrix, and obtaining an included angle between the rotated vector and the Cz axis of the measurement coordinate system to obtain the view angle of the endoscope to be measured, wherein the preset vector is a vector parallel to the Cz axis of the measurement coordinate system.
Optionally, the measurement coordinate system uses a point on an axis of the fixture as an origin, defines a Cz axis with a vector pointing from the origin to the calibration surface, defines a Cy axis with a vector vertically downward from the origin, and defines a Cx axis with a vector perpendicular to a plane formed by the Cy axis and the Cz axis from the origin.
Optionally, obtaining a rotation matrix representing an object-image relationship when the endoscope to be detected is imaged according to the position data of the plurality of preset points in the measurement coordinate system and the position data of the plurality of preset points in the image coordinate system, including:
establishing an equation set for representing the object image relationship during the imaging of the endoscope to be detected, wherein the equation set is expressed as follows:
bringing the position data of the preset points in the measurement coordinate system and the position data of the preset points in the image coordinate system into the equation set, and solving to obtain the rotation matrix representing the object-image relationship when the endoscope to be detected is imaged;
wherein, [ i ]' h i′ l ]Representing the coordinate sequence of the plurality of preset points in the image coordinate system, [ c ] x c′ y c′ z ]And (3) representing a coordinate sequence of the preset points in the measurement coordinate system, wherein Rot represents the rotation matrix, T represents the translation matrix, and the translation matrix represents the condition that the object points correspond to image points and move along each coordinate axis of the measurement coordinate system.
Optionally, rotating a preset vector in the measurement coordinate system according to the rotation matrix includes:
a unit vector parallel to the Cz axis of the measurement coordinate system is multiplied by the rotation matrix.
Optionally, obtaining an angle between the rotated vector and the Cz axis of the measurement coordinate system includes:
and calculating an included angle of a vector obtained by multiplying a unit vector parallel to the Cz axis of the measurement coordinate system by the rotation matrix and a unit vector parallel to the Cz axis of the measurement coordinate system as a viewing angle of the endoscope to be measured.
Optionally, the preset vector rotation in the measurement coordinate system is expressed as:
wherein N represents a vector after the preset vector in the measurement coordinate system rotates according to the rotation matrix, rot (θ cxcycz ) Representing the rotation matrix, θ cx 、θ cy 、θ cz Respectively representing rotation angles of rotation around three coordinate axes of the measurement coordinate system;
obtaining the included angle between the rotated vector and the preset vector of the measurement coordinate system according to the following formula:
φ=arccos(dot([N cx ,N cy ,N cz ],[0,0,1]));
wherein phi represents the angle between the rotated vector and the preset vector of the measurement coordinate system, arccos () represents the arccosine calculation, and dot (,) represents the dot product of the two vectors.
Optionally, the fixture is provided with a cavity for accommodating and fixing the scope body of the endoscope to be tested, and a central axis of the cavity is used as an axis of the fixture.
Optionally, the calibration surface is provided with a marker, and a center point or a corner point of the marker is used as the preset point.
An endoscope view angle measurement system, comprising:
the calibration surface is provided with a plurality of preset points;
the fixture is used for fixing the endoscope body of the endoscope to be tested, and the axis of the fixture is perpendicular to the calibration surface;
the data processing device is connected with the endoscope to be tested, and is used for controlling the endoscope to be tested to acquire an image of the calibration surface when the endoscope body of the endoscope to be tested is fixed on the clamp, acquiring position data of a plurality of preset points on the calibration surface in an image coordinate system of the endoscope to be tested according to the image, and acquiring position data of the plurality of preset points on the calibration surface in a measurement coordinate system, wherein the measurement coordinate system is a three-dimensional coordinate system established by taking the axis of the clamp as the Cz axis, and acquiring a view angle of the endoscope to be tested according to the position data of the plurality of preset points in the measurement coordinate system and the position data of the image coordinate system, and the main axis of the endoscope body is parallel to the axis of the clamp when the endoscope body of the endoscope to be tested is fixed on the clamp.
Optionally, the data processing device is configured to obtain the view angle of the endoscope to be tested according to the position data of the plurality of preset points in the measurement coordinate system and the position data of the plurality of preset points in the image coordinate system, and the data processing device is configured to:
according to the position data of the preset points in the measurement coordinate system and the position data of the preset points in the image coordinate system, a rotation matrix representing the object-image relationship during the imaging of the endoscope to be detected is obtained, wherein the rotation matrix represents the condition that the object points correspond to image points and rotate around all coordinate axes of the measurement coordinate system;
and rotating a preset vector in the measurement coordinate system according to the rotation matrix, and obtaining an included angle between the rotated vector and the Cz axis of the measurement coordinate system to obtain the view angle of the endoscope to be measured, wherein the preset vector is a vector parallel to the Cz axis of the measurement coordinate system.
According to the technical scheme, the method and the system for measuring the view angle of the endoscope provided by the invention comprise the following steps: the method comprises the steps of fixing a lens body of an endoscope to be detected on a clamp, enabling a main shaft of the lens body to be parallel to an axis of the clamp, obtaining an image of a calibration surface through the endoscope to be detected, enabling the axis of the clamp to be perpendicular to the calibration surface, obtaining position data of a plurality of preset points on the calibration surface in an image coordinate system of the endoscope to be detected according to the image, obtaining position data of a plurality of preset points on the calibration surface in a measurement coordinate system, wherein the measurement coordinate system is a three-dimensional coordinate system established by taking the axis of the clamp as a Cz axis, obtaining a rotation matrix representing an object image relationship when the endoscope to be detected is imaged according to the position data of the plurality of preset points in the measurement coordinate system and the position data of the image coordinate system, further enabling preset vectors in the measurement coordinate system to rotate according to the rotation matrix, obtaining included angles between the rotated vectors and the Cz axis of the measurement coordinate system, and obtaining a view angle of the endoscope to be detected, and enabling the preset vectors to be parallel to the Cz axis of the measurement coordinate system.
According to the method and the system for measuring the view angle of the endoscope, the endoscope body of the endoscope to be measured is fixed on the clamp, the image of the calibration surface is obtained through the endoscope to be measured, and the view angle of the endoscope to be measured can be obtained according to the collected image and the position data of the preset point on the calibration surface.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for measuring an endoscope view angle according to an embodiment of the present invention;
FIG. 2 shows three patterns that can be provided on a calibration surface according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a measurement coordinate system established in an embodiment of the invention;
FIG. 4 is a schematic diagram of an object-image relationship between a point on a calibration surface and a corresponding point in an image in an endoscopic view angle measurement method according to an embodiment of the present invention;
FIG. 5 is a schematic view illustrating rotation about and movement along coordinate axes of a measurement coordinate system in an endoscopic view angle measurement method according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an endoscope view angle measurement system according to an embodiment of the present invention.
Reference numerals in the drawings of the specification include:
1-supporting rod, 2-clamp, 3-calibration surface, 4-data processing device and 5-endoscope body of endoscope to be tested.
Detailed Description
In order to make the technical solution of the present invention better understood by those skilled in the art, the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of an endoscope viewing angle measurement method according to an embodiment, as shown in the drawing, the endoscope viewing angle measurement method includes the following steps:
s11: and fixing the endoscope body of the endoscope to be tested on the clamp, enabling the main shaft of the endoscope body to be parallel to the axis of the clamp, obtaining an image of the calibration surface through the endoscope to be tested, and enabling the axis of the clamp to be perpendicular to the calibration surface.
After the endoscope body of the endoscope to be tested is fixed on the clamp, the endoscope to be tested is controlled to acquire images on the calibration surface. The main axis of the mirror body is the geometric axis of the mirror body.
S12: according to the image, position data of a plurality of preset points on the calibration surface in an image coordinate system of the endoscope to be measured are obtained, and position data of the plurality of preset points on the calibration surface in a measurement coordinate system are obtained.
The measurement coordinate system is a three-dimensional coordinate system established by taking the axis of the clamp as the Cz axis, and can be a three-dimensional rectangular coordinate system established by taking the axis of the clamp as the Cz axis. When the relative positions of the calibration surface and the clamp are determined, the positions of the plurality of preset points on the calibration surface in the measurement coordinate system can be determined based on the established measurement coordinate system. The image coordinate system of the endoscope to be measured is a coordinate system established based on the imaging surface in the endoscope body.
When the endoscope body of the endoscope to be measured is fixed on the clamp, the main shaft of the endoscope body is parallel to the axis of the clamp, and then the main shaft of the endoscope body is parallel to the Cz axis of the measurement coordinate system.
S13: according to the position data of the preset points in the measurement coordinate system and the position data of the image coordinate system, a rotation matrix representing the object-image relationship during the imaging of the endoscope to be detected is obtained, wherein the rotation matrix represents the condition that the object points correspond to image points and rotate around all coordinate axes of the measurement coordinate system.
The object-image relationship of the endoscope to be detected during imaging can be represented by a rotation matrix and a translation matrix, and object points can be converted according to the rotation matrix and the translation matrix and can be corresponding to image points. The translation matrix characterizes the situation that the object point corresponds to the image point and moves along each coordinate axis of the measurement coordinate system.
S14: and rotating a preset vector in the measurement coordinate system according to the rotation matrix, and obtaining an included angle between the rotated vector and the Cz axis of the measurement coordinate system to obtain the view angle of the endoscope to be measured.
The preset vector is a vector parallel to the Cz axis of the measurement coordinate system.
The view angle of the endoscope is the included angle between the geometric axis of the endoscope body and the optical axis of the optical mirror arranged in the endoscope body. When the endoscope body of the endoscope is assembled into the fixture, the main axis of the endoscope body (namely the geometric axis of the endoscope body) is parallel to the Cz axis of the measurement coordinate system, then a preset vector, namely a vector parallel to the Cz axis of the measurement coordinate system, is rotated according to the rotation matrix, the obtained vector can reflect the optical axis direction of the optical mirror in the endoscope body, and based on the obtained vector, the included angle between the rotated vector and the Cz axis of the measurement coordinate system is the view angle of the endoscope to be measured.
According to the method for measuring the view angle of the endoscope, the endoscope body of the endoscope to be measured is fixed to the clamp, the image of the calibration surface is obtained through the endoscope to be measured, and the view angle of the endoscope to be measured can be obtained according to the collected image and the position data of the preset point on the calibration surface.
In this embodiment, the structure of the fixture is not limited, as long as the scope of the endoscope to be measured can be fixed and the axis is calibrated, so that the main axis of the scope can be parallel to the axis of the fixture when the scope of the endoscope to be measured is fixed to the fixture. The jig can be designed according to the endoscope body when the jig is designed so that the main shaft of the endoscope body can be parallel to the axis of the jig when the endoscope body is fitted into the jig. In some embodiments, the clamp is provided with a cavity for receiving and fixing the scope body of the endoscope to be tested, the central axis of the cavity being the axis of the clamp. And (3) placing the endoscope body of the endoscope to be tested into the cavity of the clamp, wherein the main shaft of the endoscope body can be parallel to the central axis of the cavity, namely, the central axis of the clamp.
The calibration surface can be provided with a marker, and the marker can be easily identified from the image by setting a preset point through the marker, so that the preset point can be conveniently identified from the image, and the position data of the marker in the image coordinate system can be obtained. In this embodiment, the markers set on the calibration surface are not limited, and the center point or the corner point of the markers may be used as a preset point. The marker may be, but is not limited to, one or more pattern elements in black and white squares, dots, or crosses, and the one or more patterns may be uniformly distributed on the calibration surface. Referring to fig. 2 for exemplary purposes, fig. 2 illustrates three patterns that may be provided on the calibration surface of an embodiment, which may be black and white squares, dots, or crosses as shown.
After the fixture and the calibration surface are set, a measurement coordinate system is established, a plurality of preset points are selected on the calibration surface, the positions of the preset points on the calibration surface in the measurement coordinate system are determined, and the position data of the preset points are obtained. The position data of each preset point in the measurement coordinate system can be obtained through measurement by using a measuring tool.
Alternatively, the measurement coordinate system may be a Cx axis defined by a vector directed from an origin to the calibration surface with respect to a point on an axis of the jig as the origin, a Cy axis defined by a vector directed vertically downward from the origin, and a Cx axis defined by a vector perpendicular to a plane formed by the Cy axis and the Cz axis from the origin. Referring to fig. 3 for exemplary purposes, fig. 3 is a schematic diagram of a measurement coordinate system established in an embodiment, where, as shown, a vector pointing from the origin toward the calibration surface and parallel to the axis of the jig is defined as a measurement coordinate system Cz axis, a vector pointing vertically downward from the origin is defined as a measurement coordinate system Cy axis, and a vector pointing from the origin perpendicularly to a plane formed by the Cy axis and the Cz axis and horizontally to the right is defined as a measurement coordinate system Cx axis. The center of the clamp is the point on the clamp axis.
Correspondingly, the position data of the preset point on the calibration surface in the measurement coordinate system, namely the coordinates, can be expressed as [ c ] x c y c z ] num Wherein c x Representing the Cx axis component value, c, of the preset point in the measurement coordinate system y Representing Cy axis component value, c of preset point in measurement coordinate system z The component value of the preset point in the measurement coordinate system Cz axis is represented, and num represents the number of the preset point.
And identifying preset points in the image of the calibration surface image acquired by the endoscope to be detected, and determining the position data of each preset point in an image coordinate system. The position data of the preset point in the image coordinate system, namely the coordinates, can be expressed as [ i ] h i l ] num Wherein i is h Representing the row coordinates, i, of the preset points in the image coordinate system l The column coordinates of the preset points in the image coordinate system are represented, and num represents the preset point number. Referring to fig. 4, fig. 4 is a schematic diagram of an object-image relationship between a point on a calibration surface and a corresponding point in an image in an endoscope view angle measurement method according to an embodiment, wherein a marker center or a marker corner point on the calibration surface is used as a preset point.
According to the position data of a plurality of preset points in the measurement coordinate system and the position data of the image coordinate system, the method for obtaining the rotation matrix representing the object-image relationship during the imaging of the endoscope to be detected can comprise the following steps: establishing an equation set for representing the object image relationship during the imaging of the endoscope to be detected, wherein the equation set is expressed as follows:
bringing the position data of the preset points in the measurement coordinate system and the position data of the preset points in the image coordinate system into the equation set, and solving to obtain the rotation matrix representing the object-image relationship when the endoscope to be detected is imaged; wherein, [ i ]' h i′ l ]Representing a coordinate sequence of the plurality of preset points in the image coordinate system, [ c ]' x c′ y c′ z ]And (3) representing a coordinate sequence of the preset points in the measurement coordinate system, wherein Rot represents the rotation matrix, T represents the translation matrix, and the translation matrix represents the condition that the object points correspond to image points and move along each coordinate axis of the measurement coordinate system.
Coordinates c of each preset point in the measurement coordinate system x c y c z ] num And corresponding image coordinate system coordinates [ i ] h i l ] num Substituting the rotation matrix Rot and the translation matrix T into the object image relation equation set to obtain the rotation matrix Rot and the translation matrix T representing the object image relation of the endoscope to be detected during imaging.
Referring to fig. 5, fig. 5 is a schematic view illustrating rotation around and movement along coordinate axes of a measurement coordinate system in an endoscopic view angle measurement method according to an embodiment. Wherein the rotation matrix Rot can be expressed as Rot (θ cxcycz ),θ cx 、θ cy 、θ cz Respectively representing rotation angles, rot (θ cxcycz ) May be referred to as a gesture rotation matrix. The translation matrix may be represented as t= [ T cx ,t cy ,t cz ],t cx 、t cy 、t cz Respectively represent the amounts of translation along three coordinate axes of the measurement coordinate system, t= [ T ] cx ,t cy ,t cz ]May be referred to as an amount of pose translation. Specifically, therein, θ cx Represents the rotation angle theta of the endoscope body around the Cx axis of the measurement coordinate system cy Indicating the rotation angle theta of the endoscope body around the Cy axis of the measurement coordinate system cz Represents the rotation angle, t of the endoscope body around the Cz axis of the measurement coordinate system cx Representing displacement, t, of an endoscope body along a Cx axis of a measurement coordinate system cy Representing the displacement of the endoscope body along the Cy axis of the measurement coordinate system, t cz The displacement of the endoscope along the Cz axis of the measurement coordinate system is shown.
Wherein,wherein:
Rot(1,1)=cos(θ cy )cos(θ cz ),Rot(1,2)=-cos(θ cy )sin(θ cz );
Rot(1,3)=sin(θ cy );
Rot(2,1)=sin(θ cx )sin(θ cy )cos(θ cz )+cos(θ cx )sin(θ cz );
Rot(2,2)=cos(θ cx )cos(θ cz )-sin(θ cx )sin(θ cy )sin(θ cz );
Rot(2,3)=-sin(θ cx )cos(θ cy );
Rot(3,1)=-cos(θ cx )sin(θ cy )cos(θ cz )+sin(θ cx )sin(θ cz );
Rot(3,2)=sin(θ cx )cos(θ cz )+cos(θ cx )sin(θ cy )sin(θ cz );
Rot(3,3)=cos(θ cx )cos(θ cy )。
alternatively, the rotation matrix Rot and the translation matrix T may be obtained by a least squares-based iterative operation solution.
In this embodiment, the preset vector is not limited, and a vector parallel to the Cz axis of the measurement coordinate system may be selected, for example, a unit vector parallel to the Cz axis of the measurement coordinate system may be selected, and the unit vector parallel to the Cz axis of the measurement coordinate system may be rotated according to the rotation matrix, and the vector obtained after rotation may be regarded as the optical axis vector of the optical lens in the endoscope body to be measured. Accordingly, rotating the preset vector in the measurement coordinate system according to the rotation matrix may include: a unit vector parallel to the Cz axis of the measurement coordinate system is multiplied by the rotation matrix. Accordingly, obtaining the angle between the rotated vector and the Cz axis of the measurement coordinate system may include: and calculating an included angle of a vector obtained by multiplying a unit vector parallel to the Cz axis of the measurement coordinate system by the rotation matrix and a unit vector parallel to the Cz axis of the measurement coordinate system as a viewing angle of the endoscope to be measured.
The rotation angle (θ) obtained by solving the object-image relation equation set cxcycz ) Substitution rotation matrix Rot (θ) cxcycz ) The unit vector parallel to the Cz axis of the measurement coordinate system is multiplied by the rotation matrix, expressed as:
wherein N represents an optical axis vector of an optical lens of the endoscope to be tested.
Calculating an included angle between an optical axis vector of an optical mirror of the endoscope to be measured and a Cz axis of a measurement coordinate system according to the following formula, namely, a view angle of the endoscope to be measured:
φ=arccos(dot([N cx ,N cy ,N cz ],[0,0,1]))=arccos(cos(θ cx )cos(θ cy ));
wherein phi represents the included angle between the rotated vector and the preset vector of the measurement coordinate system, namely the included angle between the optical axis vector of the optical mirror of the endoscope to be measured and the Cz axis of the measurement coordinate system, arccosis () represents the inverse cosine calculation, and dot (,) represents the dot product of the two vectors.
The present embodiment also provides an endoscope viewing angle measurement system, including:
the calibration surface is provided with a plurality of preset points;
the fixture is used for fixing the endoscope body of the endoscope to be tested, and the axis of the fixture is perpendicular to the calibration surface;
the data processing device is connected with the endoscope to be tested, and is used for controlling the endoscope to be tested to acquire an image of the calibration surface when the endoscope body of the endoscope to be tested is fixed on the clamp, acquiring position data of a plurality of preset points on the calibration surface in an image coordinate system of the endoscope to be tested according to the image, and acquiring position data of the plurality of preset points on the calibration surface in a measurement coordinate system, wherein the measurement coordinate system is a three-dimensional coordinate system established by taking the axis of the clamp as the Cz axis, and acquiring a view angle of the endoscope to be tested according to the position data of the plurality of preset points in the measurement coordinate system and the position data of the image coordinate system, and the main axis of the endoscope body is parallel to the axis of the clamp when the endoscope body of the endoscope to be tested is fixed on the clamp.
According to the endoscope view angle measuring system, the endoscope body of the endoscope to be measured is fixed to the clamp, the image of the calibration surface is obtained through the endoscope to be measured, and the view angle of the endoscope to be measured can be obtained according to the collected image and the position data of the preset point on the calibration surface.
Referring to fig. 6 for exemplary purposes, fig. 6 is a schematic diagram of an endoscope view angle measurement system according to an embodiment, as shown in the drawing, a lens body 5 of an endoscope to be measured is fixed to a fixture 2, an axis of the fixture 2 is perpendicular to a calibration surface 3, and the fixture 2 is supported by a support rod 1. The scope body 5 of the endoscope to be tested is connected with the data processing device 4. Wherein a calibration plate can be used, one surface of the calibration plate is used as a calibration surface 3, and a marker is arranged on the calibration surface 3.
Optionally, the data processing device 4 is configured to obtain the view angle of the endoscope to be tested according to the position data of the plurality of preset points in the measurement coordinate system and the position data of the plurality of preset points in the image coordinate system, where the data processing device 4 is configured to:
according to the position data of the preset points in the measurement coordinate system and the position data of the preset points in the image coordinate system, a rotation matrix representing the object-image relationship during the imaging of the endoscope to be detected is obtained, wherein the rotation matrix represents the condition that the object points correspond to image points and rotate around all coordinate axes of the measurement coordinate system;
and rotating a preset vector in the measurement coordinate system according to the rotation matrix, and obtaining an included angle between the rotated vector and the Cz axis of the measurement coordinate system to obtain the view angle of the endoscope to be measured, wherein the preset vector is a vector parallel to the Cz axis of the measurement coordinate system.
In this embodiment, the implementation of the fixture and the calibration surface, and the implementation of the data processing device 4 to obtain the view angle of the endoscope to be measured according to the image, the position data of the plurality of preset points on the calibration surface in the image coordinate system, and the position data of the plurality of preset points on the calibration surface in the measurement coordinate system may refer to the corresponding implementation of the above-mentioned method for measuring the view angle of the endoscope, which is not described herein again.
The method and the system for measuring the view angle of the endoscope provided by the invention are described in detail. The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the method of the present invention and its core ideas. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.

Claims (10)

1. An endoscope viewing angle measurement method, comprising:
fixing a lens body of an endoscope to be tested on a clamp, enabling a main shaft of the lens body to be parallel to the axis of the clamp, and obtaining an image of a calibration surface through the endoscope to be tested, wherein the axis of the clamp is perpendicular to the calibration surface;
according to the image, acquiring position data of a plurality of preset points on the calibration surface in an image coordinate system of the endoscope to be detected, and acquiring position data of the plurality of preset points on the calibration surface in a measurement coordinate system, wherein the measurement coordinate system is a three-dimensional coordinate system established by taking the axis of the clamp as a Cz axis;
according to the position data of the preset points in the measurement coordinate system and the position data of the preset points in the image coordinate system, a rotation matrix representing the object-image relationship during the imaging of the endoscope to be detected is obtained, wherein the rotation matrix represents the condition that the object points correspond to image points and rotate around all coordinate axes of the measurement coordinate system;
and rotating a preset vector in the measurement coordinate system according to the rotation matrix, and obtaining an included angle between the rotated vector and the Cz axis of the measurement coordinate system to obtain the view angle of the endoscope to be measured, wherein the preset vector is a vector parallel to the Cz axis of the measurement coordinate system.
2. The endoscopic view angle measurement method according to claim 1, wherein the measurement coordinate system defines a Cz axis with a point on an axis of the jig as an origin, a Cy axis with a vector directed from the origin toward the calibration surface, a Cy axis with a vector directed vertically downward from the origin, and a Cx axis with a vector perpendicular to a plane composed of the Cy axis and the Cz axis from the origin.
3. The endoscope viewing angle measurement method according to claim 1, wherein obtaining a rotation matrix characterizing an object-image relationship at the time of imaging of the endoscope to be measured from position data of the plurality of preset points in the measurement coordinate system and position data in the image coordinate system, comprises:
establishing an equation set for representing the object image relationship during the imaging of the endoscope to be detected, wherein the equation set is expressed as follows:
bringing the position data of the preset points in the measurement coordinate system and the position data of the preset points in the image coordinate system into the equation set, and solving to obtain the rotation matrix representing the object-image relationship when the endoscope to be detected is imaged;
wherein, [ i ]' h i′ l ]Representing a coordinate sequence of the plurality of preset points in the image coordinate system, [ c ]' x c′ y c′ z ]And (3) representing a coordinate sequence of the preset points in the measurement coordinate system, wherein Rot represents the rotation matrix, T represents the translation matrix, and the translation matrix represents the condition that the object points correspond to image points and move along each coordinate axis of the measurement coordinate system.
4. The endoscopic view angle measurement method according to claim 1, wherein rotating a preset vector in the measurement coordinate system according to the rotation matrix comprises:
a unit vector parallel to the Cz axis of the measurement coordinate system is multiplied by the rotation matrix.
5. The method of claim 4, wherein obtaining the angle of the rotated vector with respect to the Cz axis of the measurement coordinate system comprises:
and calculating an included angle of a vector obtained by multiplying a unit vector parallel to the Cz axis of the measurement coordinate system by the rotation matrix and a unit vector parallel to the Cz axis of the measurement coordinate system as a viewing angle of the endoscope to be measured.
6. The endoscopic view angle measurement method according to claim 1, wherein a preset vector in the measurement coordinate system is expressed as rotation according to the rotation matrix as:
wherein N represents a vector after the preset vector in the measurement coordinate system rotates according to the rotation matrix, rot (θ cxcycz ) Representing the rotation matrix, θ cx 、θ cy 、θ cz Respectively representing rotation angles of rotation around three coordinate axes of the measurement coordinate system;
obtaining the included angle between the rotated vector and the preset vector of the measurement coordinate system according to the following formula:
φ=arccos(dot([N cx ,N cy ,N cz ],[0,0,1]));
wherein phi represents the angle between the rotated vector and the preset vector of the measurement coordinate system, arccos () represents the arccosine calculation, and dot (,) represents the dot product of the two vectors.
7. The endoscope viewing angle measurement method according to claim 1, wherein the jig is provided with a cavity for accommodating and fixing the scope body of the endoscope to be measured, a central axis of the cavity being an axis of the jig.
8. The endoscope viewing angle measurement method according to claim 1, wherein the calibration surface is provided with a marker, and a center point or a corner point of the marker is used as the preset point.
9. An endoscope viewing angle measurement system, comprising:
the calibration surface is provided with a plurality of preset points;
the fixture is used for fixing the endoscope body of the endoscope to be tested, and the axis of the fixture is perpendicular to the calibration surface;
the data processing device is connected with the endoscope to be tested, and is used for controlling the endoscope to be tested to acquire an image of the calibration surface when the endoscope body of the endoscope to be tested is fixed on the clamp, acquiring position data of a plurality of preset points on the calibration surface in an image coordinate system of the endoscope to be tested according to the image, and acquiring position data of the plurality of preset points on the calibration surface in a measurement coordinate system, wherein the measurement coordinate system is a three-dimensional coordinate system established by taking the axis of the clamp as the Cz axis, and acquiring a view angle of the endoscope to be tested according to the position data of the plurality of preset points in the measurement coordinate system and the position data of the image coordinate system, and the main axis of the endoscope body is parallel to the axis of the clamp when the endoscope body of the endoscope to be tested is fixed on the clamp.
10. The endoscope viewing angle measurement system of claim 9, wherein the data processing apparatus for obtaining the viewing angle of the endoscope under test based on the position data of the plurality of preset points in the measurement coordinate system and the position data in the image coordinate system comprises the data processing apparatus for:
according to the position data of the preset points in the measurement coordinate system and the position data of the preset points in the image coordinate system, a rotation matrix representing the object-image relationship during the imaging of the endoscope to be detected is obtained, wherein the rotation matrix represents the condition that the object points correspond to image points and rotate around all coordinate axes of the measurement coordinate system;
and rotating a preset vector in the measurement coordinate system according to the rotation matrix, and obtaining an included angle between the rotated vector and the Cz axis of the measurement coordinate system to obtain the view angle of the endoscope to be measured, wherein the preset vector is a vector parallel to the Cz axis of the measurement coordinate system.
CN202311402407.2A 2023-10-26 2023-10-26 Endoscope view angle measuring method and system Pending CN117433753A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311402407.2A CN117433753A (en) 2023-10-26 2023-10-26 Endoscope view angle measuring method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311402407.2A CN117433753A (en) 2023-10-26 2023-10-26 Endoscope view angle measuring method and system

Publications (1)

Publication Number Publication Date
CN117433753A true CN117433753A (en) 2024-01-23

Family

ID=89551033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311402407.2A Pending CN117433753A (en) 2023-10-26 2023-10-26 Endoscope view angle measuring method and system

Country Status (1)

Country Link
CN (1) CN117433753A (en)

Similar Documents

Publication Publication Date Title
TW201831858A (en) Camera and specimen alignment to facilitate large area imaging in microscopy
CN111862238B (en) Full-space monocular light pen type vision measurement method
CN109272555B (en) External parameter obtaining and calibrating method for RGB-D camera
CN113724337B (en) Camera dynamic external parameter calibration method and device without depending on tripod head angle
CN106447729B (en) A kind of two-dimensional digital image correlative compensation method and two-dimension optical digital picture correlation extensometer based on coordinate transform
JP5270138B2 (en) Calibration jig and calibration method
CN110108203B (en) Silk thread position measuring method and system based on photogrammetry technology
CN105559809B (en) Scanning method and device
CN111145247B (en) Position degree detection method based on vision, robot and computer storage medium
CN109556528A (en) A kind of one camera 3 D video extensometer and measurement method
CN111336937B (en) 2D device for improving measurement precision of cylinder diameter and measurement method thereof
CN110458894B (en) Calibration method for camera and contact type measuring head of measuring machine
CN117433753A (en) Endoscope view angle measuring method and system
CN113359382B (en) Device suitable for testing camera lenses with different field angles, adjusting method and testing method
CN204314239U (en) X ray CT device
CN114061472B (en) Method for correcting measurement coordinate error based on target
CN112507871B (en) Inspection robot and detection method thereof
CN115290008A (en) Angle calibration algorithm of image measurement collimator
CN116592757A (en) Two-dimensional precision compensation method of measurement system
CN112308890B (en) Standard ball-assisted reliable registration method for industrial CT measurement coordinate system
CN111947896A (en) System and method for aligning optical center of lens with center of photosensitive surface of imaging sensor
CN111754584A (en) Remote large-field-of-view camera parameter calibration system and method
CN113670280A (en) Verticality measuring device and method
CN111780683A (en) Portable scanning system and method of use
CN113945174B (en) X-ray projection measurement image size calibration method

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