1316642 九、發明說明: 【發明所屬之技術領域】 、、本發明係有關-種影像對位方法,特別是—種利用相位關 連法(phase correlation)處理之影像對位方法。 【先前技術】 按,顯微技術(microscopy)自發明以來經歷多年演變,在 . 人類科技文明的發展上已做出極大的貢獻,近十餘年來由於高 性能個人電腦的快速發展,更促成了顯微技術的成熟與應用。 而利用光學切片(斷層掃描技術)和數位影像重組的技術,達成 立體的顯微斷層掃描在各領域也已造成極大的影響。 以穿透式電子顯微鏡(transmission electron microscope, 或X光顯微鏡(X-ray microscope)而言,拍攝待重建物體 趙項針對物體進行不同投射角度的影像組合,進而結合產生立 货的資料以及影像’但是立體的資料和影像需要正確的影像對 的1而原始影像的位移乃是由於從不同的角度拍攝產生機械上 用$動或缺陷’或因為溫度差造成的位置移動所造成。習知利 夫’、雜的人工對位,不僅是時間上的浪費,也容易產生人為疏 解一種習知的改善方法係利用互相關法(cross correlation)來 烏夫人工對位的問題,然,另一個重要的議題在於,針對不同 ,所拍攝的物體影像是不完全相同的,而習知的影像 P無法完全克服這個困難。 〔蝥明内容】 每,鑒於上述問題,本發明目的之一係提供一種影像對位方 利用相位關連演算法能快速且較準確運算兩影像之位移。 5 1316642 —本發明目的之-係提供—_像對位方法,利用相位關連 演算法能在擷取衫全㈣影像的情況τ,達成影像對位的目 的0 、—本發明目的之—係提供—種影像對位方法,利用相位關連 算法了處理掉大。卩分的雜訊區域,藉由雜訊的減少 的對位更為精確。 1冢1316642 IX. Description of the invention: [Technical field to which the invention pertains] The present invention relates to an image alignment method, and more particularly to an image alignment method using phase correlation processing. [Prior Art] According to microscopy, microscopy has undergone many years of evolution since its invention. It has made great contributions to the development of human science and technology civilization. It has been promoted in the past ten years due to the rapid development of high-performance personal computers. The maturity and application of microscopy. The use of optical sectioning (tomographic scanning) and digital image recombination technology to achieve stereoscopic microscopic tomography has also had a great impact in various fields. In the case of a transmission electron microscope (X-ray microscope), the image of the object to be reconstructed is photographed at different projection angles of the object, and the data and image of the stock are combined. However, stereoscopic data and images require the correct image pair 1 and the original image displacement is caused by mechanically moving from a different angle to produce a motion or defect ' or a positional shift due to a temperature difference. Miscellaneous artificial alignment is not only a waste of time, but also a kind of artificial improvement method. It is a problem of using the cross correlation method to match the position of the Ukrainian workers. However, another important issue Therefore, for different images, the images of the captured objects are not identical, and the conventional image P cannot completely overcome this difficulty. [Explanation] Each of the objects of the present invention is to provide an image alignment. The phase correlation algorithm can quickly and accurately calculate the displacement of the two images. 5 1316642 - The present invention The method of providing -_ like the alignment method, using the phase correlation algorithm to capture the full (four) image of the shirt τ, to achieve the purpose of image alignment 0, - the purpose of the present invention - to provide an image alignment In the method, the phase correlation algorithm is used to deal with the large noise region, and the reduced alignment of the noise is more accurate.
本發^目的之—係提供—種影像重建方法,利用相位關連 =异法運异之影像對位方法’可解決在斷層掃描時因機台 旋轉震動所造成的對位問題。 、、寅笪目的之m種影像重建方法,细相位關連 _ /具之衫像對位方法,可解決在數位取像裝置拍攝時, 因手震影響相片品質的問題。 了達到上述目的,本發明—實施例之—種影像對位方 /包括.擷取至少二影像;計算相鄰兩影像之—相對位移, 2相對位移伽用—相位,演算法運算得之;計算每-影 絕對影㈣一絕對位移;以及利用相對位移與 像。 〜像之一共同區域,並移除共同區域之外的影 達到上述目的,本發明另一實施例之一種影像重建方 並#4·.擷取至少二影像;計算相鄰兩影像之一相對位移, 像係彻-相位義演算法運算得之;計算每一影 像興影像中之筮—&忠你^ 張衫像的一絕對位移;利用相對位移與絕對 衫像之—共同區域,並移除共同區域之外的影像; 决切像之旋射心;以及重建影像之立體資料。 ,二達到上述目的,本發明又一實施例之一種影像重建方 匕 擷取至少二影像;計算相鄰兩影像之一相對位移, 6 1316642 其中相對位移係利用一相位關連演算法運算得之;計算每一影 像與影像中之第一張影像的一絕對位移;利用相對位移與絕對 位移計算出影像之一共同區域,並移除共同區域之外的影像; 以及疊加每一影像計算出之共同區域。 底下藉由具體實施例配合所附的圖式詳加說明,當更容易 瞭解本發明之目的、技術内容、特點及其所達成之功效。 【實施方式】 其詳細說明如下,所述較佳實施例僅做一說明非用以限定 本發明。 第1圖所示為根據本發明影像對位方法一實施例之步驟 流程圖。如圖所示,首先,由拍攝好的影像中擷取至少二影像 S10,其中,依據不同應用,這些影像可以是針對相同物體同 一角度拍攝,亦可是針對不同角度拍攝而成;接著,計算相鄰 兩影像之一相對位移S20,其中相對位移係利用一相位關連演 算法(phase correlation algorithm)運算得之;再來,計算每一影 像與影像中之第一張影像的一絕對位移S30,其中絕對位移之 計算亦是利用相位關連演算法運算得之,或是,利用任兩張影 像所求得之相對位移進而計算出每一張影像與第一影像的絕 對位移;最後,利用相對位移與絕對位移計算出所有影像之一 共同區域,並移除共同區域之外的影像S40。於一實施例中, 共同區域之判定係基於相對位移之位移量,若影像有過大位移 量,例如:超過兩倍均方根值,則去除。找出共同區域後,將 所有共同區域之外影像去除,以完成影像對位的步驟。 接續上述說明,在計算影像之相對位移或絕對位移前,更 包括針對影像進行一影像前處理步驟。於一實施例中,影像前 處理步驟係包括對影像做銳化處理、平滑化處理與去雜訊處理 7 1316642 之至少其中之任一。其中影像前處理步驟有助於所拍攝的影像 _ 處理一些不必要的雜訊,亦或是,幫助影像的訊號強化,以增 強後續影像對位甚至是影像重建的正確性。 於一實施例中,計算出上述相對位移或是絕對位移的方 法’可以是利用傅立葉函數轉換(Fourier transform)或快速傅立 • 葉函數轉換(Fast Fourier transform,FFT)及其運算所得之。其 運算方法如下方程式(I)所示:首先,須將欲運算之兩影像,例 如pi及p2,分別作傅立葉轉換而得兩數值F[pl]及F[p2];接 著,計算兩張影像之相關(correlation),亦即,取其中一張影 ® 像與另一張影像的共扼複數(complex conjugate)相乘,如 F[pl](F[p2])* ;再來,將上述之值除以兩張影像之絕對值,如 (F[pl](F[p2])*)+(|F[pl]||F[p2]|);接著,乘上一個空間的濾波函 數,如G,於本實施例中,濾波函數係為一低通濾波函數 (low-pass filter);接下來,再將其做逆傅立葉轉換(inverted Fourier transform)運算後,求得空間上的最大值,此最大值即 為預處理兩影像之位移。 ❿ b』W㈣]— \F[pl]\\F[p2]\ ……方程式(I) 其中: ρ 1 : —影像; ρ2 :另一影像; G:濾波函數; . X, y : pi及ρ2位移量的X軸位置與y軸位置。 8 1316642 下列即將此影像對位方法應用於不同實施例的影像重建 方法上做一說明。 第2圖所示為根據本發明影像重建方法第一實施例之步 驟流程圖。於此實施例中,係將上述影像對位方法應用於微斷 層掃描上。微斷層掃描所需影像係針對同一物體隨不同角度進 行拍攝,其中先將待投影物體固定,藉由旋轉機台以進行不同 角度之影像拍攝,由於機台本身旋轉震動會造成影像對位問 題,故必須將影像對正為同一區域才利於進行後續影像重建的 工作。如圖所示,首先,由拍攝好的影像中擷取至少二影像 S10,其中此處之影像是針對相同物體不同角度拍攝;接著, 計算相鄰兩影像之一相對位移S20,其中相對位移係利用一相 位關連演算法運算得之,例如藉由傅立葉函數轉換或快速傅立 葉函數轉換及其運算而得;再來,計算每一影像與影像中之第 一張影像的一絕對位移S30,亦即,以第一張影像為基準,計 算出每一張影像與第一張影像的位移(即絕對位移),於一實施 例中,絕對位移之計算亦可是利用相位關連演算法運算得之; 接著,利用相對位移與絕對位移計算出所有影像之一共同區 域,並移除共同區域之外的影像S40,此時影像對位之工作已 經完成;再來,決定影像之旋轉中心S50 ;最後,即是重建影 像之立體資料S60。 接續上述說明,在計算影像之相對位移或絕對位移前,更 包括針對影像進行一影像前處理步驟。於一實施例中,影像前 處理步驟係包括對影像做銳化處理、平滑化處理與去雜訊處理 之至少其中之任一。於一實施例中,決定影像之旋轉中心的方 法係為經由判斷旋轉執跡以求得旋轉中心,但不限於此。 於一實施例中,為方便微斷層掃描的FFT資料重建,在 重建影像前,更包括内插(interpolate)或外插(extrapolate)各影 9 1316642 ,以利斷層掃描的諸轉換,其中影像可延展至晝素數目為 =個,且k為-正整數。接下來,便可進行如遽波反投影(施^ Back -Projecd〇n,FBP)方法來重建影像的立體資料。 接下來,請參考第3圖’苐3圖所示為根據本發明影像重 ,方法k實施狀步㈣簡。於此實施射,係將上述影 像對位方法應用於如數位相機的數位取像裝置連續拍攝時之 ^手震功能上’首先須先改變數位相機之曝光時間1曝光時 間tm後進行曝光,在預定的曝光時間内,操取n張或少於n 張影像’其中N為—正整數。操取完影像後之處理,於 =-描述。如圖所示’在計算出所有影像之共同區域前之步驟 如S10、S20、S30及S4〇)皆與前述影像重建方法相同,此處 便不再贅述。在找出影像中之共同區域後,疊加每一影像計算 出=共同區域S70以增強信噪比。這個方法利用縮短曝光時間 到雜訊較大但是清晰的影像,但這些影像可經由影像前 處理後,例如銳化處理、平滑化處理與去雜訊處理之至少其中 =一’再經過相位關連演算法對位,將共同區域的影像疊加 if=信噪比’達到縮短曝光時間但是不模糊影像之數位 取像裝置的防手震功能。 接續上述說明,由於目前數位取像裝置本身資料、中央處 ==及記憶體的限制,畫面擷取的方式也可能先操取兩影像 Ϊίί订影像的對位,取得共同區域之後,再將共同區域之影 接力^其中一影像中,而另一影像即可刪除以節省記憶體 =。補程序完成之後,再取下一影像進行相同的步驟。利 =種方式’相鄰兩影像之共同區域會一直被累加至最後一張 衫像,以完成影像修復。 依據上述’本發明的特徵之一係利用相位關連法計算兩影 像之位移以有效完成影像對位,此種影像對位方法可應用於其The purpose of this invention is to provide an image reconstruction method that uses the phase correlation = image migration method of the different method to solve the alignment problem caused by the rotation vibration of the machine during the tomographic scan. The m image reconstruction method, the fine phase correlation _ / the shirt image alignment method can solve the problem of the photo quality caused by the hand shake when the digital image capturing device is photographed. In order to achieve the above object, the present invention--the image-aligning side/includes. extracts at least two images; calculates the relative displacement of the two adjacent images, and the relative displacement gamma-phase, which is calculated by an algorithm; Calculate the absolute shadow of each shadow (four) and the absolute displacement; and use the relative displacement and image. ~ a common area, and remove the shadow outside the common area to achieve the above purpose, another embodiment of the present invention, an image reconstruction side and #4·. capture at least two images; calculate one of the adjacent two images relative to Displacement, which is calculated by the algorithm-phase-interval algorithm; calculate the absolute displacement of each image in the image of the image--and loyalty to you; use the relative displacement and the absolute image of the shirt-like area, and shift An image other than the common area; a spinning heart of the image; and a three-dimensional reconstruction of the image. The second object of the present invention is to obtain at least two images; and to calculate a relative displacement of one of the two adjacent images, wherein the relative displacement is calculated by using a phase correlation algorithm; Calculating an absolute displacement of each image and the first image in the image; calculating a common region of the image using the relative displacement and the absolute displacement, and removing the image outside the common region; and superimposing each image to calculate the common region. The purpose, technical contents, features and effects achieved by the present invention will be more readily understood by the detailed description of the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The detailed description is not intended to limit the invention. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a flow chart showing the steps of an embodiment of an image registration method in accordance with the present invention. As shown in the figure, first, at least two images S10 are captured from the captured images, wherein, according to different applications, the images may be shot at the same angle for the same object, or may be shot at different angles; a relative displacement S20 of one of the two adjacent images, wherein the relative displacement is calculated by a phase correlation algorithm; and then an absolute displacement S30 of each image and the first image in the image is calculated, wherein The calculation of the absolute displacement is also calculated by the phase correlation algorithm, or the relative displacement of any two images is used to calculate the absolute displacement of each image and the first image; finally, the relative displacement is used. The absolute displacement calculates a common area of all the images and removes the image S40 outside the common area. In one embodiment, the determination of the common region is based on the amount of displacement of the relative displacement, and if the image has an excessive displacement, for example, more than twice the root mean square value, it is removed. After finding the common area, remove all images outside the common area to complete the image alignment step. Following the above description, before calculating the relative displacement or absolute displacement of the image, an image pre-processing step is performed on the image. In one embodiment, the image pre-processing step includes at least one of sharpening, smoothing, and de-noising processing of the image 7 1316642. The image pre-processing steps help the captured image _ to process some unnecessary noise, or to help the signal enhancement of the image to enhance the correctness of subsequent image alignment and even image reconstruction. In an embodiment, the method of calculating the relative displacement or the absolute displacement may be obtained by using a Fourier transform or a Fast Fourier transform (FFT) and its operation. The calculation method is as shown in the following equation (I): First, the two images to be calculated, such as pi and p2, are respectively subjected to Fourier transform to obtain two values F[pl] and F[p2]; then, two images are calculated. Correlation, that is, multiplying one of the shadow images by the complex conjugate of another image, such as F[pl](F[p2])*; The value is divided by the absolute value of the two images, such as (F[pl](F[p2])*)+(|F[pl]||F[p2]|); then, multiply the filter function of a space For example, in G, in this embodiment, the filter function is a low-pass filter; then, after performing an inverse Fourier transform operation, the maximum space is obtained. Value, this maximum is the displacement of the preprocessed two images. ❿ b』W(4)]— \F[pl]\\F[p2]\ ...... Equation (I) where: ρ 1 : —image; ρ2 : another image; G: filter function; . X, y : pi and The X-axis position and the y-axis position of the ρ2 displacement amount. 8 1316642 The following is an illustration of the image reconstruction method applied to different embodiments. Fig. 2 is a flow chart showing the steps of the first embodiment of the image reconstruction method according to the present invention. In this embodiment, the image alignment method described above is applied to the micro-tom scan. The image required for micro-tomography scanning is shot at different angles for the same object. First, the object to be projected is fixed, and by rotating the machine to perform image shooting at different angles, the image alignment problem is caused by the rotation vibration of the machine itself. Therefore, it is necessary to align the images into the same area to facilitate subsequent image reconstruction. As shown in the figure, first, at least two images S10 are captured from the captured image, wherein the images are taken at different angles for the same object; then, a relative displacement S20 of one of the adjacent images is calculated, wherein the relative displacement is Calculated by a phase correlation algorithm, for example, by Fourier function transformation or fast Fourier function transformation and its operation; and then calculating an absolute displacement S30 of each image and the first image in the image, that is, Calculating the displacement (ie, absolute displacement) of each image and the first image based on the first image. In an embodiment, the calculation of the absolute displacement may also be performed by using a phase correlation algorithm; Calculate a common area of all images by using relative displacement and absolute displacement, and remove the image S40 outside the common area. At this time, the image alignment work has been completed; then, the rotation center S50 of the image is determined; finally, It is a three-dimensional data S60 for reconstructing images. Following the above description, before calculating the relative displacement or absolute displacement of the image, an image pre-processing step is performed on the image. In one embodiment, the image pre-processing step includes at least one of sharpening, smoothing, and de-noising processing of the image. In one embodiment, the method of determining the center of rotation of the image is to determine the center of rotation by determining the rotation, but is not limited thereto. In an embodiment, in order to facilitate the reconstruction of the FFT data of the micro-tom scan, before reconstructing the image, the interpolation or extrapolation of the shadows 9 1316642 is further included to facilitate the conversion of the tomographic scan, wherein the image can be The number of elements is extended to =, and k is a - positive integer. Next, you can perform stereoscopic data such as C-Back-Projecd〇n (FBP) to reconstruct the image. Next, please refer to Fig. 3, which is shown in Fig. 3, which shows the image weight according to the present invention, and the method k implements step (4). In this implementation, the image alignment method is applied to the digital sensor function of a digital camera such as a digital camera. The first time, the exposure time of the digital camera is changed first, and the exposure time tm is performed. For a predetermined exposure time, take n or less than n images 'where N is a positive integer. After the operation of the image, the processing is described in =-. As shown in the figure below, the steps before calculating the common area of all images, such as S10, S20, S30, and S4, are the same as the image reconstruction method described above, and will not be described again here. After finding the common area in the image, superimposing each image calculates = common area S70 to enhance the signal to noise ratio. This method uses a shortened exposure time to a large but clear image of the noise, but these images can be processed through image pre-processing, such as sharpening, smoothing, and de-noising processing. The method is aligned, and the image of the common area is superimposed with if=signal-to-noise ratio to achieve the anti-shake function of the digital image capturing device which shortens the exposure time but does not obscure the image. Following the above description, due to the current digital image capture device's own data, the central location == and the memory limit, the screen capture method may also first capture the alignment of the two images Ϊίί images, and then share the common area. The shadow of the area is in one of the images, and the other image can be deleted to save memory =. After the completion of the program, take the next image and perform the same steps. Benefit = mode] The common area of two adjacent images will be added to the last shirt image to complete the image restoration. According to the above-mentioned one feature of the present invention, the phase correlation method is used to calculate the displacement of the two images to effectively complete the image alignment, and the image alignment method can be applied to the image alignment method.
1316642 =影像錢料料置心,如 :物斷,微斷層婦描。更甚者,'電子, 攝物之間的相對移動, 由於數位取像 動,此影像對位方法亦 $疋破攝物體本身* σ破 取像裝置之與傻番ί應用於如數位相機、照相卜的移 、。重建,其應用並不限 ’機等數位 品要影像對位處理之系统。 '此’亦可使用於其他 連演;係提供-種影像對位方l ' 準確運算兩影像之位蔣。]用相位關 的目:^ 完全相同影像的情況下,亦s此種影像對 . 1用相仇關連演算法可處理w達到影像對位 雜訊的減少致使影像的對位更為精二大部分的雜訊區 =之-係提供一種影像4建方法,=確1,本發明目 衫像對位方法,可解決在 位關連演算法運笪 =對位問題。更甚者 ::::可解決在數位取像裝置拍攝時,以:::; 以上所述之實施例僅係為說明本發, 點,其目的在使熟習此項技藝之人士能夠之技術思想及特 據以實施,當不能以之P艮定本發明之專利纟:解本發明之内容並 明所揭示之精神所作之均等變化或修飾’即大凡依本發 專利範圍内。 ^應涵蓋在本發明之 11 1316642 【圖式簡單說明】 第1圖所示為根據本發明影像對位方法一實施例之步驟流程 圖。 第2圖所示為根據本發明影像重建方法第一實施例之步驟流 程圖。 第3圖所示為根據本發明影像重建方法第二實施例之步驟流 程圖。 【主要元件符號說明】 S10 擷取至少二影像 S20 計算相鄰兩影像之一相對位移 S30 計算每一影像與影像中之第一張影像的一絕對位移 S40 利用相對位移與絕對位移計算出所有影像之共同區域, 並移除共同區域之外的影像 S50 決定影像之旋轉中心 S60 重建影像之立體資料 S70 疊加每一影像計算出之共同區域 121316642 = Image money material is in the heart, such as: material break, micro-fault women. What's more, 'electronics, the relative movement between the objects, due to the digital image capture, this image alignment method is also 疋 疋 物体 本身 * * * * * 像 像 ί ί ί ί ί ί ί ί ί ί ί The movement of the photo. Reconstruction, its application is not limited to the system of image alignment processing. 'This' can also be used in other serials; it provides a kind of image-aligning side l 'accurately calculating the position of two images. ] With the phase off: ^ In the case of the exact same image, this image pair is also used. 1 The covenant algorithm can be used to achieve the reduction of image alignment noise, resulting in a more precise alignment of the image. Part of the noise area = - provides a method of image 4 construction, = 1 , the method of the eye-catching method of the present invention can solve the problem of in-position correlation algorithm operation = alignment problem. What's more: ::: can solve the problem of taking digital imaging device with:::; The above-mentioned embodiments are only for the purpose of explaining this, and the purpose is to enable the technology of those skilled in the art. The thoughts and the specifics are implemented, and the patents of the present invention cannot be determined by the following: the equivalent changes or modifications made by the spirit of the present invention and the spirit of the present invention are generally within the scope of the present patent. ^ 111616642 of the present invention [Schematic Description of the Drawing] Fig. 1 is a flow chart showing the steps of an embodiment of the image registration method according to the present invention. Fig. 2 is a flow chart showing the steps of the first embodiment of the image reconstruction method according to the present invention. Fig. 3 is a flow chart showing the steps of the second embodiment of the image reconstruction method according to the present invention. [Main component symbol description] S10 Capture at least two images S20 Calculate the relative displacement of one of the adjacent two images S30 Calculate an absolute displacement of each image and the first image in the image S40 Calculate all images with relative displacement and absolute displacement Common area, and remove the image outside the common area S50 Determine the rotation center of the image S60 Reconstruct the image of the stereoscopic material S70 Superimpose the common area calculated by each image 12