TW201818347A - The method of complete endoscopic MIS instrument 3D position estimation using a single 2D image - Google Patents

The method of complete endoscopic MIS instrument 3D position estimation using a single 2D image Download PDF

Info

Publication number
TW201818347A
TW201818347A TW105135385A TW105135385A TW201818347A TW 201818347 A TW201818347 A TW 201818347A TW 105135385 A TW105135385 A TW 105135385A TW 105135385 A TW105135385 A TW 105135385A TW 201818347 A TW201818347 A TW 201818347A
Authority
TW
Taiwan
Prior art keywords
ring
image
dimensional
iii
angle
Prior art date
Application number
TW105135385A
Other languages
Chinese (zh)
Other versions
TWI594208B (en
Inventor
沈岱範
許家銓
Original Assignee
國立雲林科技大學
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 國立雲林科技大學 filed Critical 國立雲林科技大學
Priority to TW105135385A priority Critical patent/TWI594208B/en
Application granted granted Critical
Publication of TWI594208B publication Critical patent/TWI594208B/en
Publication of TW201818347A publication Critical patent/TW201818347A/en

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Analysis (AREA)

Abstract

This invention is about the method of endoscopic MIS instrument tracking based 3D complete eight quadrants position estimation and using 2D image. It can extends the original formular for one particular pose to formulars for any pose. It can select the colors of the two rings as well as the RGB thresholds for fast and accurate ring shape extraction from the 2D image by analyzing a large amount of laparoscopic images. And, it can propose an algorithm with a 2D laparoscopic image as the input and the corresponding six 3D pose parameters as the output., and the six 3D pose parameters of a real rod-shaped body is estimated by the proposed system and transmitted to drive its 3D model in the remote. Thus, compared to other existing MIS pose estimation methods, the proposed Double-Ring marker based algorithm of this invention is accurate and computationally very efficient.

Description

基於二維影像及三維完整八象限定位之內視鏡手術器械追蹤方法Endoscopic surgical instrument tracking method based on two-dimensional image and three-dimensional complete eight-image limited position

本發明係關於一種基於二維影像及三維完整八象限定位之內視鏡手術器械追蹤方法,可運用於實際手術當中,以及結合3D擴增實境技術(Augmented Reality,AR)在遠距手術環境之應用。The present invention relates to an endoscopic surgical instrument tracking method based on two-dimensional images and three-dimensional complete eight-image limited position, which can be used in actual surgery, and combined with 3D augmented reality (AR) in a remote surgical environment. Application.

當前微創手術(MIS)在近幾十年來,已成為越來越流行的手術,也因微創手術大大的減低了病患的疼痛與縮短了恢復時間,使得微創手術廣為病人所接受。傳統上要完成的MIS,至少一個助手控制腹腔鏡攝像頭,和一個外科醫生,控制腹腔鏡器械進行手術是必要的。為了幫助外科醫生專注於手術,助理需要的責任,要確保手術器械的尖端要位於攝影機視圖的中央,隨者助理的幫助下,外科醫生可以直接觀察2D攝影機視圖去操作工具,但對於一個助理很難保持攝影相機一段時間的穩定型,此外由於2D照相機視圖缺乏深度資訊,一個外科醫生應該要經過足夠的訓練來進行手術,因此一個系統可以自動跟蹤器械並重建其方向和位置,在微創手術(MIS)的過程中變得更加重要。At present, minimally invasive surgery (MIS) has become an increasingly popular operation in recent decades, and minimally invasive surgery has greatly reduced the pain of patients and shortened the recovery time, making minimally invasive surgery widely accepted by patients. . Traditionally, MIS, at least one assistant controls the laparoscopic camera, and a surgeon, controlling the laparoscopic instrument for surgery is necessary. In order to help the surgeon focus on the surgery, the assistant needs to ensure that the tip of the surgical instrument is located in the center of the camera view. With the help of the assistant, the surgeon can directly observe the 2D camera view to operate the tool, but for an assistant It is difficult to maintain a stable camera for a period of time, and because the 2D camera view lacks depth information, a surgeon should be trained enough to perform surgery, so a system can automatically track the instrument and reconstruct its orientation and position in minimally invasive surgery. The process of (MIS) has become more important.

按,目前電腦視覺系統取得二維影像中的深度訊息的傳統方法是利用同一物件在兩台以上的攝影機位置來估測。而本國專利申請案第104143279號「標記式圓桿狀物體二維影像之三維定位方法及其應用於內視鏡器械定位與追蹤之方法」之專利申請案中,曾提出的以均勻圓桿狀物體(如內視鏡之手術器械)在單一鏡頭相機拍攝下,藉由在桿上兩個位置分別貼上兩個相同形狀,但不同顏色之環形標記,運用現代數位影像處理的相關技術,能有效的偵測出標記物以及圓桿狀物體在影像平面上所有的2D資訊,且透過鏡頭映射在相機感測器成像位置之幾何關係,快速求出圓桿狀物體3D定位資訊。此圓桿狀物體之3D定位參數共有七個。前三個參數為3D座標值,最後是In-plane角和Out-plane角三個角度,該專利申請案也提出在桿狀物體上環之標記,以進制編碼方式估測自軸旋轉角度。此七個參數決定唯一圓桿狀物體之3D姿勢。According to the current method of computer vision system to obtain depth information in two-dimensional images, the same object is used to estimate the position of two or more cameras. In the patent application No. 104143279 of the National Patent Application No. 104143279, the method for three-dimensional positioning of a two-dimensional image of a marked round rod object and the method for positioning and tracking the endoscope device, the uniform round rod shape has been proposed. Objects (such as endoscopic surgical instruments) can be photographed by a single lens camera by applying two identical shapes on the two positions of the rod, but the circular marks of different colors, using the relevant technology of modern digital image processing, Effectively detect all the 2D information of the marker and the round object in the image plane, and quickly find the 3D positioning information of the round object through the geometric relationship of the lens mapping at the imaging position of the camera. There are seven 3D positioning parameters for this round rod object. The first three parameters are the 3D coordinate values, and finally the three angles of the In-plane angle and the Out-plane angle. The patent application also proposes marking the ring on the rod-shaped object, and estimates the angle of rotation of the shaft in a binary code. These seven parameters determine the 3D pose of the unique round bar object.

然而,前述專利申請案係以均勻圓桿狀物體(如內視鏡之手術器械)在單一鏡頭環境中,可藉由在桿上兩個位置分別貼上兩個相同形狀,但不同顏色之環形標記來快速算出物體三維參數。但其只推導單一姿態的推導公式並不足以估測圓桿狀物任意姿態,並無在真實MIS微創手術的背景下執行,精準度上有改進空間且未做量測誤差的分析。However, the aforementioned patent application uses a uniform round rod-like object (such as an endoscopic surgical instrument) in a single lens environment, by which two identical shapes are respectively attached to the two positions on the rod, but the rings of different colors are used. Mark to quickly calculate the 3D parameters of the object. However, its derivation formula for deducing a single pose is not enough to estimate the arbitrary posture of the round rod. It is not performed in the context of real MIS minimally invasive surgery. There is room for improvement in accuracy and no measurement error is analyzed.

鑑於上述第104143279號專利申請案的技術問題點,於是本發明人窮盡心思研發出一種基於二維影像及三維完整八象限定位之內視鏡手術器械追蹤方法,故本發明最主要目的在於:提供快速又精確的內視鏡手術器械追蹤方法;本發明次要目的在於:提供在複雜器官背景中可辨識出雙環的完整輪廓。In view of the technical problem of the above-mentioned patent application No. 104143279, the present inventors have exhaustedly developed an endoscopic surgical instrument tracking method based on two-dimensional images and three-dimensional complete eight-image limited position, so the main purpose of the present invention is to provide A fast and accurate endoscopic surgical instrument tracking method; a secondary objective of the present invention is to provide a complete contour that can be identified in a complex organ background.

為達上述目的,本發明運用如下的技術手段:一種運用三維完整八象限定位之內視鏡手術器械追蹤方法,係包含有:一雙環輪廓取出步驟,係將所輸入的投影於平面之手術器械影像擷取其第一環體(A)與第二環體(B)之平面影像;一影像座標轉換步驟,係設定前述第一環體及第二環體平面影像的中心為原點,並進行其座標轉換;一找出雙環重心的步驟,係分別計算出第一環體及第二環體的重心座標;一取得雙環二維資訊步驟,將該第一環體及第二環的重心座標連線形成軸線段之直線方程式(L)並透過邊緣點以計算出該第一環體的二中心端點座標A1、A2及該第二環體的二中心端點座標B1、B2;一像素轉換毫米單位步驟,係將前述四個端點座標A1、A2、B1、B2轉換成毫米單位;一進行三維姿態估測步驟,係使用上個步驟終的端點座標A1、A2、B1、B2及已知的攝影機焦距(λ),環軸長(L),雙環重心軸長(LAB ),雙環兩端投射點(xa1 xa2 xb1 xb2 )和(ya1 ya2 yb1 yb2 )之參數,並配合使用三維八像限定位系統,進而求出求該手術器械的三維定位參數{XA1 ,YA1 ,ZA1 ,α,β,γ}之參數,進而可快速算該手術器械在空間的任意姿態。In order to achieve the above object, the present invention utilizes the following technical means: an endoscopic surgical instrument tracking method using a three-dimensional complete eight-image limited position, comprising: a double-loop contour removal step, which is to input the projected surgical instrument onto the plane The image captures a planar image of the first ring body (A) and the second ring body (B); an image coordinate conversion step sets the center of the first ring body and the second ring body plane image as an origin, and Performing coordinate conversion; a step of finding the center of gravity of the double ring, respectively calculating the coordinates of the center of gravity of the first ring body and the second ring body; and obtaining the two-dimensional two-dimensional information step, the center of gravity of the first ring body and the second ring The coordinate line forms a straight line equation (L) of the axis segment and passes through the edge point to calculate the two center endpoint coordinates A1, A2 of the first ring body and the two center endpoint coordinates B1, B2 of the second ring body; The pixel conversion millimeter unit step converts the aforementioned four endpoint coordinates A1, A2, B1, and B2 into millimeter units; and performs a three-dimensional attitude estimation step using the endpoint coordinates A1, A2, and B1 of the last step. B2 and known camera coke (Λ), the ring shaft length (L), the center of gravity bicyclic axial length (L AB), bicyclic ends projection points (x a1, x a2, x b1, x b2) and (y a1, y a2, y b1, y The parameters of b2 ), together with the three-dimensional eight-image limit system, determine the parameters of the three-dimensional positioning parameters {X A1 , Y A1 , Z A1 , α, β, γ} of the surgical instrument, and then quickly calculate Surgical instruments in any position in space.

上述該雙環輪廓取出步驟中,係定義該第一環體為(Ra,Ga,Ba)及該第二環體為(Rb,Gb,Bb),運用通道差的概念,將該第一環體、第二環體影像中的每個像素做三通道相減取絕對值,在對相減後的三通道分別設其定門檻值,並定義如下數學式: 【數學式1】;其中該門檻值設定主要對於每種顏色對於光源的容忍度,假設以上條件成立則屬於該環體的像素。In the double loop profile extraction step, the first ring body is defined as (Ra, Ga, Ba) and the second ring body is (Rb, Gb, Bb), and the first ring body is used by using the concept of channel difference. Each pixel in the second ring image is subtracted from the absolute value of the three channels, and the fixed threshold is set in the three channels after subtraction, and the following mathematical formula is defined: [Math 1] Where the threshold value is set primarily for the tolerance of the light source for each color, assuming that the above conditions are true, the pixels belonging to the ring body.

本發明藉由上述技術手段,可以達成如下功效: 1、 本發明係將二維雙環輪廓推導出三維器械姿態六參數的關係式由原來只有三維第一象限,延伸至完整八象限,故相較於其他三維器械姿態定位參數估計演算法,本發明所提出的標記式的演算法相當快速精準且簡便。 2、 本發明應用於MIS微創手術環境之雙環顏色選取,係對大量的複雜器官背景影像進行色彩模型分析,決定雙環的最優顏色,分析找出能夠在腹腔鏡環境中易於辨識的顏色,並對於因光照明而導致手術器械反光,挑選了理想RGB門檻值,能於實際手術中完整辨識出手術器械上的雙環輪廓。The invention can achieve the following effects by the above technical means: 1. The invention derives the two-dimensional double-loop profile from the three-dimensional instrument attitude six-parameter relationship from the original three-dimensional first quadrant to the complete eight-quadrant, so For other 3D instrument attitude positioning parameter estimation algorithms, the tagged algorithm proposed by the present invention is quite fast, accurate and simple. 2. The invention is applied to the double-loop color selection of the MIS minimally invasive surgery environment, and performs color model analysis on a large number of complex organ background images, determines the optimal color of the double loop, and analyzes the colors that can be easily recognized in the laparoscopic environment. And for the illumination of the surgical instrument caused by light illumination, the ideal RGB threshold value is selected, and the double loop contour on the surgical instrument can be completely recognized in the actual operation.

關於標記式圓桿狀物體二維影像之三維定位系統八象限延伸推導:本發明以2015年本實驗室余明駿碩士論文(即第104143279號專利申請案),提出的「標記式圓桿狀物體二維影像之三維定位系統及內視鏡器械追蹤應用」為基礎再延伸,該專利申請案可藉由在桿狀物體上分別在兩個位置上貼上相同形狀且不同顏色的環形標記,藉由兩個標記透過單台攝影機感測器成像位置之幾何關係,推導出圓桿狀物體的3D姿態,但目前該演算法只有單一姿態推導公式並不足以估測圓桿狀物任意姿態,且精準度尚有改進空間,故,本發明目的係推出圓桿狀物體3D任意姿態公式與精準度的提升。Eight-quadrant extension derivation of the three-dimensional positioning system of the two-dimensional image of the marked round rod-shaped object: The present invention proposes the "marked round rod-like object" proposed by the laboratory in the laboratory of Yu Mingjun (the patent application No. 104143279) Based on the three-dimensional image positioning system and the endoscopic device tracking application, the patent application can be attached to the rod-shaped object by two ring marks of the same shape and different colors at two positions. The 3D attitude of the round rod object is derived from the geometric relationship between the two markers through the imaging position of the single camera sensor, but currently only a single attitude derivation formula of the algorithm is not sufficient to estimate the arbitrary posture of the round rod, and There is still room for improvement in accuracy. Therefore, the object of the present invention is to promote the 3D arbitrary posture formula and accuracy of the round rod-like object.

關於桿狀物體物體3D六參數之推導原理:The derivation principle of the 3D six parameters of the rod object:

如圖1所示者,假設原點的3D座標系統為(X,Y,Z)與相機底片之2D座標系統(x,y)重疊,X和x為垂直軸,Y和y為水平軸,Z軸為縱軸。在桿狀物體兩端之靠前端,塗上或標記相同寬度為L的第一環體(以下稱A環)和第二環體(以下稱B環),兩環預定距離則為LAB ,為了精確和方便辨識2D影像中的環A及環B,建議使用能與使用情境容易區別的兩種不同的顏色,分別配給環A及環B。As shown in Figure 1, it is assumed that the 3D coordinate system of the origin is (X, Y, Z) overlapping with the 2D coordinate system (x, y) of the camera film, X and x are vertical axes, and Y and y are horizontal axes. The Z axis is the vertical axis. At the front end of both ends of the rod-shaped object, a first ring body (hereinafter referred to as an A ring) and a second ring body (hereinafter referred to as a B ring) having the same width L are coated or marked, and the predetermined distance between the two rings is L AB . In order to accurately and conveniently identify the ring A and the ring B in the 2D image, it is recommended to use two different colors that can be easily distinguished from the use situation, and respectively assign the ring A and the ring B.

將該圓桿狀物3D姿態定義成6個參數分別為(XAA1 ,YAA1 ,ZAA1 andα,β,γ),其中(XAA1 ,YAA1 ,ZAA1 )3D座標設為參考點AA1,如圖2所示,點AA1(BB1)是桿狀物軸線與環A(環B)上邊緣的平面焦點,因此該桿狀物的軸線可被表示為方向,令他為線向量。然而參考點AA1他是在桿狀物體的軸線上,它無法被看見,並不能從二維影像去中去做偵測。環A表面上的上邊緣點A1(XA1 ,YA1 ,ZA1 )座標如圖2是用來估測先前推估的參考點AA1(XAA1 ,YAA1 ,ZAA1 )3D座標,邊緣點A1(XA1 ,YA1 ,ZA1 )座標可在二維影像中被偵測出。The 3D attitude of the round rod is defined as six parameters (X AA1 , Y AA1 , Z AA1 and α, β, γ), wherein (X AA1 , Y AA1 , Z AA1 ) 3D coordinates are set as reference point AA1, As shown in Fig. 2, point AA1 (BB1) is the plane focus of the axis of the rod and the upper edge of ring A (ring B), so the axis of the rod can be represented as a direction, making him a line vector . However, at reference point AA1, he is on the axis of the rod-like object, it cannot be seen, and cannot be detected from the two-dimensional image. The coordinates of the upper edge point A1 (X A1 , Y A1 , Z A1 ) on the surface of the ring A are as shown in Fig. 2 to estimate the previously estimated reference point AA1 (X AA1 , Y AA1 , Z AA1 ) 3D coordinates, edge points The A1 (X A1 , Y A1 , Z A1 ) coordinates can be detected in the 2D image.

令線向量是交叉於桿狀體的表面和軸線向量投射於影像平面的軌跡,如圖2所示,由於假設該桿狀物的直線是均勻的,在桿狀物表面上的線是平行於軸線。要注意的是,點A1是在向量與環A上邊緣的交叉點,如圖2所示。Line vector Is the surface and axis vector that intersects the rod The trajectory projected onto the image plane, as shown in Figure 2, is assumed to be parallel to the axis, assuming that the straight line of the rod is uniform. It should be noted that point A1 is at The intersection of the vector and the upper edge of ring A is shown in Figure 2.

而圓桿狀物三個角度為α、β、γ,如圖1詳細定義如下:(1)α角度為X軸與投射於x-y(X-Y)影像平面線向量的夾角。α角度圍繞的Z軸旋轉,也被稱為In-Plan角。(2)β角度為X軸與投射於X(x)-Z平面線向量的夾角,β角度圍繞著Y軸旋轉,也被稱為out-plan角。(3)γ角度為y軸和投射於Z-Y(y)平面線向量的夾角,γ角圍繞著X旋轉,也被稱為Out-Plan角。上面描述的六參數(XAA1 ,YAA1 ,ZAA1 andα,β,γ)足以決定該圓桿狀物的3D姿態。The three angles of the round rod are α, β, γ, as defined in detail in Fig. 1 as follows: (1) The α angle is the X axis and the plane vector projected on the xy (XY) image The angle of the. The Z-axis rotation around the alpha angle is also known as the In-Plan angle. (2) β angle is the X axis and is projected on the X(x)-Z plane line vector The angle of the β, the angle of rotation around the Y axis, also known as the out-plan angle. (3) γ angle is y-axis and projected on ZY(y) plane line vector The angle, the gamma angle rotates around X, also known as the Out-Plan angle. The six parameters (X AA1 , Y AA1 , Z AA1 and α, β, γ) described above are sufficient to determine the 3D pose of the round rod.

關於In-planeα角之估測:Estimation of the In-planeα angle:

2D影像平面中的線向量投射於x-y平面上3D線向量。然而角度是與X軸之間的夾角。線向量則是為影像中點所連接起來的。是環A透過相機鏡頭長度為λ的焦距投射於影像平面的區域的重心。同樣的,是環A是透過同一台相機鏡頭長度為γ的焦距投射於影像平面的區域的重心。所以可得到如下公式: 【數學式2】 Line vector in 2D image plane Projecting a 3D line vector on the xy plane . however Angle is The angle between the X axis and the X axis. Line vector Is for the midpoint of the image with Connected. It is the center of gravity of the area where the ring A projects through the image plane through the focal length of the camera lens length λ. same, Ring A is the center of gravity of the area projected onto the image plane by the focal length of the same camera lens length γ. Therefore, the following formula can be obtained: [Math 2]

其中α為銳角。這邊列出了四種可能的α角,如圖3所示:1.假設xa <xb 和ya >yb 成立,α則為第一象限角度,即。2.假設xa <xb 和ya >yb 成立,α則為第二象限角度,即。3.假設xa <xb 和ya <yb 成立,α則為第三象限角度,即。4.假設xa >xb 和ya <yb 成立,α則為第四象限角度,即。整理成表格如表1所示(X-Y平面四象限α角): 【表1】 Where α is an acute angle. Here are four possible alpha angles, as shown in Figure 3: 1. Let x a < x b and y a > y b hold, and α be the first quadrant angle, ie . 2. Suppose x a <x b and y a >y b hold, and α is the second quadrant angle, ie . 3. Suppose x a <x b and y a <y b hold, and α is the third quadrant angle, ie . 4. Suppose x a >x b and y a <y b hold, and α is the fourth quadrant angle, ie . The table is organized as shown in Table 1 (four-quadrant alpha angle of XY plane): [Table 1]

關於Out-planeβ角及深度Z值估測:Estimation of Out-plane β angle and depth Z value:

在2D影像平面向量可以決定投射於3D方向線向量,藉由環A與環B的尋找投射於2D區域的質心,如圖4所示,座標點是2D投影線向量與環A及環B上邊緣和下邊緣的交叉點如圖5所示,同樣的座標點也是如此。In the 2D image plane Vector can decide to project in 3D direction line vector The center of mass of the 2D region is projected by the search of the ring A and the ring B, as shown in FIG. Coordinate point is 2D projection The intersection of the line vector with the upper edge and the lower edge of the ring A and the ring B is as shown in FIG. 5, and the same The same is true for the coordinate point.

如圖4定義在X-Z平面,桿狀物向量與X軸夾角的角度稱為β角,然後再定義了該圓桿狀物在每個一象限姿態的β角,第一象限為,第二象限為,第三象限為,第四象限為,之後在分別詳細推導各象限的β角度及深度ZA1As defined in Figure 4 in the XZ plane, the rod The angle between the vector and the X-axis is called the β angle, and then the angle β of the round rod in each quadrant is defined. The first quadrant is The second quadrant is The third quadrant is The fourth quadrant is Then, the β angle and depth Z A1 of each quadrant are derived in detail respectively.

在已知條件有雙環投射點和相機焦距,環A及環B寬度,環A及環B之間的間距,且使用相機的成像幾何關係及相似三小比例關係來計算出out-plane角及深度Z資訊。Double loop projection point under known conditions And camera focal length , ring A and ring B width , the spacing between ring A and ring B And use the camera's imaging geometry and similar three small proportional relationships to calculate out-plane Corner and depth Z information.

關於第一象限out-planeβ及深度ZA1 估測:Estimation of the first quadrant out-planeβ and depth Z A1 :

此小節介紹第一象限圓桿狀物體在上的標記在二維影像投射面差以及三角比例關係計算β角度及深度ZA1 (本發明採用虛擬平面座標推導,較符合所取得影像的方位)。This section describes the marking of the first quadrant round bar object on the two-dimensional image projection surface and the triangular proportional relationship calculation β angle and depth Z A1 (the invention uses the virtual plane coordinates to derive, more in line with the orientation of the acquired image).

從圖5(環A),將用環A與相機的成像幾何關係做推導公式:(I-1) 使用相機的成相幾何關係,得到(I-2)(I-3) 替代Eq.(I-2) (I-3) 到 Eq.(I-1),得到(I-4) 進一步簡化Eq.(I-4)使用3D幾何關係(I-5) 得到(I-6)From Figure 5 (ring A), the imaging geometry of the ring A and the camera will be used to derive the formula: (I-1) Using the phase relationship of the camera, get (I-2) (I-3) Substitute Eq.(I-2) (I-3) to Eq.(I-1), get (I-4) Further simplifying Eq. (I-4) using 3D geometric relations (I-5) get (I-6)

同樣的,從圖5(環B),得到下列公式:(I-7) 為了簡單推導令:, (I-8) 注意簡化Eq.(I-6) (I-7) 與 Eq.(I-8),得到(I-9)(I-10) 為了進一步簡化(I-9)(I-10),令(I-11) 並獲得Eq. (I-12)及(I-13)(I-12)(I-13) Eq.(I-12) 和 (I-13) 分別除以A和B,得到:(I-14)(I-15) Eq.(I-14) 減去 Eq.(I-15),得到(I-16) Set(I-17) 得到(I-18)Similarly, from Figure 5 (ring B), the following formula is obtained: (I-7) For a simple derivation order: , (I-8) Note Simplify Eq. (I-6) (I-7) and Eq. (I-8), get (I-9) (I-10) To further simplify (I-9) (I-10), (I-11) and obtain Eq. (I-12) and (I-13) (I-12) (I-13) Eq. (I-12) and (I-13) are divided by A and B, respectively, to obtain: (I-14) (I-15) Eq.(I-14) minus Eq.(I-15), get (I-16) Set (I-17) get (I-18)

使用環A和環B在圖5中的相似三角形關係,得到:(I-19) Eq.(I-18)可以使用Eq.(I-19)做簡化 (I-20)(I-21) Let (I-21-A) Eq.(I-21) 被簡化如下(I-22) 由於, 使用Eq.(I-22),得到, 所以,(由於假設角為銳角,所以v1 取正值) (I-23)and(I-24)(I-25-1) (I-25-1)詳細如下:(I-25-2)(I-26)Using the similar triangle relationship of Ring A and Ring B in Figure 5, we get: (I-19) Eq. (I-18) can be simplified using Eq. (I-19) (I-20) (I-21) Let (I-21-A) Eq.(I-21) is simplified as follows (I-22) due to , using Eq. (I-22), get with , and so, (due to assumptions The angle is an acute angle, so v 1 takes a positive value) (I-23) And (I-24) (I-25-1) (I-25-1) is as follows: (I-25-2) (I-26)

第二象限out-planeβ及深度ZA1 估測:Estimation of the second quadrant out-planeβ and depth Z A1 :

此小節接介紹第二象限圓桿狀物體在上的標記在二維影像投射面差以及三角比例關係計算β角度及深度ZA1 (本發明採用虛擬平面座標推導,較符合所取得影像的方位)。This section introduces the mark of the second quadrant round rod object on the two-dimensional image projection surface difference and the triangular proportional relationship calculation β angle and depth Z A1 (the invention uses the virtual plane coordinates to derive, which is more in line with the orientation of the acquired image) .

從圖6(環A),將用環A與相機的成像幾何關係做推導公式:(II-1) 使用相機的成相幾何關係,得到(II-2)(II-3) 替代Eq. (II-2) (II-3)到 Eq.(II-1),得到(II-4) 進一步簡化Eq.(I-4) 使用3D幾何關係(II-5) 得到(II-6)From Figure 6 (ring A), the imaging geometry of the ring A and the camera will be used to derive the formula: (II-1) Using the phase relationship of the camera, get (II-2) (II-3) Substitute Eq. (II-2) (II-3) to Eq. (II-1), get (II-4) Further simplification of Eq. (I-4) Using 3D geometric relations (II-5) get (II-6)

同樣的,從圖6(環B),得到下列公式:(II-7) 為了簡單推導令:, (II-8) 注意簡化 Eq.( II-6) (II-7) 與Eq.( II-8),得到(II-9)(II-10) 為了進一步簡化(II-9)(II-10),令(II-11) 並獲得Eq.(II-12)及(II-13)(II-12)(II-13) Eq.(II-12)和(II-13)分別除以A和B,得到:(II-14)(II-15) Eq.(II-14)減去Eq.(II-15),得到(II-16) Set(II-17) 得到(II-18)Similarly, from Figure 6 (ring B), the following formula is obtained: (II-7) For a simple derivation order: , (II-8) Note Simplify Eq. (II-6) (II-7) and Eq. (II-8), get (II-9) (II-10) To further simplify (II-9)(II-10), (II-11) and obtain Eq. (II-12) and (II-13) (II-12) (II-13) Eq. (II-12) and (II-13) are divided by A and B, respectively, to obtain: (II-14) (II-15) Eq. (II-14) minus Eq. (II-15), obtained (II-16) Set (II-17) get (II-18)

使用環A和環B在圖6中的相似三角形關係,得到:(II-19) Eq.(II-18)可以使用Eq.(II-19)做簡化 (II-20)(II-21) Let (II-21-A) Eq.( II-21)被簡化如下(II-22) 由於,使用Eq.(II-22),得到所以,(由於假設角為銳角,所以v1 取正值) (II-23)and(II-24) From eq.(II-14)(II-25-1) (II-25-1)詳細如下:(II-25-2)(II-26)Using the similar triangle relationship of Ring A and Ring B in Figure 6, we get: (II-19) Eq. (II-18) can be simplified using Eq. (II-19) (II-20) (II-21) Let (II-21-A) Eq. (II-21) is simplified as follows (II-22) due to , using Eq. (II-22), get with and so, (due to assumptions The angle is an acute angle, so v 1 takes a positive value) (II-23) And (II-24) From eq.(II-14) (II-25-1) (II-25-1) Details are as follows: (II-25-2) (II-26)

第三象限out-planeβ及深度ZA1 估測:Estimation of the third quadrant out-planeβ and depth Z A1 :

此小節介紹第三象限圓桿狀物體在上的標記在二維影像投射面差以及三角比例關係計算β角度及深度ZA1 (本發明採用虛擬平面座標推導,較符合所取得影像的方位)。This section describes the marking of the third quadrant round bar object on the two-dimensional image projection surface and the triangular proportional relationship calculation β angle and depth Z A1 (the invention uses the virtual plane coordinates to derive, more in line with the orientation of the acquired image).

從圖7(環A),將用環A與相機的成像幾何關係做推導公式:(III-1) 使用相機的成相幾何關係,得到(III-2)(III-3) 替代 Eq. (III-2) (III-3) to Eq.( III-1),得到(III-4) 進一步簡化 Eq.(III-4)使用3D幾何關係(III-5) 得到(III-6)From Figure 7 (ring A), the imaging geometry of the ring A and the camera will be used to derive the formula: (III-1) Using the phase relationship of the camera, get (III-2) (III-3) Substitute Eq. (III-2) (III-3) to Eq. (III-1), get (III-4) Further simplifying Eq. (III-4) using 3D geometric relations (III-5) get (III-6)

同樣的,從圖7(環B),得到下列公式:(III-7) 為了簡單推導令:, (III-8) 注意簡化Eq.(III-6) (III-7) 與Eq.(III-8),得到(III-9)(III-10) 為了進一步簡化(III-9)(III-10),令(III-11) 並獲得(III-12)(III-13) Eq.( III-12) 和 (III-13) 分別除以A和B,得到:(III-14)(III-15) Eq.( III-14) 減去Eq.( III-15),得到(III-16) Set(III-17) 得到(III-18)Similarly, from Figure 7 (ring B), the following formula is obtained: (III-7) For a simple derivation order: , (III-8) Note Simplify Eq.(III-6) (III-7) and Eq.(III-8), get (III-9) (III-10) To further simplify (III-9)(III-10), (III-11) and obtained (III-12) (III-13) Eq. (III-12) and (III-13) are divided by A and B, respectively, to obtain: (III-14) (III-15) Eq. (III-14) minus Eq. (III-15), (III-16) Set (III-17) get (III-18)

使用環A和環B在圖7中的相似三角形關係,得到:(III-19) Eq.(III-18) 可以使用 Eq.( III-19) 做簡化 (III-20)(III-21) Let (III-21-A) Eq.(III-21)被簡化如下(III-22) 由於, 使用 Eq.( III-22),得到and, thus,(由於假設角為銳角,所以v1 取正值) (III-23)and(III-24) From eq.(III-14)(III-25-1) (III-25-1)詳細如下:(III-25-2)(III-26)Using the similar triangle relationship of Ring A and Ring B in Figure 7, we get: (III-19) Eq.(III-18) can be simplified using Eq.(III-19) (III-20) (III-21) Let (III-21-A) Eq. (III-21) is simplified as follows (III-22) due to , using Eq. (III-22), get And , thus, (due to assumptions The angle is an acute angle, so v 1 takes a positive value) (III-23) And (III-24) From eq.(III-14) (III-25-1) (III-25-1) is as follows: (III-25-2) (III-26)

第四象限out-planeβ及深度ZA1 估測:Estimation of the fourth quadrant out-planeβ and depth Z A1 :

此小節介紹第四象限圓桿狀物體在上的標記在二維影像投射面差以及三角比例關係計算β角度及深度ZA1 (本發明採用虛擬平面座標推導,較符合所取得影像的方位)。This section describes the marking of the fourth quadrant round rod object on the two-dimensional image projection surface and the triangular proportional relationship calculation β angle and depth Z A1 (the invention uses virtual plane coordinates to derive, more in line with the orientation of the acquired image).

從圖8(環A),將用環A與相機的成像幾何關係做推導公式:(IV-1) 使用相機的成相幾何關係,得到(IV-2)(IV-3) 替代 Eq. (I-2) (I-3)到Eq.(I-1),得到(IV-4) 進一步簡化 Eq.(IV-4)使用3D幾何關係(IV-5) 得到(IV-6)From Figure 8 (ring A), the imaging geometry of the ring A and the camera will be used to derive the formula: (IV-1) Using the phase relationship of the camera, get (IV-2) (IV-3) Substitute Eq. (I-2) (I-3) to Eq. (I-1), get (IV-4) Further simplifying Eq. (IV-4) using 3D geometric relationships (IV-5) get (IV-6)

同樣的,從圖8 (環B),得到下列公式:(IV-7) 為了簡單推導令:, (IV-8) 注意簡化 Eq.(IV-6) (IV-7)與Eq.(IV-8),得到(IV-9)(IV-10) 為了進一步簡化(IV-9)(IV-10),令(IV-11) 並獲得Eq. (IV-12)及(IV-13)(IV-12)(IV-13) Eq.(IV-12) 和(IV-13) 分別除以A和B,得到:(IV-14)(IV-15) Eq.(IV-14) 減去Eq.(IV-15),得到(IV-16) Set(IV-17) 得到(IV-18)Similarly, from Figure 8 (ring B), the following formula is obtained: (IV-7) For a simple derivation order: , (IV-8) Note Simplify Eq. (IV-6) (IV-7) and Eq. (IV-8), get (IV-9) (IV-10) To further simplify (IV-9)(IV-10), (IV-11) and obtain Eq. (IV-12) and (IV-13) (IV-12) (IV-13) Eq. (IV-12) and (IV-13) are divided by A and B, respectively, to obtain: (IV-14) (IV-15) Eq.(IV-14) minus Eq.(IV-15), get (IV-16) Set (IV-17) get (IV-18)

使用環A和環B在圖8中的相似三角形關係,得到:(IV-19) Eq.(IV-18) 可以使用 Eq.(IV-19),做簡化 (IV-20)(IV-21) Let (IV-21-A) Eq.(IV-21) 被簡化如下(IV-22) 由於, 使用 Eq.(IV-22),得到,所以,(由於假設角為銳角,所以v1 取正值)and(IV-24)(IV-25-1) (IV-25-1)詳細如下:(IV-25-2)(IV-26)Using the similar triangle relationship of Ring A and Ring B in Figure 8, we get: (IV-19) Eq.(IV-18) Eq.(IV-19) can be used for simplification (IV-20) (IV-21) Let (IV-21-A) Eq.(IV-21) is simplified as follows (IV-22) due to , using Eq. (IV-22), get with ,and so, (due to assumptions The angle is an acute angle, so v 1 takes a positive value) And (IV-24) (IV-25-1) (IV-25-1) is as follows: (IV-25-2) (IV-26)

下面列出了所有β角的可能如圖9所示,SD=size(ringA)-size(ringB),其中size()為環A或環B的總面積(像素點的數目) 1. 假設SD<0與xa >xb 成立,則圓桿狀物朝向第一象限, and(I-24)(I-25)(I-26) 2.假設SD<0與xa <xb 成立,則圓桿狀物朝向第二象限 and(II-24)(II-25)(II-26) 3.假設 SD>0 與 xa <xb 成立,則圓桿狀物朝向第三象限 and(III-24)(III-25)(III-26) 4. 假設 SD>0 與xa >xb 成立,則圓桿狀物朝向第四象限 and(IV-24)(IV-25)(IV-26)The following is a list of possible beta angles as shown in Figure 9, SD = size(ringA)-size(ringB), where size() is the total area of ring A or ring B (number of pixels) 1. Suppose SD <0 and x a >x b , established, the round rod faces the first quadrant, And (I-24) (I-25) (I-26) 2. Suppose SD<0 and x a <x b , which are true, the round rod faces the second quadrant And (II-24) (II-25) (II-26) 3. Assuming SD>0 and x a <x b , established, the round rod faces the third quadrant And (III-24) (III-25) (III-26) 4. Suppose SD>0 and x a >x b , established, the round rod faces the fourth quadrant And (IV-24) (IV-25) (IV-26)

一至四象限β推導結果比較:根據上面在X-Z平面上圓桿狀物姿態的,每個象限的角度和深度ZA1 所推導的結果都是不一樣的,如下表2: 【表2】 Comparison of the derivation results of one to four quadrants β: According to the above-mentioned attitude of the circular rod on the XZ plane, the angles and depths of each quadrant Z A1 are different, as shown in the following Table 2: [Table 2]

Out-planeγ角及深度Z值估測Out-plane γ angle and depth Z value estimation

在2D影像平面向量可以決定投射於3D方向線向量,藉由環A與環B的尋找投射於2D區域的質心,如圖10所示,座標點是2D投影線向量與環A及環B上邊緣和下邊緣的交叉點如圖11所示,同樣的座標點也是如此。In the 2D image plane Vector can decide to project in 3D direction line vector The center of mass of the 2D region is projected by the search of the ring A and the ring B, as shown in FIG. Coordinate point is 2D projection The intersection of the line vector with the upper edge and the lower edge of the ring A and the ring B is as shown in FIG. The same is true for the coordinate point.

如圖10所示,定義在Y-Z平面,桿狀物向量與X軸夾角的角度稱為角,定義了該圓桿狀物在每個象限姿態的角,第一象限為,第二象限為,第三象限為,第四象限為,在之後,會分別詳細推導各象限的角度及深度ZA1As shown in Figure 10, defined in the YZ plane, the rod The angle between the vector and the X-axis is called the angle, which defines the angle of the round rod in each quadrant. The first quadrant is The second quadrant is The third quadrant is The fourth quadrant is After that, each quadrant will be deduced in detail. Angle and depth Z A1 .

已知條件有雙環投射點和相機焦距,環A及環B寬度,環A及環B之間的間距,使用相機的成像幾何關係及相似三小比例關係來計算出out-plane角及深度Z資訊。Double loop projection point And camera focal length , ring A and ring B width , the spacing between ring A and ring B The out-plane angle and depth Z information are calculated using the camera's imaging geometry and similar three small scale relationships.

第一象限out-planeγ及深度ZA1 估測First quadrant out-plane gamma and depth Z A1 estimate

此小節介紹第一象限圓桿狀物體在上的標記在二維影像投射面差以及三角比例關係計算角度及深度ZA1 (本發明採用虛擬平面座標推導,較符合所取得影像的方位)。This section describes the angle of the two-dimensional image projection surface and the triangular proportional relationship calculation angle and depth Z A1 of the first quadrant round rod object (the invention uses the virtual plane coordinates to derive the orientation of the acquired image).

從圖11(環A),將用環A與相機的成像幾何關係做推導公式:(I-1) 使用相機的成相幾何關係到(I-2)(I-3) 替代Eq. (I-2) (I-3)到 Eq.(I-1),得到(I-4) 進一步簡化Eq.(I-4) 使用3D幾何關係(I-5) 得到(I-6)From Figure 11 (ring A), the imaging geometry of the ring A and the camera will be used to derive the formula: (I-1) Using the phase relationship of the camera to (I-2) (I-3) Substitute Eq. (I-2) (I-3) to Eq. (I-1), get (I-4) Further simplifying Eq. (I-4) Using 3D geometric relations (I-5) get (I-6)

同樣的,從圖11 (環B),得到下列公式:(I-7) 為了簡單推導令:, (I-8) 注意簡化Eq.(I-6) (I-7) 與 Eq.(I-8),得到(I-9)(I-10) 為了進一步簡化(I-9)(I-10),令(I-11) 並獲得Eq. (I-12)及(I-13)(I-12)(I-13) Eq.(I-12) 和 (I-13) 分別除以A和B,得到:(I-14)(I-15) Eq.(I-14) 減去 Eq.(I-15),得到(I-16) Set(I-17) 得到(I-18)Similarly, from Figure 11 (ring B), the following formula is obtained: (I-7) For a simple derivation order: , (I-8) Note Simplify Eq. (I-6) (I-7) and Eq. (I-8), get (I-9) (I-10) To further simplify (I-9) (I-10), (I-11) and obtain Eq. (I-12) and (I-13) (I-12) (I-13) Eq. (I-12) and (I-13) are divided by A and B, respectively, to obtain: (I-14) (I-15) Eq.(I-14) minus Eq.(I-15), get (I-16) Set (I-17) get (I-18)

使用環A和環B在圖11中的相似三角形關係,得到:(I-19)  Eq.(I-18) 可以使用Eq.(I-19)做簡化 (I-20)(I-21) Let (I-21-A) Eq.(I-21) 被簡化如下(I-22) 由於, 使用Eq.(I-22), 得到,所以,(由於假設角為銳角,所以v1 取正值) (I-23)and(I-24)(I-25-1) (I-25-1)詳細如下:(I-25-2) Using the similar triangle relationship of Ring A and Ring B in Figure 11, we get: (I-19) Eq.(I-18) can be simplified using Eq.(I-19) (I-20) (I-21) Let (I-21-A) Eq.(I-21) is simplified as follows (I-22) due to , using Eq.(I-22), get with ,and so, (due to assumptions The angle is an acute angle, so v 1 takes a positive value) (I-23) And (I-24) (I-25-1) (I-25-1) is as follows: (I-25-2)

第二象限out-planeγ及深度ZA1 估測:Estimation of the second quadrant out-planeγ and depth Z A1 :

此小節介紹第二象限圓桿狀物體在上的標記在二維影像投射面差以及三角比例關係計算角度及深度ZA1 (本發明採用虛擬平面座標推導,較符合所取得影像的方位)。This section describes the projection of the second quadrant round bar object on the 2D image projection surface and the triangular proportional relationship calculation. Angle and depth Z A1 (The invention uses virtual plane coordinates to derive, which is more in line with the orientation of the acquired image).

從圖12(環A),將用環A與相機的成像幾何關係做推導公式:(II-1) 使用相機的成相幾何關係,得到(II-2)(II-3) 替代Eq. (II-2) (II-3)到 Eq.(II-1),得到(II-4) 進一步簡化Eq.(II-4) 使用3D幾何關係(II-5) 得到(II-6)From Figure 12 (ring A), the imaging geometry of the ring A and the camera will be used to derive the formula: (II-1) Using the phase relationship of the camera, get (II-2) (II-3) Substitute Eq. (II-2) (II-3) to Eq. (II-1), get (II-4) Further simplification of Eq. (II-4) Using 3D geometric relations (II-5) get (II-6)

同樣的,從圖12(環B),得到下列公式:(II-7) 為了簡單推導令, (II-8) 注意簡化 Eq.( II-6) (II-7) 與Eq.( II-8),得到(II-9)(II-10) 為了進一步簡化(II-9)( II-10),令(II-11) 並獲得Eq. (II-12)及(II-13)(II-12)(II-13) Eq.( II-12) 和(II-13) 分別除以A和B,得到:(II-14)(II-15) Eq.( II-14) 減去Eq.( II-15),得到(II-16) Set(II-17) 得到(II-18)Similarly, from Figure 12 (Ring B), the following formula is obtained: (II-7) For a simple derivation order , (II-8) Note Simplify Eq. (II-6) (II-7) and Eq. (II-8), get (II-9) (II-10) To further simplify (II-9) (II-10), (II-11) and obtain Eq. (II-12) and (II-13) (II-12) (II-13) Eq. (II-12) and (II-13) are divided by A and B, respectively, to obtain: (II-14) (II-15) Eq.( II-14) Subtract Eq.( II-15) and get (II-16) Set (II-17) get (II-18)

使用環A和環B在圖12中的相似三角形關係,得到:(II-19) Eq.(II-18) 可以使用Eq.(II-19)做簡化 (II-20)(II-21) Let (II-21-A) Eq.( II-21) 被簡化如下(II-22) 由於, 使用Eq.(II-22),得到,所以,(由於假設角為銳角,所以v1 取正值) (II-23)and(II-24) From eq.(II-14)(II-25-1) (II-25-1)詳細如下:(II-25-2)(II-26)Using the similar triangle relationship of Ring A and Ring B in Figure 12, we get: (II-19) Eq.(II-18) can be simplified using Eq.(II-19) (II-20) (II-21) Let (II-21-A) Eq. (II-21) is simplified as follows (II-22) due to , using Eq. (II-22), get with ,and so, (due to assumptions The angle is an acute angle, so v 1 takes a positive value) (II-23) And (II-24) From eq.(II-14) (II-25-1) (II-25-1) Details are as follows: (II-25-2) (II-26)

第三象限out-planeγ及深度ZA1 估測:Estimation of the third quadrant out-planeγ and depth Z A1 :

此小節介紹第三象限圓桿狀物體在上的標記在二維影像投射面差以及三角比例關係計算角度及深度ZA1 (本發明採用虛擬平面座標推導,較符合所取得影像的方位)。This section describes the marking of the third quadrant round bar object on the two-dimensional image projection surface and the triangular proportional relationship calculation angle and depth Z A1 (the invention uses virtual plane coordinates to derive, more in line with the orientation of the acquired image).

從圖13(環A),將用環A與相機的成像幾何關係做推導公式:(III-1) 使用相機的成相幾何關係,得到(III-2)(III-3) 替代 Eq. (III-2) (III-3) 到 Eq.( III-1), 得到(III-4) 進一步簡化 Eq.(III-4) 使用3D幾何關係(III-5) 得到(III-6)From Figure 13 (ring A), the imaging geometry of the ring A and the camera will be used to derive the formula: (III-1) Using the phase relationship of the camera, get (III-2) (III-3) Substitute Eq. (III-2) (III-3) to Eq. (III-1), get (III-4) Further simplification of Eq. (III-4) Using 3D geometric relations (III-5) get (III-6)

同樣的,從圖13(環B),得到下列公式:(III-7) 為了簡單推導令:, (III-8) 注意簡化 Eq.(III-6) (III-7) 與Eq.( III-8),得到(III-9)(III-10) 為了進一步簡化(III-9)( III-10),令(III-11) 並獲得(III-12)(III-13) Eq.( III-12) 和 (III-13)分別除以A和B,得到:(III-14)(III-15) Eq.( III-14) 減去Eq.( III-15),得到(III-16) Set(III-17) 得到(III-18)Similarly, from Figure 13 (ring B), the following formula is obtained: (III-7) For a simple derivation order: , (III-8) Note Simplify Eq. (III-6) (III-7) and Eq. (III-8), get (III-9) (III-10) To further simplify (III-9) (III-10), (III-11) and obtained (III-12) (III-13) Eq. (III-12) and (III-13) are divided by A and B, respectively, to obtain: (III-14) (III-15) Eq. (III-14) minus Eq. (III-15), (III-16) Set (III-17) get (III-18)

使用環A和環B在圖13中的相似三角形關係,得到:(III-19) Eq.(III-18) 可以使用 Eq.( III-19)做簡化 (III-20)(III-21) Let (III-21-A) Eq.( III-21) 被簡化如下(III-22) 由於,使用 Eq.( III-22),得到and,thus,(由於假設角為銳角,所以v1 取正值) (III-23)and(III-24) From eq.(III-14)(III-25-1) (III-25-1)詳細如下:(III-25-2) Using the similar triangle relationship of Ring A and Ring B in Figure 13, we get: (III-19) Eq.(III-18) can be simplified using Eq.(III-19) (III-20) (III-21) Let (III-21-A) Eq. (III-21) is simplified as follows (III-22) due to , using Eq. (III-22), get And ,thus, (due to assumptions The angle is an acute angle, so v 1 takes a positive value) (III-23) And (III-24) From eq.(III-14) (III-25-1) (III-25-1) is as follows: (III-25-2)

第四象限out-planeγ及深度ZA1 估測:Estimation of the fourth quadrant out-planeγ and depth Z A1 :

此小節介紹第四象限圓桿狀物體在上的標記在二維影像投射面差以及三角比例關係計算β角度及深度ZA1 (本發明採用虛擬平面座標推導,較符合所取得影像的方位)。This section describes the marking of the fourth quadrant round rod object on the two-dimensional image projection surface and the triangular proportional relationship calculation β angle and depth Z A1 (the invention uses virtual plane coordinates to derive, more in line with the orientation of the acquired image).

從圖14(環A),將用環A與相機的成像幾何關係做推導公式:(IV-1) 使用相機的成相幾何關係,得到(IV-2)(IV-3) 替代 Eq. (IV-2) (IV-3) 到Eq.(IV-1),得到(IV-4) 進一步簡化 Eq.(IV-4) 使用3D幾何關係(IV-5) 得到(IV-6)From Figure 14 (ring A), the imaging geometry of the ring A and the camera will be used to derive the formula: (IV-1) Using the phase relationship of the camera, get (IV-2) (IV-3) Substitute Eq. (IV-2) (IV-3) to Eq. (IV-1), get (IV-4) Further simplification of Eq. (IV-4) using 3D geometric relations (IV-5) get (IV-6)

同樣的,從圖14(環B),得到下列公式:(IV-7) 為了簡單推導令:, (IV-8) 注意簡化 Eq.(IV-6) (IV-7) 與Eq.(IV-8),得到(IV-9)(IV-10) 為了進一步簡化(IV-9)(IV-10),令(IV-11) 並獲得Eq. (IV-12)及(IV-13)(IV-12)(IV-13) Eq.(IV-12) 和(IV-13) 分別除以A和B,得到:(IV-14)(IV-15) Eq.(IV-14) 減去Eq.(IV-15),得到(IV-16) Set(IV-17) 得到(IV-18)Similarly, from Figure 14 (ring B), the following formula is obtained: (IV-7) For a simple derivation order: , (IV-8) Note Simplify Eq.(IV-6) (IV-7) and Eq.(IV-8), get (IV-9) (IV-10) To further simplify (IV-9)(IV-10), (IV-11) and obtain Eq. (IV-12) and (IV-13) (IV-12) (IV-13) Eq. (IV-12) and (IV-13) are divided by A and B, respectively, to obtain: (IV-14) (IV-15) Eq.(IV-14) minus Eq.(IV-15), get (IV-16) Set (IV-17) get (IV-18)

使用環A和環B在圖14中的相似三角形關係,得到:(IV-19) Eq.(IV-18) 可以使用 Eq.(IV-19),做簡化 (IV-20)(IV-21) Let (IV-21-A) Eq.(IV-21) 被簡化如下(IV-22) 由於, 使用 Eq.(IV-22), 得到,所以,(由於假設角為銳角,所以v1 取正值)and(IV-24)(IV-25-1) (IV-25-1)詳細如下:(IV-25-2) Using the similar triangle relationship of Ring A and Ring B in Figure 14, you get: (IV-19) Eq.(IV-18) Eq.(IV-19) can be used for simplification (IV-20) (IV-21) Let (IV-21-A) Eq.(IV-21) is simplified as follows (IV-22) due to , using Eq.(IV-22), get with ,and so, (due to assumptions The angle is an acute angle, so v 1 takes a positive value) And (IV-24) (IV-25-1) (IV-25-1) is as follows: (IV-25-2)

下面列出了所有角的可能,如圖15所示SD=size(ringA)-size(ringB),其中size()為環A或環B的總面積: 1.假設SD<0與ya >yb 成立,則圓桿狀物朝向第一象限, and(I-24)(I-25)(I-26) 2.假設SD<0與ya <xb 成立,則圓桿狀物朝向第二象限 and(II-24) (II-25)(II-26) 3.假設SD>0與ya <yb 成立,則圓桿狀物朝向第三象限 and(III-24)(III-25)(III-26) 4.假設SD>0與ya >yb 成立,則圓桿狀物朝向第四象限 and(IV-24)(IV-25)(IV-26)Listed below The possibility of the angle, as shown in Figure 15, is SD=size(ringA)-size(ringB), where size() is the total area of ring A or ring B: 1. Assuming SD<0 and y a >y b , it is true. Then the round rod faces the first quadrant, And (I-24) (I-25) (I-26) 2. Assuming SD<0 and y a <x b , established, the round rod faces the second quadrant And (II-24) (II-25) (II-26) 3. Assuming SD>0 and y a <y b , established, the round rod faces the third quadrant And (III-24) (III-25) (III-26) 4. Suppose SD>0 and y a >y b , established, the round rod faces the fourth quadrant And (IV-24) (IV-25) (IV-26)

一至四象限γ推導結果比較:Comparison of gamma derivation results from one to four quadrants:

根據上面在Y-Z平面上圓桿狀物姿態的γ,每個象限的γ角度和深度ZA1 所推導的的結果都是獨立的,如下表3: 【表3】 According to the above γ of the circular rod attitude on the YZ plane, the results derived from the γ angle and the depth Z A1 of each quadrant are independent, as shown in Table 3 below: [Table 3]

估測3D座標參考點AA1:Estimate 3D coordinate reference point AA1:

在圖16中,以估測表面的3D座標A1(XA1 ,YA1 ZA1 )為基礎,來找出軸心參考點座標(XAA1 ,YAA1 ZAA1 )。給一個影像座標,ZA1,如果想要估測桿狀體表面的3D座標A1(XA1 ,YA1 ZA1 )及參考點AA1,步驟如下:In Fig. 16, the axis reference point coordinates (X AA1 , Y AA1 , Z AA1 ) are found based on the 3D coordinates A1 (X A1 , Y A1 , Z A1 ) of the estimated surface. Give an image coordinate , Z A1 and If you want to estimate the 3D coordinates A1 (X A1 , Y A1 , Z A1 ) of the rod surface and the reference point AA1, the steps are as follows:

Step1:在桿狀體表面估測A1(XA1 ,YA1 ZA1 )3D座標時,由於A1點沒有深度ZA1 資訊,將藉由求得β與γ角的過程得到ZA1 ,可利用影像幾何中的逆透視轉換得到XA1 和YA1 ,公式如下:(27)(28)Step1: When estimating A1 (X A1, Y A1, Z A1) 3D coordinates on the surface of the rod-like member, since there is no point A1 A1 the Z depth information, the process is determined by an angle β and γ obtained the Z A1, can be used The inverse perspective transformation in image geometry yields X A1 and Y A1 with the following formula: (27) (28)

Step2:估測3D座標。 從圖16中,(29),R是桿狀體的半徑。所以可以獲得定義雙環圓桿狀物3D姿態6參數:XAA1 ,YAA1 ZAA1 andStep2: Estimate 3D coordinates. From Figure 16, (29) , , , R is the radius of the rod. Therefore, it is possible to obtain a 3D attitude 6 parameter defining a double-ring round rod: X AA1 , Y AA1 , Z AA1 and .

延伸至其他象限的AA1推導結果:AA1 derivation results extending to other quadrants:

上述推導出了圓桿狀物在第一象限AA1點的推導,本節將對每個象限做推導結果的比較。將該圓桿狀物擺出以鏡心為中心點的四個象限姿態,發現當桿狀體在鏡心左邊時表面看的到的,當桿狀體在鏡心右邊時,表面則是完全擋住,所以依據圖17,將所有不同的AA1點座標的公式做推導整理如表4: 【表4】 The above derivation of the rounded rod at the first quadrant AA1 point, this section will make a comparison of the derivation results for each quadrant. The round rod is placed in four quadrant positions centered on the center of the mirror, and the surface is seen when the rod is on the left side of the mirror core. When the rod is on the right side of the mirror, the surface is completely Blocked, so according to Figure 17, the formula for all the different AA1 coordinates is deduced as shown in Table 4: [Table 4]

無論對X軸或Y軸,相對於靜心的位置為正的(右邊或上面)則需扣掉,反之若為負(左邊或下邊)則須加上Regardless of the X-axis or Y-axis, the position relative to the meditation is positive (right or top) If it is negative (left or bottom), it must be added .

總合圓桿3D八象限三角度姿態與位置推導關係:3D eight-quadrant three-angle attitude and position derivation relationship of the total round bar:

可以想像圓桿狀物在3維空間裡面會有八種象限的姿態,如圖18,因三維空間有三個平面,也將這3個平面定義成3三個角度α、β、γ,α角則是以X-Y平面定義、β角則是以Y-Z平面定義、γ角則是以X-Z平面定義,再以圖18去分析出八種象限姿態的關係表,如圖19,即可更明確的知道八種姿態所需條件關係。其中Q1~Q4與鏡頭同向,Q5~Q8指向鏡頭。It is conceivable that the round rod has eight quadrants in the three-dimensional space, as shown in Fig. 18. Since the three-dimensional space has three planes, the three planes are also defined as three angles α, β, γ, α angle. It is defined by the XY plane, the β angle is defined by the YZ plane, the γ angle is defined by the XZ plane, and then the relationship table of the eight quadrant poses is analyzed by Fig. 18, as shown in Fig. 19, it can be more clearly known. The conditional relationship required for the eight postures. Among them, Q1~Q4 are in the same direction as the lens, and Q5~Q8 are pointing to the lens.

總結,原演算法只有單一姿態象限推導公式,並不足以計算出圓桿狀物體的任意姿態,所以將3D空間定義為八象限,推出八種象限圓桿狀物姿態,α角則是以X-Y平面定義、γ角則是以Y-Z平面定義、β角則是以X-Z平面定義,推導結果α、β、γ、ZA1 分別列於表1~表3。另,該桿狀物軸心點AA1則會依據以鏡頭為中心的四個象限姿態,無論對X軸或Y軸,相對於靜心的位置為正的(右邊或上面)則需扣掉∆z,反之若為負(左邊或下邊)則須加上∆z。To sum up, the original algorithm has only a single attitude quadrant derivation formula, which is not enough to calculate the arbitrary posture of the round rod object. Therefore, the 3D space is defined as eight-quadrant, and eight quadrants are displayed. The α angle is XY. The plane definition, the γ angle is defined by the YZ plane, and the β angle is defined by the XZ plane. The derivation results α, β, γ, and Z A1 are listed in Tables 1 to 3, respectively. In addition, the rod axis point AA1 will be based on the four quadrants centered on the lens, regardless of the X-axis or Y-axis, the position relative to the meditation is positive (right or above). If it is negative (left or bottom), then ∆z must be added.

關於標記式圓桿狀物體應用於MIS微創手術環境之雙環顏色選取:About the double-loop color selection of the marked round rod object in the MIS minimally invasive surgery environment:

本發明將延伸至MIS微創手術的實際環境,且在複雜器官背景找出雙環完整輪廓,進而取得3D定位資訊所需要的2D資訊,且對複雜器官背景進行色彩模型分析,決定雙環的顏色,分析找出能夠在腹腔鏡環境中易於辨識的顏色,以利找出環形標記完整輪廓,在複雜器官背景快速且完整辨識出雙環之輪廓,並取得精準的二維資訊。The invention will extend to the actual environment of MIS minimally invasive surgery, and find the complete contour of the double loop in the complex organ background, thereby obtaining the 2D information required for the 3D positioning information, and performing color model analysis on the complex organ background to determine the color of the double loop. Analyze the color that can be easily identified in the laparoscopic environment to find the complete contour of the circular marker, quickly and completely identify the contour of the double loop in the complex organ background, and obtain accurate two-dimensional information.

本發明的另一目的是找出適合在真實手術環境中容易辨識的兩種標記環顏色,係運用如下步驟:Another object of the present invention is to find two marker ring colors that are readily identifiable in a real surgical environment, using the following steps:

Step1:收集大量具代表性的內視鏡複雜器官影像,並將做拼貼動作及Histogram分析找出使用最少的2種顏色;Step2:再以單調背景的雙環手術刀,找出雙環任一環當作精準答案影像(這邊以A環當精準答案);Step3:利用繪圖軟體PhotoImpactX3,將物件化的手術器械刀與真實環境做結合,並對環上的可能顏色(除第一步驟分析出來的顏色,再加入8個容易分辨的極端顏色作為可能的顏色選項稱為可能顏色),令他為實驗影像 ;Step4:將實驗影像套至本發明所提出之獲取雙環輪廓演算法,獲取A環輪廓,令他為濾出A環實驗影像;Step5:完美答案R_P(x,y)與濾出A環實驗影像R_j^A(x,y)做XOR找出差異像素點並計算變異數分析 (j=1~50);Step6:依據step5分析結果做出雙環顏色選擇。圖21為前述Step1至Step5之流程圖。Step1: Collect a large number of representative endoscopic complex organ images, and do the collage action and Histogram analysis to find the least 2 colors to use; Step2: Then use the double-ring scalpel with monotonous background to find any ring of double ring. Make a precise answer image (here is the A-ring as a precise answer); Step3: Use the drawing software PhotoImpactX3 to combine the object-oriented surgical instrument knife with the real environment and the possible colors on the ring (except for the first step) Color, then add 8 easily distinguishable extreme colors as possible color options called possible colors), make him an experimental image; Step4: Apply the experimental image to the proposed double-loop contour algorithm proposed by the present invention to obtain the A-ring contour Let him filter out the A-ring experimental image; Step5: Perfect answer R_P(x,y) and filter out the A-loop experimental image R_j^A(x,y) to do XOR to find the difference pixel and calculate the variance analysis (j =1~50); Step6: Make a double ring color selection according to the step 5 analysis result. Fig. 21 is a flow chart of the aforementioned Steps 1 to 5.

獲取雙環輪廓演算法:Get the double loop contour algorithm:

套至本發明所提出之獲取雙環輪廓演算法,令影像上的顏色定義為(R,G,B),對環設定的顏色定義A環為(Ra,Ga,Ba)及B環為(Rb,Gb,Bb),利用通道差的概念,將影像中的每個Pixel做三通道相減取絕對值,在對相減後的三通道分別設定門檻值,分別定義為: 【數學式3】 The method for obtaining a double loop contour algorithm proposed by the present invention defines the color on the image as (R, G, B), and the color defined for the ring defines the A ring as (Ra, Ga, Ba) and the B ring as (Rb). , Gb, Bb), using the concept of channel difference, each Pixel in the image is subtracted from the absolute value of the three channels, and the threshold values are respectively set in the three channels after subtraction, respectively defined as: [Math 3]

其中門檻值設定主要對於每種顏色對於光源的容忍度。假設以上條件成立則屬於該環Pixel。流程圖如圖20所示者(例如:環)。The threshold value is set primarily for the tolerance of each color to the light source. It is assumed that the above conditions are true and belong to the ring Pixel. The flow chart is shown in Figure 20 (for example: ring).

各個顏色性能分析:Performance analysis of each color:

1.令精確Marker位置答案為Rp (x,y),令該Step5的實際複雜器官背景Marker位置為RIJ (x,y)做邏輯運算XOR(exclusive or)互斥或閘 :1. Let the exact Marker position answer be R p (x, y), and let the actual complex organ background Marker position of Step 5 be R IJ (x, y) for logical operation XOR (exclusive or) mutual exclusion or gate: .

2.計算每N個Case,精確Marker位置Rp (x,y)二元影像與實際複雜器官背景Marker位置二元影像RIJ (x,y)做邏輯運算XOR(exclusive or),找出差異像素點,如圖22所示者: 【數學式4】 2. Calculate every N Cases, the exact Marker position R p (x, y) binary image and the actual complex organ background Marker position binary image R IJ (x, y) do XOR (exclusive or), find the difference Pixels, as shown in Figure 22: [Math 4]

3.在這邊同時進行變異數( Variance ) 的運算,變異數公式如下: 【數學式5】 3. In operation side while variance (Variance), the variation of the number of the following formula: [Mathematical Formula 5]

其中公式中相當於我的實際複雜器官背景Marker位置二元影像RIJ (x,y),μ相當於精確Marker位置Rp (x,y)二元影像,n 則是實驗的張數。Among the formulas Equivalent to my actual complex organ background Marker position binary image R IJ (x, y), μ corresponds to the exact Marker position R p (x, y) binary image, n is the experimental number of sheets.

4.記錄每一種顏色XOR(exclusive or)運算後的總數與變異數制實驗數據表。4. Record the experimental data table for the total number and variance of each color XOR (exclusive or) operation.

以下是關於每種可能實驗顏色使用50張複雜器官背景所計算出的實驗數據,接下來皆適當的調整門檻值TR、TG、TB觀測每種顏色與變異數(Variance) 挑出最適當的兩種顏色當作本發明雙環顏色。The following is the experimental data calculated using 50 complex organ backgrounds for each possible experimental color. Next, adjust the threshold values TR, TG, and TB to observe each color. With the Variance, the two most suitable colors are selected as the double ring color of the present invention.

