TWI613903B - Apparatus and method for combining with wavelet transformer and edge detector to generate a depth map from a single image - Google Patents

Apparatus and method for combining with wavelet transformer and edge detector to generate a depth map from a single image Download PDF

Info

Publication number
TWI613903B
TWI613903B TW105121679A TW105121679A TWI613903B TW I613903 B TWI613903 B TW I613903B TW 105121679 A TW105121679 A TW 105121679A TW 105121679 A TW105121679 A TW 105121679A TW I613903 B TWI613903 B TW I613903B
Authority
TW
Taiwan
Prior art keywords
image
depth
algorithm
edge detection
wavelet transform
Prior art date
Application number
TW105121679A
Other languages
Chinese (zh)
Other versions
TW201803342A (en
Inventor
陳昱翔
Yu Hsiang Chen
黃德豐
Der Feng Huang
Original Assignee
龍華科技大學
Lunghwa University Of Science And Technology
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 龍華科技大學, Lunghwa University Of Science And Technology filed Critical 龍華科技大學
Priority to TW105121679A priority Critical patent/TWI613903B/en
Publication of TW201803342A publication Critical patent/TW201803342A/en
Application granted granted Critical
Publication of TWI613903B publication Critical patent/TWI613903B/en

Links

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

一種結合小波轉換及邊緣偵測建立單張影像深度圖的裝置及其方法,以便提供一用於將2維(2D)平面影像訊號,轉換為3維(3D)立體影像訊號影像的轉換系統使用,其中,本發明的深度圖建立方法所產生的深度圖中,每一影像區塊分別被賦予一深度值,本發明的方法包含以下步驟:S1輸入原始影像;S2對原始影像執行小波轉換及邊緣偵測;S3根據小波轉換結果以及邊緣偵測結果,建立一散焦圖;S4根據小波轉換之小波係數值,執行深度預測;S5對應之深度值至散焦圖,以執行深度擴散;S6最後,產生深度圖。 A device and method for establishing a single image depth map combining wavelet transform and edge detection, in order to provide a conversion system for converting a 2-dimensional (2D) planar image signal into a 3-dimensional (3D) stereoscopic image signal image In the depth map generated by the depth map creation method of the present invention, each image block is assigned a depth value. The method of the present invention includes the following steps: S1 input the original image; S2 performs wavelet transformation on the original image and Edge detection; S3 creates a defocus map based on the wavelet conversion results and edge detection results; S4 performs depth prediction based on the wavelet coefficient values of the wavelet conversion; S5 corresponds to the depth value to the defocus map to perform depth diffusion; S6 Finally, a depth map is generated.

Description

結合小波轉換及邊緣偵測建立單張影像深度圖的裝置及其方法 Device and method for establishing single image depth map combining wavelet transform and edge detection

本發明有關於視訊系統,尤指一種深度圖(Depth Map)產生裝置及其方法,用以將二維影像資料轉換成三維影像資料。 The invention relates to a video information system, in particular to a depth map generating device and method for converting two-dimensional image data into three-dimensional image data.

自從2009年阿凡達3D電影的上市以來,人們開始追求於3D顯示技術的娛樂效果,2010年3D轉播世界盃足球賽,一直到了2016年的虛擬實境頭盔,皆顯示著我們的娛樂產業由2D轉像了3D,人們不在滿足於2D所帶來的影像效果,開始追求於3D顯示技術,目前,因為3D顯示技術的商業化,以及有關3D內容的服務也日益增加,相對的使用者對於3D的需求也跟著增加,然而,對於3D內容的開發並沒有顯著的進展,對比之下,現有相當龐大數量的2D影像或視訊,且個人所拍攝之影像也屬於2D影像,正等著被有效的利用,以便轉換成3D視訊應用。 Since the launch of Avatar 3D movies in 2009, people have begun to pursue the entertainment effects of 3D display technology. In 2010, the 3D broadcast World Cup football game, until the 2016 virtual reality helmet, all show that our entertainment industry has changed from 2D Like 3D, people are no longer satisfied with the image effects brought by 2D, and they are beginning to pursue 3D display technology. At present, because of the commercialization of 3D display technology and the increasing services related to 3D content, relative users Demand has also increased, however, there has been no significant progress in the development of 3D content. In contrast, there are quite a large number of 2D images or videos, and the images taken by individuals are also 2D images, which are waiting to be effectively used. For conversion into 3D video applications.

緣此,有發明人發明如中國專利公開號第CN 103559701 A「基於DCT係數熵的二維單視圖像深度估計方法」中,其提出以具有景深的單張影像中,進行深度的預測,其對擷取待處理的影像中的每個像素點, 以該像素點為中心擷取窗口作為子影像,並對這些子影像進行小波轉換後,對影像中的小波係數值進行量化,然後計算其係數熵以做為該像素點的模糊度,接著透過線性映射把熵值映射到一8bit的深度值域,以得到一像素級的深度圖。又,有發明人提出中國專利公告號第CN 10247539B號「視頻圖像2D轉3D的方法」,其利用小波轉換對單張具有景深的影像進行深度的預測,透過對原始影像進行小波轉換,以提取影像中的高頻係數,並將影像分為數個區塊,接著統計每個區塊中非零係數的數目為該區塊的模糊度,同時,基於原始影像的顏色特徵,對原始影像進行顏色分割成三類像素集合,然後比較每一個像素集合的模糊度以統計平均值,最大值對應的像素集合做為前景,次大值對應的像素集合看作中景,最小對應的像素值則看作背景,最後由預設景深的系統對前景、中景以及背景分別賦予不同的深度值,以得到深度圖。 For this reason, some inventors have invented such as Chinese Patent Publication No. CN 103559701 A "Depth Estimation Method of Two-Dimensional Single-View Images Based on DCT Coefficient Entropy", which proposes to perform depth prediction in a single image with depth of field, For each pixel in the image to be processed, Take the pixel as the center to capture the window as a sub-image, and after performing wavelet transformation on these sub-images, quantize the wavelet coefficient value in the image, and then calculate the coefficient entropy to be the blur of the pixel, and then Linear mapping maps the entropy value to an 8-bit depth range to obtain a pixel-level depth map. In addition, some inventors proposed the Chinese Patent Announcement No. CN 10247539B "Video image 2D to 3D method", which uses wavelet transform to predict the depth of a single image with depth of field, by performing wavelet transform on the original image to Extract high-frequency coefficients in the image and divide the image into several blocks, then count the number of non-zero coefficients in each block as the blur degree of the block, and at the same time, based on the color characteristics of the original image, the original image The color is divided into three types of pixel sets, and then the ambiguity of each pixel set is compared to calculate the average value, the pixel set corresponding to the maximum value is used as the foreground, the pixel set corresponding to the next largest value is regarded as the middle scene, and the minimum corresponding pixel value is Seen as the background, the system of preset depth of field finally assigns different depth values to the foreground, middle scene, and background to obtain a depth map.

由上述所揭之習知技術可知先前技術,習知之深度圖產生方法具有相關缺點,如對於以像素點為中心之窗口,其窗口設定之大小需人工設立,且無法根據不同的影像自動進行調整。再者,使用原始影像的顏色特徵將影像分割為三類像素的集合,僅僅將影像分為前景、中景以及背景,顯然在我們平時所看到的豐富影像具有多層次的深度資訊不同,導致無法產生正確的深度圖。 According to the prior art disclosed above, the prior art and the conventional depth map generation method have related shortcomings. For a window centered on a pixel, the size of the window setting needs to be manually set and cannot be automatically adjusted according to different images. . Furthermore, the color features of the original image are used to divide the image into a set of three types of pixels, and only the image is divided into the foreground, the middle scene, and the background. Obviously, the rich images we usually see have different levels of depth information, which leads to The correct depth map cannot be generated.

有鑑於此,本發明人係依據多年從事相關行業及研究,針對現有的深度圖產生方法進行研究及分析,期能發明出改善習知缺點之深度 圖產生方法,緣此,本發明之主要目的在於不需人工干涉,且符合人眼所觀看之深度資訊的結合小波轉換及邊緣偵測建立單張影像深度圖的裝置及其方法。 In view of this, the present inventors have been engaged in related industries and research for many years, and have conducted research and analysis on the existing depth map generation methods, with a view to inventing a depth that improves the conventional shortcomings The method of generating a picture. Therefore, the main purpose of the present invention is a device and method for creating a single image depth map in combination with wavelet transformation and edge detection that does not require human interference and conforms to the depth information viewed by the human eye.

為達上述目的,本發明所述之結合小波轉換及邊緣偵測建立單張影像深度圖的裝置及其方法,具有一影像擷取單元,用以擷取或輸入一原始影像;一影像分析單元,與影像擷取單元呈資訊連結,用以對該影像擷取單元所擷取或輸入之原始影像執行影像分析,其中,所述的影像分析可執行影像分析演算法,所述的影像分析演算法可為小波轉換、邊緣偵測等;一影像合成單元,與該影像分析單元呈資訊連結,當影像分析單元執行影像分析演算法後,影像合成單元可將影像分析單元分析之結果執行影像合成,以產生一散焦圖;一深度計算單元,與影像合成單元呈資訊連結,當影像合成單元產生該散焦圖後,該深度計算單元係依據該影像分析單元分析之結果,執行一深度預測演算法,並將深度預測之結果對應至該散焦圖,以便深度計算單元可依據深度預測與散焦圖對應之結果,執行一深度擴散演算法,且所述的深度擴散演算法可為一拉普拉斯插值技術或一全域插值演算法,並不以此為限。 To achieve the above purpose, the device and method for creating a single image depth map combining wavelet transform and edge detection according to the present invention has an image capture unit for capturing or inputting an original image; an image analysis unit , And presents an information link with the image capturing unit to perform image analysis on the original image captured or input by the image capturing unit, wherein the image analysis can execute an image analysis algorithm, and the image analysis calculation The method can be wavelet transformation, edge detection, etc .; an image synthesis unit, which is connected to the image analysis unit, and when the image analysis unit executes the image analysis algorithm, the image synthesis unit can perform image synthesis on the results of the image analysis unit analysis To generate a defocus map; a depth calculation unit, which is connected to the image synthesis unit for information, when the image synthesis unit generates the defocus map, the depth calculation unit performs a depth prediction based on the analysis result of the image analysis unit Algorithm, and the result of depth prediction is mapped to the defocus map, so that the depth calculation unit can be based on the depth prediction The results correspond to the defocus map, performing a deep diffusion algorithm, and the depth of diffusion algorithm may be a Laplacian interpolation technique or a global interpolation algorithm, it is not limited thereto.

1‧‧‧結合小波轉換及邊緣偵測建立單張影像深度圖的裝置 1‧‧‧ Combined wavelet transform and edge detection to create a single image depth map device

11‧‧‧影像擷取單元 11‧‧‧Image capture unit

12‧‧‧影像分析單元 12‧‧‧Image analysis unit

13‧‧‧影像合成單元 13‧‧‧Image synthesis unit

14‧‧‧深度計算單元 14‧‧‧Depth calculation unit

S1‧‧‧輸入原始影像步驟 S1‧‧‧Enter the original image steps

S2‧‧‧影像分析步驟 S2‧‧‧Image analysis steps

S22‧‧‧邊緣偵測步驟 S22‧‧‧edge detection steps

S23‧‧‧小波轉換步驟 S23‧‧‧Wavelet conversion steps

S231‧‧‧轉換為灰階影像 S231‧‧‧Convert to grayscale image

S232‧‧‧尋找局部最大直步驟 S232‧‧‧Find the local maximum straight step

S233‧‧‧局部最大值對應小波係數值 S233‧‧‧Local maximum value corresponds to wavelet coefficient value

S234‧‧‧閥值計算結果 S234‧‧‧ Threshold calculation result

S3‧‧‧建立散焦圖步驟 S3‧‧‧ Steps to create defocus map

S4‧‧‧深度預測步驟 S4‧‧‧Depth prediction steps

S41‧‧‧直方圖局部最大值之個數步驟 S41‧‧‧Number of local maximum histogram steps

S42‧‧‧依據個數建立窗口步驟 S42‧‧‧ Steps to create a window based on the number

S43‧‧‧對小波轉換結果進行模糊度計算步驟 S43‧‧‧ Step of calculating the ambiguity of the wavelet transform result

S44‧‧‧深度預測結果步驟 S44‧‧‧Depth prediction result step

S5‧‧‧深度擴散步驟 S5‧‧‧Deep diffusion step

S6‧‧‧產生深度圖步驟 S6‧‧‧Produce depth map steps

第1圖,為本發明之結構示意圖。 Figure 1 is a schematic diagram of the present invention.

第2圖,為本發明之步驟流程圖。 Figure 2 is a flow chart of the steps of the present invention.

第3圖,為本發明之實施示意圖。 Figure 3 is a schematic diagram of the implementation of the present invention.

第4圖,為本發明之實施示意圖(一)。 Figure 4 is a schematic diagram of the implementation of the present invention (1).

第5圖,為本發明之實施示意圖(二)。 Figure 5 is a schematic diagram of the implementation of the present invention (2).

第6圖,為本發明之實施例示意圖。 Figure 6 is a schematic diagram of an embodiment of the present invention.

第7圖,為本發明之實施例示意圖(一)。 Fig. 7 is a schematic diagram (1) of an embodiment of the present invention.

第8圖,為本發明之實施立示意圖(二)。 Figure 8 is a schematic diagram (2) of the implementation of the present invention.

於以下說明書的描述中,「深度圖」一詞是指深度值的二維矩陣,而該矩陣中的每一深度值,分別對應一場景的相對位置,以及每一深度值代表一特定參考位置至該場景之各相對位置的距離,若一2D影像的每一像素具有各自的深度值,則該2D影像就能使用3D技術來顯示。 In the description of the following specification, the term "depth map" refers to a two-dimensional matrix of depth values, and each depth value in the matrix corresponds to the relative position of a scene, and each depth value represents a specific reference position For the distance to each relative position of the scene, if each pixel of a 2D image has its own depth value, the 2D image can be displayed using 3D technology.

茲為使 貴審查委員得以對本發明所欲達成之目的、技術手段及功效等有進一步了解與認識,謹佐以較佳實施例搭配圖式說明。 In order to enable your reviewing committee to have a better understanding and understanding of the purpose, technical means and effects of the present invention, I would like to use the preferred embodiment together with the schematic description.

請參閱「第1圖」,圖中所示為本發明之結構示意圖,如圖所示,本發明之結合小波轉換及邊緣偵測建立單張影像深度圖的裝置1,主要係由一影像擷取單元11、一影像分析單元12、一影像合成單元13、一深度計算單元14所組構而成,其中,該影像擷取單元11係可擷取一原始影像,而所述的該原始影像為2D影像或視訊,該影像分析單元12,與該影像擷取單元11呈資訊連結,用以接收該原始影像後,執行複數個影像分析演算法,其中,所述的影像分析演算法可為一小波轉換演算法、一邊緣偵測演算法其中之一種或其組合,又,所述的該小波轉換演算法可為離散小波轉換或連續小波轉換,又,該邊緣偵測演算法可為Roberts Cross算子、Prewitt算 子、Sobel算子、Canny算子、羅盤算子、Marr-Hildreth、小波轉換其中之一種,但凡可偵測該原始影像中之邊緣偵測演算法皆為本發明之實施範疇內,但並不以此為限。該影像合成單元13與該影像分析單元12呈資訊連結,用以將該影像分析單元12所分析之影像結果執行一影像合成,進而產生一散焦圖。該深度計算單元14與該影像合成單元13呈資訊連結,係依據該影像分析單元12所分析之影像結果執行一深度預測演算法後,經該深度預測演算法至結果透過該影像合成單元13進行合成,爾後,該深度計算單元14接續執行一深度擴散演算法,且所述的深度擴散演算法可為一拉普拉斯插值技術或一全域插值演算法,並不以此為限,產生與該原始影像搭配之一深度圖。 Please refer to "Figure 1". The figure shows a schematic diagram of the structure of the present invention. The image acquisition unit 11, an image analysis unit 12, an image synthesis unit 13, and a depth calculation unit 14 are constructed, wherein the image acquisition unit 11 can acquire an original image, and the original image For a 2D image or video, the image analysis unit 12 and the image acquisition unit 11 present an information link to receive the original image and execute a plurality of image analysis algorithms, wherein the image analysis algorithm may be One or a combination of a wavelet transform algorithm and an edge detection algorithm, and the wavelet transform algorithm can be discrete wavelet transform or continuous wavelet transform, and the edge detection algorithm can be Roberts Cross operator, Prewitt calculation , Sobel operator, Canny operator, compass operator, Marr-Hildreth, wavelet transformation, but any edge detection algorithm that can detect the original image is within the scope of the implementation of the present invention, but not This is the limit. The image synthesis unit 13 and the image analysis unit 12 present an information link for performing an image synthesis on the image results analyzed by the image analysis unit 12 to generate a defocused image. The depth calculation unit 14 and the image synthesis unit 13 present an information link. After performing a depth prediction algorithm based on the image results analyzed by the image analysis unit 12, the depth prediction algorithm to the result is performed by the image synthesis unit 13 After synthesis, the depth calculation unit 14 successively executes a depth diffusion algorithm, and the depth diffusion algorithm may be a Laplace interpolation technique or a global interpolation algorithm, which is not limited to The original image is matched with a depth map.

承上所述,並請參閱「第2圖」,圖中所示為本發明之步驟流程圖,如圖所示,本發明實施步驟如下:一輸入原始影像步驟S1,其為該影像擷取單元11所輸入之該原始影像。一影像分析步驟S2,其包含有一小波轉換步驟S23及一邊緣偵測步驟S22,係對該原始影像進行一小波轉換分析及一邊緣偵測分析,其中,該小波轉換步驟S23係執行一小波轉換演算法,以產生一小波轉換分析結果,且所述的小波轉換演算法可為一離散小波轉換或一連續小波轉換其中之一種,並不以此為限,及該邊緣偵測步驟S22係執行一邊緣偵測演算法,以產生一邊緣偵測之結果,且該邊緣偵測演算法可為Roberts Cross算子、Prewitt算子、Sobel算子、Canny算子、羅盤算子、Marr-Hildreth、小波轉換其中之一種,並請搭配參閱「第3圖」,圖中所示為本發明之實施示意圖,如圖所示為小波轉換分析二值化之結果。一建立散焦圖步驟S3,其為該影像合成單元13將該小波轉換分析結果及該 邊緣偵測之結果進行合成,以產生一散焦圖,請搭配參閱「第4圖」,圖中所示為本發明之實施示意圖(一),如圖所示為該散焦圖。所述的合成為該邊緣偵測之結果對應於該小波轉換分析結果,以提取該邊緣偵測結果中像素點於該小波轉換分析結果之係數值。一深度預測步驟S4,為該深度計算單元14依據該影像分析步驟S2對該原始影像進行小波轉換後之小波轉換結果執行一深度預測演算法,以對原始影像進行一深度預測,該深度計算單元14執行該深度預測演算法後,與該建立散焦圖步驟S3所產生之該散焦圖,透過該影像合成單元13進行合成,以產生一散焦深度圖。所述的合成為該深度預測之結果對應於該散焦圖之結果,並將深度預測之結果替換至散焦圖中。一深度擴散步驟S5,為依據該散焦深度圖執行一深度擴散演算法,且所述之該深度擴散演算法可為該拉普拉斯插值技術或該全域插值演算法。最後,產生深度圖步驟S6,該深度計算單元14執行完深度擴散演算法後,係會產生一深度圖,請參閱「第5圖」,圖中所示為本發明之實施示意圖(二),如圖所示為該深度圖。 As mentioned above, and please refer to "Figure 2", the figure shows the flow chart of the steps of the present invention. The original image input by the unit 11. An image analysis step S2, which includes a wavelet transformation step S23 and an edge detection step S22, which performs a wavelet transformation analysis and an edge detection analysis on the original image, wherein the wavelet transformation step S23 performs a wavelet transformation Algorithm to generate a wavelet transform analysis result, and the wavelet transform algorithm can be one of a discrete wavelet transform or a continuous wavelet transform, which is not limited thereto, and the edge detection step S22 is executed An edge detection algorithm to produce an edge detection result, and the edge detection algorithm can be Roberts Cross operator, Prewitt operator, Sobel operator, Canny operator, compass operator, Marr-Hildreth, One of the wavelet transforms, and please refer to "Figure 3". The figure shows the schematic diagram of the implementation of the present invention, as shown in the figure is the result of wavelet transform analysis binarization. A step S3 of creating a defocus map, which is the image synthesis unit 13 transforming the wavelet analysis result and the The results of the edge detection are combined to produce a defocused map. Please refer to "Figure 4" for the matching. The figure shows the schematic diagram (1) of the implementation of the present invention. The defocused map is shown in the figure. The synthesis is that the result of the edge detection corresponds to the result of the wavelet transform analysis to extract the coefficient values of the pixels in the edge detection result in the result of the wavelet transform analysis. A depth prediction step S4 is for the depth calculation unit 14 to perform a depth prediction algorithm based on the wavelet conversion result of the original image after the wavelet transformation on the image analysis step S2 to perform a depth prediction on the original image. The depth calculation unit 14 After executing the depth prediction algorithm, the defocus map generated by the step S3 of creating a defocus map is synthesized by the image synthesis unit 13 to generate a defocus depth map. The synthesis is that the result of the depth prediction corresponds to the result of the defocus map, and the result of the depth prediction is replaced with the defocus map. A depth diffusion step S5 is to execute a depth diffusion algorithm based on the defocused depth map, and the depth diffusion algorithm may be the Laplacian interpolation technique or the global interpolation algorithm. Finally, in the step S6 of generating a depth map, after the depth calculation unit 14 executes the depth diffusion algorithm, a depth map will be generated. Please refer to "Figure 5". The figure shows the schematic diagram of the implementation of the invention (2). The depth map is shown in the figure.

承上所述,並請同時搭配參閱「第6圖」,圖中所示為本發明之實施例示意圖,如圖所示,該深度預測步驟S4所執行之該深度預測演算法之步驟流程為一直方圖局部最大值個數步驟S41,係找出該原始影像之灰階值直方圖於該灰階值直方圖中之峰值個數,一依據個數建立窗口步驟S42,依據該峰值個數建立一計算窗口,一對小波轉換結果進行模糊度計算S43,係依據該小波轉換結果以該窗口之中心像素點為中心執行一鄰域計算,計算該中心像素點鄰域之小波轉換結果,一深度預測結果步驟S44,係依據計算中心點像素鄰域之結果,即模糊度,進行深度預測。 As mentioned above, and please also refer to "Figure 6", the figure shows a schematic diagram of an embodiment of the present invention. As shown in the figure, the depth prediction algorithm executed by the depth prediction step S4 has the following steps: Step S41 of the local maximum number of histograms is to find the number of peaks of the grayscale histogram of the original image in the grayscale value histogram, a window is created based on the number of steps S42, based on the number of peaks A calculation window is established, and a pair of wavelet transformation results are used to calculate the ambiguity S43. Based on the wavelet transformation results, a neighborhood calculation is performed centering on the center pixel of the window, and the wavelet transformation results of the center pixel neighborhood are calculated. The depth prediction result step S44 is to perform depth prediction according to the result of calculating the pixel neighborhood of the center point, that is, the blur degree.

承上所述,並請同時搭配參閱「第7圖」,圖中所示為本發明之實施例示意圖(一),如圖所示,小波轉換步驟S23進一步包含有小波轉換閥值設立步驟,其步驟包含有一轉換為灰階影像步驟S231,係將該原始影像轉換為一灰階影像。一尋找局部最大值步驟S232,係依據該原始影像之灰階影像建立一灰階值直方圖,並於該灰階值直方圖中,尋找峰值所在之灰階值。一局部最大值對應小波係數值步驟S233,將所尋找到的峰值所在之所有灰階值,其位於於該原始影像之位置對應至小波轉換結果中之係數值所在之位置,並將所有係數值擷取出來。一閥值計算結果步驟S234,將所擷取之係數值透過數值分析,進行小波轉換閥值設立,其中所述的數值分析可為辛普森法則,且閥值計算函式如下:

Figure TWI613903BD00001
As mentioned above, please also refer to "Figure 7". The figure shows a schematic diagram of an embodiment of the invention (1). As shown in the figure, the wavelet conversion step S23 further includes a wavelet conversion threshold setting step, The step includes a step S231 of converting a grayscale image to convert the original image into a grayscale image. In a step S232 of finding the local maximum value, a gray-scale value histogram is created based on the gray-scale image of the original image, and in the gray-scale value histogram, the gray-scale value at which the peak is located is found. A local maximum value corresponds to the wavelet coefficient value step S233, which locates all grayscale values where the peak value is found, which is located at the position of the original image corresponds to the position of the coefficient value in the wavelet transformation result, and combines all the coefficient values Extract it. In a threshold calculation result step S234, the extracted coefficient values are subjected to numerical analysis to establish a wavelet transform threshold, wherein the numerical analysis can be Simpson's law, and the threshold calculation function is as follows:
Figure TWI613903BD00001

其中,f(x)為所擷取之所有係數值,並將所有係數值中,取前三大之係數值,透過方程式(1)進行閥值之計算,當閥值計算完成後,滿足下列函式:

Figure TWI613903BD00002
Among them, f (x) is all the coefficient values extracted, and among all coefficient values, the top three coefficient values are taken, and the threshold value is calculated through equation (1). After the threshold value calculation is completed, the following Function:
Figure TWI613903BD00002

其中,I(m,n)為小波轉換結果,Th為計算之閥值,並請搭配參閱「第3圖」,圖中所示為本發明之實施示意圖,如圖所示為小波轉換後並二值化之結果,即為尚未設立閥值之結果,並請參閱「第8圖」,圖中所示為本發明之實施立示意圖(二),如圖所示為閥值設立後之結果,將大於等於閥值之結果設為255,即白色部分,小於閥值之結果為0,即黑色部分。 Among them, I (m, n) is the result of wavelet conversion, Th is the calculated threshold, and please refer to "Figure 3", the figure shows the schematic diagram of the implementation of the present invention, as shown in the figure after wavelet conversion and The result of binarization is the result of not setting the threshold, and please refer to "Figure 8". The figure shows the schematic diagram of the implementation of the present invention (two). The figure shows the result after the threshold is established , Set the result greater than or equal to the threshold to 255, which is the white part, and the result less than the threshold to 0, which is the black part.

綜上所述,本發明之結合小波轉換及邊緣偵測建立單張影像深度圖的裝置及其方法,主要係藉一影像分析演算法對一原始影像進行影像分析,以使一深度計算單元可執行深度預測演算法後,執行深度擴散演算法,以產生深度圖,由於影像分析演算法執行快速,且準確率高,不需複雜計算,因此量測效率佳,且因本發明不需複雜且龐大的運算,因此成本亦相對減少,又,可達到本發明之主要目不需人工干涉,且符合人眼所觀看之深度資訊的結合小波轉換及邊緣偵測建立單張影像深度圖的裝置及其方法。 In summary, the device and method for creating a single image depth map combining wavelet transform and edge detection in the present invention mainly use an image analysis algorithm to perform image analysis on an original image so that a depth calculation unit can After the depth prediction algorithm is executed, the depth diffusion algorithm is executed to generate a depth map. Since the image analysis algorithm is fast and has high accuracy, no complicated calculation is required, so the measurement efficiency is good, and because the present invention does not need to be complicated and The huge calculation, so the cost is relatively reduced, and it can achieve the main purpose of the present invention without artificial interference, and is in line with the depth information viewed by the human eye combined with wavelet transform and edge detection device to create a single image depth map and Its method.

雖本發明已以較佳實施例揭露如上,然,其並非用以限定本發明之申請專利範圍,任何熟習此技藝者,再不脫離本發明之精神和範圍內,當可作些許更動及修改,因此本發明之保護範圍並不以此為限。 Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the patent application scope of the present invention. Anyone who is familiar with this art will not deviate from the spirit and scope of the present invention, and may make some changes and modifications. Therefore, the protection scope of the present invention is not limited thereto.

S1‧‧‧輸入原始影像步驟 S1‧‧‧Enter the original image steps

S2‧‧‧影像分析步驟 S2‧‧‧Image analysis steps

S22‧‧‧小波轉換步驟 S22‧‧‧wavelet conversion steps

S23‧‧‧邊緣偵測步驟 S23‧‧‧Edge detection steps

S3‧‧‧建立散焦圖步驟 S3‧‧‧ Steps to create defocus map

S4‧‧‧深度預測步驟 S4‧‧‧Depth prediction steps

S5‧‧‧深度擴散步驟 S5‧‧‧Deep diffusion step

S6‧‧‧產生深度圖步驟 S6‧‧‧Produce depth map steps

Claims (8)

一種結合小波轉換及邊緣偵測建立單張影像深度圖的裝置,其包括有:一影像擷取單元,用以輸入一原始影像;一影像分析單元,與該影像擷取單元呈資訊連結,用以執行一影像分析演算法,並透過一小波轉換演算法及一邊緣偵測演算法分析該影像擷取單元輸入之該原始影像,且該小波轉換演算法進一步包含有一小波轉換閥值設立步驟;一影像合成單元,與該影像分析單元呈資訊連結,用以將該影像分析單元分析該原始影像後之複數個分析結果,將該複數個分析結果執行一影像合成,而產生一散焦圖;一深度計算單元,與該影像合成單元呈資訊連結,可依據該複數個分析結果執行一深度預測演算法,完成後,執行一深度擴散演算法,以及,該深度擴散演算法執行後,可產生一深度圖。 A device combining wavelet transform and edge detection to create a single image depth map, which includes: an image capture unit for inputting an original image; an image analysis unit connected to the image capture unit for information To execute an image analysis algorithm, and analyze the original image input by the image capture unit through a wavelet transformation algorithm and an edge detection algorithm, and the wavelet transformation algorithm further includes a wavelet transformation threshold setting step; An image synthesizing unit, which is connected to the image analysis unit for information, and is used for analyzing the plurality of analysis results of the original image by the image analysis unit, performing an image synthesis on the plurality of analysis results, and generating a defocus map; A depth calculation unit, which is linked to the image synthesis unit for information, can execute a depth prediction algorithm based on the plurality of analysis results, after completion, execute a depth diffusion algorithm, and, after the depth diffusion algorithm is executed, can generate A depth map. 如申請專利範圍第1項所述之該結合小波轉換及邊緣偵測建立單張影像深度圖的裝置,其中,該小波轉換閥值設立步驟包含有,一轉換為灰階影像步驟、一尋找局部最大值步驟、一局部最大值對應小波係數值及一閥值計算結果。 The device combining wavelet transform and edge detection to create a single image depth map as described in item 1 of the patent application scope, wherein the wavelet transform threshold setting step includes the steps of converting to grayscale image and searching for local The maximum value step, a local maximum value correspond to the wavelet coefficient value and a threshold calculation result. 如申請專利範圍第1項所述之該結合小波轉換及邊緣偵測建立單張影像深度圖的裝置,其中,該小波轉換演算法可為離散小波轉換或連續小波轉換其中之一種。 As described in item 1 of the patent application scope, the device combining wavelet transform and edge detection to create a single image depth map, wherein the wavelet transform algorithm can be one of discrete wavelet transform or continuous wavelet transform. 如申請專利範圍第1項所述之該結合小波轉換及邊緣偵測建立單張影像 深度圖的裝置,其中,該邊緣偵測演算法可為Roberts Cross算子、Prewitt算子、Sobel算子、Canny算子、羅盤算子、Marr-Hildreth、小波轉換其中之一種。 Create a single image by combining wavelet transform and edge detection as described in item 1 of the patent application The depth map device, wherein the edge detection algorithm can be one of Roberts Cross operator, Prewitt operator, Sobel operator, Canny operator, compass operator, Marr-Hildreth, wavelet transform. 如申請專利範圍第1項所述之該結合小波轉換及邊緣偵測建立單張影像深度圖的裝置,其中,該深度計算單元所執行之該深度預測演算法,其步驟為依據該原始影像之一灰階值直方圖之局部最大值個數,建立一窗口,並依據該影像分析之結果執行一模糊度之計算。 The device for creating a single image depth map combining wavelet transform and edge detection as described in item 1 of the patent scope, wherein the steps of the depth prediction algorithm executed by the depth calculation unit are based on the original image The number of local maximums of a gray-scale value histogram creates a window, and performs a calculation of ambiguity based on the result of the image analysis. 一種結合小波轉換及邊緣偵測建立單張影像深度圖的方法,其係應用於一結合小波轉換及邊緣偵測建立單張影像深度圖的裝置,包括有一影像擷取單元、一影像分析單元、一影像合成單元、一深度計算單元,且所述之各單元互相成資訊連結,該結合小波轉換及邊緣偵測建立單張影像深度圖的裝置,其實施方法包括:一輸入原始影像步驟,透過該影像擷取單元輸入一原始影像;一影像分析步驟,承上,該影像分析單元執行一小波轉換演算法及一邊緣偵測演算法分析該影像擷取單元輸入之該原始影像,且該小波轉換演算法進一步包含有一小波轉換閥值設立步驟;一建立散焦圖步驟,當該影像分析步驟完成後,該影像合成單元將該影像分析步驟所分析之該原始應像的結果,執行一影像合成,進而產生一散焦圖;一深度預測步驟,當該散焦圖產生後,該深度計算單元依據該影像分析步驟之結果執行一深度預測演算法;一深度擴散步驟,當該深度計算單元執行完該深度預測演算法後, 執行一深度擴散演算法;一產生深度圖步驟,承上,當該深度擴散演算法完成後,產生一深度圖。 A method combining wavelet transform and edge detection to create a single image depth map, which is applied to a device combining wavelet transform and edge detection to create a single image depth map, includes an image capture unit, an image analysis unit, An image synthesis unit and a depth calculation unit, and the units described above are connected to each other in information. The device that combines wavelet transform and edge detection to create a single image depth map, the implementation method includes: a step of inputting original images The image capture unit inputs an original image; an image analysis step, in succession, the image analysis unit executes a wavelet transform algorithm and an edge detection algorithm to analyze the original image input by the image capture unit, and the wavelet The conversion algorithm further includes a wavelet conversion threshold setting step; a defocus map creation step, when the image analysis step is completed, the image synthesis unit performs an image on the result of the original image analyzed by the image analysis step Synthesis to produce a defocus map; a depth prediction step, when the defocus map is generated, the depth Depth calculation unit performs a prediction algorithm based on the results of the image analysis step; step a diffusion depth, when the depth of the depth calculation unit after executing prediction algorithm, A depth diffusion algorithm is executed; a step of generating a depth map is continued, and after the depth diffusion algorithm is completed, a depth map is generated. 如申請專利範圍第6項所述之該結合小波轉換及邊緣偵測建立單張影像深度圖的方法,其中,該深度預測演算法其步驟為依據該原始影像之一灰階值直方圖之局部最大值個數,建立一窗口,並依據該影像分析之結果執行一模糊度之計算。 The method of combining a wavelet transform and edge detection to create a single image depth map as described in item 6 of the patent scope, wherein the step of the depth prediction algorithm is based on a part of a grayscale value histogram of the original image The maximum number is used to establish a window, and a blur degree calculation is performed based on the result of the image analysis. 如申請專利範圍第6項所述之該結合小波轉換及邊緣偵測建立單張影像深度圖的方法,其中,該深度擴散演算法可為一拉普拉斯插值技術或一全域插值演算法,其中之一種。 As described in item 6 of the patent application scope, the method of combining wavelet transform and edge detection to create a single image depth map, wherein the depth diffusion algorithm can be a Laplace interpolation technique or a global interpolation algorithm, One of them.
TW105121679A 2016-07-11 2016-07-11 Apparatus and method for combining with wavelet transformer and edge detector to generate a depth map from a single image TWI613903B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW105121679A TWI613903B (en) 2016-07-11 2016-07-11 Apparatus and method for combining with wavelet transformer and edge detector to generate a depth map from a single image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW105121679A TWI613903B (en) 2016-07-11 2016-07-11 Apparatus and method for combining with wavelet transformer and edge detector to generate a depth map from a single image

Publications (2)

Publication Number Publication Date
TW201803342A TW201803342A (en) 2018-01-16
TWI613903B true TWI613903B (en) 2018-02-01

Family

ID=61725230

Family Applications (1)

Application Number Title Priority Date Filing Date
TW105121679A TWI613903B (en) 2016-07-11 2016-07-11 Apparatus and method for combining with wavelet transformer and edge detector to generate a depth map from a single image

Country Status (1)

Country Link
TW (1) TWI613903B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI722297B (en) * 2018-06-28 2021-03-21 國立高雄科技大學 Internal edge detection system and method thereof for processing medical images

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200816800A (en) * 2006-10-03 2008-04-01 Univ Nat Taiwan Single lens auto focus system for stereo image generation and method thereof
TW201015487A (en) * 2008-10-03 2010-04-16 Himax Tech Ltd 3D depth generation by local blurriness estimation
CN103559702A (en) * 2013-09-26 2014-02-05 哈尔滨商业大学 Method for estimating depth of two-dimensional single view image based on wavelet coefficient entropy
CN105121680A (en) * 2013-04-23 2015-12-02 新日铁住金株式会社 Spring steel having excellent fatigue characteristics and process for manufacturing same
TWM535848U (en) * 2016-07-11 2017-01-21 Lunghwa Univ Of Science And Tech Apparatus for combining with wavelet transformer and edge detector to generate a depth map from a single image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200816800A (en) * 2006-10-03 2008-04-01 Univ Nat Taiwan Single lens auto focus system for stereo image generation and method thereof
TW201015487A (en) * 2008-10-03 2010-04-16 Himax Tech Ltd 3D depth generation by local blurriness estimation
CN105121680A (en) * 2013-04-23 2015-12-02 新日铁住金株式会社 Spring steel having excellent fatigue characteristics and process for manufacturing same
CN103559702A (en) * 2013-09-26 2014-02-05 哈尔滨商业大学 Method for estimating depth of two-dimensional single view image based on wavelet coefficient entropy
TWM535848U (en) * 2016-07-11 2017-01-21 Lunghwa Univ Of Science And Tech Apparatus for combining with wavelet transformer and edge detector to generate a depth map from a single image

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
(申請號);Matthieu Maitre, "Joint encoding of the depth image based representation using shape-adaptive wavelets",Image Processing, 2008. ICIP 2008. 15th IEEE International Conference on, 2008/12/15 *
Matthieu Maitre, "Joint encoding of the depth image based representation using shape-adaptive wavelets",Image Processing, 2008. ICIP 2008. 15th IEEE International Conference on, 2008/12/15

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI722297B (en) * 2018-06-28 2021-03-21 國立高雄科技大學 Internal edge detection system and method thereof for processing medical images

Also Published As

Publication number Publication date
TW201803342A (en) 2018-01-16

Similar Documents

Publication Publication Date Title
US8718356B2 (en) Method and apparatus for 2D to 3D conversion using scene classification and face detection
US8059911B2 (en) Depth-based image enhancement
RU2587425C2 (en) Method of producing high-quality image depth map
US20110148868A1 (en) Apparatus and method for reconstructing three-dimensional face avatar through stereo vision and face detection
CN107025660B (en) Method and device for determining image parallax of binocular dynamic vision sensor
CN110503620B (en) Image fusion method based on Fourier spectrum extraction
US20150379720A1 (en) Methods for converting two-dimensional images into three-dimensional images
CN107689050B (en) Depth image up-sampling method based on color image edge guide
US8565513B2 (en) Image processing method for providing depth information and image processing system using the same
KR20130112311A (en) Apparatus and method for reconstructing dense three dimension image
US20230394834A1 (en) Method, system and computer readable media for object detection coverage estimation
US10298914B2 (en) Light field perception enhancement for integral display applications
KR101125061B1 (en) A Method For Transforming 2D Video To 3D Video By Using LDI Method
CN111465937B (en) Face detection and recognition method employing light field camera system
CN108961182B (en) Vertical direction vanishing point detection method and video correction method for video image
TWI613903B (en) Apparatus and method for combining with wavelet transformer and edge detector to generate a depth map from a single image
Taha et al. Partial Differential Equations and Digital Image Processing: A Review
TWM535848U (en) Apparatus for combining with wavelet transformer and edge detector to generate a depth map from a single image
Ji et al. An automatic 2D to 3D conversion algorithm using multi-depth cues
US9171357B2 (en) Method, apparatus and computer-readable recording medium for refocusing photographed image
KR20140026078A (en) Apparatus and method for extracting object
TWI610271B (en) Apparatus and method for combining with wavelet transformer and corner point detector to generate a depth map from a single image
TWM542833U (en) Apparatus for combining with wavelet transformer and corner point detector to generate a depth map from a single image
Che et al. Reduced-reference quality metric for screen content image
KR101626679B1 (en) Method for generating stereoscopic image from 2D image and for medium recording the same

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees