TW201623918A - Distance estimation system, method and computer readable media - Google Patents

Distance estimation system, method and computer readable media Download PDF

Info

Publication number
TW201623918A
TW201623918A TW103145263A TW103145263A TW201623918A TW 201623918 A TW201623918 A TW 201623918A TW 103145263 A TW103145263 A TW 103145263A TW 103145263 A TW103145263 A TW 103145263A TW 201623918 A TW201623918 A TW 201623918A
Authority
TW
Taiwan
Prior art keywords
target
distance
image
module
processing module
Prior art date
Application number
TW103145263A
Other languages
Chinese (zh)
Other versions
TWI516744B (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 TW103145263A priority Critical patent/TWI516744B/en
Application granted granted Critical
Publication of TWI516744B publication Critical patent/TWI516744B/en
Publication of TW201623918A publication Critical patent/TW201623918A/en

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Measurement Of Optical Distance (AREA)

Abstract

A computer readable media stores a estimation program which make a distance estimation system to run a distance estimation method. Based on an image, the distance estimation system generates a depth map corresponding to the image, a first position data corresponding a first chosen position and a second position data corresponding a second chosen position in the image. The first and second chosen position respectively corresponds to a first and a second object in the image. The distance estimation system calculates the distance between the first and second object to achieve a convenient and reliable distance estimation method further based on the first and second position data and the depth map.

Description

距離估算系統、距離估算方法及電腦可讀取媒體Distance estimation system, distance estimation method, and computer readable medium

本發明是有關於一種距離估算系統、距離估算方法及電腦可讀取媒體,特別是指一種根據一影像之深度圖的距離估算系統、距離估算方法及電腦可讀取媒體。 The invention relates to a distance estimation system, a distance estimation method and a computer readable medium, in particular to a distance estimation system, a distance estimation method and a computer readable medium according to a depth map of an image.

隨著半導體製程的日新月異,及生產技術的持續改良,行動設備(Mobile Device)如手機或平板電腦的性能變得日益強大,且其價格也變得讓一般消費者都能負擔,進而使得行動設備廣泛地被大眾所使用。然而,在習知具有攝影功能的單鏡頭行動設備中,往往都只能提供拍照及錄影的功能,但卻無法得知該影像中之任一物體的實際尺寸。所以,若遇到需要標示尺寸做為參考依據的物體,通常會在拍攝時在被測物體的附近放置一可作為長度參考依據的參考物體,例如尺或常用的硬幣等。然而,此種方法無法直接得到被測物體的實際尺寸,因此造成使用上的不便且不準確。 With the rapid changes in semiconductor manufacturing processes and continuous improvement in production technology, the performance of mobile devices such as mobile phones or tablets has become increasingly powerful, and the price has become affordable for the average consumer, which in turn has made mobile devices Widely used by the public. However, in the conventional single-lens mobile device with photography function, it is often only possible to provide the function of photographing and recording, but the actual size of any object in the image cannot be known. Therefore, if you encounter an object that needs to be labeled as a reference, a reference object that can be used as a reference for length, such as a ruler or a commonly used coin, is usually placed near the object to be measured at the time of shooting. However, this method cannot directly obtain the actual size of the object to be measured, and thus causes inconvenience and inaccuracy in use.

因此,本發明之目的,即在藉由所拍攝的影像 而可方便且準確地估算出該影像中相應之任一目標物的尺寸或任二個目標物之間的距離。 Therefore, the object of the present invention is to use the image taken It is convenient and accurate to estimate the size of any corresponding object in the image or the distance between any two objects.

於是,根據本發明之一觀點,提供一種距離估算方法,適用於一距離估算系統,該距離估算系統包含一用於擷取具有至少一第一標的與一第二標的之一影像的影像擷取模組、一輸入模組、一用於顯示該影像的顯示模組及一至少電連接該輸入模組與該顯示模組的處理模組。該距離估算方法包含以下步驟:(a)藉由該處理模組,根據該影像產生一對應該影像的深度圖;(b)藉由該輸入模組,產生分別對應於該顯示模組所顯示之該影像中之一第一選擇位置及一第二選擇位置的一第一位置資料及一第二位置資料,該第一選擇位置及該第二選擇位置分別對應於該影像中的該第一標的及該第二標的;及(c)藉由該處理模組,至少根據該第一位置資料、該第二位置資料及該深度圖,估算該第一標的及該第二標的之間的距離。 Thus, in accordance with one aspect of the present invention, a distance estimation method is provided for use in a distance estimation system, the distance estimation system including an image capture method for capturing an image having at least a first target and a second target a module, an input module, a display module for displaying the image, and a processing module for electrically connecting the input module and the display module. The distance estimation method includes the following steps: (a) generating, by the processing module, a depth map of a pair of images according to the image; and (b) generating, by the input module, corresponding to the display module a first selected location of the image and a first location data of a second selected location and a second location profile, the first selected location and the second selected location respectively corresponding to the first of the images And (c) estimating, by the processing module, a distance between the first target and the second target based on at least the first location data, the second location data, and the depth map .

於是,根據本發明之另一觀點,提供一種距離估算系統,該距離估算系統包含一用於擷取具有至少一第一標的與一第二標的之一影像的影像擷取模組、一輸入模組、一用於顯示該影像的顯示模組,及一處理模組。 Therefore, according to another aspect of the present invention, a distance estimating system is provided, the distance estimating system comprising an image capturing module for capturing an image having at least a first target and a second target, and an input mode a group, a display module for displaying the image, and a processing module.

該輸入模組用於產生分別對應於該顯示模組所顯示之該影像中之一第一選擇位置及一第二選擇位置的一 第一位置資料及一第二位置資料。該第一選擇位置及該第二選擇位置分別對應於該影像中的該第一標的及該第二標的。 The input module is configured to generate one of a first selected position and a second selected position respectively corresponding to the image displayed by the display module First location data and a second location profile. The first selected location and the second selected location respectively correspond to the first target and the second target in the image.

該處理模組至少電連接該輸入模組與該顯示模組,並可根據該影像產生一對應該影像的深度圖,再至少根據該第一位置資料、該第二位置資料及該深度圖,估算該第一標的及該第二標的之間的距離。 The processing module at least electrically connects the input module and the display module, and generates a pair of depth maps of the image according to the image, and at least according to the first location data, the second location data, and the depth map. Estimating the distance between the first target and the second target.

於是,根據本發明之再一觀點,提供一種電腦可讀取媒體,適用於一距離估算系統。該距離估算系統包含一用於擷取具有至少一第一標的與一第二標的之一影像的影像擷取模組、一輸入模組、一用於顯示該影像的顯示模組及一至少電連接該輸入模組與該顯示模組的處理模組。該電腦可讀取媒體用於儲存一估算程式,該估算程式包含多數個指令,當該等指令於該處理模組執行時,使得該處理模組執行下列步驟,包含:根據該影像獲取一對應該影像的深度圖;獲取透過該輸入模組產生分別對應於該顯示模組所顯示之該影像中之一第一選擇位置及一第二選擇位置的一第一位置資料及一第二位置資料,該第一選擇位置及該第二選擇位置分別對應於該影像中的該第一標的及該第二標的;及至少根據該第一位置資料、該第二位置資料及該深度圖,估算該第一標的及該第二標的之間的距離。 Thus, in accordance with still another aspect of the present invention, a computer readable medium is provided for use in a distance estimation system. The distance estimation system includes an image capture module for capturing an image having at least a first target and a second target, an input module, a display module for displaying the image, and an at least The input module and the processing module of the display module are connected. The computer readable medium is configured to store an estimation program. The estimation program includes a plurality of instructions. When the instructions are executed by the processing module, the processing module performs the following steps, including: acquiring a pair according to the image. a depth map of the image; a first location data and a second location data corresponding to one of the first selected location and the second selected location of the image displayed by the display module are generated by the input module The first selected location and the second selected location respectively correspond to the first target and the second target in the image; and the at least the first location data, the second location data, and the depth map are estimated The distance between the first target and the second target.

本發明之功效是藉由該處理模組至少根據該第 一位置資料、該第二位置資料及該深度圖,估算該第一標的及該第二標的之間的距離,以提供兼具便利性及可靠度的距離估算方法、距離估算系統及電腦可讀取媒體。 The effect of the present invention is that the processing module is based at least on the first a location data, the second location data, and the depth map, estimating a distance between the first target and the second target to provide a distance estimation method, a distance estimation system, and a computer readable method that are both convenient and reliable Take the media.

S1~S5‧‧‧步驟 S1~S5‧‧‧Steps

S41‧‧‧子步驟 S41‧‧‧ substeps

S41’‧‧‧子步驟 Sub-step S41’‧‧

S42‧‧‧子步驟 S42‧‧‧ substeps

S42’‧‧‧子步驟 Sub-step S42’‧‧

S421‧‧‧子步驟 Sub-step S421‧‧

S422‧‧‧子步驟 Sub-step S422‧‧

S422’‧‧‧子步驟 Sub-step S422’‧‧

S422”‧‧‧子步驟 S422”‧‧‧ substeps

11‧‧‧影像擷取模組 11‧‧‧Image capture module

12‧‧‧輸入模組 12‧‧‧ Input Module

13‧‧‧顯示模組 13‧‧‧Display module

14‧‧‧感測模組 14‧‧‧Sensor module

15‧‧‧處理模組 15‧‧‧Processing module

16‧‧‧電腦可讀取媒體 16‧‧‧Computer readable media

h1、h2‧‧‧距離 H1, h2‧‧‧ distance

h11‧‧‧距離 H11‧‧‧ distance

h21、h22‧‧‧距離 H21, h22‧‧‧ distance

h33‧‧‧距離 H33‧‧‧distance

L1~L3‧‧‧距離 L1~L3‧‧‧Distance

f‧‧‧鏡頭焦距 F‧‧‧ lens focal length

I‧‧‧影像感測器陣列 I‧‧‧Image Sensor Array

d1‧‧‧第一物距 D1‧‧‧first object distance

d2‧‧‧第二物距 D2‧‧‧Second object distance

A‧‧‧傾斜角度 A‧‧‧ tilt angle

B‧‧‧角度 B‧‧‧ angle

K‧‧‧角度 K‧‧‧ angle

K1、K2‧‧‧角度 K1, K2‧‧‧ angle

M‧‧‧焦點 M‧‧‧ focus

本發明之其他的特徵及功效,將於參照圖式的實施方式中清楚地呈現,其中:圖1是一方塊圖,說明本發明距離估算方法之一第一實施例及一第三實施例所適用之距離估算系統;圖2是一流程圖,說明本發明距離估算方法之該第一實施例;圖3是一示意圖,說明該第一實施例之一顯示模組所顯示的一影像;圖4是一示意圖,說明該第一實施例之計算方式;圖5是一方塊圖,說明本發明距離估算方法之一第二實施例所適用之距離估算系統;圖6是一流程圖,說明本發明之該第二實施例;圖7是一流程圖,說明本發明之該第三實施例;圖8是一示意圖,說明本發明之該第二實施例之計算方式;及圖9是一示意圖,說明本發明之該第三實施例之計算方式。 Other features and effects of the present invention will be apparent from the embodiments of the present invention. FIG. 1 is a block diagram illustrating a first embodiment and a third embodiment of the distance estimating method of the present invention. FIG. 2 is a flow chart illustrating the first embodiment of the distance estimating method of the present invention; FIG. 3 is a schematic diagram showing an image displayed by the display module of the first embodiment; 4 is a schematic diagram illustrating the calculation manner of the first embodiment; FIG. 5 is a block diagram illustrating a distance estimation system to which the second embodiment of the distance estimation method of the present invention is applied; FIG. 6 is a flowchart illustrating the present invention The second embodiment of the invention; FIG. 7 is a flow chart illustrating the third embodiment of the present invention; FIG. 8 is a schematic view showing the calculation mode of the second embodiment of the present invention; and FIG. The calculation method of the third embodiment of the present invention will be described.

在本發明被詳細描述之前,應當注意在以下的 說明內容中,類似的元件是以相同的編號來表示。 Before the present invention is described in detail, it should be noted in the following In the description, similar elements are denoted by the same reference numerals.

參閱圖1,其係本發明距離估算方法所適用之距離估算系統之第一實施例的方塊圖。該距離估算系統包含一影像擷取模組11、一輸入模組12、一顯示模組13、一感測模組14、一處理模組15及一電腦可讀取媒體16。該影像擷取模組11具有立體視覺(Stereopsis)功能,並包括一鏡頭及一影像感測器陣列,且用於擷取一影像,該影像包含至少一第一標的及一第二標的。該輸入模組12用於方便使用者進行輸入指示。該顯示模組13用於顯示該影像。該感測模組14用於偵測該影像感測器陣列相對於一垂直面(Vertical Plane)的傾斜角度,而該垂直面是一相對於一水平面(Horizontal Plane),例如:地面,垂直的一個平面。該電腦可讀取媒體16儲存一估算程式,該估算程式包含多數個指令,該等指令指使該處理模組15執行該距離估算方法而達成距離估算的目的。其中,該估算程式係可以是出廠時內建於該電腦可讀取媒體16或透過網路下載一具該估算程式的應用軟體(APP)於該電腦可讀取媒體16。 Referring to Figure 1, there is shown a block diagram of a first embodiment of a distance estimation system to which the distance estimation method of the present invention is applied. The distance estimation system includes an image capture module 11, an input module 12, a display module 13, a sensing module 14, a processing module 15, and a computer readable medium 16. The image capturing module 11 has a Stereopsis function, and includes a lens and an image sensor array, and is used for capturing an image, the image comprising at least a first target and a second target. The input module 12 is for facilitating an input indication by a user. The display module 13 is configured to display the image. The sensing module 14 is configured to detect an inclination angle of the image sensor array relative to a vertical plane, and the vertical plane is opposite to a horizontal plane, for example, ground, vertical a plane. The computer readable medium 16 stores an estimation program that includes a plurality of instructions that cause the processing module 15 to perform the distance estimation method to achieve distance estimation. The estimation program may be an application software (APP) built in the computer readable medium 16 or downloaded through the network to download the media 16 from the computer.

在本實施例中,該距離估算系統可以是一行動裝置(Mobile Device),如智慧型手機、數位相機或平板電腦。該處理模組15電連接該影像擷取模組11、該輸入模組12、該顯示模組13、該感測模組14及該電腦可讀取媒體16。該影像擷取模組11是該行動裝置的相機模組,用以擷取影像。該輸入模組12是該行動裝置的觸控介面。該顯示模組13是該行動裝置的螢幕,用以顯示該影像。該感測模組14 例如是該行動裝置內建的陀螺儀(Gyro),或其他可以藉由偵測三軸(x,y,z)位置以獲得傾斜角度的類似元件。值得注意的是,在其他實施例中,該感測模組14亦可以省略,或者該傾斜角度可以用演算方式估算出。該處理模組15是該行動裝置的處理器。該電腦可讀取媒體16是該行動裝置的儲存單元。 In this embodiment, the distance estimation system may be a mobile device such as a smart phone, a digital camera or a tablet. The processing module 15 is electrically connected to the image capturing module 11 , the input module 12 , the display module 13 , the sensing module 14 , and the computer readable medium 16 . The image capturing module 11 is a camera module of the mobile device for capturing images. The input module 12 is a touch interface of the mobile device. The display module 13 is a screen of the mobile device for displaying the image. The sensing module 14 For example, the Gyro built into the mobile device, or other similar components that can be used to detect the three-axis (x, y, z) position to obtain the tilt angle. It should be noted that in other embodiments, the sensing module 14 can also be omitted, or the tilt angle can be estimated by calculation. The processing module 15 is a processor of the mobile device. The computer readable medium 16 is a storage unit of the mobile device.

在其他實施例中,該距離估算系統也可以是一行動裝置及一電腦、或是一電腦及一具有攝像功能的裝置,如監控裝置、行車紀錄器、倒車攝像裝置。該處理模組15電連接該輸入模組12、該顯示模組13及該電腦可讀取媒體16。該影像擷取模組11例如是該行動裝置的相機模組。該輸入模組12是該電腦的滑鼠或鍵盤。該顯示模組13是該電腦的顯示器。該感測模組14例如是該行動裝置的陀螺儀,或其他可以偵測傾斜角度的類似元件。值得注意的是,在其他實施例中,該感測模組14亦可以省略,或者該傾斜角度可以用演算方式估算出。該處理模組15是該電腦的處理器,該電腦可讀取媒體16是該電腦的儲存單元,例如:RAM、EEPROM、CD-ROM、硬碟…等。 In other embodiments, the distance estimation system can also be a mobile device and a computer, or a computer and a camera-enabled device, such as a monitoring device, a driving recorder, and a reverse camera device. The processing module 15 is electrically connected to the input module 12, the display module 13, and the computer readable medium 16. The image capturing module 11 is, for example, a camera module of the mobile device. The input module 12 is a mouse or keyboard of the computer. The display module 13 is a display of the computer. The sensing module 14 is, for example, a gyroscope of the mobile device, or other similar component that can detect the tilt angle. It should be noted that in other embodiments, the sensing module 14 can also be omitted, or the tilt angle can be estimated by calculation. The processing module 15 is a processor of the computer, and the computer readable medium 16 is a storage unit of the computer, such as RAM, EEPROM, CD-ROM, hard disk, and the like.

參閱圖1與圖2,圖2是一流程圖,說明該距離估算系統如何執行本發明距離估算方法之第一實施例。特別值得一提的是,本發明之距離估算方法之每一實施例中的步驟並無順序先後的限制。 Referring to Figures 1 and 2, Figure 2 is a flow chart illustrating how the distance estimation system performs the first embodiment of the distance estimation method of the present invention. It is particularly worth mentioning that the steps in each embodiment of the distance estimation method of the present invention are not sequentially limited.

於步驟S1,該處理模組15根據該影像產生一對應該影像的深度圖(Depth Map)。該深度圖包含該影像中 之每一標的相對於自目標物每一點到該鏡頭之間的相對距離。 In step S1, the processing module 15 generates a depth map (Depth Map) of a pair of images according to the image. The depth map is included in the image The relative distance of each target relative to each point from the target to the lens.

於步驟S2,該輸入模組12產生分別對應於該顯示模組13所顯示之該影像中之一第一選擇位置及一第二選擇位置的一第一位置資料及一第二位置資料。該第一選擇位置及該第二選擇位置分別對應於該影像中的該第一標的及該第二標的。其中,該第一位置資料的定義就是該資料具有對應於該影像中之一第一選擇位置,且對應影像中的該第一標的的位置資料。也就是說該資料包含影像中所選到的位置及該對應的標的,此即座標。同理,該第二位置資料的定義依此類推。 In step S2, the input module 12 generates a first location data and a second location profile corresponding to one of the first selected location and the second selected location of the image displayed by the display module 13. The first selected location and the second selected location respectively correspond to the first target and the second target in the image. The definition of the first location data is that the data has a location information corresponding to one of the first selected locations in the image and corresponding to the first target in the image. That is to say, the data includes the selected location in the image and the corresponding target, which is the coordinate. Similarly, the definition of the second location data is analogous.

於步驟S3,該顯示模組13在該影像中之該第一選擇位置及該第二選擇位置分別顯示一第一標記及一第二標記。再參閱圖3,圖3是該顯示模組13顯示該影像的一個例子,在本實施例中,該輸入模組12與該顯示模組13結合為一觸控螢幕,讓一使用者可藉由手指先點選該影像中的一第一選擇位置,如下方虛線圓圈D1的中心處,該虛線圓圈D1即為該第一標記。該第一選擇位置對應該影像中的該第一標的,如一櫃子的右下角。該使用者再藉由手指點選該影像中的一第二選擇位置,如上方虛線圓圈D2的中心處,該虛線圓圈D2即為該第二標記。該第二選擇位置對應該影像中的該第二標的,如該櫃子的右上角。 In step S3, the display module 13 displays a first mark and a second mark respectively in the first selected position and the second selected position in the image. Referring to FIG. 3, FIG. 3 is an example of the display module 13 displaying the image. In the embodiment, the input module 12 and the display module 13 are combined into a touch screen, so that a user can borrow A first selected position in the image is first selected by the finger, such as the center of the dotted circle D1, and the dotted circle D1 is the first mark. The first selected position corresponds to the first target in the image, such as the lower right corner of a cabinet. The user then clicks a finger to select a second selected position in the image, such as the center of the upper dotted circle D2, and the dotted circle D2 is the second mark. The second selected position corresponds to the second target in the image, such as the upper right corner of the cabinet.

參閱圖1與圖2,於步驟S4,該處理模組15至少根據該第一位置資料、該第二位置資料及該深度圖,估 算該第一標的及該第二標的之間的距離。步驟S4包括子步驟S41及子步驟S42。 Referring to FIG. 1 and FIG. 2, in step S4, the processing module 15 estimates at least the first location data, the second location data, and the depth map. Calculate the distance between the first target and the second target. Step S4 includes sub-step S41 and sub-step S42.

於子步驟S41,該處理模組15根據該第一位置資料及該深度圖,還根據該影像擷取模組11擷取該影像時的一鏡頭焦距及該影像感測器陣列的畫素尺寸,估算該第一標的與該鏡頭之間的一第一物距。 In the sub-step S41, the processing module 15 further selects a lens focal length and a pixel size of the image sensor array according to the first position data and the depth map according to the image capturing module 11 Estimating a first object distance between the first target and the lens.

於子步驟S42,該處理模組15至少根據該第一物距、該第一位置資料、該第二位置資料及該鏡頭焦距,估算該第一標的及該第二標的之間的距離。子步驟S42包含子步驟S421及子步驟S422。 In sub-step S42, the processing module 15 estimates the distance between the first target and the second target based at least on the first object distance, the first position data, the second position data, and the focal length of the lens. Sub-step S42 includes sub-step S421 and sub-step S422.

於子步驟S421,該處理模組15分別根據該第一位置資料及該第二位置資料獲得在該影像感測器陣列上且分別對應該第一選擇位置及該第二選擇位置的一第一位置及一第二位置。 In sub-step S421, the processing module 15 obtains, according to the first location data and the second location data, a first on the image sensor array and respectively corresponding to the first selected location and the second selected location. Location and a second location.

於子步驟S422,該處理模組15根據該第一物距、該第一位置與該第二位置之間的距離、該鏡頭焦距及該傾斜角度,估算該第一標的與該第二標的之間的距離。 In sub-step S422, the processing module 15 estimates the first target and the second target according to the first object distance, the distance between the first position and the second position, the focal length of the lens, and the tilt angle. The distance between them.

再參閱圖1與圖4,圖4是一利用透視投影(Perspective Projection)或針孔(Pinhole)成像原理的示意圖,說明該第一實施例之該影像擷取模組11在對一目標物擷取該影像時,該第一標的、該第二標的、一焦點(投影中心點)M、鏡頭焦距、該傾斜角度、與成像在該影像感測器陣列I上的該影像之間的關係,及該處理模組15的計算方式。定義h1為該第一標的與該第二標的之間的距離,如圖 3的例子所述的該櫃子的右下角及右上角之間的距離。定義f為該影像擷取模組11擷取該影像時的該鏡頭焦距。定義d1為該第一物距。定義在該影像擷取模組11擷取該影像時,該影像感測器陣列I相對於該垂直面的該傾斜角度為A。定義h11為該第一位置與該第二位置之間的距離。利用近似三角形的比例關係可以得到公式(1),且依三角函數原理整理公式(1)可得公式(2),再由公式(2)計算出該第一標的與該第二標的之間的距離h1。 Referring to FIG. 1 and FIG. 4, FIG. 4 is a schematic diagram of a principle of using a perspective projection (Plecthole Projection) or a pinhole imaging method, illustrating that the image capturing module 11 of the first embodiment is in a target object. Taking the image, the relationship between the first target, the second target, a focus (projection center point) M, the lens focal length, the tilt angle, and the image imaged on the image sensor array I, And the calculation method of the processing module 15. Defining h1 as the distance between the first target and the second target, as shown in the figure The distance between the lower right corner and the upper right corner of the cabinet as described in the example of 3. The definition f is the focal length of the lens when the image capturing module 11 captures the image. The definition d1 is the first object distance. It is defined that when the image capturing module 11 captures the image, the tilt angle of the image sensor array I with respect to the vertical plane is A. The definition h11 is the distance between the first location and the second location. Equation (1) can be obtained by using the proportional relationship of approximate triangles, and formula (2) can be obtained according to the principle of trigonometric function, and then formula (2) is used to calculate the relationship between the first target and the second target. Distance h1.

特別值得一提的是,圖3所示例的該第一標的及該第二標的剛好分別是同一個櫃子的右下角及右上角,因此,該第一標的及該第二標的之間的距離恰好就是該櫃子的高度。在其他的實施例中,該第一標的及該第二標的也可以是分屬於不同物體,以估算該第一標的及該第二標的之間的距離。在該第一實施例中,由於有將傾斜角度等納入考量,所以所估算出的該第一標的與該第二標的之間的距離較為精確。 It is particularly worth mentioning that the first target and the second target in the example shown in FIG. 3 are respectively the lower right corner and the upper right corner of the same cabinet, so the distance between the first target and the second target is just right. It is the height of the cabinet. In other embodiments, the first target and the second target may also belong to different objects to estimate the distance between the first target and the second target. In the first embodiment, since the inclination angle or the like is taken into consideration, the estimated distance between the first target and the second target is relatively accurate.

參閱圖1與圖2,於步驟S5,該顯示模組13將估算出的該第一標的及該第二標的之間的距離顯示於其上,例如位於該第一選擇位置及該第二選擇位置之間。如圖3所示的例子,在二個虛線圓圈之間顯示該距離,如D:1M。 Referring to FIG. 1 and FIG. 2, in step S5, the display module 13 displays the estimated distance between the first target and the second target, for example, at the first selected position and the second selection. Between locations. As in the example shown in Figure 3, the distance is displayed between two dashed circles, such as D: 1M.

參閱圖5與圖6,本發明距離估算方法之第二 實施例,其所適用的該距離估算系統與該第一實施例稍有不同。如圖5所示,該距離估算系統不包含圖1的感測模組14。而距離估算方法之第二實施例大致上是與該第一實施例相同,不同的地方在於:該距離估算方法的子步驟S41’、子步驟S42’及子步驟S422’。 Referring to FIG. 5 and FIG. 6, the second method of distance estimation according to the present invention The embodiment, the distance estimation system to which it applies is slightly different from the first embodiment. As shown in FIG. 5, the distance estimation system does not include the sensing module 14 of FIG. The second embodiment of the distance estimating method is substantially the same as the first embodiment, and differs in sub-step S41', sub-step S42' and sub-step S422' of the distance estimating method.

於子步驟S41’,該處理模組15根據該第一位置資料、該第二位置資料及該深度圖,還根據該影像擷取模組11擷取該影像時的一鏡頭焦距及該影像感測器陣列的畫素尺寸,估算該第一標的及該第二標的分別與該鏡頭之間的一第一物距及一第二物距。 In the sub-step S41 ′, the processing module 15 further determines a lens focal length and the image sense when the image capturing module 11 captures the image according to the first location data, the second location data, and the depth map. The pixel size of the detector array is used to estimate a first object distance and a second object distance between the first target and the second target respectively.

於子步驟S42’,該處理模組15根據該第一物距、該第二物距、該第一位置資料、該第二位置資料及該鏡頭焦距,估算該第一標的及該第二標的之間的距離。 In the sub-step S42 ′, the processing module 15 estimates the first target and the second target according to the first object distance, the second object distance, the first position data, the second position data, and the focal length of the lens. the distance between.

於子步驟S42’的子步驟S422’,該處理模組15根據該第一物距、該第二物距、該第一位置與該第二位置之間的距離及該鏡頭焦距,估算該第一標的與該第二標的之間的距離。再參閱圖8,圖8是一類似圖4的示意圖,說明該第二實施例之該第一標的、該第二標的、該焦點(投影中心點)M、鏡頭焦距、與成像在該影像感測器陣列I上的該影像之間的關係,及該處理模組15的計算方式。定義h2為該第一標的與該第二標的之間的距離,如圖3的例子所述的該櫃子的右下角及右上角之間的距離。定義f為該影像擷取模組11擷取該影像時的該鏡頭焦距。定義d1及d2分別為該第一物距及該第二物距。定義h33為該第一位 置與該第二位置在該影像感測器陣列I上之間的距離。利用公式(3)及(4)計算出該第一標的與該第二標的之間的距離h2。特別值得一提的是,雖然該第二實施例所適用的該距離估算系統不需要該感測模組14,但該第二實施例的所估算的距離h2為一近似值。更具體的說,當該影像擷取模組11擷取該影像,且當該影像感測器陣列I相對於該垂直面的該傾斜角度較小時,例如小於20度,則該距離h2的該近似值與該第一標的與該第二標的之間的真正距離的誤差較小。 In sub-step S422 ′ of sub-step S42 ′, the processing module 15 estimates the first object distance, the second object distance, the distance between the first position and the second position, and the focal length of the lens. The distance between a target and the second target. Referring to FIG. 8, FIG. 8 is a schematic view similar to FIG. 4, illustrating the first target, the second target, the focus (projection center point) M, the focal length of the lens, and the image in the second embodiment. The relationship between the images on the detector array I and the calculation mode of the processing module 15. The definition h2 is the distance between the first target and the second target, as shown in the example of FIG. 3, the distance between the lower right corner and the upper right corner of the cabinet. The definition f is the focal length of the lens when the image capturing module 11 captures the image. Definitions d1 and d2 are the first object distance and the second object distance, respectively. Define h33 as the first place The distance between the second position and the image sensor array I is set. The distance h2 between the first target and the second target is calculated using equations (3) and (4). It is particularly worth mentioning that although the distance estimation system to which the second embodiment is applied does not require the sensing module 14, the estimated distance h2 of the second embodiment is an approximation. More specifically, when the image capturing module 11 captures the image, and when the tilt angle of the image sensor array I relative to the vertical plane is small, for example, less than 20 degrees, the distance h2 The error between the approximation and the true distance between the first target and the second target is small.

h2=d12+d22-2.d1.d2.cos(K)…(3) h 2= d 1 2 + d 2 2 -2. d 1. d 2. Cos( K )...(3)

參閱圖1與圖7,本發明距離估算方法之第三實施例所適用的距離估算系統與該第一實施例相同,而該距離估算方法與該第一實施例不同的地方在於:該距離估算方法的子步驟S41’、子步驟S42’及其子步驟S422”,且在該影像擷取模組11擷取該影像時,該影像感測器陣列I相對於一垂直面所具有的該傾斜角度為零(因為已先行調校過tilt或rotation)。換句話說,在該影像擷取模組11擷取該影像時,該顯示模組13可更進一步顯示一參考水平線(可設定為通過該影像感測器陣列I之中心點的水平線),以利使用者先行對齊校正,用於消除該傾斜角度的因素。當該使用者對齊校正時,則該影像感測器陣列I相對於該垂直面所具有的該傾斜角度則為零。值得注意的是,該顯示模組13不限制一定要顯示出一參考水平線,在其他實施態樣 中,亦可以用其他方式(例如:燈號)指示使用者是否已完成校正。 Referring to FIG. 1 and FIG. 7, the distance estimation system to which the third embodiment of the distance estimation method of the present invention is applied is the same as the first embodiment, and the distance estimation method is different from the first embodiment in that the distance estimation is: Sub-step S41 ′, sub-step S42 ′ and sub-step S422 ′′ of the method, and the image sensor array I has the tilt with respect to a vertical surface when the image capturing module 11 captures the image The angle is zero (because the tilt or rotation has been adjusted first). In other words, when the image capturing module 11 captures the image, the display module 13 can further display a reference horizontal line (can be set to pass a horizontal line of the center point of the image sensor array I for the user to perform alignment correction for eliminating the tilt angle factor. When the user aligns the correction, the image sensor array I is relative to the The angle of inclination of the vertical plane is zero. It is worth noting that the display module 13 does not limit the display of a reference horizontal line, in other embodiments. In other ways, it is also possible to indicate to the user whether the correction has been completed by other means (for example, a light number).

於子步驟S41’,該處理模組15根據該第一位置資料、該第二位置資料及該深度圖,還根據該影像擷取模組11擷取該影像時的一鏡頭焦距及該影像感測器陣列的畫素尺寸,估算該第一標的及該第二標的分別與該鏡頭之間的一第一物距及一第二物距。 In the sub-step S41 ′, the processing module 15 further determines a lens focal length and the image sense when the image capturing module 11 captures the image according to the first location data, the second location data, and the depth map. The pixel size of the detector array is used to estimate a first object distance and a second object distance between the first target and the second target respectively.

於子步驟S42’,該處理模組15根據該第一物距、該第二物距、該第一位置資料、該第二位置資料及該鏡頭焦距,估算該第一標的及該第二標的之間的距離。 In the sub-step S42 ′, the processing module 15 estimates the first target and the second target according to the first object distance, the second object distance, the first position data, the second position data, and the focal length of the lens. the distance between.

於子步驟S42’的子步驟S422”,該處理模組15根據該第一物距、該第二物距、該第一位置與該影像感測器陣列I之中心點的距離、該第二位置與該影像感測器陣列I之中心點之間的距離及該鏡頭焦距,估算該第一標的與該第二標的之間的距離。再參閱圖9,圖9是一類似圖4的示意圖,說明該第三實施例之該第一標的、該第二標的、該焦點(投影中心點)M、鏡頭焦距、與成像在該影像感測器陣列I上的該影像之間的關係,及該處理模組15的計算方式。在該影像擷取模組11擷取該影像時,先讓該影像感測器陣列相對於該垂直面所具有的該傾斜角度為零,即圖9中的B為90度。定義f為該影像擷取模組11擷取該影像時的該鏡頭焦距。定義d1及d2分別為該第一物距及該第二物距。定義h21為當透過該參考水平線讓該影像感測器陣列I與水平面(如:地面)垂直時,該第一位置與該影 像感測器陣列I之中心點的距離。定義h22為當透過該參考水平線讓該影像感測器陣列I與水平面(如:地面)垂直時,該第二位置與該影像感測器陣列I之中心點的距離。利用公式(5)~(7)計算出該第一標的與該第二標的之間的距離h2。 In sub-step S422 of sub-step S42 ′, the processing module 15 is based on the first object distance, the second object distance, the distance between the first position and the center point of the image sensor array I, and the second The distance between the position and the center point of the image sensor array I and the focal length of the lens are used to estimate the distance between the first target and the second target. Referring again to FIG. 9, FIG. 9 is a schematic view similar to FIG. Describe the relationship between the first target, the second target, the focus (projection center point) M, the lens focal length, and the image imaged on the image sensor array I of the third embodiment, and The calculation mode of the processing module 15 is: when the image capturing module 11 captures the image, first letting the image sensor array have a tilt angle with respect to the vertical plane, that is, the image in FIG. B is 90 degrees. The definition f is the focal length of the lens when the image capturing module 11 captures the image. The definitions d1 and d2 are the first object distance and the second object distance respectively. The definition h21 is when the reference is transmitted. The horizontal position causes the image sensor array I to be perpendicular to the horizontal plane (eg, the ground), the first position and the shadow The distance from the center point of the sensor array I. The definition h22 is the distance between the second position and the center point of the image sensor array I when the image sensor array I is perpendicular to the horizontal plane (eg, the ground) through the reference horizontal line. The distance h2 between the first target and the second target is calculated using equations (5) to (7).

h2=d1.sin(K1)-d2.sin(K2)…(5) h 2= d 1. Sin( K 1)- d 2. Sin( K 2)...(5)

綜上所述,透過在拍攝影像的同時紀錄目標物與影像擷取模組之間的相對距離(深度圖),甚至獲取影像擷取模組的三軸旋轉角度(獲取一傾斜角度),再藉由該處理模組15至少根據該第一位置資料、該第二位置資料、該鏡頭參數(focal length、pixel size)及該深度圖等,估算出該影像中之任一目標物的尺寸或任二個目標物之間的直線距離,以提供兼具便利性及可靠度的距離估算方法,且使拍攝的影像不再是單純的2D影像,還能提供3D的資訊。 In summary, by recording the relative distance (depth map) between the target and the image capturing module while capturing the image, or even obtaining the three-axis rotation angle of the image capturing module (acquiring a tilt angle), The processing module 15 estimates the size of any object in the image or at least according to the first location data, the second location data, the focal length, the pixel size, and the depth map. The linear distance between any two objects to provide a convenient and reliable distance estimation method, and the captured image is no longer a simple 2D image, but also provides 3D information.

惟以上所述者,僅為本發明之較佳實施例而已,當不能以此限定本發明實施之範圍,即大凡依本發明申請專利範圍及專利說明書內容所作之簡單的等效變化與修飾,皆仍屬本發明專利涵蓋之範圍內。 The above is only the preferred embodiment of the present invention, and the scope of the present invention is not limited thereto, that is, the simple equivalent changes and modifications made by the patent application scope and patent specification content of the present invention, All remain within the scope of the invention patent.

S1~S5‧‧‧步驟 S1~S5‧‧‧Steps

S41~S42‧‧‧子步驟 S41~S42‧‧‧ substeps

S421~S422‧‧‧子步驟 Sub-step S421~S422‧‧

Claims (21)

一種距離估算方法,適用於一距離估算系統,該距離估算系統包含一用於擷取具有至少一第一標的與一第二標的之一影像的影像擷取模組、一輸入模組、一用於顯示該影像的顯示模組及一至少電連接該輸入模組與該顯示模組的處理模組,該距離估算方法包含以下步驟:(a)藉由該處理模組,根據該影像產生一對應該影像的深度圖;(b)藉由該輸入模組,產生分別對應於該顯示模組所顯示之該影像中之一第一選擇位置及一第二選擇位置的一第一位置資料及一第二位置資料,該第一選擇位置及該第二選擇位置分別對應於該影像中的該第一標的及該第二標的;及(c)藉由該處理模組,至少根據該第一位置資料、該第二位置資料及該深度圖,估算該第一標的及該第二標的之間的距離。 A distance estimation method is applicable to a distance estimation system, and the distance estimation system includes an image capturing module, an input module, and a method for capturing an image having at least a first target and a second target. For the display module for displaying the image and a processing module for electrically connecting the input module and the display module, the distance estimation method comprises the following steps: (a) generating, by the processing module, a image according to the image Corresponding to the depth map of the image; (b) generating, by the input module, a first location data corresponding to one of the first selected location and the second selected location of the image displayed by the display module a second location data, the first selection location and the second selection location respectively corresponding to the first target and the second target in the image; and (c) by the processing module, at least according to the first The location data, the second location data, and the depth map estimate a distance between the first target and the second target. 如請求項1所述的距離估算方法,該影像擷取模組包括一鏡頭及一影像感測器陣列,其中,步驟(c)包括以下子步驟:(c-1)藉由該處理模組,根據該第一位置資料及該深度圖,並還根據該影像擷取模組擷取該影像時的一鏡頭焦距及該影像感測器陣列的畫素尺寸,估算該第一標的與該鏡頭之間的一第一物距;及 (c-2)藉由該處理模組,至少根據該第一物距、該第一位置資料、該第二位置資料及該鏡頭焦距,估算該第一標的及該第二標的之間的距離。 The method of claim 1, wherein the image capturing module comprises a lens and an image sensor array, wherein the step (c) comprises the following substeps: (c-1) by the processing module And estimating the first target and the lens according to the first position data and the depth map, and according to a lens focal length and a pixel size of the image sensor array when the image capturing module captures the image a first object distance between; and (c-2) estimating, by the processing module, a distance between the first target and the second target based at least on the first object distance, the first position data, the second position data, and the focal length of the lens . 如請求項2所述的距離估算方法,在該影像擷取模組擷取該影像時,該影像感測器陣列相對於一垂直面具有一傾斜角度(A),其中,子步驟(c-2)包含以下子步驟:(c-21)藉由該處理模組,分別根據該第一位置資料及該第二位置資料獲得在該影像感測器陣列上且分別對應該第一選擇位置及該第二選擇位置的一第一位置及一第二位置;及(c-22)藉由該處理模組,根據該第一物距(d1)、該第一位置與該第二位置之間的距離(h11)、該鏡頭焦距(f)、及該傾斜角度(A),利用下列公式 估算該第一標的與該第二標的之間的距離(h1)。 The method for estimating distance according to claim 2, wherein when the image capturing module captures the image, the image sensor array has an oblique angle (A) with respect to a vertical mask, wherein the sub-step (c- 2) comprising the following sub-steps: (c-21) obtaining, by the processing module, the first location information and the second location data respectively on the image sensor array and respectively corresponding to the first selected location and a first position and a second position of the second selected position; and (c-22) by the processing module, according to the first object distance (d1), between the first position and the second position The distance (h11), the focal length of the lens (f), and the angle of inclination (A), using the following formula The distance (h1) between the first target and the second target is estimated. 如請求項1所述的距離估算方法,該影像擷取模組包括一鏡頭及一影像感測器陣列,其中,步驟(c)包括以下子步驟:(c-1)藉由該處理模組,根據該第一位置資料、該第二位置資料及該深度圖,並還根據該影像擷取模組擷取該影像時的一鏡頭焦距及該影像感測器陣列的畫素尺寸,估算該第一標的及該第二標的分別與該鏡頭之間的一第一物距及一第二物距;及(c-2)藉由該處理模組,根據該第一物距、該第二 物距、該第一位置資料、該第二位置資料及該鏡頭焦距,估算該第一標的及該第二標的之間的距離。 The method of claim 1, wherein the image capturing module comprises a lens and an image sensor array, wherein the step (c) comprises the following substeps: (c-1) by the processing module According to the first location data, the second location data, and the depth map, and estimating the lens focal length and the pixel size of the image sensor array according to the image capturing module, a first object distance and a second object distance between the first target and the second target respectively; and (c-2), by the processing module, according to the first object distance, the second The object distance, the first position data, the second position data, and the focal length of the lens are used to estimate a distance between the first target and the second target. 如請求項4所述的距離估算方法,其中,子步驟(c-2)包含以下子步驟:(c-21)藉由該處理模組,分別根據該第一位置資料及該第二位置資料獲得在該影像感測器陣列上且分別對應該第一選擇位置及該第二選擇位置的一第一位置及一第二位置;及(c-22)藉由該處理模組,根據該第一物距(d1)、該第二物距(d2)、該第一位置與該第二位置之間的距離(h33)、及該鏡頭焦距(f),利用下列公式h2=d12+d22-2.d1.d2.cos(K) 估算該第一標的與該第二標的之間的距離(h2)。 The distance estimation method according to claim 4, wherein the sub-step (c-2) comprises the following sub-steps: (c-21) by the processing module, respectively, according to the first location data and the second location data Obtaining a first position and a second position on the image sensor array and respectively corresponding to the first selected position and the second selected position; and (c-22) by the processing module, according to the first An object distance (d1), the second object distance (d2), a distance between the first position and the second position (h33), and a focal length (f) of the lens, using the following formula h 2 = d 1 2 + d 2 2 -2. d 1. d 2. Cos( K ) The distance (h2) between the first target and the second target is estimated. 如請求項4所述的距離估算方法,在該影像擷取模組擷取該影像時,該影像感測器陣列相對於一垂直面具有一傾斜角度且讓該傾斜角度為零,其中,子步驟(c-2)包含以下子步驟:(c-21)藉由該處理模組,分別根據該第一位置資料及該第二位置資料獲得在該影像感測器陣列上且分別對應該第一選擇位置及該第二選擇位置的一第一位置及一第二位置;及(c-22)藉由該處理模組,根據該第一物距(d1)、該第二物距(d2)、該第一位置與該影像感測器陣列之中心 點的距離(h21)、該第二位置與該影像感測器陣列之中心點的距離(h22)及該鏡頭焦距(f),利用下列公式h2=d1.sin(K1)-d2.sin(K2) 估算該第一標的與該第二標的之間的距離(h2)。 The distance estimation method of claim 4, when the image capturing module captures the image, the image sensor array has an oblique angle with respect to a vertical mask and the tilt angle is zero, wherein The step (c-2) includes the following sub-steps: (c-21) obtaining, by the processing module, the first position data and the second position data respectively on the image sensor array a first position and a second position of the selected position and the second selected position; and (c-22), by the processing module, according to the first object distance (d1), the second object distance (d2) The distance between the first position and the center point of the image sensor array (h21), the distance between the second position and the center point of the image sensor array (h22), and the focal length (f) of the lens are utilized. The following formula h 2 = d 1. Sin( K 1)- d 2. Sin( K 2) The distance (h2) between the first target and the second target is estimated. 如請求項1所述的距離估算方法,還包含步驟(d)及步驟(e):(d)藉由該顯示模組,在該影像中之該第一選擇位置及該第二選擇位置分別顯示一第一標記及一第二標記;及(e)藉由該顯示模組,將估算出的該第一標的及該第二標的之間的距離顯示於該第一選擇位置及該第二選擇位置之間。 The distance estimation method of claim 1, further comprising the step (d) and the step (e): (d) by the display module, the first selected position and the second selected position in the image respectively Displaying a first mark and a second mark; and (e) displaying, by the display module, a distance between the estimated first target and the second target at the first selected position and the second Choose between locations. 一種距離估算系統,包含:一影像擷取模組,用於擷取具有至少一第一標的與一第二標的之一影像;一顯示模組,用於顯示該影像;一輸入模組,用於產生分別對應於該顯示模組所顯示之該影像中之一第一選擇位置及一第二選擇位置的一第一位置資料及一第二位置資料,該第一選擇位置及該第二選擇位置分別對應於該影像中的該第一標的及該第二標的;及一處理模組,至少電連接該輸入模組與該顯示模 組,並可根據該影像產生一對應該影像的深度圖,再至少根據該第一位置資料、該第二位置資料及該深度圖,估算該第一標的及該第二標的之間的距離。 A distance estimation system includes: an image capture module for capturing an image having at least a first target and a second target; a display module for displaying the image; and an input module for And generating a first location data and a second location profile respectively corresponding to one of the first selected location and the second selected location of the image displayed by the display module, the first selected location and the second selected Positions respectively corresponding to the first target and the second target in the image; and a processing module electrically connecting at least the input module and the display module And generating a pair of depth maps corresponding to the image according to the image, and estimating a distance between the first target and the second target based at least on the first location data, the second location data, and the depth map. 如請求項8所述的距離估算系統,其中,該影像擷取模組包括一鏡頭及一影像感測器陣列,該處理模組根據該第一位置資料及該深度圖,並還根據該影像擷取模組擷取該影像時的一鏡頭焦距及該影像感測器陣列的畫素尺寸,估算該第一標的與該鏡頭之間的一第一物距,該處理模組再至少根據該第一物距、該第一位置資料、該第二位置資料及該鏡頭焦距,估算該第一標的及該第二標的之間的距離。 The distance estimation system of claim 8, wherein the image capturing module comprises a lens and an image sensor array, and the processing module is based on the first position data and the depth map, and is further based on the image The capture module captures a lens focal length of the image and a pixel size of the image sensor array, and estimates a first object distance between the first target and the lens, and the processing module further depends on the The first object distance, the first position data, the second position data, and the focal length of the lens are used to estimate a distance between the first target and the second target. 如請求項9所述的距離估算系統,還包含一電連接該處理模組的感測模組,以感測該影像感測器陣列相對於一垂直面的一傾斜角度,其中,該影像感測器陣列在該影像擷取模組擷取該影像時,相對於該垂直面具有該傾斜角度(A),該處理模組分別根據該第一位置資料及該第二位置資料獲得在該影像感測器陣列上且分別對應該第一選擇位置及該第二選擇位置的一第一位置及一第二位置,該處理模組再根據該第一物距(d1)、該第一位置與該第二位置之間的距離(h11)、該鏡頭焦距(f)、及該傾斜角度(A),利用下列公式 估算該第一標的與該第二標的之間的距離(h1)。 The distance estimation system of claim 9, further comprising a sensing module electrically connected to the processing module to sense an oblique angle of the image sensor array relative to a vertical plane, wherein the image sense When the image capturing module captures the image, the detector array has the tilt angle (A) with respect to the vertical surface, and the processing module obtains the image according to the first position data and the second position data respectively. a first position and a second position on the sensor array corresponding to the first selected position and the second selected position, respectively, the processing module is further configured according to the first object distance (d1), the first position and The distance between the second position (h11), the focal length of the lens (f), and the angle of inclination (A), using the following formula The distance (h1) between the first target and the second target is estimated. 如請求項8所述的距離估算系統,其中,該影像擷取模 組包括一鏡頭及一影像感測器陣列,該處理模組根據該第一位置資料、該第二位置資料及該深度圖,並還根據該影像擷取模組擷取該影像時的一鏡頭焦距及該影像感測器陣列的畫素尺寸,估算該第一標的及該第二標的分別與該鏡頭之間的一第一物距及一第二物距,該處理模組再根據該第一物距、該第二物距、該第一位置資料、該第二位置資料及該鏡頭焦距,估算該第一標的及該第二標的之間的距離。 The distance estimation system of claim 8, wherein the image capture mode The group includes a lens and an image sensor array, and the processing module is based on the first position data, the second position data, and the depth map, and further captures a lens according to the image capturing module a focal length and a pixel size of the image sensor array, estimating a first object distance and a second object distance between the first target and the second target respectively, the processing module according to the first An object distance, the second object distance, the first position data, the second position data, and the focal length of the lens are used to estimate a distance between the first target and the second target. 如請求項11所述的距離估算系統,其中,該處理模組分別根據該第一位置資料及該第二位置資料獲得在該影像感測器陣列上且分別對應該第一選擇位置及該第二選擇位置的一第一位置及一第二位置,該處理模組再根據該第一物距(d1)、該第二物距(d2)、該第一位置與該第二位置之間的距離(h33)、及該鏡頭焦距(f),利用下列公式h2=d12+d22-2.d1.d2.cos(K) 估算該第一標的與該第二標的之間的距離(h2)。 The distance estimation system of claim 11, wherein the processing module obtains on the image sensor array according to the first location data and the second location data, respectively, and respectively corresponding to the first selected location and the first Selecting a first position and a second position of the position, the processing module is further configured according to the first object distance (d1), the second object distance (d2), and the first position and the second position The distance (h33) and the focal length (f) of the lens are expressed by the following formula h 2 = d 1 2 + d 2 2 -2. d 1. d 2. Cos( K ) The distance (h2) between the first target and the second target is estimated. 如請求項11所述的距離估算系統,還包含一電連接該處理模組的感測模組,以感測該影像感測器陣列相對於一垂直面的一傾斜角度,其中,該影像感測器陣列在該影像擷取模組擷取該影像時,相對於該垂直面具有該傾斜角度且讓該傾斜角度為零,該處理模組分別根據該第一位置資料及該第二位置資料獲得在該影像感測器陣 列上且分別對應該第一選擇位置及該第二選擇位置的一第一位置及一第二位置,該處理模組再根據該第一物距(d1)、該第二物距(d2)、該第一位置與該影像感測器陣列之中心點的距離(h21)、該第二位置與該影像感測器陣列之中心點的距離(h22)及該鏡頭焦距(f),利用下列公式h2=d1.sin(K1)-d2.sin(K2) 估算該第一標的與該第二標的之間的距離(h2)。 The distance estimation system of claim 11, further comprising a sensing module electrically connected to the processing module to sense an oblique angle of the image sensor array relative to a vertical plane, wherein the image sense When the image capturing module captures the image, the image sensor module has the tilting angle with respect to the vertical surface and the tilting angle is zero, and the processing module respectively determines the first position data and the second position data. Obtaining a first position and a second position on the image sensor array corresponding to the first selection position and the second selection position, respectively, the processing module is further configured according to the first object distance (d1) a second object distance (d2), a distance between the first position and a center point of the image sensor array (h21), a distance between the second position and a center point of the image sensor array (h22), and the lens Focal length (f), using the following formula h 2 = d 1. Sin( K 1)- d 2. Sin( K 2) The distance (h2) between the first target and the second target is estimated. 如請求項8所述的距離估算系統,其中,該顯示模組在該影像中之該第一選擇位置及該第二選擇位置分別顯示一第一標記及一第二標記,該顯示模組再將估算出的該第一標的及該第二標的之間的距離顯示於該第一選擇位置及該第二選擇位置之間。 The distance estimation system of claim 8, wherein the display module displays a first mark and a second mark in the first selected position and the second selected position in the image, the display module And displaying the estimated distance between the first target and the second target between the first selected position and the second selected position. 一種電腦可讀取媒體,適用於一距離估算系統,該距離估算系統包含一用於擷取具有至少一第一標的與一第二標的之一影像的影像擷取模組、一輸入模組、一用於顯示該影像的顯示模組及一至少電連接該輸入模組與該顯示模組的處理模組,該電腦可讀取媒體用於儲存一估算程式,該估算程式包含多數個指令,當該等指令於該處理模組執行時,使得該處理模組執行下列步驟,包含:根據該影像獲取一對應該影像的深度圖;獲取透過該輸入模組產生分別對應於該顯示模組 所顯示之該影像中之一第一選擇位置及一第二選擇位置的一第一位置資料及一第二位置資料,該第一選擇位置及該第二選擇位置分別對應於該影像中的該第一標的及該第二標的;及至少根據該第一位置資料、該第二位置資料及該深度圖,估算該第一標的及該第二標的之間的距離。 A computer readable medium, which is suitable for a distance estimation system, the distance estimation system includes an image capture module for capturing an image having at least a first target and a second target, an input module, a display module for displaying the image and a processing module for electrically connecting at least the input module and the display module, the computer readable medium for storing an estimation program, the estimation program comprising a plurality of instructions When the instructions are executed by the processing module, the processing module performs the following steps, including: acquiring a depth map of a pair of images according to the image; and obtaining, by the input module, corresponding to the display module a first location of the first selected location and a second location of the second selected location and a second location data, the first selected location and the second selected location respectively corresponding to the image a first target and the second target; and estimating a distance between the first target and the second target based at least on the first location data, the second location data, and the depth map. 如請求項15所述的電腦可讀取媒體,該影像擷取模組包括一鏡頭及一影像感測器陣列,其中,該等指令於該處理模組執行時,使得該處理模組還執行下列步驟:根據該第一位置資料及該深度圖,並還根據該影像擷取模組擷取該影像時的一鏡頭焦距及該影像感測器陣列的畫素尺寸,估算該第一標的與該鏡頭之間的一第一物距;及至少根據該第一物距、該第一位置資料、該第二位置資料及該鏡頭焦距,估算該第一標的及該第二標的之間的距離。 The computer-readable medium as claimed in claim 15 , wherein the image capturing module comprises a lens and an image sensor array, wherein the instructions are executed by the processing module when the processing module is executed The following steps: estimating the first target according to the first position data and the depth map, and according to a lens focal length and a pixel size of the image sensor array when the image capturing module captures the image a first object distance between the lenses; and estimating a distance between the first target and the second target based at least on the first object distance, the first position data, the second position data, and the focal length of the lens . 如請求項16所述的電腦可讀取媒體,在該影像擷取模組擷取該影像時,該影像感測器陣列相對於一垂直面具有一傾斜角度(A),其中,該等指令於該處理模組執行時,使得該處理模組還執行下列步驟:分別根據該第一位置資料及該第二位置資料獲得在該影像感測器陣列上且分別對應該第一選擇位置及該第二選擇位置的一第一位置及一第二位置;及根據該第一物距(d1)、該第一位置與該第二位置之 間的距離(h11)、該鏡頭焦距(f)、及該傾斜角度(A),利用下列公式 估算該第一標的與該第二標的之間的距離(h1)。 The computer readable medium of claim 16, wherein the image sensor array has an oblique angle (A) with respect to a vertical mask when the image capturing module captures the image, wherein the instructions When the processing module is executed, the processing module further performs the following steps: respectively obtaining, according to the first location data and the second location data, on the image sensor array and respectively corresponding to the first selected location and the a first position and a second position of the second selected position; and according to the first object distance (d1), a distance between the first position and the second position (h11), the focal length of the lens (f), And the inclination angle (A), using the following formula The distance (h1) between the first target and the second target is estimated. 如請求項15所述的電腦可讀取媒體,該影像擷取模組包括一鏡頭及一影像感測器陣列,其中,該等指令於該處理模組執行時,使得該處理模組還執行下列步驟:根據該第一位置資料、該第二位置資料及該深度圖,並還根據該影像擷取模組擷取該影像時的一鏡頭焦距及該影像感測器陣列的畫素尺寸,估算該第一標的及該第二標的分別與該鏡頭之間的一第一物距及一第二物距;及根據該第一物距、該第二物距、該第一位置資料、該第二位置資料及該鏡頭焦距,估算該第一標的及該第二標的之間的距離。 The computer-readable medium as claimed in claim 15 , wherein the image capturing module comprises a lens and an image sensor array, wherein the instructions are executed by the processing module when the processing module is executed The following steps: according to the first location data, the second location data, and the depth map, and according to the lens focal length of the image capturing module and the pixel size of the image sensor array, Estimating a first object distance and a second object distance between the first target and the second target respectively; and according to the first object distance, the second object distance, the first position data, The second position data and the focal length of the lens are used to estimate the distance between the first target and the second target. 如請求項18所述的電腦可讀取媒體,其中,該等指令於該處理模組執行時,使得該處理模組還執行下列步驟:分別根據該第一位置資料及該第二位置資料獲得在該影像感測器陣列上且分別對應該第一選擇位置及該第二選擇位置的一第一位置及一第二位置;及根據該第一物距(d1)、該第二物距(d2)、該第一位置與該第二位置之間的距離(h33)、及該鏡頭焦距(f),利用下列公式 h2=d12+d22-2.d1.d2.cos(K) 估算該第一標的與該第二標的之間的距離(h2)。 The computer readable medium of claim 18, wherein the instructions are executed by the processing module, so that the processing module further performs the following steps: obtaining the first location data and the second location data respectively a first position and a second position on the image sensor array and respectively corresponding to the first selected position and the second selected position; and according to the first object distance (d1), the second object distance ( D2), the distance between the first position and the second position (h33), and the focal length (f) of the lens, using the following formula h 2 = d 1 2 + d 2 2 -2. d 1. d 2. Cos( K ) The distance (h2) between the first target and the second target is estimated. 如請求項18所述的電腦可讀取媒體,在該影像擷取模組擷取該影像時,該影像感測器陣列相對於一垂直面具有一傾斜角度且該傾斜角度為零,其中,該等指令於該處理模組執行時,使得該處理模組還執行下列步驟:分別根據該第一位置資料及該第二位置資料獲得在該影像感測器陣列上且分別對應該第一選擇位置及該第二選擇位置的一第一位置及一第二位置;及根據該第一物距(d1)、該第二物距(d2)、該第一位置與該影像感測器陣列之中心點的距離(h21)、該第二位置與該影像感測器陣列之中心點的距離(h22)及該鏡頭焦距(f),利用下列公式h2=d1.sin(K1)-d2.sin(K2) 估算該第一標的與該第二標的之間的距離(h2)。 The computer readable medium of claim 18, wherein the image sensor array has an oblique angle with respect to a vertical mask and the tilt angle is zero, wherein the image capturing module captures the image, wherein When the processing module is executed, the processing module further performs the following steps: respectively obtaining, according to the first location data and the second location data, on the image sensor array and respectively corresponding to the first selection a first position and a second position of the second selected position; and according to the first object distance (d1), the second object distance (d2), the first position and the image sensor array The distance of the center point (h21), the distance between the second position and the center point of the image sensor array (h22), and the focal length (f) of the lens are determined by the following formula h 2 = d 1. Sin( K 1)- d 2. Sin( K 2) The distance (h2) between the first target and the second target is estimated. 如請求項15所述的電腦可讀取媒體,該等指令於該處理模組執行時,使得該處理模組還執行下列步驟:透過該顯示模組在該影像中之該第一選擇位置及該第二選擇位置分別顯示一第一標記及一第二標記;及 透過該顯示模組將估算出的該第一標的及該第二標的之間的距離顯示於該第一選擇位置及該第二選擇位置之間。 The computer readable medium as claimed in claim 15 , wherein when the processing module is executed, the processing module further performs the following steps: the first selected location in the image by the display module and The second selected position respectively displays a first mark and a second mark; and And displaying, by the display module, the estimated distance between the first target and the second target is displayed between the first selected position and the second selected position.
TW103145263A 2014-12-24 2014-12-24 Distance estimation system, method and computer readable media TWI516744B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW103145263A TWI516744B (en) 2014-12-24 2014-12-24 Distance estimation system, method and computer readable media

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW103145263A TWI516744B (en) 2014-12-24 2014-12-24 Distance estimation system, method and computer readable media

Publications (2)

Publication Number Publication Date
TWI516744B TWI516744B (en) 2016-01-11
TW201623918A true TW201623918A (en) 2016-07-01

Family

ID=55640329

Family Applications (1)

Application Number Title Priority Date Filing Date
TW103145263A TWI516744B (en) 2014-12-24 2014-12-24 Distance estimation system, method and computer readable media

Country Status (1)

Country Link
TW (1) TWI516744B (en)

Also Published As

Publication number Publication date
TWI516744B (en) 2016-01-11

Similar Documents

Publication Publication Date Title
US10825198B2 (en) 3 dimensional coordinates calculating apparatus, 3 dimensional coordinates calculating method, 3 dimensional distance measuring apparatus and 3 dimensional distance measuring method using images
CN105453136B (en) The three-dimensional system for rolling correction, method and apparatus are carried out using automatic focus feedback
US9565364B2 (en) Image capture device having tilt and/or perspective correction
US10277889B2 (en) Method and system for depth estimation based upon object magnification
JP7293169B2 (en) Distance measuring device for video camera focus applications
US10506225B2 (en) Method of calibrating a camera
US9883170B2 (en) Method for estimating distance, and system and computer-readable medium for implementing the method
US9891040B2 (en) Method and electronic device for measuring a distance
WO2019169941A1 (en) Distance measurement method and apparatus
WO2018214778A1 (en) Method and device for presenting virtual object
US20220155176A1 (en) Fixtureless lensmeter system
JP2017090420A (en) Three-dimensional information restoration device and three-dimensional information restoration method
TW201312080A (en) Non-contact method for measuring dimensions of objects
JP5996233B2 (en) Imaging device
JP2008076405A (en) Three-dimensional surveying apparatus and electronic storage medium
TWI516744B (en) Distance estimation system, method and computer readable media
JP2009299241A (en) Body size measuring device
JP6448413B2 (en) Roof slope estimation system and roof slope estimation method
CN109945840B (en) Three-dimensional image shooting method and system
US20120038750A1 (en) Apparatus and method for displaying three-dimensional (3d) object
Aldelgawy et al. Semi‐automatic reconstruction of object lines using a smartphone’s dual camera
EP2843365A2 (en) Site surveying
JP2023546037A (en) image recording device
JP5980541B2 (en) Imaging apparatus and imaging control method
JP2015197429A (en) Image processing apparatus, imaging apparatus, image processing method, and program