從下表5的數據發現(255,255,255)與(0,0,0)這兩總顏色已經受的影響,數在門檻值均設為1時變大,變異數(Variance)也隨之變大(255,255,255)全白顏色受的影響是最大的,基本上可以淘汰(255,255,255)與(0,0,0)。 【表5】 From the data in Table 5 below, it is found that the two total colors (255, 255, 255) and (0, 0, 0) have been affected. The number becomes larger when the threshold value is set to 1, and the variation (Variance) also becomes larger (255, 255, 255). The effect of the all white color is the largest, and can basically be eliminated (255, 255, 255). With (0,0,0). 【table 5】

下表6(門檻值均設為10)、表7(門檻值均設為30)的數據觀察除了(255,255,255)與(0,0,0)的與變異數(Variance)隨著門檻值越高遞增以外,其餘顏色皆不受影響。 【表6】【表7】 The data observations in Table 6 below (the threshold values are all set to 10) and Table 7 (the threshold values are all set to 30) are in addition to (255, 255, 255) and (0, 0, 0). With the increase of the threshold (Variance), the other colors are not affected. [Table 6] [Table 7]

由上述表6到表7可看出門檻值10調整到30的情況下,還看不出來所要選取的兩種顏色,所以決定將門檻值直接調到120觀測數據。下述表8(門檻值均設為10)的數據觀察除了極端值顏色(0,255,255)與(0,255,0)受影響較小,其餘顏色的與變異數(Variance)隨門檻值越高遞增,這時可以選出標記環在真實手術環境最適合的兩種顏色,圖23還做了真實環境標記環理想顏色的排名。 【表8】 It can be seen from Table 6 to Table 7 above that in the case where the threshold value 10 is adjusted to 30, the two colors to be selected are not seen, so it is decided to directly adjust the threshold value to 120 observation data. The following table 8 (the threshold value is set to 10) data observation except the extreme value color (0, 255, 255) and (0, 255, 0) are less affected, the rest of the color Variant (Variance) increases with the threshold value, then you can choose the two colors that the marker ring is most suitable for in the real operating environment. Figure 23 also shows the ideal color ranking of the real environment marker ring. [Table 8]

