201211510 六、發明說明: 【發明所屬之技術領域】 操取光點的成像大㈣所計算光_成像位置進行補償之 待別是可藉由判斷所 測距系統。 【先前技術】 在先前技術中,測距裝置係對待測物發射 收由待測物反射制光所產生之反射光。_裝 偵測光往返測距裝置與待測物之間所需的時間,以推^ = 置與待測物之間的距離。然、而,由於當铜物表面且 待測物/斤反射之光點不具峨 別距裝置在料轉時無法制準麵絲重 較大的量測誤差,造成使用者的不便。 置而產生 【發明内容】 括.本其卜目的,是在於提供—動_統,包 先源,用以對-物件表面提供—光線…感 =接收由該物件表面所反㈣錢,並根據所接收、光線 =-距離,該影像感職置包括:电 =線,並產生m算模組,根_反射 在该影像之成像位置以及成像大小輸出該物件之距, 其中該影像感測模組可包含—光線感剛單以构 取該光線,-亮度控鮮福啸_光線€測單元操取 201211510 光線所需之參數,一影像處理單元接收該光線感測單元所 感測之訊號而輸出該影像。 其中該計算模組包含一距離計算單元用以接收該影 像並根據该反射之光線在該影像之成像位置而計算該物件 之距離,以及一距離輸出單元用以輸出該距離。 其中該距離計算模組進一步包含一光點記憶單元用 以儲存一預設光點尺寸,而該距離計算單元則在接收該影 像後先將該影像中該反射之光線的成像大小與該預設光點 尺寸比對,若該反射之光線的成像大小約略相等於該預設 光點尺寸則計算該物件c距離,若該反射之光線的成像大 小小於该預设光點尺寸則根據該反射之光線的成像大小與 該預設光點尺寸的差異㈣該反射之光線的成像位置進行 補償,再根據補償後之成像位置計算該物件之距離。 戎距離計#單元對該反狀光線的成像位置進行補 償時是補償該反射之光線所成像—I點之重心,並根據該 光點成像之重心位置計算該物件之距離。 為讓本發明之上述和其他目的、特徵和伽能更明顯 易懂’下文特舉較佳實施例,並配合所附圖式,作詳細說 明如下^ 【實施方式】 本發明是有關-種彻光學成像進行測距之測距系 統。參考第-圖所示為-測距系統之示意圖,包含一感測 裝置1◦以及-光源2〇,該光源2〇投射—光線至—物件3〇 的表面,輯光線並由該物件3〇之表面反射至該感測裝置 201211510 先’而該感測裴置10即可 t 所形成該絲料餘 I 门依狀射之先線 離。 战像位置彳异该物件30與該光源20之距 哼反心1〇前方設置了-個感測鏡片41,用以將 到該感測裂置10的感測表面上。而該光 攸,如此可二加發光效果,則在前方設置了一個發光鏡片 光鏡片42亦3Q表面之效率’但該發 物件3〇之㈣。 ㈣絲2G將光線投射至該 算之發光鏡片42,因此所欲計 D + 不為忒發光鏡片42至該物件30的距離 兔略°譜光鏡# 42 ’貞彳所欲計算之距離則可表示 為該光源20表面至鋪件3G之麟。 ^據物件成像之原理,該光源2G投射在該物件30表 線反射至該感測裝置10表面時’該反射之光線會先 二,,感測鏡片41上再射人該感測裝置丨。之感測表面 f,/亥感測裝置10之感測表面到該感測鏡片41之距離為 ,减距離亦可視為該感測裝置10之感測元件的焦距。 而由於該感測裝置10與該光源20之間的距離固定且 知,该感測裝置10的焦距f亦為已知,因此根據該反射 =·光,所形成光點在該感測裝置10的感測面上之成像位 、邊感測裝置10的焦距f以及該感測裝置10與該光源 之間的距離即可計算出該物件30與該光源20之間的距 離。其中,上述過程所需使用之演算法為習知所廣泛熟悉 201211510 之技術’因此在此即不加以贅述。 參考第二圖為該感測裝置10的一種架構圖。該感測 裝置10具有-個感賴組以及―個計算模組,該感測模址 包括一個光線感測單元11、一個亮度控制單元12以及— 個影像處理單元13,而該計算模組則包括一 元H、-個光點記鮮元15以及—個轉輸出單元 該光線感測單元11用以提供可感測光線之感測面, 該反射之光線則在該紐感測單元u之感測面上形成— 光點。該亮度蝴單元12 Μ控繼光線感料元u掏 取光線所需之參數(例如光圈、感光度),且進一步可控 光源2G ’藉鱗到更㈣亮度㈣效果。 元則以接收所感測光線並產生包含該光點之—影像早 該距離指單元14接收鄉像並據此計算該物件3〇 與該光源20之_雜。該 _ 物件30 呌管以η… 離輸出早疋K則將該距離 计开早tl 14所產生該距離輸出 示)。該光點記憶單元15記憶一個預=== 離計算單元14在叶I 九點尺寸,而该距 在今料H。 彳事先比對該反射之光現 上所形成光點之尺寸以及該預設光 ..人丁用以判畸所接收該反射光 光源20所投射之光線 由疋否僅包各部伤由該 線,.關斷疋否計算該距離 =射之光 之光^進行補償後再計算該距離對姐射光線所形成 疋11的像素之歧,W代表該光線感 201211510 測單元11的每行像素所感測到之亮度值(第三圖、第 圖、第五11之χ、γ軸线皆相同)。其中在該影像 = 一預定值TG之亮度值即可表示為該反射之光線所^ 成光點區域。而為了計算該光點在該光線感測單元11 ^201211510 VI. Description of the invention: [Technical field of invention] The imaging of the light spot is large (4) The calculated light_imaging position is compensated by the judgment of the distance measuring system. [Prior Art] In the prior art, the distance measuring device emits reflected light generated by the object to be measured and reflected by the object to be measured. _ Installs the time required between the detection of the light to and from the distance measuring device and the object to be tested to push the distance between the object and the object to be tested. However, since the spot on the surface of the copper object and the object to be measured is not reflected, the measurement error of the surface wire weight cannot be adjusted when the device is turned, which causes inconvenience to the user. The purpose of the invention is to provide a dynamic source, which is used to provide the light to the surface of the object - the sense of being received by the surface of the object (four), and according to Received, light=-distance, the image sensory position includes: electric=line, and generates an m-calculation module, and the root_reflection outputs the distance of the object at the imaging position of the image and the imaging size, wherein the image sensing mode The group may include a light sensation just to construct the light, and a brightness control bluffing _ ray measuring unit takes the parameters required for the 201211510 light, and an image processing unit receives the signal sensed by the light sensing unit and outputs The image. The computing module includes a distance calculating unit for receiving the image and calculating a distance of the object according to the reflected light at an imaging position of the image, and a distance output unit for outputting the distance. The distance calculation module further includes a spot memory unit for storing a preset spot size, and the distance calculating unit firstly images the reflected light of the image and the preset after receiving the image. If the image size of the reflected light is approximately equal to the preset spot size, the distance of the object c is calculated, and if the image size of the reflected light is smaller than the preset spot size, according to the reflection The difference between the imaging size of the light and the preset spot size (4) the imaging position of the reflected light is compensated, and the distance of the object is calculated according to the compensated imaging position. When the distance meter unit compensates for the imaged position of the ray, it compensates the center of gravity of the image of the reflected light, and calculates the distance of the object based on the position of the center of gravity of the image. The above and other objects, features and gamma of the present invention will be more apparent and understood. The following detailed description of the preferred embodiments and the accompanying drawings are described in detail below. Optical imaging for ranging ranging systems. Referring to Fig. - is a schematic diagram of a ranging system, comprising a sensing device 1 ◦ and a light source 2 〇, the light source 2 〇 projecting light to the surface of the object 3 ,, arranging the light and arranging the object 3 The surface is reflected to the sensing device 201211510 first, and the sensing device 10 can be formed by the first line of the wire. The image position is different from the distance between the object 30 and the light source 20. A sensing lens 41 is disposed in front of the anti-center 1 to be applied to the sensing surface of the sensing crack 10. In this case, the light illuminating effect is such that a luminous lens 42 is also disposed in front of the 3Q surface efficiency 'but the hairpiece 3 ( (4). (4) The wire 2G projects the light to the calculated illuminating lens 42, so that the distance D + is not the distance from the illuminating lens 42 to the object 30, and the distance to be calculated is It is expressed as the surface of the light source 20 to the lining 3G. According to the principle of object imaging, the light source 2G is projected when the surface of the object 30 is reflected to the surface of the sensing device 10, and the reflected light will be second, and the sensing lens 41 is incident on the sensing device. The sensing surface f, the distance from the sensing surface of the sensing device 10 to the sensing lens 41 is, and the distance can be regarded as the focal length of the sensing element of the sensing device 10. Since the distance between the sensing device 10 and the light source 20 is fixed and the focal length f of the sensing device 10 is also known, according to the reflection=·light, the formed light spot is at the sensing device 10 The distance between the object 30 and the light source 20 can be calculated by the imaging position on the sensing surface, the focal length f of the edge sensing device 10, and the distance between the sensing device 10 and the light source. Among them, the algorithms required for the above process are widely known in the art of 201211510' and therefore will not be described here. Referring to the second figure, an architectural diagram of the sensing device 10 is shown. The sensing device 10 has a sensing group and a computing module. The sensing module includes a light sensing unit 11, a brightness control unit 12, and an image processing unit 13, and the computing module The light sensing unit 11 is configured to provide a sensing surface of the senseable light, and the reflected light is in the sense of the neo-sensing unit u. The measuring surface forms a light spot. The brightness unit 12 controls the parameters (e.g., aperture, sensitivity) required for the light sensing element u, and further controls the light source 2G' to scale to a more (four) brightness (four) effect. The element receives the sensed light and generates an image containing the spot. The distance early refers to the unit 14 receiving the image of the image and calculating the object 3 from the source 20 accordingly. The _ object 30 is connected to the output by η... from the output 疋K, and the distance is calculated as the distance tl 14 is generated. The spot memory unit 15 memorizes a pre === from the calculation unit 14 at the leaf I nine point size, and the distance is now H.彳In advance, the size of the spot formed by the reflected light and the preset light. The person used to determine the distortion of the light reflected by the reflected light source 20 is caused by only , . . . Turn off the distance = calculate the light = the light of the light ^ to compensate and then calculate the distance to the pixel formed by the sister's light 疋11, W represents the sense of light of each row of pixels of the light sense 201211510 The measured brightness values (the third picture, the first picture, the fifth 11th, and the γ axis are the same). The brightness value of the image = a predetermined value TG can be expressed as the light spot area of the reflected light. And in order to calculate the spot in the light sensing unit 11 ^
像位置’該距離計算單元14可進-步對該影像中該光點成 區,進行處理,在一實施例中該距離計算單元14可在診之 點區域中取—半亮度位置之資訊代表光點範圍,亦即 光點區域中亮度的最高值減去亮度的最低值(亦即τ〇),^ 將該差值減半之後加上該亮度的最低值(亦即το),如再 可取個亮度值Π’該亮度值Τ1即代表該光點區域= 涵蓋亮度範圍中位於中間的亮度值。而該影像中代表兮“ 點區域之波形在該亮度·值Τ1中的光點範圍即為該光 成像大小,而對該波形在該亮度值T1上方的區域取重‘心0 可取得代表該光點之成像位置。該距離計算單元14即可p 據該重心之位置’該感測裝置10的焦距f以及該感測裝】 10與该光源"2 〇之間的距離而計算出該物件3 〇與該光源 之間的距離。 〃 卜、 參考第四圖,為物件在不同距離時反射光線所產生光 點的影像。由®所知,以相同亮度條件(総區域所涵蓋亮 度範圍中位於巾_亮度值T2、T3)#·影像巾之亮度值 波形時’可知物件在不同輯時所產生光點範圍的成像大 小是約略相等的。 由於物件30之表面可能非完整平面,或者 有溝槽或深淺不-的凹陷處’因此投射祕在該物件3〇 201211510 表面上有時候無法全部反射至該光線感測單元u,光點的 部份區域的反射光線可能因反射角度不同而散佚。而當光 ,無法全部反射至光線感測單元丨丨時,因光點在光線^測 單元11上的成像大小會小於原本應有之尺寸,且其影像通 常會偏向二側。而使用重心方式計算光點的成像ϋ時, 即會因為光點的成像面積偏向二側而無法得知原有的重心 位置。 a本發明之感測裝置10即會先判斷所取得光點的影像 疋否為完整影像,或者僅取得部份面積的光點影像。而由 於固定光源所投射光點的在相同條件下的成像大小約略相 同,因此該成像大小即可被儲存於該光點記憔單元丨 距離計算單元14在每次計算距離前即可將所取得光點的 成像大小與该光點§己憶单元15所儲存的一個預定光點尺 寸進行比對,來判斷所取得光點的影像是否為一個完整影 像。 ' ’ 參考第五圖,為物件在相同距離時反射光線非完整反 射至光線感測單元11所產生光點的影像。其中L1.為投射 光線的光點100%反射至光線感測單元丨丨所產生亮度值的 波形,L2為投射光線的光點80%(亦即光點的20%面積區 域热法反射至遠光線感測單元1 1 )反射至光線感測單元1 1 所產生亮度值的波形’L3為投射光線的光點6〇%反射至光 線感測單元Π所產生亮度值的波形,L4為投射光線的光 點40%反射至光線感測單元11所產生亮度值的波形,[5 為投射光線的光點20%反射至光線感測單元η所產生亮 201211510 度值的波形。 位於’在相同條件(光點區域所涵蓋亮度範圍中 XU,L2的冗度值)的4選下’ U的光點範圍為X11至 L2的光點範圍為χ21至χ22,u的光點範圍 Γο ^目鬥以及L4的光點範圍為X41至X42。因此即使物件 的情況下’若不同面積的光點可反射至光線 導致該光線感測單元11所偵測到光點範 =圍成像大小,即可確定所取得光點的影像是否為 而當得知所取得光點的成像尺寸小於一 15所儲存的預定光點尺寸時,該距離叶V垔二f 據所取得光_祕到爾14即可根 計算的光點影像的重心成像位置二 件30,光源2〇之間的距離。另外,根據d 可在得知所擷取光點影像非完整 亦 30盥兮杏馮9n +小λα 々像恰,停止計算該物件 暫停輪^距離資訊距離輸出單元16 使雜歡機砂料輯_流程無法取得正確距 所館成Λ尺寸小於光點記憶單元15 進行重心計算,並_“二影像的光點區域 右侧。洛哕#X軸上疋偏向左側或偏向 SUM在以上偏向左側時,而光點的成像 201211510 =、以及該預定元點尺寸 M個像素點即可取得該重心位 利用该修正過後的重心 Θ過後的重心位置。再 20之間的距離D。同理’當該物件30與該光源 右側時’則將該重心位置位置在W上偏向 正過後的重心位置。 左移動M個像素點即可取得修 WJi補償、修正方式只是舉例 不问補償方式對該起始的^者亦可利用 不加以贅述。 置進仃補償,因此在此即 限定本發明冬二::貫施例揭露如上,然其並非用以 都,因此本 可作些許之更動與潤 定者為準。 遵乾圍當視後附之申請專利範圍所界 【圖式簡單說明】 ^一圖為測距系統之一光學示意圖; 第,圖為測距系統之一感測裝置的架構圖; ,三圖為❹置擷取光線由物件表面反射取得之 尤點成像資訊之示意圖; 第四圖為物件在不同距離時所產生光點祕資訊之 不意圖;以及 第五圖為物件在相同距離時由不完整的反射光線所 產生光點成像資訊之示意圖。 10 201211510 【主要元件符號說明】 10 —感測裝置 11 —光線感測單元 12 —亮度控制單元 13 —影像處理單元 14 ---距離計算單元 15 —光點記憶單元 16 ---距離輸出單元 20 —光源 30 —物件 41 ---發光鏡片 42 —感測鏡片-The image location unit 14 can further process the spot in the image for processing. In an embodiment, the distance calculating unit 14 can take the information representative of the half-brightness position in the spot area of the diagnosis. The spot range, that is, the highest value of the brightness in the spot area minus the lowest value of the brightness (ie, τ〇), ^ halved the difference and then adds the lowest value of the brightness (ie το), such as It is possible to take a brightness value Π 'this brightness value Τ 1 means that the spot area = the brightness value in the middle of the covered brightness range. In the image, the range of the spot representing the waveform of the dot area in the brightness value Τ1 is the size of the light image, and the area of the waveform above the brightness value T1 is taken to be 'heart 0'. The imaging position of the light spot. The distance calculating unit 14 can calculate the distance between the focal point f of the sensing device 10 and the distance between the sensing device 10 and the light source "2 据 according to the position of the center of gravity The distance between the object 3 and the light source. 〃 卜, refer to the fourth picture, which is the image of the light spot generated by the object at different distances. Known by the same brightness condition (the brightness range covered by the area) In the case of the towel_brightness value T2, T3)#·the brightness value waveform of the image towel, it can be seen that the imaging size of the range of light spots generated by the object in different series is approximately equal. Since the surface of the object 30 may be non-completely planar, or There is a groove or a shallow groove that does not have a shadow. Therefore, the projection of the object may not be totally reflected to the light sensing unit u on the surface of the object 3〇201211510. The reflected light of a part of the spot may be different depending on the angle of reflection.当 When the light cannot be totally reflected to the light sensing unit ,, the image size of the light spot on the light detecting unit 11 will be smaller than the original size, and the image is usually biased to the two sides. When the imaging method of the light spot is calculated by the center of gravity method, the original gravity center position cannot be known because the imaging area of the light spot is biased to the two sides. a The sensing device 10 of the present invention first determines the image of the obtained light spot. Whether it is a complete image, or only a partial image of a spot is obtained. Since the image size of the spot projected by the fixed light source under the same condition is about the same, the image size can be stored in the spot unit. The 丨 distance calculating unit 14 compares the imaging size of the acquired light spot with a predetermined spot size stored by the light spot § recall unit 15 before calculating the distance, and determines the image of the acquired light spot. Whether it is a complete image. ' ' Refer to the fifth figure, which is an image in which the reflected light is not completely reflected to the light spot generated by the light sensing unit 11 when the object is at the same distance. L1. is the projected light. The light spot is 100% reflected to the waveform of the brightness value generated by the light sensing unit, and L2 is 80% of the light spot of the projected light (that is, the 20% area of the light spot is thermally reflected to the far light sensing unit 1 1 The waveform 'L3 reflected to the brightness value generated by the light sensing unit 1 1 is a waveform of the brightness value of the projected light ray 6 〇 % reflected to the light sensing unit ,, and L4 is the 40% reflection of the light ray of the projected light. The waveform of the brightness value generated by the light sensing unit 11 is [5 is a waveform of the projected light ray 20% reflected to the light sensing unit η generated by the 201211510 degree value. Located in the same condition (covered by the light spot area) In the brightness range, XU, the redundancy value of L2 is selected as 4, the spot range of U is X11 to L2, and the spot range is χ21 to χ22, the spot range of u is Γο ^The range of the target and the spot of L4 is X41 to X42. Therefore, even in the case of an object, if the light spot of different areas can be reflected to the light, the light sensing unit 11 detects the spot size and the surrounding image size, and it can be determined whether the image of the obtained light spot is Knowing that the image size of the obtained spot is less than a predetermined spot size stored in the 15th, the distance of the leaf V垔2 f is obtained according to the position of the center of gravity of the spot image calculated by the root 14 30, the distance between the light source 2〇. In addition, according to d, it can be known that the image of the captured spot is not complete, and 30 盥兮 冯 von 9n + small λα 々 恰, stop calculating the object pause wheel ^ distance information distance output unit 16 _ The process cannot obtain the correct distance from the library. The size of the library is smaller than the light point memory unit 15 for the center of gravity calculation, and _ "the right side of the spot area of the two images. The 哕## axis is on the left side or the SUM is on the left side. And the imaging of the spot 201211510 =, and the predetermined element size M pixels can obtain the position of the center of gravity of the center of gravity after the corrected center of gravity. The distance D between the two. Similarly, when When the object 30 and the right side of the light source, the position of the center of gravity is biased to the position of the center of gravity after W. The left movement of M pixels can be used to obtain the WJi compensation, and the correction method is only an example without the compensation method for the start. The person can also use it without further elaboration. In this case, the invention is limited to the second winter of the present invention: the above example is disclosed above, but it is not used for all, so this can be used to make some changes and refinements. Accurate The outline of the patent application scope attached to the circumstance is [simplified description of the drawing] ^ One diagram is an optical diagram of one of the ranging systems; the figure is the architecture diagram of one of the sensing devices of the ranging system; A schematic diagram of the imaging information obtained by reflecting the surface of the object by the reflection of the object; the fourth figure is the intention of the information generated by the object at different distances; and the fifth picture is the incompleteness of the object at the same distance Schematic diagram of light spot imaging information generated by reflected light. 10 201211510 [Main component symbol description] 10 - Sensing device 11 - Light sensing unit 12 - Brightness control unit 13 - Image processing unit 14 - Distance calculating unit 15 - Light Point memory unit 16 --- distance output unit 20 - light source 30 - object 41 --- illuminating lens 42 - sensing lens -