TWI700670B - Method and electrical device for transforming 3d depth information - Google Patents
Method and electrical device for transforming 3d depth information Download PDFInfo
- Publication number
- TWI700670B TWI700670B TW108107305A TW108107305A TWI700670B TW I700670 B TWI700670 B TW I700670B TW 108107305 A TW108107305 A TW 108107305A TW 108107305 A TW108107305 A TW 108107305A TW I700670 B TWI700670 B TW I700670B
- Authority
- TW
- Taiwan
- Prior art keywords
- range
- sub
- frequency part
- ranges
- depth
- Prior art date
Links
Images
Landscapes
- Image Processing (AREA)
Abstract
Description
本發明是有關於一種將三維深度資訊轉換為二維影像的方法。 The present invention relates to a method for converting three-dimensional depth information into two-dimensional images.
三維深度資訊可用來描述物體的凹凸表面,是用來辨識物體的重要資訊,為了讓深度資訊具有更精細的表達能力,會使用高位元(例如16位元)的數字資料來表示深度資訊。然而,一般的影像處理方法是用以處理較低位元(例如8位元)的影像,因此如何將高位元的深度資訊轉換為低位元的影像,同時又保留物體表面的細節,為此領域技術人員所關心的議題。 Three-dimensional depth information can be used to describe the uneven surface of an object. It is important information used to identify the object. In order to make the depth information more precise, high-bit (for example, 16-bit) digital data is used to represent the depth information. However, the general image processing method is used to process low-bit (such as 8-bit) images, so how to convert high-bit depth information into low-bit images while preserving the details of the surface of the object, this area Topics of concern to technicians.
本發明的實施例提出一種三維深度資訊的轉換方法,適用於電子裝置,此方法包括:取得深度圖,此深度圖包含多個深度值,每一個深度值都在第一範圍中;在第一範圍中取得多個子範圍;對於每一個子範圍,將子範圍內的 深度值透過轉換函數轉換至第二範圍以得到影像,其中第二範圍小於第一範圍;以及將影像融合以得到輸出影像。 An embodiment of the present invention provides a method for converting three-dimensional depth information, which is suitable for electronic devices. The method includes: obtaining a depth map. The depth map includes a plurality of depth values, and each depth value is in a first range; Get multiple sub-ranges in the range; for each sub-range, set the The depth value is converted to a second range through a conversion function to obtain an image, wherein the second range is smaller than the first range; and the image is fused to obtain an output image.
在一些實施例中,每個子範圍所對應的轉換函數為非線性函數。 In some embodiments, the transfer function corresponding to each sub-range is a non-linear function.
在一些實施例中,上述的子範圍彼此至少部分的重疊。 In some embodiments, the aforementioned sub-ranges at least partially overlap each other.
在一些實施例中,將子範圍內的深度值透過轉換函數轉換至第二範圍以得到影像的步驟包括:將落在子範圍以外的深度值設定為第二範圍的最大值或最小值。 In some embodiments, the step of converting the depth value in the sub-range to the second range through a conversion function to obtain an image includes: setting the depth value outside the sub-range to the maximum or minimum value of the second range.
在一些實施例中,將影像融合以得到輸出影像的步驟包括:對於每一張影像,取得高頻部份與低頻部份;取低頻部份的平均以作為輸出低頻部份;取高頻部份的最大值以作為輸出高頻部份;以及將輸出低頻部份與輸出高頻部份結合以產生輸出影像。 In some embodiments, the step of fusing images to obtain an output image includes: for each image, obtaining a high frequency part and a low frequency part; taking the average of the low frequency part as the output low frequency part; taking the high frequency part The maximum value of the division is used as the output high frequency part; and the output low frequency part and the output high frequency part are combined to generate the output image.
以另外一個角度來說,本發明的實施例提出一種電子裝置,包括記憶體與處理器。記憶體儲存有程式碼,處理器用以執行程式碼以實施上述的轉換方法。 From another perspective, an embodiment of the present invention provides an electronic device including a memory and a processor. The memory stores program codes, and the processor executes the program codes to implement the above conversion method.
在上述的轉換方法中,轉換後的影像具有較少的位元,同時又保留了興趣區域內的細節。 In the above conversion method, the converted image has fewer bits while retaining the details in the region of interest.
為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。 In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail in conjunction with the accompanying drawings.
110‧‧‧深度感測器 110‧‧‧Depth sensor
120‧‧‧電子裝置 120‧‧‧Electronic device
121‧‧‧處理器 121‧‧‧Processor
122‧‧‧記憶體 122‧‧‧Memory
210‧‧‧深度圖 210‧‧‧Depth map
220‧‧‧直方圖 220‧‧‧Histogram
221、222‧‧‧子範圍 221, 222‧‧‧ sub-range
301、302‧‧‧轉換函數 301, 302‧‧‧ Conversion function
410、420‧‧‧二維影像 410、420‧‧‧Two-dimensional image
411、421‧‧‧低頻部份 411, 421‧‧‧Low frequency part
412、422‧‧‧高頻部份 412, 422‧‧‧High frequency part
431‧‧‧輸出低頻部份 431‧‧‧Output low frequency part
432‧‧‧輸出高頻部份 432‧‧‧High frequency output
440‧‧‧輸出影像 440‧‧‧Output image
501~504‧‧‧步驟 501~504‧‧‧Step
[圖1]是根據一實施例繪示將三維深度資訊轉換為二維影像的系統示意圖。 [Fig. 1] is a schematic diagram of a system for converting 3D depth information into 2D images according to an embodiment.
[圖2]是根據一實施例說明轉換方法的示意圖。 [Figure 2] is a schematic diagram illustrating a conversion method according to an embodiment.
[圖3]是根據一實施例繪示轉換函數的示意圖。 [Fig. 3] is a schematic diagram showing a conversion function according to an embodiment.
[圖4]是根據一實施例繪示融合影像的示意圖。 [Fig. 4] is a schematic diagram showing a fusion image according to an embodiment.
[圖5]是根據一實施例繪示三維資訊的轉換方法的流程圖。 [Fig. 5] is a flowchart of a method for converting 3D information according to an embodiment.
關於本文中所使用之『第一』、『第二』、…等,並非特別指次序或順位的意思,其僅為了區別以相同技術用語描述的元件或操作。 Regarding the "first", "second", etc. used in this text, it does not specifically refer to the order or sequence, but only to distinguish elements or operations described in the same technical terms.
圖1是根據一實施例繪示將三維深度資訊轉換為二維影像的系統示意圖。請參照圖1,此系統包括深度感測器110與電子裝置120,電子裝置120包括了處理器121與記憶體122。深度感測器110例如為紅外線感測器或其他能感測出深度的感測器,在一些實施例中系統也可以設置紅外線發射器等裝置,本發明並不在此限。處理器121可為中央處理器、微處理器、影像處理晶片等,記憶體122可為揮發性記憶體或非揮發性記憶體,記憶體122中儲存有程式碼,處理器121會執行這些程式碼來實施三維深度資訊的轉換方法,以下將詳細說明此轉換方法。
FIG. 1 is a schematic diagram of a system for converting 3D depth information into 2D images according to an embodiment. Please refer to FIG. 1, this system includes a
圖2是根據一實施例說明轉換方法的示意圖。首先從深度感測器110取得深度圖210,此深度圖210包含了
多個深度值,每一個深度值是落在第一範圍中。例如,每一個深度值是以16個位元來編碼,因此第一範圍即是0~216-1。上述的第一範圍僅是範例,本發明並不限制每個深度值要用幾個位元來編碼。根據深度圖210中的深度值可以畫出直方圖220,其中橫軸代表深度值,縱軸代表深度值的數目。由於深度圖210對應的場景可能有很近的物體,也有很遠的背景,因此必須先篩選出興趣區域,過濾掉不感興趣的區域。具體來說,在第一範圍中可設定多個子範圍221、222,這些子範圍可以至少部分的重疊,而在子範圍內的深度值會透過轉換函數轉換至第二範圍以得到影像。上述的第二範圍例如為0~255,也就是說第二範圍會小於第一範圍。
Fig. 2 is a schematic diagram illustrating a conversion method according to an embodiment. First, a
舉例來說,請參照圖3,圖3是根據一實施例繪示轉換函數的示意圖。子範圍221亦可表示為x1~y1,對應至轉換函數301,小於數值x1的深度值會被轉換為0,而大於數值y1的深度值會被轉換為255,其餘的深度值透過轉換函數301會被轉換至0~255之間,因此深度圖210會被轉換為一張二維影像。類似地,子範圍222表示為x2~y2,小於數值x2的深度值會被轉換為0,而大於數值y2的深度值會被轉換為255,其餘的深度值透過轉換函數302會被轉換至0~255之間,因此深度圖210也會被轉換為另一張二維影像。以另一個角度來說,落在子範圍221、222以外的深度值會被設定為第二範圍(0~255)的最大值或最小值。
For example, please refer to FIG. 3, which is a schematic diagram illustrating a conversion function according to an embodiment. The
在圖2與圖3的實施例中共有兩個子範圍221、
222,但在其他實施例中也可以設計更多子範圍,因而產生更多張二維影像。此外,轉換函數301、302為非線性函數,例如為多項式函數、指數函數、三角函數或其組合,本發明並不限制轉換函數301、302的數學式。在一些實施例中,轉換函數301、302為遞增函數,即f(xi)>f(xj)if xi>xj。
In the embodiments of FIG. 2 and FIG. 3, there are two
接下來,根據子範圍221、222所產生的多張二維影像會被融合以計算輸出影像。具體來說,請參照圖4,二維影像410是根據子範圍221所產生的,而二維影像420是根據子範圍222所產生的。對於每一張二維影像410、420都可以產生對應的高頻部份與低頻部份。舉例來說,對二維影像410執行一低通濾波器(例如高斯濾波器)以後可產生低頻部份411,將二維影像410減去低頻部份411即是高頻部份412。根據相同的做法,二維影像420可被分為低頻部份421與高頻部份422。接下來,取低頻部份411與低頻部份421的平均以作為輸出低頻部份431,換言之對於低頻部份411中的一個數值來說,此數值會與低頻部份421中相同位置的數值平均以得到輸出低頻部份431中相同位置的數值。高頻部份412與高頻部份422的最大值可作為輸出高頻部份432,換言之對於高頻部份412中的一個數值來說,此數值和高頻部份422中相同位置的數值的最大值可設定為輸出高頻部份432中相同位置的數值。最後,將輸出低頻部份431與輸出高頻部份432結合(相加)便可以得到輸出影像440。
Next, the multiple 2D images generated according to the
在一些實施例中,上述的低頻部份與高頻部份
也可以透過任意的空間域至頻率域轉換,例如小波轉換、傅立葉轉換等等來產生,本發明並不在此限。因此,上述將輸出低頻部份431與輸出高頻部份432結合的步驟也可以是逆小波轉換、逆傅立葉轉換等,本發明並不在此限。此外,圖4中的符號“♁”僅是示意,並不必然是相加,也可以是取最大值、平均、逆小波轉換等步驟。
In some embodiments, the aforementioned low frequency part and high frequency part
It can also be generated through any space-to-frequency domain conversion, such as wavelet transform, Fourier transform, etc. The present invention is not limited thereto. Therefore, the steps of combining the output low-
圖5是根據一實施例繪示三維資訊的轉換方法的流程圖。請參照圖5,在步驟501中,取得深度圖,此深度圖包含多個深度值,每一個深度值都在第一範圍中。在步驟502中,在第一範圍中取得多個子範圍。在步驟503中,對於每一個子範圍,將子範圍內的深度值透過轉換函數轉換至第二範圍以得到影像。在步驟504中,將影像融合以得到輸出影像。然而,圖5中各步驟已詳細說明如上,在此便不再贅述。值得注意的是,圖5中各步驟可以實作為多個程式碼或是電路,本發明並不在此限。此外,圖5的方法可以搭配以上實施例使用,也可以單獨使用。換言之,圖5的各步驟之間也可以加入其他的步驟。
Fig. 5 is a flowchart illustrating a method for converting 3D information according to an embodiment. Referring to FIG. 5, in
雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。 Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the relevant technical field can make slight changes and modifications without departing from the spirit and scope of the present invention. The scope of protection of the present invention shall be determined by the scope of the attached patent application.
501~504‧‧‧步驟 501~504‧‧‧Step
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108107305A TWI700670B (en) | 2019-03-05 | 2019-03-05 | Method and electrical device for transforming 3d depth information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108107305A TWI700670B (en) | 2019-03-05 | 2019-03-05 | Method and electrical device for transforming 3d depth information |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI700670B true TWI700670B (en) | 2020-08-01 |
TW202034279A TW202034279A (en) | 2020-09-16 |
Family
ID=73002941
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW108107305A TWI700670B (en) | 2019-03-05 | 2019-03-05 | Method and electrical device for transforming 3d depth information |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI700670B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI814483B (en) * | 2022-07-12 | 2023-09-01 | 中國鋼鐵股份有限公司 | Method and system for identifying metal billet |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201330589A (en) * | 2011-11-01 | 2013-07-16 | Koninkl Philips Electronics Nv | Saliency based disparity mapping |
-
2019
- 2019-03-05 TW TW108107305A patent/TWI700670B/en active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201330589A (en) * | 2011-11-01 | 2013-07-16 | Koninkl Philips Electronics Nv | Saliency based disparity mapping |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI814483B (en) * | 2022-07-12 | 2023-09-01 | 中國鋼鐵股份有限公司 | Method and system for identifying metal billet |
Also Published As
Publication number | Publication date |
---|---|
TW202034279A (en) | 2020-09-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109697728B (en) | Data processing method, device, system and storage medium | |
JP6471448B2 (en) | Noise identification method and noise identification apparatus for parallax depth image | |
US9715746B2 (en) | Curve rendering method and apparatus | |
CN108986197B (en) | 3D skeleton line construction method and device | |
CN112836688B (en) | Feature extraction method and device of tile image, electronic equipment and storage medium | |
TWI700670B (en) | Method and electrical device for transforming 3d depth information | |
CN110111284B (en) | Method and device for correcting vignetting image, electronic equipment and storage medium | |
Mei et al. | Radial lens distortion correction using cascaded one-parameter division model | |
CN112785634A (en) | Computer device and synthetic depth map generation method | |
CN109360167B (en) | Infrared image correction method and device and storage medium | |
KR101262164B1 (en) | Method for generating high resolution depth image from low resolution depth image, and medium recording the same | |
CN113766117B (en) | Video de-jitter method and device | |
CN111932466B (en) | Image defogging method, electronic equipment and storage medium | |
TWI402479B (en) | Depth detection method and system using thereof | |
CN116128770B (en) | Image generation method and device, electronic equipment and storage medium | |
Choi et al. | Implementation of Real‐Time Post‐Processing for High‐Quality Stereo Vision | |
KR102060758B1 (en) | Primitive fitting apparatus and method using point cloud | |
KR101904125B1 (en) | VIDEO PROCESSING Device and Method For Depth Video by Concave Curved Surface Modeling | |
US20240289929A1 (en) | Methods and apparatus to perform mask-based depth enhancement for multi-view systems | |
CN104182971B (en) | A kind of high precision image square localization method | |
Kwon | Single image dehazing based on hidden Markov random field and expectation–maximisation | |
JP2014220704A (en) | Image processing apparatus and image processing method | |
CN110288543B (en) | Depth image edge-preserving processing method and device | |
KR20140081639A (en) | Homography estimation apparatus and method | |
CN111325215B (en) | Image local feature description method, device, equipment and medium |