MIS微創手術環境決定標記環RGB門檻值:The MIS minimally invasive surgical environment determines the RGB threshold of the marker ring:

因真實手術環境手術器械會因照明而反光,將以繪圖軟體(PhotoimpacX3t)模擬之,依據本發明獲取雙環輪廓演算法,調整並決定適當的RGB門檻值(光源容忍度)以獲取清晰完整雙環輪廓,其方法流程圖,如圖24所示者,其目的是找出適合在真實手術環境中合適的RGB門檻值。Due to the actual surgical environment, the surgical instrument will be reflected by the illumination. It will be simulated by the drawing software (PhotoimpacX3t). According to the invention, the double loop contour algorithm is obtained, and the appropriate RGB threshold value (light source tolerance) is adjusted and determined to obtain a clear and complete double loop contour. The method flow chart, as shown in Figure 24, aims to find a suitable RGB threshold value suitable for use in a real surgical environment.

Step1:以單調的全黑爲背景,找出A環與B環位置,當作實驗完美(perfect)答案RP (x,y);Step2:將多張的手術器械合成圖利用繪圖軟PhotoimpactX3打入反光,令影像為測試影像;Step3:將實驗影像套至本發明所提出之獲取雙環輪廓演算法,獲取雙環輪廓,令他為濾出A環實驗影像;Step5:完美答案(x,y)與濾出雙環實驗影像做XOR找出差異像素點並計算變異數分析(j=1~20);及Step6:依據前述step5分析結果做出門檻值選擇。Step1: Use the monotonous all black as the background to find the position of the A ring and the B ring, as the experimental perfect (R P (x, y); Step 2: combine multiple surgical instruments with the drawing soft PhotoimpactX3 Into the reflection, the image is the test image; Step3: The experimental image is applied to the double loop contour algorithm proposed by the present invention to obtain the double loop contour, so that he can filter out the A loop experimental image; Step 5: perfect answer (x,y) and filtered double loop experimental images Do XOR to find the difference pixel and calculate the variance analysis (j=1~20); and Step6: Make the threshold value selection according to the above step 5 analysis result.

模擬真實環境方法:Simulate real-world methods:

本發明以單調的全黑爲背景如圖25,找出A環與B環位置。The invention has a monotonous all black background as shown in Fig. 25, and finds the positions of the A ring and the B ring.

將多張的手術器械合成圖利用繪圖軟體PhotoImpactX3調整光源強度,在PhotoImpactX3中的環境光線參數,可以調整光源的強度。將利用此參隊原影像(零級光源),數調整光源的強、中、弱。並定義強、中、弱,如下:環境光線參數為30時,令他為一級光源(弱),如圖26-1;環境光線參數為60時,令他為二級光源(中),如圖26-2;環境光線參數為90時,令他為三級光源(強),如圖26-3。Combine multiple surgical instruments with the drawing software PhotoImpactX3 to adjust the intensity of the light source. In the ambient light parameters of PhotoImpactX3, the intensity of the light source can be adjusted. The original image (zero-level light source) of this team will be used to adjust the intensity, medium and weak of the light source. And define strong, medium, and weak, as follows: when the ambient light parameter is 30, make him a primary light source (weak), as shown in Figure 26-1; when the ambient light parameter is 60, make him a secondary light source (middle), such as Figure 26-2; when the ambient light parameter is 90, make him a three-level light source (strong), as shown in Figure 26-3.

獲取雙環輪廓擷取演算法:Get the double loop contour capture algorithm:

令影像上的顏色定義為(R,G,B),對環設定的顏色定義A環為(Ra,Ga,Ba)及B環為(Rb,Gb,Bb),利用通道差的概念,將影像中的每個Pixel做三通道相減取絕對值,在對相減後的三通道分別設定門檻值,分別定義為: 【數學式6】其中,門檻值設定主要對於每種顏色對於光源的容忍度。假設以上條件成立則屬於該環Pixel。流程圖如圖27(例如:環)。Let the color on the image be defined as (R, G, B), and the color set for the ring defines the A ring as (Ra, Ga, Ba) and the B ring as (Rb, Gb, Bb), using the concept of channel difference, Each Pixel in the image is subtracted from the absolute value of the three channels, and the threshold values are set respectively for the three channels after subtraction, which are respectively defined as: [Math 6] Among them, the threshold value is set mainly for the tolerance of each color to the light source. It is assumed that the above conditions are true and belong to the ring Pixel. The flow chart is shown in Figure 27 (for example: ring).

各RGB門檻值性能分析:Performance analysis of each RGB threshold:

令精確Marker位置答案為RP (x,y),令實際複雜器官背景Marker位置為RJ (x,y)做邏輯運算XOR(exclusive or)互斥或閘: 【數學式7】其示意圖,如圖28。其目的為計算兩者相異的點數。(XOR規則:兩者相同為0,不同則為1)。Let the exact Marker position answer be R P (x, y), so that the actual complex organ background Marker position is R J (x, y) to do the logical operation XOR (exclusive or) mutual exclusion or gate: [Math 7] Its schematic diagram is shown in Figure 28. Its purpose is to calculate the number of points that differ from each other. . (XOR rule: both are the same as 0, and the difference is 1).

將上述RP (x,y)與Rj (X,Y)經過互斥或運算的得到的 【數學式8】變更門檻值並重複上述步驟,並比較各。其目的:挑選各級光源出最佳RGB門檻值。[Formula 8] obtained by mutually exclusive ORing the above R P (x, y) and R j (X, Y) , Change the threshold and repeat the above steps and compare each . Its purpose: to select the best RGB threshold value for each level of light source.

零級光源實驗結果如下:The experimental results of the zero-level light source are as follows:

為了要找出零級光源的理想門檻值,首先從大範圍開始尋找,如表9,由1開始之後從等差為10的加至250。可以觀察到門檻值為1時DTH 為最小的,這時可縮小範圍到門檻值30左右去尋找理想門檻值,結果如表10。 【表9】【表10】 In order to find the ideal threshold value of the zero-order light source, first look for it from a wide range, as shown in Table 9, from the start of 1 to the increase of 10 to 250. It can be observed that when the threshold value is 1, the D TH is the smallest. At this time, the range can be narrowed to about 30 threshold values to find the ideal threshold value. The result is shown in Table 10. [Table 9] [Table 10]

故,從表9擴大範圍尋找,可以觀察到理想門檻值可能再為30附近,這時再縮小範圍從門檻值30附近去尋找,如表10,發現從門檻值25開始的是遞增的狀態,這時可以知道零級光源理想門檻值為25。Therefore, from Table 9 to expand the scope of the search, it can be observed that the ideal threshold value may be again around 30, then narrow the range from the threshold value of 30 to find, as shown in Table 10, found from the threshold value of 25 It is an incremental state, and it can be known that the ideal threshold value of the zero-order light source is 25.

一級光源實驗結果如下:The experimental results of the primary light source are as follows:

為了要找出一級光線的理想門檻值,首先從大範圍開始尋找,如表11,由1開始之後從等差為10的加至250。可以觀察到門檻值為130時DTH 為最小的,這時可縮小範圍到門檻值130左右去尋找理想門檻值,結果如表12。 【表11】【表12】 In order to find the ideal threshold for the first-order light, first look for it from a wide range, as shown in Table 11, from the start of 1 to the increase of 10 to 250. It can be observed that when the threshold value is 130, the D TH is the smallest. At this time, the range can be narrowed down to the threshold value of 130 to find the ideal threshold value. The result is shown in Table 12. [Table 11] [Table 12]

從表11擴大範圍尋找,可以觀察到理想門檻值可能再為130附近,這時再縮小範圍從門檻值130附近去尋找,如表12,發現在130以上或以下的是遞增的狀態,這時可以知道一級光源理想門檻值為130。Looking at the expanded range from Table 11, it can be observed that the ideal threshold value may be again near 130, and then narrow the range from the threshold value 130 to find, as shown in Table 12, found above 130 or below. It is an incremental state, and it can be known that the ideal threshold value of the primary light source is 130.

二級光源實驗結果如下:The experimental results of the secondary light source are as follows:

為了要找出二級光線的理想門檻值,首先從大範圍開始尋找,如表13,由1開始之後從等差為10的加至250。可以觀察到門檻值為60時DTH 為最小的,這時可縮小範圍到門檻值60左右去尋找理想門檻值,結果如表14。 【表13】【表14】 In order to find the ideal threshold for secondary light, first look for it from a wide range, as shown in Table 13, from the start of 1 to the increase of 10 to 250. It can be observed that the D TH is the smallest when the threshold value is 60. At this time, the range can be narrowed down to the threshold value of about 60 to find the ideal threshold value. The results are shown in Table 14. [Table 13] [Table 14]

從表13擴大範圍尋找,可以觀察到理想門檻值可能再為60附近,這時再縮小範圍從門檻值60附近去尋找,如表14,發現從門檻值62以上開始的是遞增的狀態,這時可以知道二級光源理想門檻值為62。Looking up from the expanded range of Table 13, it can be observed that the ideal threshold value may be again around 60. At this time, the narrowing range is further searched from the threshold value of 60, as shown in Table 14, and it is found that the threshold value is above 62. It is an incremental state, and it can be known that the ideal threshold value of the secondary light source is 62.

三級光源實驗結果如下:The experimental results of the three-level light source are as follows:

為了要找出三級光線的理想門檻值,首先從大範圍開始尋找,如表15,由1開始之後從等差為10的加至250。可以觀察到門檻值為1時DTH 為最小的,這時可縮小範圍到門檻值1左右去尋找理想門檻值,結果如表16。 【表15】【表16】 In order to find the ideal threshold for the three-level ray, first look for it from a wide range, as shown in Table 15, from the start of 1 to the increase of 10 to 250. It can be observed that when the threshold value is 1, the D TH is the smallest. At this time, the range can be narrowed down to the threshold value of 1 to find the ideal threshold value. The result is shown in Table 16. [Table 15] [Table 16]

從表15擴大範圍尋找,可以觀察到理想門檻值可能再為1附近,這時再縮小範圍從門檻值1附近去尋找,如表16,發現從門檻值1以上開始的是遞增的狀態,這時可以知道結果三級光源理想門檻值為1。Looking up from the expanded range of Table 15, it can be observed that the ideal threshold value may be again near 1, then narrow the range from the threshold value of 1 to find, as shown in Table 16, found that the threshold value is above 1 It is an incremental state, and it can be known that the ideal threshold value of the three-level light source is 1.

經過上述實驗,將光源調整強、中、弱、無,決定每個光源級別(零級、一級、二級、三級)的理想RGB門檻值。1.零級光源(無光源效果)門檻值為25。2.一級光源(弱)門檻值為130。3.二級光源(中)門檻值為62。4.三級光源(強)門檻值為1。After the above experiments, the light source is adjusted to be strong, medium, weak, and non-deterministic, and the ideal RGB threshold value of each light source level (zero, first, second, third) is determined. 1. Zero-level light source (no light source effect) threshold value is 25. 2. First-level light source (weak) threshold value is 130. 3. Secondary light source (middle) threshold value is 62. 4. Three-level light source (strong) threshold value Is 1.

因此,將對大量的複雜器官背景影像進行色彩模型分析,分析找出能夠在腹腔鏡環境中易於辨識的兩種作為雙環的顏色,A環為(0,255,255),B環為(0,255,0)。而對於因光照明而導致手術器械反光,利用繪圖軟體PhotoimpactX3模擬光源,並定義光源強度(無光源、強、中、弱),決定了各級光源的理想RGB門檻值,零級光源(無光源效果)門檻值為25。一級強光(弱)門檻值為130。二級強光(中)門檻值為62。三級強光(強)門檻值為1。接者擺出器械姿態並觀察光源對六參數的影響。觀察結果光源強度對3D六參數的結果,還是微小的誤差,可能原因:因在獲取雙環輪廓時各級光線與完美答案的所濾出之輪廓的相異位置分布在雙環的邊緣,造成在獲取雙環上沿點與下沿點時會有差異性,導致微小的誤差。Therefore, a large number of complex organ background images will be color model analyzed to find two colors that can be easily identified in the laparoscopic environment as a double ring. The A ring is (0, 255, 255) and the B ring is (0, 255, 0). For the illumination of the surgical instrument due to light illumination, using the drawing software PhotoimpactX3 to simulate the light source and defining the intensity of the light source (no light source, strong, medium, weak), the ideal RGB threshold value of each level of light source is determined, and the zero-level light source (no light source) Effect) The threshold is 25. The first-order glare (weak) threshold is 130. The secondary glare (middle) threshold is 62. The third-level glare (strong) threshold is 1. The receiver poses the instrument and observes the effect of the light source on the six parameters. Observing the result of the light source intensity on the 3D six parameters, it is still a small error. Possible reason: because the different positions of the filtered contours of the light rays and the perfect answer are distributed at the edge of the double loop when acquiring the double loop contour, resulting in acquisition There are differences between the upper and lower edges of the double loop, resulting in minor errors.

