TW201042576A - Method and device for obtaining deviation position of picture - Google Patents

Method and device for obtaining deviation position of picture Download PDF

Info

Publication number
TW201042576A
TW201042576A TW98116611A TW98116611A TW201042576A TW 201042576 A TW201042576 A TW 201042576A TW 98116611 A TW98116611 A TW 98116611A TW 98116611 A TW98116611 A TW 98116611A TW 201042576 A TW201042576 A TW 201042576A
Authority
TW
Taiwan
Prior art keywords
image
line
ruler
spline
upper layer
Prior art date
Application number
TW98116611A
Other languages
Chinese (zh)
Other versions
TWI401617B (en
Inventor
jia-hong Xu
You-Neng Xiao
Guo-Liang Wang
Original Assignee
Ipanel Technologies Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ipanel Technologies Ltd filed Critical Ipanel Technologies Ltd
Priority to TW98116611A priority Critical patent/TWI401617B/en
Publication of TW201042576A publication Critical patent/TW201042576A/en
Application granted granted Critical
Publication of TWI401617B publication Critical patent/TWI401617B/en

Links

Landscapes

  • Image Analysis (AREA)

Abstract

A method and a device for obtaining deviation position of picture are disclosed. The method includes the steps of searching for the first measure scale line and the second measure scale line along a Y-axis and X-axis in an image, wherein the image has an upper image overlapping on a lower image, the first measure scale line and the second measure scale line are drawn on the upper image beforehand and satisfied a pre-set layout condition; and deriving the deviation position of the upper image to the lower image according to the position of anyone of the measure scale lines on the upper image. The present invention provides an implementation for obtaining the deviation position of the upper image on the lower image when the upper image overlaps the lower image.

Description

201042576 六、發明說明: 【發明所屬之技術領域】 移位歧触賴’找奴-贿取圖像偏 【先前技術】 。:=r:=完⑼ 上就不存在偏移位置,或者說上層圖像在下像 置為零;相反,如果上層圖像和下 層圖像完全落在了下層圖像上,此時上層 :且上 f上必然會形細像分界,只要獲得上i 的困:分界像形j ^ ®像的圖案都十分複雜,劣去園安丄八 果上層圖像和下層 ❹ 輯的邊緣在下層圖像上^^“/^,這樣會導致上層 -獲得上廣圖像在二界很不明顯,無法準確 【發明内容】 置,可以在:層下了層-圖偏移位|的方法及裝 層圖像在下層則象上的偏it 情況下’準確地獲取上 括:本發明實施例提供了—種獲取圖像偏移位置的方法,包 〜圖像的γ姊/或χ軸方向細第—尺樣條線和第二尺 4 201042576 ,該第一 ί滿足預 樣條線;該圖像是由上層圖像和下層圖像疊加構成的, 尺樣條線和第二尺樣條線預先纷製在該上層圖像上, 設的佈局條件;201042576 VI. Description of the invention: [Technical field to which the invention belongs] Displacement disregard ‘search for slaves-bribe image bias 【Previous technique】. :=r:=End (9) There is no offset position, or the upper image is set to zero in the lower image; conversely, if the upper image and the lower image completely fall on the lower image, the upper layer: On the f, there will inevitably be a demarcation of the fine image, as long as the sleepy i is obtained: the pattern of the boundary image j ^ ® is very complicated, and the image of the upper layer and the lower layer of the lower layer are inferior. On ^^"/^, this will cause the upper layer - to obtain the upper wide image in the second boundary is not obvious, can not be accurate [invention] set, can be in the layer: layer - map offset bit | method and layer The image is accurately acquired in the case of the lower layer in the lower layer. The embodiment of the present invention provides a method for acquiring the image offset position, and the γ 姊 / or the 方向 axis direction of the packet ~ - a ruler line and a second ruler 4 201042576, the first ί satisfies the pre-spline; the image is composed of an upper layer image and a lower layer image superimposed, the ruler line and the second rule line are pre- Layout conditions on the upper layer image;

根據探測到的該尺樣條線在該上層圖像的位置和誃 條線在該®像的位置計算上層圖像在下像中的偏移^置。 本發明實施纖供了-髓取圖像偏移位置的裝置,包括: 探測模組,用於沿圖像的γ軸和/或又轴方向探測第一尺 樣條線和第二尺樣條線;該圖像是由上層圖像和下層圖像疊加 構成的’該第-尺雜線和該第二尺雜線預先_在該I層 圖像上,且滿足預設的佈局條件; 確定模組,用於根據探測到的該第一尺樣條線和第二尺樣 條線確定任意一條尺樣條線在上層圖像的位置; 計算模組,用於根據探測到的該尺樣條線在該上層圖像的 位置和該尺樣條線在該圖像的位置計算上層圖像在下層圖像 中的偏移位置。 本發明實施例以圖像處理技術為基礎,利用繪製有尺樣條 線的圖像作為上層圖像完全落在下層圖像上,並與下層圖像進 行疊加,通過對疊加後的圖像從Υ轴和/或X轴方向進行連續 的第一尺樣條線和第二尺樣條線探測’並根據探測結果分析第 一尺樣條線和第二尺樣條線在疊加後的圖像上的位置以及在 上層圖像上的位置’將第一尺樣條線或第二尺樣條線在疊加後 的圖像上的位置以及在上層圖像上的位置進行比較,即可獲得 上層圖像落在下層圖像上的偏移位置。 【實施方式】 下面將結合本發明實施例中的附圖,對本發明實施例中的 5 201042576 行清楚、完細喊’顯然,所贿的實施例僅僅 疋^發明-部分實_,崎是全部的實_。基 的實施例’本領域普通技術人員在沒有作 $ 所獲得的所有其他實施例,都屬於本發· 第一實施例: _ 請參閱第1圖,第1圖為本發明實施例中提供的一種择敗 . =偏移位置的方賊程圖。如第1圖所示,該方法包括“ 步驟101:沿圖像的Y軸和/或又軸方向探測 線和第二尺樣條線;該圖像是由上層圖像和下層圖ί養加t 該J-尺樣條線和第二尺樣條線預先 f t 上,且滿足預設的佈局條件; h上層圖像 上層in第一 t樣條線和第二尺樣條線預先繪製在該 圖像上,且滿足預设的佈局條件具體可以為: 尺樣條線和第二尺樣條線是預先_在上居 目/平行且第一尺樣條線和第二尺樣條線以 說’第一尺樣條線和第二尺樣條線的間距與第-尺 樣條線到達該上層圖像的起始位置的距離他是任不=的的兩條尺 層Jiuif本發明實棚提供的方法’可財步驟1G1之前對卜 理^::圖像疊加構成的圖像進行二值化處理,二值化ΐ 、、疋為了使探測第-尺樣條線和第二尺樣條線更加簡 6 201042576 單,不用受圖像亮度和顏色的影響。 根據本發明實施例提供的方法,可以在二值化處理該圖像 之後,沿圖像的X轴方向獲取多個基準點位置,每一個基準 點位置滿足大於上述的下層圖像與上層圖像的高度的差值,且 小於預設的上述的上層圖像的非尺樣條線區域高度的條件;和 /或 可以沿圖像的γ軸方向獲取多個基準點位置,每一個基 準點位置滿足大於上述的下層圖像與上層圖像的寬度的差值 且小於預設的上述的上層圖像的非尺樣條線區域寬度的條件。’ Ο ❹ 優選地,上述步驟101中的沿圖像的γ軸和/或χ轴方向 探測第一尺樣條線和第二尺樣條線具體可以包括: 從X轴方向上獲取的每個基準點位置開始,沿圖像的γ 軸方向逐各像素遍歷檢測像素灰階值,直到灰階 檢測,並將灰階值為零的騎闕縱坐標存餅^ 樣條=====錄衫義钱,料第一條尺 然後,從灰階值為零的像素點開始,繼續沿 ”,素遍歷檢聰素灰階值,直職階值為零時停止= 小並將义階值為零的像素點的縱坐標存健於第二陣列中. 樣條現次數最多的縱坐標,作為第二條尺 像的和χΐ;方從向位置開始,沿圖 姻’並將灰階值為零的像素以坐 樣條=圖出現次數最多的縱坐標,作為第-條尺 7The offset of the upper layer image in the lower image is calculated based on the detected position of the upper layer image and the position of the stencil line at the position of the photographic line. The device of the present invention provides a fiber-to-myelin image shifting position, comprising: a detecting module for detecting the first and second ruler splines along the γ axis and/or the axis direction of the image a line; the image is formed by superimposing an upper layer image and a lower layer image, and the second ruler line is pre-positioned on the layer I image and satisfies a preset layout condition; a module, configured to determine, according to the detected first and second ruled splines, a position of an upper image of the ruled sample line; and a calculation module, configured to detect the size of the sample The position of the line at the upper layer image and the position of the ruled line at the image calculate the offset position of the upper layer image in the lower layer image. The embodiment of the present invention is based on the image processing technology, and uses the image drawn with the ruled line as the upper layer image completely falls on the lower layer image, and is superimposed with the lower layer image, and the superimposed image is obtained from Continuous first and second ruler line detection in the x-axis and/or x-axis direction' and analyze the superimposed image of the first and second ruled lines according to the detection result The upper position and the position on the upper image 'Compare the position of the first ruler line or the second rule line on the superimposed image and the position on the upper image to obtain the upper layer The image falls at the offset position on the underlying image. [Embodiment] In the following, in conjunction with the drawings in the embodiments of the present invention, the line 5 201042576 in the embodiment of the present invention is clearly and completely shouted 'obviously, the embodiment of the bribe is only 发明^ invention-partial _, saki is all Real _. Embodiments of the present invention are all present in the present invention. All of the other embodiments obtained by those of ordinary skill in the art are disclosed in the first embodiment: _ See FIG. 1 , which is provided in the embodiment of the present invention. A choice of the thief. As shown in Fig. 1, the method includes "Step 101: detecting a line along the Y-axis and/or the axis direction of the image and a second-scale spline; the image is raised by the upper image and the lower layer. t The J-strip line and the second ruled spline are pre-fined and meet the preset layout conditions; h upper layer image upper layer in the first t-spline and the second-scale spline are pre-drawn in the The image on the image and satisfying the preset layout condition may be: the ruler line and the second rule line are in advance_parallel/parallel and the first ruler line and the second ruler line are Say that the distance between the first ruler and the second ruler and the distance from the first ruler to the start position of the upper image is the two ruler Jiuif The method provided by the shed can be binarized before the 1G1 step: the image formed by the image superimposition, binarized ΐ, 疋, in order to detect the first-scale spline and the second rule The line is more simple 6 201042576 single, without being affected by image brightness and color. According to the method provided by the embodiment of the present invention, the image can be processed in binarization Afterwards, a plurality of reference point positions are acquired along the X-axis direction of the image, and each of the reference point positions satisfies a difference greater than a height of the lower layer image and the upper layer image, and is smaller than a preset non-previous image of the upper layer image. a condition of the height of the ruled line region; and/or a plurality of reference point positions may be acquired along the γ-axis direction of the image, each of the reference point positions satisfying a difference greater than a width of the lower layer image and the upper layer image described above and less than The condition of the width of the non-small line region of the above-mentioned upper layer image is preset. ' Ο ❹ Preferably, the first ruler spline is detected along the γ axis and/or the χ axis direction of the image in the above step 101 The second ruled spline may specifically include: starting from each reference point position acquired in the X-axis direction, traversing the detected pixel grayscale value by pixel in the γ-axis direction of the image until grayscale detection, and grayscale The value of the 阙 阙 阙 存 ^ ^ ^ = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Gray scale value, stop when the direct grade value is zero = small and the meaning value is The ordinate of the pixel is stored in the second array. The ordinate with the largest number of splines is used as the sum of the second ruler; the square starts from the position, along the graph' and the grayscale value is zero. The pixel is the first ruler with the seat bar = the ordinate with the most occurrences of the figure.

201042576 然後,從灰階值為零的像辛 步驟102:根據探測到的第一描 定任意-條尺樣條線在上層圖像的位 第一尺樣條線確 其中’步驟102可以包括·· 1)計算第-尺樣條線和第二尺樣條線的間距; 碰’第一尺樣絲和第二尺樣條線的間距可以是第一尺 樣條線和第二尺樣絲的高度絲度之騎間距。 -尺的第—尺樣條線和第二尺樣條線關距與第 =樣條線和第二尺樣條線分制達上述的上顧像的起始 位置的距離賴應廳,確定第-尺樣條線在上制上層圖 ίίΪίί度,或者確定該第二尺樣條線在上述的上層圖像的 步驟103 :根據探測到的該尺樣條線在該上層圖像的位置 和該尺樣條線在該圖像的位置計算該上層圖像在下層圖 的偏移位置。 其中’步驟103可以包括: 什鼻第一尺樣條線在上述的上層圖像上的高度與第一尺 樣條線在上述的圖像上的高度的差值;和/或,計算第二尺樣 條線在上述的上層圖像的高度與第二尺樣條線在上述的圖像 上的高度的差值; 或者’計算第一尺樣條線在上述的上層圖像上的寬度與第 一尺樣條線在上述的圖像上的寬度的差值;和/或,計算第二 8 201042576 ίϊΐϊΐ上述的上層圖像的寬度與第二尺樣條線在上述的 =上的寬度的差值,從而獲得上層圖像在下層圖像中的偏移 位罝0 需要說明的是’本發明實施例只是為了便於 , 測連續的第-尺樣條線和第二尺樣條線,本領域技術人員可以 =’預先在上像上_的尺樣鱗驗二以是大於兩 條的’都屬於本發明的保護範圍。 Ο 〇 上述對本發㈣-實補提供的獲取圖像偏移位置的方 Γί細的介紹,本發明實補舰輕奴樣條線的圖 ‘、、、s圖像元全落在下層圖像上,並與下層圖像進行叠 ί尺疊加後_像從γ轴和/或x軸方向進行連續的_ 並根據_結果分析第一尺 第二尺樣絲在疊加後的圖像上的位置以及在上層 置,將第—尺樣條線或第二尺樣條線在疊加後的圖 圖像落在下:位置進行比較’即可獲得上層 第二實施例: 閱第2圖’第2圖為本發明實施例中提供的一種獲取 位置的方法流程.本㈣實施例以上層圖像的 ^6·526,下層圖像的解析度是冗奶76為例,介紹本發 2施例提供的獲取圖像偏移位㈣方法。如第 方法可以包括: 步驟201:預先在上層圖像上緣製尺樣條線; Μ ί 1胃的尺樣條線是指用於計算上層圖像完全落在下 層圖像上的偏移位置的自繪規律線條。 後,例是以64〇X526大小的白底圖片作為上層圖 ’先從上層圖像的最上邊往下方向以高度1〇〇像素的位置 9 201042576 ,依次以2的n(其中,1<=n<=8)次方高間距居行 中(左、右各留100像素寬度)畫8條橫黑線; Μ,理從上層圖像的最左邊往右方向以左寬度像素的 位置為起始,依次以2的η(其中,1<=η<=8)次方,寬間 距居列中(上、下各留丨⑽像素寬度)晝8條豐黑線; 這樣就形成了一副繪製有尺樣條線的上層圖像,請一併參 f 3圖’第3 ®為本㈣實施繼供轉財尺樣條線的上 廣圖像的示意®。如第3圖所示,尺樣條線位置說明如下:201042576 Then, the symplectic step from the grayscale value is zero. Step 102: According to the detected first description, the arbitrary-strip-shaped spline is in the first-level spline of the upper-layer image. The step 102 may include · 1) Calculate the distance between the first-scale spline and the second-spline spline; the distance between the first-size and second-stripe splines can be the first-spline and the second-stripe The height of the silky ride spacing. - the distance between the first and second ruler lines of the ruler and the distance between the first and second sample lines and the starting position of the above-mentioned upper image, The first-foot spline is on the upper layer ίίΪίί, or the step 103 of determining the second-scale spline in the above-mentioned upper layer image: according to the detected position of the ruled line at the upper layer image and The ruler line calculates the offset position of the upper layer image in the lower layer image at the position of the image. Wherein the step 103 may include: a difference between a height of the first-foot spline on the upper image and a height of the first ruled spline on the image; and/or a second calculation a difference between the height of the upper layer image and the height of the second ruled spline on the image; or 'calculating the width of the first ruled spline on the upper image a difference in width of the first ruled spline on the image above; and/or, calculating a width of the upper layer image of the second 8 201042576 ίϊΐϊΐ and a width of the second ruled spline at the above= The difference is obtained to obtain the offset position of the upper layer image in the lower layer image. 需要 0 It should be noted that the embodiment of the present invention is only for convenience, and the continuous first-scale spline and the second-scale spline are measured. Those skilled in the art can = 'pre-measure the size of the upper image on the upper image to be more than two' are all within the scope of protection of the present invention. Ο 〇 The above description of the position of the offset of the image provided by the present (4)-the real complement, the picture of the actual slave ship light slave spline ',, s image elements all fall on the lower layer image Up, and superimposed with the underlying image _image continuous _ from the γ axis and / or x axis direction and analyze the position of the first ft second ruled wire on the superimposed image according to the _ result And in the upper layer, the image of the superimposed ruler line or the second ruled spline line is placed under the superimposed position: the position is compared 'to obtain the upper layer second embodiment: read the second picture' It is a method flow for obtaining a position provided in the embodiment of the present invention. In the fourth embodiment, the resolution of the lower layer image is 276, and the analysis of the lower layer image is taken as an example. Get the image offset bit (four) method. For example, the method may include: Step 201: Pre-cut the ruler line on the upper layer image; Μ ί 1 The ruler line of the stomach refers to an offset position for calculating that the upper layer image completely falls on the lower layer image. Self-painting regular lines. After that, the example is a 64 〇 X 526 size white background image as the upper layer image 'first from the top edge of the upper layer image to the height of 1 〇〇 pixel position 9 201042576, followed by 2 n (where 1 <= n<=8) The height of the secondary high-distance line (left and right left 100 pixels wide) draws 8 horizontal black lines; Μ, from the leftmost right direction of the upper image to the left width pixel position First, in order of 2 η (where 1 < = η < = 8) power, the wide spacing in the column (upper and lower each remaining (10) pixel width) 昼 8 black lines; thus forming a pair To draw the upper layer image with the ruler line, please refer to the figure 3 of the 3rd ® (4) implementation of the image of the upper wide image of the feed-for-traffic sample line. As shown in Figure 3, the position of the ruler line is as follows:

尺樣條線從上到下、從左到右分別以相對丨⑽像素偏移 的2的1次方( = 2) ’ 2的2次方( = 4),2的3次方〇8), 2的4次方(=16),2的5次方(=32),2的ό次方(=64), 2的7次方(=128),2的8次方(=256);其中,第3圖所 示的上層圖像中水準方向、垂直方向各繪製8條尺樣條線, 上、下、左、右100像素邊距區域為非尺樣條線區域,中間 尺樣條線交錯區域440x326為尺樣條線區域。 步驟202 :對上層圖像和下層圖像疊加後的圖像進行二值 化處理; 二值化的目的是為了讓後續對圖像的尺樣條線的探測處 理更加簡單,而且不受圖像亮度和顏色的影響。 影響二值化結果的因素主要是中間灰階值(亮度值)的取 值’如果灰階值的取值偏低,則二值化後的黑色樣條線會更加 淡細,樣條線之間的清晰度會越明顯;如果灰階值的取值偏 高’則二值化後的黑色樣條線會更加粗濃,尺樣條線只見的清 晰度會越模糊。 步驟203 :沿圖像的X軸方向獲取多個基準點位置; 其中,多個基準點位置滿足大於上述下層圖像與上層圖像 的高度的差值、且小於預設的上述的上層圖像的非尺樣條線區 201042576 域高度的條件。 、根據本發明實施例提供的上層圖像和下層圖像的大小’由 於上層圖像完全落在下層圖像上,所以上層圖像相對下層圖像 的偏移位置範圍為:〇<=上偏移<=64 ; 0<=左偏移<=50。其中, 為下層圖像的高度與上層圖像的高度640的差值,50 為下層圖像的寬度576與上層圖像的寬度526的差值。 即是,多個基準點位置的高度大於6〇像素和/或多個基準 =位,的寬度大於5Q像素’且小於1GG像素的非尺樣條線區 ft南度條件。這裡所述的丨〇〇像素的非尺樣條線區域的高度 〇 0括上,下,左,右的非尺樣條線區域的高度。其中,本發明實施 ,選擇疊加後的圖像80像素位置作為基準點位置’可以滿足 基準點位置需要的條件。 =驟204 :以X轴方向獲取的多個基準點開始,沿γ轴 方向探測第一條尺樣條線’獲取第-條尺樣條線的高度值; 假设’本發明實施例從χ轴方向獲取的多個基準點的數 =為30個,則遍歷這3〇基準點,依次從每一個基準點開始, /σ γ轴方向上逐各像素遍歷檢測像素灰階值,直到碰到了灰 階值為0的像素,將該像素的縱坐標(高度值)存儲在第一陣 ❹ 列中,這樣當30個採用探測結束時,第一陣列填滿;例如: 第陣列-{452,381,382,451,382,382,382,382,452, 382,382,382,382,撕,382,382,382,452,382,382, 381,382 ’ 382,382,382,382,383,382,382,382 }; 從第一陣列中統計出現次數最多的縱坐標為382,則將縱 坐標382作為第—條尺樣條線在該圖像上的高度值。 步驟205 :繼續沿γ轴方向探測第二條尺樣條線,獲取第 二條尺樣條線的高度值; 從第一陣财存朗灰階值為料像素點開始 ,繼續沿圖 201042576 像的γ軸方向逐各像素遍歷檢測像素灰階值,直到碰到了灰 階值為0的像素’將該像素的縱坐標(高度值)存儲在第二陣 列中’這樣當30個採用探測結束時,第二陣列填滿;例如: 第二陣列={451,254,254,450,254,254,255,254, 451,254,254,255,254,254,254,253,255,451,254, 254 ’ 253 ’ 254 ’ 254,254,254,254,253,254,254,254 }; 從第二陣列中統計出現次數最多的縱坐標為254,則將縱 • 坐標245作為第二條尺樣條線在該圖像上的高度值。 ❹ 步巧206 :計算第一條尺樣條線與第二條尺樣條線的間 距,推算上層圖像在下層圖像上的Υ軸方向偏移位置。 其中,由上述步驟203和步驟204可知,第一條尺檨條峻 =H382 ’第二條尺樣條線在圖像上的it 第 樣條線與第二條尺樣條線的間距為: 利用上層圖像上纷製的尺樣條線的規律,確定第 條線或第二條尺樣條線在上層圖像上的位置。 ' ❹的面的表1,表1表示繪製在上層圖像上尺樣條線The ruler lines are offset from the top to the bottom, from left to right, with a 丨(10) pixel offset of 2 to the power of 2 (= 2) ' 2 to the power of 2 (= 4), 2 to the 3rd power 〇 8) , 2 to the 4th power (=16), 2 to the 5th power (=32), 2 to the power of the second (=64), 2 to the 7th power (=128), 2 to the 8th power (=256) Among them, in the upper layer image shown in Fig. 3, eight ruler lines are drawn in the horizontal direction and the vertical direction, and the upper, lower, left and right 100 pixel margin areas are non-small line areas, and the middle size is The line interlaced area 440x326 is a ruled line area. Step 202: Perform binarization processing on the superimposed image of the upper layer image and the lower layer image; the purpose of the binarization is to make the subsequent detection processing of the ruled line of the image simpler and not subject to the image. The effect of brightness and color. The factor affecting the binarization result is mainly the value of the intermediate grayscale value (luminance value). If the grayscale value is lower, the binarized black spline will be more subtle, and the spline will be The sharpness between the two will be more obvious; if the value of the grayscale value is higher, the blackned spline will be thicker and thicker, and the sharpness of the ruled line will be blurred. Step 203: Acquire a plurality of reference point positions along the X-axis direction of the image; wherein, the plurality of reference point positions satisfy a difference greater than a height of the lower layer image and the upper layer image, and is smaller than the preset upper layer image The non-small line area 201042576 is the height of the field. According to the size of the upper layer image and the lower layer image provided by the embodiment of the present invention, since the upper layer image completely falls on the lower layer image, the offset position range of the upper layer image relative to the lower layer image is: 〇<= Offset <=64;0<=left offset <=50. Wherein, the difference between the height of the lower layer image and the height 640 of the upper layer image, 50 is the difference between the width 576 of the lower layer image and the width 526 of the upper layer image. That is, the height of the plurality of reference point positions is greater than 6 〇 pixels and/or the plurality of reference = bits, and the width is greater than 5Q pixels ′ and less than 1 GG pixels of the non-small line area ft south condition. The height 〇 0 of the non-small line area of the 丨〇〇 pixel described here includes the heights of the upper, lower, left, and right non-small line areas. Here, in the practice of the present invention, selecting the superimposed image 80 pixel position as the reference point position' can satisfy the condition required for the reference point position. = step 204: starting with a plurality of reference points acquired in the X-axis direction, detecting the first ruler spline 'in the γ-axis direction' to obtain the height value of the first-strip-shaped spline; assuming that the embodiment of the present invention is from the x-axis The number of the plurality of reference points acquired in the direction is 30, and the 3 〇 reference points are traversed, starting from each of the reference points in turn, and the pixel grayscale value is traversed by each pixel in the /σ γ-axis direction until the gray level is encountered. A pixel whose order value is 0 stores the ordinate (height value) of the pixel in the first array, so that when the 30 detection ends, the first array is filled; for example: the first array - {452, 381 ,382,451,382,382,382,382,452, 382,382,382,382, tear, 382,382,382,452,382,382, 381,382 ' 382,382,382,382,383 , 382,382,382 }; The ordinate with the most statistical occurrences from the first array is 382, and the ordinate 382 is used as the height value of the first-strip-shaped spline on the image. Step 205: continue to detect the second ruled sample line along the γ axis direction, and obtain the height value of the second ruled sample line; start from the first array of grayscale values, and continue along the image of 201042576. The γ-axis direction traverses the pixel grayscale value by pixel by pixel until the pixel with the grayscale value of 0 is encountered 'store the ordinate of the pixel (height value) in the second array' so that when 30 probe ends , the second array is filled; for example: second array = {451, 254, 254, 450, 254, 254, 255, 254, 451, 254, 254, 255, 254, 254, 254, 253, 255, 451, 254, 254 ' 253 ' 254 ' 254,254,254,254,253,254,254,254 }; The most frequently occurring ordinate from the second array is 254, then the vertical coordinate 245 is taken as the second The height value of the ruler line on the image.步 Step 206: Calculate the distance between the first ruler line and the second ruler line, and estimate the offset position of the upper layer image on the lower layer image. It can be seen from the above steps 203 and 204 that the distance between the first line and the second line of the second ruled line on the image is: The position of the first line or the second ruled line on the upper image is determined by the rule of the ruled line on the upper image. ' Table 1 of the face of the ❹, Table 1 shows the ruled line drawn on the upper image

\^-條 28 27 第^^\ 28 27 128 (27) - 26 192 64 (26) ' [¥ 224 96 ' 24 240 112 23 248 120 — 22 252 124 21 254 126 12 201042576 關係: 有這ϊίίί』律可以得知上層圖像上預先繪製的尺樣條線具 不會1^^何_ 2的n次方位置的A樣條線之間的間距是 2)任何_ 2的η次方位置的尺樣條狀_間距存在 2 - 2m >= 2(η· (m>-〇,n >= ι , m<n) 祕上規律,可以在計算出第-條尺樣條線與第二條尺\^-条28 27 第^^\ 28 27 128 (27) - 26 192 64 (26) ' [¥ 224 96 ' 24 240 112 23 248 120 — 22 252 124 21 254 126 12 201042576 Relationship: There is this ϊ ί ί ί It can be known that the pre-drawn ruler line on the upper layer image does not have a spacing between the A-sample lines at the n-th power position of 2^^ _ 2 is 2) the η-th power position of any _ 2 The ruler strip _ spacing exists 2 - 2m >= 2(η· (m>-〇,n >= ι , m<n) The secret rule can be calculated in the first ruler line and the first Two ruler

間距時’很容易的得知第一條尺樣條線與第二條 條線在上層圖像上的位置。 _ 實&例_ ’第—條尺樣絲與第二條尺樣條線 給二β疋128,根據上述表1 ’可以知道這是28標識的尺樣條 線和s標識的尺樣條線的之間的間距。從而知道第一條尺樣 ,線是28標識的尺樣條線’第二條尺樣條線& y標識的尺樣 Y备錄。 另$,又知道28標識的第一條尺樣條線相對上層圖像最 上邊的高度為:/+ ; 27標麵第二條尺樣條線相對上層圖 像最上邊的高度為:27+1()();靠,根據第—條尺樣條線相對 上層圖像最上邊的高度(28+lGG)以及第—條尺樣條線在疊加 後的圖像辛的位置382,或者根據第二條尺樣條線相對上層圖 像最上邊的高度(27+1〇〇)以及第二條尺樣條線在疊加後的圖 像中的位置254 ’可以得到上層圖像落在下層圖像上的 置為:偏移位置=382- (28+100) =26,或者,偏移位 (27+100) =26。 本實施例只是介紹從在Y轴方向上獲取上層圖像在下層 圖像上的偏移位置,本領域技術人員可以理解,根據本發明| 施例提供的方法’同樣可以從在X轴方向上的獲取上層圖像 13 201042576 ί t的偏雜置,由於從X財向上_取上層圖 偏移位置與從Y軸方向上賴取上層圖像 像上的偏移位置的方法完全補,所以本實施例在此 ,f* f 本實施例僅以2為底數’介紹本實施例提供的療製 ο <n)即可,本實施例不作限 $上層_上的尺樣條線的佈局規律’還可以通過改變指數2 為3、4、5……等大於2的有理數,主要滿足:an-a™ >= a(n-(其中 ’ a >= 2 ’ m >= 〇,n >=卜 定。 ΟAt the time of spacing, it is easy to know the position of the first ruler line and the second line on the upper layer image. _ Real & Example _ 'The first ruler wire and the second ruler line to the second β疋128, according to the above Table 1 'can be known that this is the 28 mark of the ruled line and the s logo of the ruled strip The spacing between the lines. Thus, the first ruler is known, and the line is the ruler line of the 28 mark. The second ruler line & y identifies the size Y record. Another $, also knows that the height of the first ruled line of the 28 mark relative to the uppermost side of the upper layer image is: / + ; 27 The second ruler of the second ruled line is the uppermost height of the upper layer image: 27+ 1()(); depends on the height of the uppermost edge of the upper layer image (28+lGG) and the position of the first ruler-like sample line after the superimposed image is 382, or according to The height of the second ruler line relative to the uppermost edge of the upper layer image (27+1〇〇) and the position of the second ruler line in the superimposed image 254′ can be obtained as the upper layer image falls on the lower layer map. The image is set to: offset position = 382- (28 + 100) = 26, or offset bit (27 + 100) = 26. This embodiment only introduces the offset position of the upper layer image on the lower layer image from the Y-axis direction. It will be understood by those skilled in the art that the method according to the present invention can also be viewed from the X-axis direction. Obtaining the superimposed image of the upper layer image 13 201042576 ί t, since the offset position of the upper layer image from the X financial direction is taken up and the offset position on the upper image image is taken from the Y axis direction, Embodiments Here, f* f This embodiment only describes the treatment system ο <n) provided by the embodiment in the case of 2 as the base number. This embodiment does not limit the layout rule of the ruler line on the upper layer _. 'It is also possible to change the index 2 to 3, 4, 5, etc. rational numbers greater than 2, mainly satisfying: an-aTM >= a(n-(where ' a >= 2 ' m >= 〇, n >=卜定. Ο

Q 、:ΐ述ί本發明第二實施例提供的獲取圖像偏移位置的方 •/II ΐ細的介紹’本發明實施例利躲製有尺樣條線的圖 ί作ί層圖像完全落在下層_上,並與下層圖像進行疊 ,乙過對疊加後的圖像從γ轴方向進行連續的第一尺樣條 篦和線探測’並根據探測結果分析第-尺樣條線‘ =第-尺樣條線或第二尺樣條線在疊丄;= nr 1固你上層圖像上的位£進行比較,#可獲得上層圖像落在 下層圖像上的偏移位置。 第三實施例: 傻2 ’第4圖為本發明實施例提供的—種獲取圖 ,,移位置的裝置的結構*意圖。如第4圖所示,該裝置可以 包括: —ρΪΪ,401 ’用於沿圖像的Υ轴和/或Χ軸方向探測第 h線和第二尺樣條、線;該圖像是由上層圖像和下層圖像 的’第-尺樣條線和第二尺樣條_先繪製在上述上 層圖像上,且滿足預設的佈局規律; 心f選,’第-尺樣條線和第二尺樣條線滿足預設的佈局規 #包括1_尺樣絲和第二尺樣條線相互平行,且第一尺樣 201042576 條線和第二尺樣條線的間距對應預設的第一尺樣條線和第二 尺樣條線分別到達上述上層圖像的起始位置的距離。 , 具體地’第一尺樣條線和第二尺樣條線滿足預設的佈局規 ,可以和上述第二實施例中的表1所示,本實施例在此不再復 述。 確定模組402 ’用於根據探測到的第一尺樣條線和第二尺 樣條線確定任意一條尺樣條線在上層圖像的位置; 計算模組403 ’用於根據探測到的該尺樣條線在上述的上 Ο 層圖像的位置和該尺樣條線在該圖像的位置計算上層圖像在 下層圖像中的偏移位置。 優選地’本發明實施例提供的裝置還可以還包括: 處理模組404,用於在上述探測模組401對該圖像探測第 一尺樣條線和第二尺樣條線之前,對該圖像進行二值化處理。 優選地,本發明實施例提供的裝置還可以還包括: 獲取模組405,用於在上述探測模組4〇1對該圖像探測第 一尺樣條線和第二尺樣條線之前,沿該圖像的X軸方向獲取 多個基準點位置,該基準點位置滿足大於上述的下層圖像與上 的差值,且小於預設的上述的上層圖像的非义樣 條線&域向度的條件;和/或 沿該圖像的γ軸方向獲取多個基準點位置,該 ^滿足大於上述下層圖像與上層圖像的寬度的差值,且小於預 設的上述的上層圖像的非尺樣條線區域寬度的條件。 、 請一併參閱第5圖,第5圖為本發明實施例提供的一 測模組的結構示意圖。如第5圖所示,探測模組4〇1包括: 準點子模、组4〇11,用於從Χ轴方向上獲取的每個基 準點位置開始像的γ軸方向逐各像素顧檢測像素灰 15 201042576 制,餅紐料料像素點 模組4012 ’用戶與從第一陣列中統計出現次數是 夕Ύ坐払’作為第一條尺樣條線在該圖像上的高度; ,,歷檢測子模组備,麟從灰階值為零的 ,續沿圖像的Υ軸方向逐各像素遍歷檢測像素灰階值3 標存檢測,並將灰階值為零的像素點的縱坐 ❹ Ο 多的S子:次數最 的每測子模組備用於從γ軸方向上獲取 _χ _向逐各像素遍歷檢 的像素點的橫坐標===錄測,並將灰階值為零 多⑶計:;;:^^現次數最 開始上4011還用於從灰階值為零的像素點 直到灰階信*的軸方向逐各像素遍歷檢測像素灰階值, 標存儲於ίίί St檢測,並將灰階值為零的像素點的橫坐 最多ΐίϊϊΐίΓ2還麟從第二陣财統計出現次數 、示作為第一條尺樣條線在圖像上的寬度。 定模閱ί6圖’第6圖為本發明實施例提供的一種確 、、的-構不意圖。如第6圖所示,確定模组4〇2可以包括: 線的32模組彻,用於計算第—尺樣條線和第二尺樣條 16 201042576 確定子模組4022,用於根據預設的第一尺樣條線和第二 尺樣條線的間距與第一尺樣條線和第二尺樣條線分別到達上 f的上層®像的起始位置的距觸龍隱,確㈣—尺樣條 線在上述上層®制《度或寬度,或者較帛二尺樣條線在上 述上層圖像的高度或寬度。 可選地,上述計算模組4〇3具體用於計算第一尺樣條線在 ,上層圖像的冑度或寬度鮮__尺雜齡圖像上的高度 或冗度的差值; ❹ Ο 或者’用於計算第二尺樣條線在上層圖像的高度或寬度與 第二尺樣條線在圖像上的高度或寬度的差值,從而獲得上^ 層圖像在下層圖像中的偏移位置。 亡述3本㈣第三實施纖供賴取圖像偏移位置的裝 推了詳、細的介紹’本發明實施例利用_有尺樣條線的圖 為上層圖像完全落在下層圖像上,並與下層圖像進 =^過對叠加後的圖像從γ轴方向進行 ί ’ #雜湖絲分料—尺樣條線和 :表條線在疊加後的圖像上的位置以及在上層 第-尺樣條線或第二尺樣條線在疊加後的圖像上的位 -Λ 上層雖上的位置精味,即可獲得上層圖像落在 下層圖像上的偏移位置。 私备牡 ㈣it ϊ#通技術可㈣解:實現上述方法實施例的全 存儲於「電腦可讀取存儲介質中,該程式在執行時,: 订υ括上述方法實施例的步驟;而前述的存儲介質包括 ;===_ (RAM)m者光碟等各種 方法:發所提供的一種獲取圖像偏移位置的 裝置進订了 κ绍,本文中應用了具體個例對本發明 17 201042576Q, ΐ ί ί 第二 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取 获取It completely falls on the lower layer _ and overlaps with the lower layer image. After the superimposed image, the first image of the superimposed image is continuous from the γ-axis direction and the line detection ' and analyzes the first-strip spline according to the detection result. Line ' = the first-foot spline or the second-foot spline in the stack; = nr 1 fix the bit on your upper image to compare, # can get the offset of the upper image on the lower image position. The third embodiment: Fig. 4 is a schematic diagram of the structure of the device for moving the position provided by the embodiment of the present invention. As shown in Fig. 4, the apparatus may include: - ρ ΪΪ 401 ' for detecting the h-th line and the second-scale spline, line along the x-axis and/or the x-axis direction of the image; the image is from the upper layer The 'the first ruler line and the second ruler' of the image and the lower layer image are first drawn on the above upper layer image and satisfy the preset layout rule; the heart f is selected, the 'first ruler sample line and The second rule spline satisfies the preset layout rule #includes the 1_ ruler wire and the second ruler sample line are parallel to each other, and the spacing of the first ruler 201042576 line and the second ruler sample line corresponds to the preset The first ruler and the second ruler respectively reach the distance from the start position of the upper image. Specifically, the first ruler line and the second ruler line satisfy the preset layout rule, and can be shown in Table 1 in the second embodiment, and the embodiment will not be repeated here. The determining module 402' is configured to determine the position of any one of the ruled splines in the upper layer image according to the detected first and second ruled splines; the calculating module 403' is configured to detect the The ruler line calculates the offset position of the upper layer image in the lower layer image at the position of the above-described upper layer image and the position of the ruler line at the image. Preferably, the apparatus provided by the embodiment of the present invention may further include: a processing module 404, configured to: before the detecting module 401 detects the first and second ruled splines for the image, The image is binarized. Preferably, the apparatus provided by the embodiment of the present invention may further include: an obtaining module 405, configured to: before the detecting module 4〇1 detects the first and second ruled splines of the image, Acquiring a plurality of reference point positions along the X-axis direction of the image, the reference point position satisfying a difference between the lower layer image and the upper portion, and smaller than the preset non-sense spline of the upper layer image. a condition of the domain dimension; and/or acquiring a plurality of reference point positions along the γ-axis direction of the image, the ^ satisfying a difference larger than a width of the lower layer image and the upper layer image, and smaller than the preset upper layer The condition of the width of the non-small line area of the image. Please refer to FIG. 5, which is a schematic structural diagram of a test module according to an embodiment of the present invention. As shown in FIG. 5, the detecting module 4〇1 includes: a quasi-point sub-module, a group 4〇11, for detecting the pixel from the pixel in the γ-axis direction of each reference point position obtained from the x-axis direction. Gray 15 201042576 system, cake material material pixel module 4012 'user and the number of occurrences from the first array is the number of times sitting on the image as the height of the first ruler line on the image; The detection sub-module is prepared, and the gradation of the gray-scale value is zero, and the pixel-level traversal detection pixel gray-scale value 3 is detected along the Υ-axis direction of the image, and the pixel point of the gray-scale value is zero ❹ Ο Many S sub-caps: Each sub-module with the highest number of times is used to obtain _χ _ from the γ-axis direction to the abscissa of the pixel traversed by each pixel === recording, and the gray-scale value is Zero more (3) count: ;;: ^ ^ The number of times at the beginning 4011 is also used to traverse the detected pixel grayscale value from pixel to pixel of the grayscale value to the axis direction of the grayscale letter*, the standard is stored in ίίί St detects, and the cross-sitting of the pixel points with the gray-scale value of zero is at most ΐίϊϊΐίΓ2, and the number of occurrences of the second fiscal statistics is shown. A first spline ulnar width in the image. FIG. 6 is a schematic diagram of an embodiment of the present invention. As shown in FIG. 6, the determining module 4〇2 may include: a 32-module of the line for calculating the first-scale spline and the second-spline spline 16 201042576 Determining the sub-module 4022 for Set the distance between the first and second ruler lines and the distance between the first and second ruler lines to reach the starting position of the upper layer of the upper f, respectively. (d) - the ruler line is in the above upper layer ® "degree or width, or the height or width of the upper layer image of the two-dimensional spline." Optionally, the calculating module 4〇3 is specifically configured to calculate a difference between the height or the redundancy of the first-level spline, the width or the width of the upper image, and the redundancy; Ο or 'used to calculate the difference between the height or width of the upper image and the height or width of the second ruled line on the image, thereby obtaining the image of the upper layer in the lower layer The offset position in . 3 (4) The third embodiment of the fiber is used for the image offset position. The detailed description of the image is used. The embodiment of the present invention uses the image of the ruled line to completely fall on the lower layer image. Up, and the lower layer image is input = ^ over the superimposed image from the γ axis direction ί ' #杂湖丝分料 - ruler line and: the position of the strip line on the superimposed image and In the upper layer of the first-foot spline or the second-size spline, the position of the upper layer on the superimposed image is fine, and the offset position of the upper image on the lower image can be obtained. . Private preparation of the four (four) it ϊ #通技术可(四) Solution: The embodiment of the above method is fully stored in a "computer readable storage medium, when the program is executed, the steps of the above method embodiment are stipulated; The storage medium includes: ===_ (RAM)m, the optical disc, and the like: a device for obtaining an image offset position provided by the sender has been ordered by κ, and a specific example is applied herein to the present invention 17 201042576

If 2實施方式進行了·,以上實關的說明只是用於幫 =解t發明的方法及其核心、思想;同時,對於本領域的-般 本發明的思想,在具體實施方式及應用範圍上 均會有改變之處’综上所述,本說明書内容不應理解為對本發 明的限制。 【圖式簡單說明】 第1圖為本發明實施例中提供的一種獲取圖像偏移位置 的方法流程圖; 第2圖為本發明實施例中提供的一種獲取圖像偏移位置 〇 的方法流程圖; 第3圖為本發明實施例中提供的繪製有尺樣條線的上 圖像示意圖; 第4圖為本發明實施例中提供的一種獲取圖像偏移位置 的裝置結構圖; 第5圖為本發明實施例中提供的一種探測模組的結構示 意圖;If 2 implementations have been carried out, the above description is only used to help the solution of the invention and its core, ideas; at the same time, for the general inventive concept of the field, in the specific implementation and application scope There are variations from the above description, and the contents of this specification are not to be construed as limiting the invention. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a flowchart of a method for acquiring an image offset position according to an embodiment of the present invention; FIG. 2 is a method for acquiring an image offset position 提供 according to an embodiment of the present invention; FIG. 3 is a schematic diagram of an upper image of a ruled line drawn according to an embodiment of the present invention; FIG. 4 is a structural diagram of an apparatus for acquiring an image offset position according to an embodiment of the present invention; 5 is a schematic structural diagram of a detecting module provided in an embodiment of the present invention;

第6圖為本發明實施例中提供的一種確定模組的社 意圖。 …傅不 【主要元件符號說明】 探測模組...............401 遍歷檢測子模組......4011 統計子模組............4012 確定模組...............402 計算子模組............4021 確定子模組............4022 18 201042576 計算模組...............403 處理模組...............404 擷取模組...............405 ❹ ❹ 19Figure 6 is a view showing a social module for determining a module according to an embodiment of the present invention. ...Fu does not [main component symbol description] detection module..................401 traversal detection sub-module...4011 statistical sub-module...... ...4012 Determining the module...............402 Calculating the submodule............4021 Determining the submodule... .........4022 18 201042576 Computing Module...............403 Processing Module...............404 Capture module..................405 ❹ ❹ 19

Claims (1)

201042576 七、申請專利範圍·· 1、一種獲取圖像偏移位置的方法,包括下列步驟: 樣條2=¾ 預設的佈局規律; 几’抑上層圖像上,且滿足 意一條尺樣條線該f :尺樣條線確定任 Ο 條線的以== 象•置和該尺樣 1 A“ 置心^層圖像在下層圖像中的偏移位置。 、如凊求項1所述之獲取圖像偏移位 的佈局規律包括: 乃沄其中該滿足預設 該第-尺樣條線和第二尺樣條線相互平行,且 條線和該第二尺樣條線的間距對應預設的該第一 ^ 該第二尺樣條線分別到達該上層圖像的起始位置的距離条、,、 3、 j求項i或2所述之獲取圖像偏移位置之方法, 圖 ίϊ:軸和/或x軸方向探測該第-尺樣條線和該ώί: 線之前,該方法還包括: 矛人mi* 對該圖像進行二值化處理。 4、 騎之獲取圖像偏移位置之方法,其中該沿圖像的 Υ轴和/或X軸方向探測該第一尺樣條線和該第二尺樣 前’該方法還包括步驟: /σ圖像的X轴方向獲取多個基準點位置,該基準點位置滿 足大於該下層圖像與上層圖像的高度的差值,且小於預設的該 上層圖像的非尺樣條線區域高度的條件;和/或 沿圖像的Υ軸方向獲取多個基準點位置,該基準點位置滿 20 201042576 侧設的該 5、如請求項4所述之獲取圖像偏移位 軲方向探測該第一尺樣條線和該第== Ο 檢測,並將灰階值為零的像素點的縱坐標存儲 尺樣=====财妓麵縱雜,作為第一條 各像點軸_ 將灰階值為零的像素點的檢測,並 尺樣現次數最多的縱坐標 ’作為第二條 Ο 檢測’並將灰階值為零的像素點的橫坐標=== 尺樣以現次數最多的縱坐標’作為第-條 將灰階值為零的像素點的橫坐標存檢測,並 尺樣現次數最多的橫坐標 ’作為第二條 21 201042576 6、偏移位置之方法,其中該根據探測 到的該第尺樣條線和該第二尺樣條線 線在上層圖像的位置的步驟包括:戟任⑥條尺樣條 計算該第-尺樣條線和該第二尺樣條線的間距; 第—尺樣條線和該第二尺樣條線的間距與 .的定該第-尺樣條線在該 或a $者確疋該第—尺樣條線在該上層圖像的高度 ο 7 取Λ像偏移位置之方法,其中該根據探測 =tiffin上層圖像的位置和該尺樣條線在該圖像 的位置3十斤上層圖像在下層圖像中的偏移位置的步驟包括: -尺線^該上細_度或寬度與該第 尺樣條線在該圖像上的高度或寬度的差值;或者 計算該第二尺樣條線在該上層圖像 線在該圖像上的高度或寬度的差值,從⑤= 圖像在下層圖像中的偏移位置。 X仟X上廣 ❹8、一種獲取圖像偏移位置的裝置,其中包括·· • 測模組’用於沿圖像的γ軸和/或X轴方向探測第-尺 構i的和ί ί尺τ線’·糊像是由上層®像和下層圖像疊加 ’該第—尺樣條線和該第二尺樣條線預翁製在該上層 圖像上,且滿足預設的佈局規律; 曰 魏ΐίΐ組,用於根據探測到的該第一尺樣條線和該第二尺 樣條線蜂疋任意一條尺樣條線在上層圖像的位置; 位置根據探測到的該尺樣條線在該上層圖像的 ΐίϊίίϊ 哪的㈣計算上層崎在下層圖像 22 201042576 9、如請求項8所述之獲取圖像偏移位置之裝置,其中該裝置還包 括: ' ~ ι 處理模組’用於在該探測模組對該圖像探測該第一尺樣條 線和該第二尺樣條線之前,對該圖像進行二值化處理。 10、如請求項9所述之獲取圖像偏移位置之裝置,其中該裝置還 包括: ' 獲取模·組’用於在該細模組對該圖像探測該第一尺樣條 線和該第二尺樣條線之前,沿該圖像的χ軸方向獲取多個基 Ο201042576 VII. Patent application scope ·· 1. A method for obtaining image offset position, including the following steps: Spline 2=3⁄4 Preset layout rule; Several 'suppressed upper layer image, and satisfying one ruler spline Line f: The ruled line determines the offset position of the line in the lower layer image with the == image and the size 1 A. The layout rule for obtaining the image offset bit includes: wherein the predetermined first and second ruler lines are parallel to each other, and the distance between the line and the second rule line is a method for obtaining an image offset position according to a preset distance bar of the first rule line of the upper layer image, respectively, 3, j, or item i or 2 Figure ϊ: Before the axis and / or x-axis direction of the first-strip spline and the ώί: line, the method further includes: the spearman mi* binarizes the image. a method of shifting an image position, wherein the first ruler spline and the second ruler are detected along a x-axis and/or an X-axis direction of the image The method further includes the steps of: acquiring a plurality of reference point positions in the X-axis direction of the /σ image, the reference point position satisfying a difference greater than a height of the lower layer image and the upper layer image, and being smaller than the preset upper layer a condition of the height of the non-small line area of the image; and/or acquiring a plurality of reference point positions along the direction of the x-axis of the image, the reference point position being over 20 201042576, the side being set as described in claim 4 Obtaining the image offset bit 轱 direction to detect the first ruled spline and the first == Ο detection, and storing the ordinate of the pixel point with the grayscale value of zero ===== As the first pixel axis _ the detection of the pixel point with the grayscale value of zero, and the ordinate with the largest number of ticks as the second Ο detection 'and the pixel with the grayscale value of zero The abscissa === The ruler uses the ordinate of the current number as the first strip to detect the abscissa of the pixel with the gray scale value of zero, and the abscissa with the largest number of times is the second strip 21 201042576 6. A method of offsetting a position, wherein the based on the detected spline And the step of the second ruler spline in the position of the upper layer image comprises: calculating a distance between the first ruler spline and the second ruler spline by using a 6 ruler spline; The spacing between the line and the second ruled spline is determined by the first-strip spline at the or a $ of the height of the first-level spline at the height of the upper image ο 7 The method of moving the position, wherein the step of detecting the position of the upper layer image according to the tiffin and the offset position of the upper layer image in the lower layer image of the image line at the position of the image line includes: - ruler line ^ the difference between the height or width of the upper ruler and the height or width of the first ruler spline on the image; or calculating the height of the second ruled spline on the image of the upper image line Or the difference in width from 5 = the offset position of the image in the underlying image. X仟X上❹8, a device for acquiring an image shift position, including: ····································································· The ruler τ line '· paste image is superimposed by the upper layer ® image and the lower layer image', the first ruler sample line and the second rule line are pre-textured on the upper layer image, and satisfy the preset layout rule ; 曰 Weiΐίΐ group, for the position of the upper layer image according to the detected first ruler line and the second rule line line bee; The line is in the upper layer image of (4) the upper layer image is calculated in the lower layer image 22 201042576 9. The device for acquiring the image offset position as described in claim 8 wherein the device further comprises: ' ~ ι processing mode The group 'is used to binarize the image before the detecting module detects the first ruled spline and the second ruled spline. 10. The apparatus for obtaining an image offset position according to claim 9, wherein the apparatus further comprises: 'acquiring a mode group' for detecting the first ruled spline line and the image in the thin module Obtaining multiple bases along the x-axis of the image before the second-scale spline 點位置,該基準點位置狀大於該下層圖像與±層_的高度 的差值,且小於預設的該上層圖像的非尺樣條線區域高度的條 件;和/或 滿/ΐ^ΐΐ 取多個基準點位置,該基準點位置 ίΐί 層圖像與層圖像的寬度的差值,且小於預設的 該上層圖像的非尺樣條線區域寬度的條件。 求項Κ)所述之獲取圖像偏移位置之裝置,其中該探測模 置門Ϊ歷?敝,驗從X財向上獲取的仙基準點位 圖像的丫軸方向逐各像素遍歷檢測像素灰階值,直 存檢測’並將灰階值為零的像素點的縱坐標 縱坐第,列愧計出現次數最多的 ‘作為第一條尺樣條線在該圖像上的高度; 繼續ί用於從該灰階值為零的像素點開始, 階值為零赫卜H肖逐錢素顧制像錢階值,直到灰 於第做階料騎點_坐標存儲 的 該統計子·,用於從該第二陣财辑出現次數最多 23 201042576 縱坐標,作為第二條尺樣條線在該圖像上的高度。 12、如請求項U所述之獲取圖像偏移位置之 測子模組用於從γ軸方向上獲遍歷檢 ο 存館檢測,並將灰階值為零的像素點的橫坐標 該,計子模組還驗從該第二_中統計出現次 、秩坐如,作為第二條尺樣條線在該圏像上的寬度。 13 mm或12所述之獲取圖像偏移位置之裝置,其中該 〇 的間=子模組’用於計算該第一尺樣條線和該第二尺樣條線 減1定子模組,用於根據預設的該第一尺樣條線和該第二尺 的間距與該第-尺樣條線和該第二尺樣條線分別到達 =亡層圖像的起始位置的距離的對應關係,確定該第一尺條 層圖像的高度或寬度,或者確定該第二尺樣條線在該 上層圖像的南度或寬度。 14、如請求項13所述之獲取圖像偏移位置之裝置,其中該計算模 組具體用於計算該第-尺樣條線在該上層圖像的高度或寬^ 與該第一尺樣條線在該圖像上的高度或寬度的差值; 或者,用於計算該第二尺樣條線在該上層圖像的高度或寬 24 201042576 從而獲 度與該第二尺樣條線在該圖 得該上層圖像在下層圖像中的偏或寬度的差值, 搂8所述之獲取圖像偏移位置之聿置,其中兮笙 設的佈局規律包括U 尺樣條線相互平行’且該第—尺樣條線和第二尺 樣條線的間距對應職的該第-尺樣條線和該第二尺樣&線 分別到達該上層圖像的起始位置的距離。 Ο 〇 25a position of the reference point which is larger than a difference between the height of the lower layer image and the ± layer_, and less than a preset condition of the height of the non-small line area of the upper layer image; and/or full/ΐ^取 Take a plurality of reference point positions, which are the difference between the layer image and the width of the layer image, and less than the preset condition of the width of the non-small line region of the upper layer image. The apparatus for obtaining an image offset position, wherein the detection mode threshold is used?敝, the 丫 axis direction of the sensible reference point image obtained from the X financial direction is traversed by each pixel to detect the pixel grayscale value, and the direct storage detection 'and the vertical coordinate of the pixel point with the grayscale value of zero is placed vertically, The column counts the most frequently occurring 'as the height of the first ruler line on the image; continue ί is used to start from the pixel with the grayscale value of zero, the order value is zero heb H Xiao Qian Qian The prime value is used to calculate the value of the money, until the gray is used in the first step of the riding point _ coordinate storage of the statistic, used for the second time from the second generation of the most frequently appeared 23 201042576 ordinate, as the second ruler The height of the line on the image. 12. The sub-module for obtaining an image offset position as described in claim U is used for obtaining the traversal detection from the γ-axis direction and the abscissa of the pixel point having the gray-scale value of zero. The meter module also checks the second occurrence of the second statistic, the rank sitting, as the width of the second ruled line on the image. The device for acquiring an image offset position according to 13 mm or 12, wherein the inter-sub-module ' is used to calculate the first-scale spline and the second-strip spline minus 1 stator module, And a distance between the first ruler spline and the second ruler according to the preset distance from the first ruler spline and the second ruler spline respectively reaching a starting position of the image of the dead layer Corresponding relationship, determining the height or width of the first ruler layer image, or determining the southness or width of the second ruled sample line in the upper layer image. 14. The apparatus for obtaining an image offset position according to claim 13, wherein the calculation module is specifically configured to calculate a height or a width of the first-level spline in the upper layer image and the first size The difference in height or width of the line on the image; or, used to calculate the height or width of the second ruled sample line in the upper layer image 24 201042576, thereby obtaining the degree with the second ruled sample line The figure obtains the difference between the offset or the width of the upper layer image in the lower layer image, and the position of the image offset position is obtained as described in FIG. 8, wherein the layout rule of the set includes the U rule spline lines being parallel to each other. And the distance between the first ruler and the second ruler line corresponds to the distance between the first ruler and the second ruler and the line respectively reaching the starting position of the upper image. Ο 〇 25
TW98116611A 2009-05-19 2009-05-19 Method and device for obtaining deviation position of picture TWI401617B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW98116611A TWI401617B (en) 2009-05-19 2009-05-19 Method and device for obtaining deviation position of picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW98116611A TWI401617B (en) 2009-05-19 2009-05-19 Method and device for obtaining deviation position of picture