標記式圓桿狀物體三維定位演算法應用於內視鏡手術:Marked round rod object three-dimensional positioning algorithm applied to endoscopic surgery:

本發明基於前述標記式圓桿狀物體二維影像之三維八象限定位演算法流程,並於圓桿狀物在不同的姿態及距離對三維定位參數之影響。基於前述推導公式,提出標記式圓桿狀物體基於單張二維影像之三維八象限參數估計演算法並應用於內視鏡手術環境,做詳細步驟介紹。The invention is based on the three-dimensional eight-image limited-bit algorithm flow of the two-dimensional image of the labeled round rod object, and influences the three-dimensional positioning parameters of the round rod in different postures and distances. Based on the above derivation formula, a three-dimensional eight-quadrant parameter estimation algorithm based on a single two-dimensional image is proposed and applied to the endoscopic surgery environment. The detailed steps are introduced.

首先,於前述MIS微創手術環境中雙環顏色選擇的實驗結果如,圖23(只列出前十名)決定雙環的顏色,本發明選擇了第一名與第二名的顏色,分別為:(1)A環:(0,255,255);(2)B環:(0,255,0),這兩種顏色在真實手術環境(如圖5.1)中能有效地分辨出圓桿狀物體的雙環標記。First, the experimental results of the double-loop color selection in the aforementioned MIS minimally invasive surgery environment, as shown in Fig. 23 (only the top ten are listed) determine the color of the double ring, and the present invention selects the colors of the first and second names, respectively: (1) A ring: (0, 255, 255); (2) B ring: (0, 255, 0), these two colors can effectively distinguish the round rod in the real operating environment (Figure 5.1) The double loop mark of the object.