Publications (2)

Publication Number Publication Date
TW201042576A true TW201042576A (en) 2010-12-01
TWI401617B TWI401617B (en) 2013-07-11

Family

ID=45000612

Family Applications (1)

Application Number Title Priority Date Filing Date
TW98116611A TWI401617B (en) 2009-05-19 2009-05-19 Method and device for obtaining deviation position of picture

Country Status (1)

Country Link
TW (1) TWI401617B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112862724A (en) * 2021-03-12 2021-05-28 上海壁仞智能科技有限公司 Method for computing, computing device and computer-readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US580561A (en) * 1897-04-13 John foster stepiienson
US5497236A (en) * 1993-06-23 1996-03-05 Ricoh Company Ltd. Method and apparatus for distortion correction of scanned images
TW580824B (en) * 2002-08-13 2004-03-21 Microtek Int Inc Scanner capable of providing extra position information and image calibrating method
WO2004093011A1 (en) * 2003-04-17 2004-10-28 Seiko Epson Corporation Generation of still image from a plurality of frame images

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112862724A (en) * 2021-03-12 2021-05-28 上海壁仞智能科技有限公司 Method for computing, computing device and computer-readable storage medium
CN112862724B (en) * 2021-03-12 2022-09-09 上海壁仞智能科技有限公司 Method for computing, computing device and computer-readable storage medium

Also Published As

Publication number Publication date
TWI401617B (en) 2013-07-11

Similar Documents

Publication Publication Date Title
TWI274868B (en) Apparatus inspecting printed solder
JP6166852B1 (en) Method and system for measuring lens distortion
US8953048B2 (en) Information processing apparatus and control method thereof
EP2367352B1 (en) Imaging apparatus and method
CN102055988B (en) Image processing apparatus and control method therefor
TWI447642B (en) Electronic device, image display system and method thereof
JP2008175549A (en) Defect detection device and method
JP2009216494A (en) Reference line position measuring instrument, program for reference line position measurement, and reference line mark
WO2015158024A1 (en) Image processing method and apparatus, and automatic optical detector
WO2016026238A1 (en) Image border recognition method, device and display panel
TWI384417B (en) Image processing method and apparatus
TWI715178B (en) Display and method of reducing mura
TW201042576A (en) Method and device for obtaining deviation position of picture
Pauli et al. Effect of image compression and resolution on retinal vascular caliber
CN105847816B (en) The creation method and electronic device of video file thumbnail
JP2014116706A (en) Two-dimensional color code display apparatus, display method, reading device, and reading method
JP2009250937A (en) Pattern inspection device and method
CN104318236B (en) A kind of method and system for obtaining image local feature
TW200811758A (en) Method for edge detection, method for motion detection, method for pixel interpolation utilizing up-sampling, and apparatuses thereof
JP3973024B2 (en) Defect detection method and defect detection system using 8-neighbor point adjacent comparison method in imaging inspection apparatus
TW201007162A (en) Optical carriage structure of inspection apparatus and its inspection method
TWM563247U (en) Microvascular detection device
CN108629786A (en) Method for detecting image edge and device
JP5882883B2 (en) Telop detection device, telop detection method, and telop detection program
JP2014235676A (en) Two-dimensional color code display device and display method for the same, and two-dimensional color code reading device and reading method for the same