標記式圓桿狀物體基於二維影像之三維八象限定位演算法流程:The marker-type round rod object is based on a three-dimensional image of a three-dimensional eight-image limited-bit algorithm flow:

本發明的標記式圓桿狀物體單張二維影像作輸入,再透過現代影像處理的技術,取得圓桿狀物的二維資訊,再透過第三章所推導之公式即可快速算出標記式圓桿狀物體在三維空間中的八象限任意姿態參數。演算法流程圖,如圖29。The two-dimensional image of the marked round rod object of the invention is input, and the two-dimensional information of the round rod is obtained through the technology of modern image processing, and the marked round rod can be quickly calculated through the formula derived in the third chapter. The eight-quadrant arbitrary pose parameter of the object in three-dimensional space. Algorithm flow chart, as shown in Figure 29.

Step1.取出雙環輪廓 :Step1. Take out the double loop outline:

令影像上的顏色定義為(R,G,B),對環設定的顏色定義A環為(Ra,Ga,Ba)及B環為(Rb,Gb,Bb),利用通道差的概念,將影像中的每個Pixel做三通道相減取絕對值,在對相減後的三通道分別設定門檻值,分別定義為,如前述的數學式6;其中門檻值設定主要對於每種顏色對於光源的容忍度。假設以上條件成立則屬於該環Pixel,如圖30所示者。例如:Pixel∈A環。Let the color on the image be defined as (R, G, B), and the color set for the ring defines the A ring as (Ra, Ga, Ba) and the B ring as (Rb, Gb, Bb), using the concept of channel difference, Each Pixel in the image is subtracted from the absolute value of the three channels, and the threshold values are respectively set in the three channels after subtraction, respectively defined as Mathematical Formula 6 as described above; wherein the threshold value is set mainly for each color for the light source Tolerance. It is assumed that the above conditions are true and belong to the ring Pixel, as shown in FIG. For example: Pixel∈A ring.

Step2.影像座標轉換:Step2. Image coordinate conversion:

因影像開發軟體的(0,0)是由圖片左上方開始,但推導公式的過程中則是以影像的中心為(0,0),所以必須將座標轉換將原點移至中心,如圖31,令輸入的是一張MXN大小影像或視訊的影格為f(i,j),要將f(i,j)轉成f(x,y),公式如下: 【數學式9】 f(x,y)=(i-M/2,N/2-j)Because the image development software (0,0) starts from the top left of the picture, but the process of deriving the formula is based on the center of the image (0,0), so the coordinates must be converted to move the origin to the center, as shown in the figure. 31, the input is an MXN size image or video frame f (i, j), to f (i, j) into f (x, y), the formula is as follows: [Math 9] f ( x,y)=(iM/2,N/2-j)

Step3.找出雙環重心:Step3. Find the center of gravity of the double ring:

由前述的Step1敘述將圓桿狀物體上的A,B環切割出來,之後分別計算其重心座標,如圖32,並透過數學式9可計算出物件重心點座標值(Xc,Yc),其中P為pixel。 【數學式10】 The A and B rings on the round rod object are cut out by the aforementioned Step 1 and then the center of gravity coordinates are calculated respectively, as shown in Fig. 32, and the coordinates of the center of gravity of the object (Xc, Yc) can be calculated by the mathematical formula 9, wherein P is pixel. [Math 10]

Step4.取得雙環二維資訊:Step4. Get double-loop 2D information:

利用前述的Step3,將兩環重心點座標連線形成軸線段之直線方程式L,如圖33,且兩環二值化影像分別透過Canny邊緣檢測或形態學方法,取得兩環所有之邊緣點座標,帶入軸線段之直線方程式L通過邊緣點來計算出環型標記兩端點座標位置A(Xa1 ,Ya1 )、A(Xa2 ,Ya2 )、B(Xb1 ,Yb1 )、B(Xb2 ,Yb2 ),如圖34。Using the aforementioned Step 3, the two-ring center of gravity coordinates are connected to form a straight line equation L of the axis segment, as shown in FIG. 33, and the two-ring binarized images are respectively obtained by Canny edge detection or morphological method to obtain all the edge point coordinates of the two rings. The linear equation L brought into the axis segment calculates the coordinate positions A (X a1 , Y a1 ), A (X a2 , Y a2 ), B (X b1 , Y b1 ) at both ends of the ring mark by the edge points. B(X b2 , Y b2 ), as shown in Figure 34.

Step5.pixel轉換成mm單位:Step5.pixel is converted into mm units:

將前述的Step4所取得的兩端點座標位置A(Xa1 ,Ya1 )、A(Xa2 ,Ya2 )、B(Xb1 ,Yb1 )、B(Xb2 ,Yb2 )單位從像素點Pixel轉換成mm單位(10mm=1cm),使用影像的解析度以及相機鏡頭大小換算。而本發明係使用Iphone5相機解析度為:3264x2448,相機鏡頭大小為:4.54x3.42mm,轉換係數為dy=4.54/3264,dx=3.42/2448。The position coordinates A (X a1 , Y a1 ), A (X a2 , Y a2 ), B (X b1 , Y b1 ), B (X b2 , Y b2 ) obtained by the above Step 4 are obtained from the pixel. The point Pixel is converted into mm units (10 mm = 1 cm), and the resolution of the image and the camera lens size are used. The present invention uses the Iphone5 camera resolution: 3264x2448, the camera lens size is: 4.54x3.42mm, the conversion factor is dy=4.54/3264, dx=3.42/2448.

Step6.進行三維姿態估測:Step6. Perform 3D pose estimation:

透過Step1到Step5方法可以推算出所需要的二維空間中的參數,再利用前述所推出的三維八象限定位系統,即可快速算出圓桿狀物體在3D空間的任意姿態。已知攝影機焦距(),環軸長(),雙環重心軸長(),雙環兩端投射點()和(),求桿狀物體三維定位參數{},參數求解步驟如下:Through the Step1 to Step5 method, the parameters in the required two-dimensional space can be derived, and then the three-dimensional eight-image limit position system introduced above can be used to quickly calculate the arbitrary posture of the round rod-like object in the 3D space. Known camera focal length ( ), the length of the ring axis ( ), double ring center of gravity axis ( ), the double-ring projection point )with( ), to find the three-dimensional positioning parameters of the rod object { , , , , , }, the parameter solving steps are as follows:

為銳角。這邊列出了四種可能的角,如表17(X-Y平面四象限α角)、表18(X-Z平面四象限β角與ZA1 )、表19(Y-Z平面四象限γ 角與ZA1 )。 【表17】【表18】【表19】 It is an acute angle. Here are four possible The angles are as shown in Table 17 (the four-quadrant alpha angle of the XY plane), Table 18 (the four-quadrant beta angle of the XZ plane and the Z A1 ), and Table 19 (the four-quadrant γ angle of the YZ plane and Z A1 ). [Table 17] [Table 18] [Table 19]

帶入數學式11 【數學式11】 Brought into the mathematical formula 11 [Math 11]

便獲得XA1 與YA1 ,進而獲得參考點座標點AA1(XAA1 ,YAA1 ,ZAA1 )、如表20(圓桿狀體一至四象限AA1點座標推導結果) : 【表20】 X A1 and Y A1 are obtained, and the reference point coordinate points AA1 (X AA1 , Y AA1 , Z AA1 ) are obtained, as shown in Table 20 (the derivation results of the A1 point coordinate of the circular rod-shaped one to four quadrants): [Table 20]

綜上所述各實施說明,本發明係關於一種「基於二維影像及三維完整八象限定位之內視鏡手術器械追蹤方法」,且其構成結構未曾見於諸書刊或公開使用,誠符合專利申請要件,懇請 鈞局明鑑,早日准予專利,至為感禱;需陳明者,以上所述乃是本專利申請案之具體實施例及所運用之技術原理,若依本專利申請案之構想所作之改變,其所產生之功能作用仍未超出說明書及圖式所涵蓋之精神時,均應在本專利申請案之範圍內,合予陳明。In summary, the present invention relates to a "tracking method for an endoscopic surgical instrument based on a two-dimensional image and a three-dimensional complete eight-image limit position", and the structure thereof has not been seen in various books or publicly used, and is in compliance with a patent application. In the case of the requirements of the patent application, the stipulations of the patent application are based on the specific examples of the patent application and the technical principles applied. Changes in the functions of the products and their functions beyond the scope of this specification and the drawings shall be incorporated in the scope of this patent application.

a、b、c、d、e、f‧‧‧步驟a, b, c, d, e, f‧ ‧ steps

圖1:雙環圓桿狀物體與影像平面的關係示意圖。 圖2:參考點AA1為圓桿狀物軸線與環A上邊緣平面之交叉點示意圖。 圖3:α角度為X軸與投射於x-y(X-Y)影像平面線向量的夾角示意圖。 圖4:β角度為X軸與投射於X(x)-Z平面線向量的夾角(β為銳角)示意圖。 圖5:標記式圓桿狀物體在二維的影像X軸投射面(第一象限方向)示意圖。 圖6:標記式圓桿狀物體在二維的影像X軸投射面(第二象限方向)示意圖。 圖7:標記式圓桿狀物體在二維的影像X軸投射面(第三象限方向)示意圖。 圖8:標記式圓桿狀物體在二維的影像X軸投射面(第四象限方向)示意圖。 圖9:所有β角的可能投射於X(x)-Z平面(β角為銳角)示意圖。 圖10:角度為Y軸與投射於Y(y)-Z平面線向量的夾角(角為銳角)示意圖。 圖11:標記式圓桿狀物體在二維的影像Y軸投射面(第一象限方向)示意圖。 圖12:標記式圓桿狀物體在二維的影像Y軸投射面(第二象限方向示意圖。 圖13:標記式圓桿狀物體在二維的影像Y軸投射面(第三象限方向)示意圖。 圖14:標記式圓桿狀物體在二維的影像Y軸投射面(第四象限方向)示意圖。 圖15:所有γ角的可能投射於Y(y)-Z平面(γ角為銳角)示意圖。 圖16:座標點A1及AA1之間的幾何關係示意圖。 圖17:圓桿狀體一至四象限AA1點座標推導結果示意圖。 圖18:三維八象限姿態概念圖(Z軸正的方向為鏡頭方向)示意圖。 圖19:三維八象限姿態關係表示意圖。 圖20:本發明所提出獲取雙環輪廓演算法之示意圖。 圖21:MIS微創手術環境雙環顏色選擇之Step1至Step5流程圖。 圖22:本發明關於RP (x,y)與RIJ (x,y)做XOR之示意圖。 圖23:本發明雙環可適用顏色排名示意圖。 圖24:本發明挑選RGB門檻值流程圖。 圖25:本發明以單調的全黑爲背景,擷取雙環之示意圖。 圖26:將多張的手術器械合成圖利用繪圖軟體PhotoImpactX3調整光源強度之示意圖。 圖27:本發明另一獲取雙環輪廓演算法流程圖之示意圖。 圖28:另一RP (x,y)與RJ (x,y)做邏輯運算XOR示意圖。 圖29:本發明標記式圓桿狀物體基於二維影像之三維八象限定位演算法之流圖。 圖30:本發明另一獲取雙環輪廓演算法流程圖示意圖。 圖31:本發明圖29演算法的座標轉換示意圖。 圖32:本發明圖29演算法的重心座標計算示意圖。 圖33:本發明圖29演算法的AB兩環重心點座標連線之示意圖。 圖34:本發明圖29演算法獲取AB兩環上下沿點圖。Figure 1: Schematic diagram of the relationship between a double-ring round rod object and the image plane. Figure 2: Reference point AA1 is a schematic diagram of the intersection of the axis of the round bar and the plane of the upper edge of the ring A. Figure 3: α angle is the X axis and is projected onto the xy (XY) image plane line vector Schematic diagram of the angle. Figure 4: The β angle is the X-axis and the vector projected on the X(x)-Z plane Schematic diagram of the angle (β is an acute angle). Figure 5: Schematic diagram of the marked round rod object in the two-dimensional image X-axis projection plane (first quadrant direction). Figure 6: Schematic diagram of the marked round rod object in the two-dimensional image X-axis projection plane (second quadrant direction). Figure 7: Schematic diagram of the marked round rod object in the two-dimensional image X-axis projection plane (third quadrant direction). Figure 8 is a schematic view of a two-dimensional image X-axis projection surface (fourth quadrant direction) of a marked round rod object. Figure 9: Schematic representation of the possible projection of all beta angles in the X(x)-Z plane (the angle β is acute). Figure 10: The angle is the Y-axis and the vector projected on the Y(y)-Z plane Schematic diagram of the angle (the angle is an acute angle). Fig. 11 is a schematic view showing the two-dimensional image Y-axis projection plane (first quadrant direction) of the marked round rod object. Fig. 12: Schematic diagram of the marked round rod object on the two-dimensional image Y-axis projection surface (second quadrant direction. Fig. 13: Schematic diagram of the marked round rod object on the two-dimensional image Y-axis projection surface (third quadrant direction) Figure 14: Schematic diagram of the marked round bar object in the two-dimensional image Y-axis projection plane (fourth quadrant direction) Figure 15: Possible gamma angle projections on the Y(y)-Z plane (γ angle is acute) Fig. 16: Schematic diagram of the geometric relationship between coordinate points A1 and AA1. Figure 17: Schematic diagram of the derivation of the coordinates of the AA1 point of the one-four quadrant of the circular rod. Figure 18: Conceptual view of the three-dimensional eight-quadrant attitude (the positive direction of the Z-axis is Schematic diagram of the lens direction.Figure 19: Schematic diagram of the three-dimensional eight-quadrant attitude relationship table. Figure 20: Schematic diagram of the proposed double-loop contour algorithm proposed by the present invention. Figure 21: Step 1 to Step 5 flow chart of the double-loop color selection of the MIS minimally invasive surgery environment. 22: The present invention is a schematic diagram of XOR of R P (x, y) and R IJ (x, y). Figure 23: Schematic diagram of the applicable color ranking of the double loop of the present invention. Figure 24: Flow chart of selecting the RGB threshold value of the present invention. 25: The invention is based on monotonous all black, 撷Bicyclic schematic of FIG. 26: a plurality of surgical instrument of FIG synthesized using graphics software to adjust the light source intensity PhotoImpactX3 schematic FIG. 27: a flowchart of the algorithm of the present invention, a schematic view of another profile acquisition bicyclic Figure 28: Another R P ( X, y) and R J (x, y) are logically operated XOR diagrams. Figure 29: Flow diagram of the three-dimensional eight-image limit bit algorithm based on two-dimensional images of the labeled round rod object of the present invention. Figure 31 is a schematic diagram showing the coordinate conversion of the algorithm of Figure 29 of the present invention. Figure 32 is a schematic diagram of the calculation of the coordinates of the center of gravity of the algorithm of Figure 29 of the present invention. Figure 33: AB of the algorithm of Figure 29 of the present invention Schematic diagram of the coordinate connection of the two-ring center of gravity. Figure 34: The algorithm of Figure 29 of the present invention acquires the upper and lower points of the two rings of AB.

Claims (6)

一種運用三維完整八象限定位之內視鏡手術器械追蹤方法,係包含有: 一雙環輪廓取出步驟,係將所輸入的投影於平面之手術器械影像擷取其第一環體(A)與第二環體(B)之平面影像; 一影像座標轉換步驟,係設定前述第一環體及第二環體平面影像的中心為原點,並進行其座標轉換; 一找出雙環重心的步驟,係分別計算出第一環體及第二環體的重心座標; 一取得雙環二維資訊步驟,將該第一環體及第二環的重心座標連線形成軸線段之直線方程式(L)並透過邊緣點以計算出該第一環體的二中心端點座標A1、A2及該第二環體的二中心端點座標B1、B2; 一像素轉換毫米單位步驟,係將前述四個端點座標A1、A2、B1、B2轉換成毫米單位; 一進行三維姿態估測步驟,係使用上個步驟終的端點座標A1、A2、B1、B2及已知的攝影機焦距(λ),環軸長(L),雙環重心軸長(LAB ),雙環兩端投射點(xa1 xa2 xb1 xb2 )和(ya1 ya2 yb1 yb2 )之參數,並配合使用三維八像限定位系統,進而求出求該手術器械的三維定位參數{XA1 ,YA1 ,ZA1 ,α,β,γ}之參數,進而可快速算該手術器械在空間的任意姿態。An endoscopic surgical instrument tracking method using a three-dimensional complete eight-image limited position includes: a double-loop contour removal step for capturing the first ring body (A) and the image of the input surgical instrument image projected onto the plane a planar image of the second ring body (B); an image coordinate conversion step of setting the center of the first ring body and the second ring body plane image as an origin, and performing coordinate conversion; a step of finding the center of gravity of the double ring, Calculating the coordinates of the center of gravity of the first ring body and the second ring body respectively; and obtaining the two-dimensional information step of the double ring, connecting the center of gravity coordinates of the first ring body and the second ring to form a linear equation (L) of the axis segment and Calculating the two center endpoint coordinates A1, A2 of the first ring body and the two center endpoint coordinates B1, B2 of the second ring body through the edge points; a pixel conversion millimeter unit step, the four end points are Coordinates A1, A2, B1, B2 are converted into millimeter units; a three-dimensional attitude estimation step is performed using the endpoint coordinates A1, A2, B1, B2 at the end of the previous step and the known camera focal length (λ), the ring axis Long (L), double ring center of gravity axis length (L AB ), the parameters of the double-ring projection points (x a1 , x a2 , x b1 , x b2 ) and ( y a1 , y a2 , y b1 , y b2 ) are used together with the three-dimensional eight-image limit system. The parameters of the three-dimensional positioning parameters {X A1 , Y A1 , Z A1 , α, β, γ} of the surgical instrument are obtained, and the arbitrary posture of the surgical instrument in space can be quickly calculated. 如請求項1所述運用三維完整八象限定位之內視鏡手術器械追蹤方法,其中該雙環輪廓取出步驟中,係定義該第一環體為(Ra,Ga,Ba)及該第二環體為(Rb,Gb,Bb),運用通道差的概念,將該第一環體、第二環體影像中的每個像素做三通道相減取絕對值,在對相減後的三通道分別設其定門檻值,並定義如下數學式: 【數學式1】;其中該門檻值設定主要對於每種顏色對於光源的容忍度,假設以上條件成立則屬於該環體的像素。An endoscopic surgical instrument tracking method using a three-dimensional complete eight-image limit according to claim 1, wherein the double-loop contour extraction step defines the first ring body as (Ra, Ga, Ba) and the second ring body For (Rb, Gb, Bb), using the concept of channel difference, each pixel in the first ring and the second ring image is subtracted from the absolute value of the three channels, and the three channels after subtraction are respectively Set its threshold value and define the following mathematical formula: [Math 1] Where the threshold value is set primarily for the tolerance of the light source for each color, assuming that the above conditions are true, the pixels belonging to the ring body. 如請求項1所述運用三維完整八象限定位之內視鏡手術器械追蹤方法,其中該影像座標轉換步驟中,係設一張MXN大小影像或視訊的影格為f(i,j),運用如下數學式得將f(i,j)轉成f(x,y): 【數學式2】The endoscopic surgical instrument tracking method using the three-dimensional complete eight-image limit position as claimed in claim 1, wherein in the image coordinate conversion step, a frame of MXN size image or video is set as f(i, j), and the application is as follows The mathematical formula converts f(i,j) into f(x,y): [Math 2] . 如請求項1所述運用三維完整八象限定位之內視鏡手術器械追蹤方法,其中該找出雙環重心步驟中,係透過下列數學式計算出其重心點座標值(Xc,Yc),其中P為像數(pixel): 【數學式3】The endoscopic surgical instrument tracking method using the three-dimensional complete eight-image limit position as claimed in claim 1, wherein in the step of finding the double-loop center of gravity, the coordinate point coordinate value (Xc, Yc) is calculated by the following mathematical formula, wherein P For the number of pixels (pixel): [Math 3] . 如請求項1所述運用三維完整八象限定位之內視鏡手術器械追蹤方法,其中該取得雙環二維資訊驟中,係兩環二值化影像分別透過Canny邊緣檢測或形態學方法,取得兩環所有之邊緣點座標,帶入該軸線段之直線方程式(L)通過邊緣點來計算出環型標記兩端點座標位置A1(Xa1 ,Ya1 )、A2(Xa2 ,Ya2 )、B1(Xb1 ,Yb1 )、B2(Xb2 ,Yb2 )。The endoscopic surgical instrument tracking method using the three-dimensional complete eight-image limit position as claimed in claim 1, wherein the two-loop binary image is obtained by the Canny edge detection or the morphological method respectively. All the edge coordinates of the ring, the linear equation (L) brought into the axis segment calculates the coordinate positions A1 (X a1 , Y a1 ), A2 (X a2 , Y a2 ) at both ends of the ring mark through the edge points, B1 (X b1 , Y b1 ), B2 (X b2 , Y b2 ). 如請求項1所述運用三維完整八象限定位之內視鏡手術器械追蹤方法,其中該進行三維姿態估測步驟中,係透過下列步驟的數學式,以求得該桿狀物體三維定位參數{}: 步驟(1)先求出四象限的可能的角: 【數學式4】步驟(2)再求出四象限的可能的β角與ZA1 : 【數學式5】步驟(3)再求出四象限的可能的γ 角與ZA1 : 【數學式6】步驟(3)再求出XA1 與YA1 【數學式7】如此,就可獲得參考點座標點AA1(XAA1 ,YAA1 ,ZAA1 ) 【數學式8】The endoscopic surgical instrument tracking method using the three-dimensional complete eight-image limit position as claimed in claim 1, wherein the three-dimensional posture estimation step is performed by using the mathematical formula of the following steps to obtain the three-dimensional positioning parameter of the rod object. , , , , , }: Step (1) first find the possible four quadrants Angle: [Math 4] Step (2) then find the possible β angle of the four quadrants and Z A1 : [Math 5] Step (3) then find the possible gamma angle of four quadrants and Z A1 : [Math 6] Step (3) to find X A1 and Y A1 again [Math 7] Thus, the reference point coordinate point AA1 (X AA1 , Y AA1 , Z AA1 ) can be obtained. [Math 8] .
TW105135385A 2016-11-01 2016-11-01 The Method Of Complete Endoscopic MIS Instrument 3D Position Estimation Using A Single 2D Image TWI594208B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW105135385A TWI594208B (en) 2016-11-01 2016-11-01 The Method Of Complete Endoscopic MIS Instrument 3D Position Estimation Using A Single 2D Image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW105135385A TWI594208B (en) 2016-11-01 2016-11-01 The Method Of Complete Endoscopic MIS Instrument 3D Position Estimation Using A Single 2D Image

Publications (2)

Publication Number Publication Date
TWI594208B TWI594208B (en) 2017-08-01
TW201818347A true TW201818347A (en) 2018-05-16

Family

ID=60189218

Family Applications (1)

Application Number Title Priority Date Filing Date
TW105135385A TWI594208B (en) 2016-11-01 2016-11-01 The Method Of Complete Endoscopic MIS Instrument 3D Position Estimation Using A Single 2D Image

Country Status (1)

Country Link
TW (1) TWI594208B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI697317B (en) * 2019-08-30 2020-07-01 國立中央大學 Digital image reality alignment kit and method applied to mixed reality system for surgical navigation

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008537693A (en) * 2005-03-31 2008-09-25 サイティック コーポレーション Internal biopsy marking
TWI346311B (en) * 2008-02-22 2011-08-01 Univ Nat Cheng Kung Three-dimensional finger motion analysis system and method

Also Published As

Publication number Publication date
TWI594208B (en) 2017-08-01

Similar Documents

Publication Publication Date Title
Mahmoud et al. Live tracking and dense reconstruction for handheld monocular endoscopy
Lin et al. Video‐based 3D reconstruction, laparoscope localization and deformation recovery for abdominal minimally invasive surgery: a survey
JP6690041B2 (en) Method and device for determining point of gaze on three-dimensional object
EP3073894B1 (en) Corrected 3d imaging
Schmalz et al. An endoscopic 3D scanner based on structured light
US20170132806A1 (en) System and method for augmented reality and virtual reality applications
US11896441B2 (en) Systems and methods for measuring a distance using a stereoscopic endoscope
JP6580761B1 (en) Depth acquisition apparatus and method using polarization stereo camera
CN107357429B (en) Method, apparatus, and computer-readable storage medium for determining gaze
WO2019015154A1 (en) Monocular three-dimensional scanning system based three-dimensional reconstruction method and apparatus
US20120256916A1 (en) Point cloud data processing device, point cloud data processing method, and point cloud data processing program
US20030025788A1 (en) Hand-held 3D vision system
WO2020063987A1 (en) Three-dimensional scanning method and apparatus and storage medium and processor
JP7379065B2 (en) Information processing device, information processing method, and program
JP2015082288A (en) Information processing device and control method of the same
CN112184653B (en) Binocular endoscope-based focus three-dimensional size measuring and displaying method
CN102831601A (en) Three-dimensional matching method based on union similarity measure and self-adaptive support weighting
JP6894707B2 (en) Information processing device and its control method, program
CN113008195B (en) Three-dimensional curved surface distance measuring method and system based on space point cloud
WO2017199285A1 (en) Image processing device and image processing method
JP2008217243A (en) Image creation device
Kumar et al. Persistent and automatic intraoperative 3D digitization of surfaces under dynamic magnifications of an operating microscope
CN109085603A (en) Optical 3-dimensional imaging system and color three dimensional image imaging method
JP6614905B2 (en) Three-dimensional measuring apparatus and control method thereof
JP2019045989A (en) Information processing apparatus, information processing method and computer program

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees