TW202422476A - Method and computer device for generating a side-by-side 3d image - Google Patents

Method and computer device for generating a side-by-side 3d image Download PDF

Info

Publication number
TW202422476A
TW202422476A TW111144516A TW111144516A TW202422476A TW 202422476 A TW202422476 A TW 202422476A TW 111144516 A TW111144516 A TW 111144516A TW 111144516 A TW111144516 A TW 111144516A TW 202422476 A TW202422476 A TW 202422476A
Authority
TW
Taiwan
Prior art keywords
image
mesh
grid
area
coordinate system
Prior art date
Application number
TW111144516A
Other languages
Chinese (zh)
Other versions
TWI812548B (en
Inventor
佑 和
徐文正
林士豪
譚馳澔
Original Assignee
宏碁股份有限公司
Filing date
Publication date
Application filed by 宏碁股份有限公司 filed Critical 宏碁股份有限公司
Priority to TW111144516A priority Critical patent/TWI812548B/en
Priority claimed from TW111144516A external-priority patent/TWI812548B/en
Application granted granted Critical
Publication of TWI812548B publication Critical patent/TWI812548B/en
Publication of TW202422476A publication Critical patent/TW202422476A/en

Links

Images

Abstract

A method for generating a side-by-side three-dimensional (3D) image based on a raw image is provided. The method includes the following steps: creating a 3D mesh; estimating depth information of the raw image; updating the left mesh area and the right mesh area of the 3D mesh based on the estimated depth information of the raw image; projecting each of the mesh vertices of the left mesh area onto a coordinate system of the side-by-side 3D image based on a left eye position, and projecting each of the mesh vertices of the right mesh area onto the coordinate system of the side-by-side 3D image based on a right eye position; and obtaining the side-by-side 3D image by coloring the left mesh area and the right mesh area projected onto the coordinate system of the side-by-side 3D image based on the raw image.

Description

生成並排三維影像的方法及電腦裝置Method and computer device for generating side-by-side three-dimensional images

本發明大致涉及影像處理技術,特別涉及並排(side-by-side)三維(3D)影像的生成。The present invention relates generally to image processing techniques, and more particularly to the generation of side-by-side three-dimensional (3D) images.

並排3D影像是由兩個並排對齊的影像所組成。這兩個影像看似相同,實則略有不同,分別模擬我們用左眼及右眼看到的兩個影像。兩個影像之間的差異經過大腦的整合及處理,可讓觀賞者感知到3D效果。Side-by-side 3D images are composed of two images aligned side by side. These two images appear to be the same, but are actually slightly different, simulating the two images we see with our left and right eyes respectively. The difference between the two images is integrated and processed by the brain, allowing the viewer to perceive the 3D effect.

並排3D影像通常是顯示在穿戴式裝置上,諸如 3D/VR眼鏡或頭戴式顯示器。為了在裸視立體顯示裝置上顯示並排的3D影像,需要影像渲染流水線中的更多技術,例如眼睛追踪(eye tracking)及影像編織(或交錯)。在某些應用情境中,例如虛擬實境 (VR)畫面或立體3D遊戲,使用者的位置(當然還有使用者的眼睛)可能會頻繁且迅速地變化。每當使用者的位置改變時,需要重新計算要顯示的畫面,這會消耗相當大的運算資源。Side-by-side 3D images are usually displayed on wearable devices, such as 3D/VR glasses or head-mounted displays. In order to display side-by-side 3D images on a naked-eye stereo display device, more technologies in the image rendering pipeline are required, such as eye tracking and image weaving (or interlacing). In some application scenarios, such as virtual reality (VR) images or stereoscopic 3D games, the user's position (and of course the user's eyes) may change frequently and rapidly. Every time the user's position changes, the image to be displayed needs to be recalculated, which consumes considerable computing resources.

有鑑於上述問題,希望有一種方法及電腦裝置,能比傳統方法更有效率地生成並排3D影像。In view of the above problems, it is desirable to have a method and a computer device that can generate side-by-side 3D images more efficiently than conventional methods.

本揭露之一實施例提供一種基於原始影像生成並排(side-by-side)三維(3D)影像的方法。該方法是由電腦裝置所執行。該方法包含以下步驟:創建3D網格;基於估算出的原始影像之深度資訊,更新3D網格的左網格區及右網格區;基於左眼位置將左網格區的每一網格頂點投影到並排3D影像之座標系統上,及基於右眼位置將右網格區的每一網格頂點投影到並排3D影像之座標系統上;以及基於原始影像,對投影在並排3D影像之座標系統上的左網格區及右網格區進行著色,以取得並排3D影像。One embodiment of the present disclosure provides a method for generating a side-by-side three-dimensional (3D) image based on an original image. The method is performed by a computer device. The method includes the following steps: creating a 3D grid; updating a left grid area and a right grid area of the 3D grid based on estimated depth information of the original image; projecting each grid vertex of the left grid area onto a coordinate system of the side-by-side 3D image based on a left eye position, and projecting each grid vertex of the right grid area onto a coordinate system of the side-by-side 3D image based on a right eye position; and coloring the left grid area and the right grid area projected onto the coordinate system of the side-by-side 3D image based on the original image to obtain the side-by-side 3D image.

在某些實施例中,創建3D網格的步驟包含創建由三個彼此相鄰的網格頂點所構成之三角形的紋理(texture)。In some embodiments, the step of creating a 3D mesh includes creating a texture of triangles formed by three adjacent mesh vertices.

在某些實施例中,基於原始影像,對投影在並排3D影像之座標系統上的左網格區及右網格區進行著色,以取得並排3D影像的步驟,包含將原始影像的色彩紋理插捕(interpolate)到投影在並排3D影像之座標系統上的左網格區及右網格區。In some embodiments, the step of coloring the left grid area and the right grid area projected on the coordinate system of the side-by-side 3D image based on the original image to obtain the side-by-side 3D image includes interpolating the color texture of the original image to the left grid area and the right grid area projected on the coordinate system of the side-by-side 3D image.

本揭露之一實施例提供一種基於原始影像生成並排3D影像的電腦裝置。該電腦裝置包含中央處理單元(CPU)及圖形處理單元(GPU)。CPU設置以運行程式以請求GPU執行上述方法的步驟。One embodiment of the present disclosure provides a computer device for generating side-by-side 3D images based on original images. The computer device includes a central processing unit (CPU) and a graphics processing unit (GPU). The CPU is configured to run a program to request the GPU to execute the steps of the above method.

本揭露的方法及電腦裝置提供一種新穎的影像處理技術,藉由在同一網格上同時渲染左視圖及右視圖以生成並排影像,取代將左眼及右眼分開渲染兩次然後再對齊它們的作法。藉由僅將資源(舉例來說,網格模型、深度資訊、色彩紋理…等)載入GPU一次,可節省 CPU 呼叫次數。此外,可降低CPU呼叫與硬體執行之間出現同步問題的可能性。The disclosed method and computer device provide a novel image processing technique, which generates side-by-side images by rendering the left view and the right view simultaneously on the same grid, instead of rendering the left eye and the right eye separately twice and then aligning them. By loading resources (for example, grid models, depth information, color textures, etc.) into the GPU only once, the number of CPU calls can be saved. In addition, the possibility of synchronization problems between CPU calls and hardware execution can be reduced.

以下敘述列舉本發明的多種實施例,但並非意圖限制本發明內容。實際的發明範圍,是由申請專利範圍所界定。The following description lists various embodiments of the present invention, but is not intended to limit the content of the present invention. The actual scope of the invention is defined by the scope of the patent application.

在以下所列舉的各實施例中,將以相同的標號代表相同或相似的元件或組件。In the various embodiments listed below, the same reference numerals will be used to represent the same or similar elements or components.

應理解的是,說明書中所使用的用語「包含」及「包括」指示特定技術特徵、數值、方法步驟、程序操作、元件及/或組件之存在,但並不排除額外的技術特徵、數值、方法步驟、程序操作、元件、組件或上述的任意組合。It should be understood that the terms "comprises" and "includes" used in the specification indicate the existence of specific technical features, values, method steps, process operations, elements and/or components, but do not exclude additional technical features, values, method steps, process operations, elements, components or any combination thereof.

在本說明書中以及申請專利範圍中的序號,例如「第一」、「第二」等等,僅是為了方便說明,彼此之間並沒有順序上的先後關係。The serial numbers in this specification and the scope of the patent application, such as "first", "second", etc., are only for the convenience of explanation and have no sequential relationship with each other.

第1圖是繪示用以生成並排3D影像120的示例傳統作法之概念流程的示意圖。在繪示出的示例中,是以網格模型定義影像中物件的形狀與深度(例如:山)。FIG1 is a schematic diagram illustrating a conceptual flow of an exemplary conventional method for generating a side-by-side 3D image 120. In the illustrated example, a mesh model is used to define the shape and depth of an object (eg, a mountain) in the image.

如第1圖所示,創建出的網格101包含在X-Y平面上依序排列的複數個三角形(可替換為其他種類的多邊形),每個三角形具有一組頂點。藉由為網格101中的每個三角形的頂點賦予特定高度(即,沿著Z軸方向的尺度),網格101會被更新為已更新網格102。該特定高度是取決於從原始影像擷取的深度資訊100,並且儲存在深度緩衝區(亦稱為「z緩衝區」)中。然後,藉由對已更新網格102中的三角形進行著色,以生成左眼影像103(即,人類左眼的視圖)。同樣地,創建出的網格111包含在X-Y平面上依序排列的複數個三角形(可替換為其他種類的多邊形),每個三角形具有一組頂點。藉由為網格111中的每個三角形的頂點賦予特定高度(即,沿Z軸方向的尺度),網格111會被更新為已更新網格112。該特定高度是取決於從原始影像捕獲的深度資訊100,並且儲存在深度緩衝區中。然後,藉由基於原始影像10的色彩紋理對已更新網格112中的三角形進行著色,以生成右眼影像113(即,人類右眼的視圖)。左眼影像103與右眼影像113看似相同,實則略有不同。最後,藉由並排對齊左眼影像103及右眼影像113,以生成單個並排3D影像120。並排3D影像120的左部是來自左眼影像103,而並排3D影像120的右部是來自右眼影像113。As shown in FIG. 1 , the created mesh 101 includes a plurality of triangles (which may be replaced by other types of polygons) arranged in sequence on the X-Y plane, each triangle having a set of vertices. The mesh 101 is updated to an updated mesh 102 by assigning a specific height (i.e., a scale along the Z-axis) to the vertex of each triangle in the mesh 101. The specific height depends on the depth information 100 captured from the original image and stored in the depth buffer (also referred to as the "z-buffer"). Then, the left eye image 103 (i.e., the view of the left eye of a human being) is generated by coloring the triangles in the updated mesh 102. Similarly, the created mesh 111 includes a plurality of triangles (which may be replaced by other types of polygons) arranged in sequence on the X-Y plane, each triangle having a set of vertices. The mesh 111 is updated to an updated mesh 112 by assigning a specific height (i.e., a scale along the Z-axis) to the vertex of each triangle in the mesh 111. The specific height depends on the depth information 100 captured from the original image and stored in the depth buffer. Then, the triangles in the updated mesh 112 are colored based on the color texture of the original image 10 to generate a right eye image 113 (i.e., the view of the human right eye). The left eye image 103 and the right eye image 113 appear to be the same, but are actually slightly different. Finally, by aligning the left-eye image 103 and the right-eye image 113 side by side, a single side-by-side 3D image 120 is generated. The left portion of the side-by-side 3D image 120 is from the left-eye image 103 , and the right portion of the side-by-side 3D image 120 is from the right-eye image 113 .

從第1圖中可見,並排3D影像120是透過繪製畫面兩次而生成的,每隻眼睛各一次,這意味著用以繪製並排3D影像120的某些資源,會是僅繪製左眼影像103或僅繪製右眼影像113的兩倍。舉例來說,網格101及網格111是使用相同的網格模型所創建,因此網格模型從記憶體中載入了兩次。取得已更新網格102及112所需的原始影像10的深度資訊100是相同的,但是它從深度緩衝區中載入了兩次,為已更新網格102及112每者各一次。色彩紋理(舉例來說,取得左眼影像103及右眼影像113所需的原始影像10的每個像素的RGB值)也從記憶體中載入了兩次,用以已更新網格102及112每者各一次。As can be seen from FIG. 1 , the side-by-side 3D image 120 is generated by drawing the image twice, once for each eye, which means that some resources used to draw the side-by-side 3D image 120 are twice as much as drawing only the left eye image 103 or only the right eye image 113. For example, the mesh 101 and the mesh 111 are created using the same mesh model, so the mesh model is loaded from memory twice. The depth information 100 of the original image 10 required to obtain the updated meshes 102 and 112 is the same, but it is loaded from the depth buffer twice, once for each of the updated meshes 102 and 112. The color texture (eg, the RGB values of each pixel of the original image 10 required to obtain the left eye image 103 and the right eye image 113) is also loaded from the memory twice, once to update the grids 102 and 112 respectively.

第2圖是根據本揭露之實施例繪示生成並排3D影像203的概念流程的示意圖。在此示例中,網格201是以兩倍於網格101及111的寬度所創建的更大網格。將網格201更新為已更新網格202所需的原始影像10的深度資訊100,與用以取得已更新網格102或112所需的原始影像10之深度資訊100相同。已更新網格201的左右部分,分別為左眼及右眼所準備。因此,並排3D影像203可藉由直接對單個已更新網格202的左右部分進行著色而取得,而不需要分別繪製左眼影像及右眼影像然後再對齊它們。如此一來,原始影像10的網格模型、深度資訊100及色彩紋理等資源,僅載入了一次,而不必載入兩次。FIG. 2 is a schematic diagram illustrating a conceptual process of generating a side-by-side 3D image 203 according to an embodiment of the present disclosure. In this example, grid 201 is a larger grid created with twice the width of grids 101 and 111. The depth information 100 of the original image 10 required to update grid 201 to updated grid 202 is the same as the depth information 100 of the original image 10 required to obtain updated grids 102 or 112. The left and right parts of the updated grid 201 are prepared for the left eye and the right eye, respectively. Therefore, the side-by-side 3D image 203 can be obtained by directly coloring the left and right parts of a single updated grid 202, without the need to draw the left eye image and the right eye image separately and then align them. In this way, the mesh model, depth information 100, and color texture of the original image 10 are only loaded once instead of twice.

第3圖是根據本揭露之實施例繪示用以生成並排三維(3D)影像的電腦裝置300的示意方塊圖。如第3圖所示,電腦裝置300包含中央處理單元(CPU)301、圖形處理單元(GPU)302、輸入裝置303及儲存裝置304等元件,它們透過系統匯流排305彼此耦接。FIG. 3 is a schematic block diagram of a computer device 300 for generating side-by-side three-dimensional (3D) images according to an embodiment of the present disclosure. As shown in FIG. 3 , the computer device 300 includes components such as a central processing unit (CPU) 301, a graphics processing unit (GPU) 302, an input device 303, and a storage device 304, which are coupled to each other via a system bus 305.

電腦裝置300是能夠執行運算任務的電子裝置,諸如個人電腦(包含桌上型電腦、筆記型電腦及平板電腦),或伺服器電腦。The computer device 300 is an electronic device capable of performing computing tasks, such as a personal computer (including a desktop computer, a laptop computer, and a tablet computer), or a server computer.

CPU 301是一種通用處理器,設置以運行儲存在儲存裝置304中的圖形驅動程式307及應用程式308。根據本揭露之實施例,CPU 301更設置以運行儲存在儲存裝置304中的第一程式309,以請求GPU 304執行用以生成並排三維(3D)影像的方法之步驟。之後將參考第4圖敘述該方法之步驟。The CPU 301 is a general purpose processor configured to run a graphics driver 307 and an application 308 stored in a storage device 304. According to an embodiment of the present disclosure, the CPU 301 is further configured to run a first program 309 stored in the storage device 304 to request the GPU 304 to execute steps of a method for generating a side-by-side three-dimensional (3D) image. The steps of the method will be described below with reference to FIG. 4.

GPU 302可以是專門設計以執行電腦圖形運算及影像處理的電子電路,用以減輕通用的中央處理單元(CPU)的負擔。 因此,GPU 302用於圖形運算及影像處理,比起通用CPU 301更有效率。GPU 302 can be an electronic circuit specially designed to perform computer graphics calculations and image processing to reduce the burden of a general-purpose central processing unit (CPU). Therefore, GPU 302 is more efficient in graphics calculations and image processing than general-purpose CPU 301.

輸入裝置303可包含鍵盤、滑鼠、觸控式面板等任何能夠接收觀賞者控制命令的裝置,但本發明並不對此限定。在一實施例中,輸入裝置303允許觀賞者啟用/停用3D畫面,換言之,允許觀賞者在顯示器的2D模式與3D模式之間進行切換。在另一實施例中,輸入裝置303允許觀賞者調整(增加或減少)瞳距(interpupillary distance;IPD)參數設定,瞳距參數設定涉及3D網格如何投影到並排3D影像的座標系統上。The input device 303 may include any device capable of receiving viewer control commands, such as a keyboard, a mouse, a touch panel, etc., but the present invention is not limited thereto. In one embodiment, the input device 303 allows the viewer to enable/disable the 3D image, in other words, allows the viewer to switch between the 2D mode and the 3D mode of the display. In another embodiment, the input device 303 allows the viewer to adjust (increase or decrease) the interpupillary distance (IPD) parameter setting, which is related to how the 3D grid is projected onto the coordinate system of the side-by-side 3D images.

儲存裝置304可以是非揮發性儲存裝置,諸如硬碟、固態硬碟(SSD)、快閃記憶體或唯讀記憶體,但本揭露並不對此限定。 根據本發明之實施例,儲存裝置304用以儲存圖形驅動程式307、應用程式308及第一程式309。The storage device 304 can be a non-volatile storage device, such as a hard disk, a solid state hard disk (SSD), a flash memory or a read-only memory, but the present disclosure is not limited thereto. According to an embodiment of the present invention, the storage device 304 is used to store a graphics driver 307, an application program 308 and a first program 309.

圖形驅動程式307是一組軟體程式,允許安裝有應用程式308的作業系統(例如Windows、Linux、MacOS…等)與GPU 303進行通訊。Graphics driver 307 is a set of software programs that allow the operating system (such as Windows, Linux, MacOS, etc.) installed with application 308 to communicate with GPU 303.

應用程式308可以是任何給觀賞者提供視覺化影像或畫面的軟體程式,諸如游戲、影音/多媒體播放程式、網頁瀏覽器(例如當觀賞者使用它在YouTube之類的線上影音平台或Twitter之類的社群媒體上觀賞影片時)、相片觀賞程式或其他視覺娛樂應用程式。Application 308 can be any software program that provides visual images or pictures to viewers, such as games, video/multimedia players, web browsers (for example, when viewers use it to watch videos on online video platforms such as YouTube or social media such as Twitter), photo viewing programs, or other visual entertainment applications.

在第3圖的示例情境中,由於顯示裝置是在同一螢幕中呈現左眼影像及右眼影像(即,如前所述的第一影像及第二影像)的裸視立體顯示裝置310,所以GPU 302更設置以基於並排影像(例如第1圖中的並排影像120及第2圖中的並排影像203)執行交錯(或編織)程序,以生成立體影像。產生立體影像後,GPU 302透過傳輸介面306將立體影像傳送至裸視立體顯示裝置310。In the example scenario of FIG. 3 , since the display device is a auto-stereoscopic display device 310 that presents a left-eye image and a right-eye image (i.e., the first image and the second image as described above) on the same screen, the GPU 302 is further configured to perform an interlacing (or weaving) process based on the side-by-side images (e.g., the side-by-side image 120 in FIG. 1 and the side-by-side image 203 in FIG. 2 ) to generate a stereoscopic image. After generating the stereoscopic image, the GPU 302 transmits the stereoscopic image to the auto-stereoscopic display device 310 via the transmission interface 306.

傳輸介面306可包含有線傳輸介面及/或無線傳輸介面。有線傳輸介面可包含高畫質多媒體介面(High Definition Multimedia Interface;HDMI)、DisplayPort(DP)介面、嵌入式DisplayPort(eDP)介面、通用序列匯流排(Universal Serial Bus;USB)介面、USB Type-C介面、Thunderbolt介面、數位影音介面(Digital Video Interface;DVI)或其組合。無線傳輸介面可包含第五代(5G)無線系統、藍牙、WiFi、近場通訊(Near Field Communication;NFC)介面等,但本揭露並不對此限定。The transmission interface 306 may include a wired transmission interface and/or a wireless transmission interface. The wired transmission interface may include a High Definition Multimedia Interface (HDMI), a DisplayPort (DP) interface, an embedded DisplayPort (eDP) interface, a Universal Serial Bus (USB) interface, a USB Type-C interface, a Thunderbolt interface, a Digital Video Interface (DVI) or a combination thereof. The wireless transmission interface may include a fifth generation (5G) wireless system, Bluetooth, WiFi, a Near Field Communication (NFC) interface, etc., but the present disclosure is not limited thereto.

裸視立體顯示裝置310是能讓觀賞者在不使用穿戴式裝置(諸如3D/VR眼鏡或頭盔)的情況下顯示立體影像的顯示裝置。裸視立體顯示裝置310可包含顯示控制器311及顯示面板312。顯示控制器311用以根據來自電腦裝置300的顯示模式控制信號,切換顯示面板312的顯示模式(例如,如前所述允許觀賞者透過輸入裝置303在2D模式及3D模式之間進行切換。顯示面板320可以使用本揭露技術領域中任何合適的裸視立體技術以實現裸視立體視覺的效果,諸如視差屏障(parallax barrier)、雙凸透鏡(lenticular lenses)、定向背光(directional backlight)、積分成像(integral imaging)…等,於此不再贅述。藉此,響應於裸視立體顯示裝置310接收到立體影像,藉由在顯示面板上顯示立體影像,可將應用程式的立體3D畫面呈現給觀賞者。The auto-stereoscopic display device 310 is a display device that allows viewers to display stereoscopic images without using wearable devices (such as 3D/VR glasses or helmets). The auto-stereoscopic display device 310 may include a display controller 311 and a display panel 312. The display controller 311 is used to switch the display mode of the display panel 312 according to the display mode control signal from the computer device 300 (for example, as mentioned above, the viewer is allowed to switch between the 2D mode and the 3D mode through the input device 303). The display panel 320 can use any suitable auto-stereoscopic technology in the field of the disclosed technology to achieve the auto-stereoscopic visual effect, such as parallax barrier, lenticular lenses, directional backlight, integral imaging, etc., which will not be repeated here. In this way, in response to the auto-stereoscopic display device 310 receiving the stereoscopic image, the stereoscopic 3D screen of the application can be presented to the viewer by displaying the stereoscopic image on the display panel.

第4圖是根據本揭露之實施例用以基於原始影像生成並排三維(3D)影像的方法400的流程圖。方法400可由電腦裝置執行,例如第3圖中的電腦裝置300。電腦裝置300的CPU 301用以運行第一程式309,以請求GPU 302執行方法400的步驟。如第4圖所示,方法400可包含步驟401-405。FIG. 4 is a flow chart of a method 400 for generating a side-by-side three-dimensional (3D) image based on an original image according to an embodiment of the present disclosure. The method 400 may be executed by a computer device, such as the computer device 300 in FIG. 3 . The CPU 301 of the computer device 300 is used to run a first program 309 to request the GPU 302 to execute the steps of the method 400. As shown in FIG. 4 , the method 400 may include steps 401-405.

於步驟401,創建3D網格(例如第2圖中的網格201)。 然後,方法400進行到步驟402。In step 401 , a 3D grid (such as grid 201 in FIG. 2 ) is created. Then, method 400 proceeds to step 402 .

於步驟402,估算原始影像的深度資訊。然後,方法400進行到步驟403。In step 402, the depth information of the original image is estimated. Then, the method 400 proceeds to step 403.

於步驟403,基於估算出的原始影像之深度資訊,更新3D網格的左網格區及右網格區。 然後,方法400進行到步驟404。In step 403, the left grid area and the right grid area of the 3D grid are updated based on the estimated depth information of the original image. Then, the method 400 proceeds to step 404.

於步驟404,基於左眼位置(即,觀賞者左眼的位置)將左網格區的每一網格頂點投影到並排3D影像之座標系統上,以及基於右眼位置(即觀賞者右眼的位置)將右網格區的每一網格頂點投影到並排3D影像之座標系統上。然後,方法400進行到步驟405。In step 404, each grid vertex of the left grid area is projected onto the coordinate system of the side-by-side 3D image based on the left eye position (i.e., the position of the viewer's left eye), and each grid vertex of the right grid area is projected onto the coordinate system of the side-by-side 3D image based on the right eye position (i.e., the position of the viewer's right eye). Then, method 400 proceeds to step 405.

於步驟405,基於原始影像,對投影在並排3D影像之座標系統上的左網格區及右網格區進行著色,以取得並排3D影像。In step 405, based on the original image, the left grid area and the right grid area projected on the coordinate system of the side-by-side 3D image are colored to obtain the side-by-side 3D image.

在某些實施例中,步驟401包含創建由三個彼此相鄰的網格頂點所構成之三角形的紋理(texture)的操作。舉例來說,如第2圖所示,網格201包含複數個頂點及複數個三角形。每個三角形是由三個彼此相鄰的網格頂點所構成,並具有對應的紋理。當創建網格時,每個三角形的紋理作為一種資料結構,也將被創建(或初始化)。In some embodiments, step 401 includes an operation of creating a texture of a triangle formed by three adjacent mesh vertices. For example, as shown in FIG. 2 , the mesh 201 includes a plurality of vertices and a plurality of triangles. Each triangle is formed by three adjacent mesh vertices and has a corresponding texture. When creating the mesh, the texture of each triangle as a data structure will also be created (or initialized).

在進一步的實施例中,深度資訊可表示為深度圖(depth map)、視差圖(parallax map)或點雲(point cloud)的形式,本揭露並不對此限定。可以在步驟402中使用基於卷積神經網路(convolution neural network;CNN)的模型以估算深度資訊,但本揭露並不對此限定。In a further embodiment, the depth information may be represented in the form of a depth map, a parallax map, or a point cloud, but the present disclosure is not limited thereto. A model based on a convolution neural network (CNN) may be used in step 402 to estimate the depth information, but the present disclosure is not limited thereto.

在某些實施例中,於步驟404所使用的左眼位置及右眼位置,可使用任何已知的眼睛追蹤(eye tracking)技術來測量,本揭露並不對此限定。In some embodiments, the left eye position and the right eye position used in step 404 may be measured using any known eye tracking technology, and the present disclosure is not limited thereto.

在某些實施例中,步驟405可更包含將原始影像的色彩紋理插捕(interpolate)到投影在並排3D影像之座標系統上的左網格區及右網格區的操作。色彩紋理可以用多種色彩空間的格式表示,諸如RGB、YUV、YCbCr、CMYK、sRGB、HSV…等,本揭露並不對此限定。In some embodiments, step 405 may further include an operation of interpolating the color texture of the original image to the left grid area and the right grid area projected on the coordinate system of the side-by-side 3D image. The color texture can be represented by a variety of color space formats, such as RGB, YUV, YCbCr, CMYK, sRGB, HSV, etc., and the present disclosure is not limited thereto.

在某些實施例中,可藉由執行交錯(或編織)程序,基於在步驟405所取得的並排3D影像生成立體影像。然後,將立體影像發送給裸視立體顯示裝置,以顯示立體影像。In some embodiments, a stereoscopic image may be generated based on the side-by-side 3D image obtained in step 405 by performing an interlacing (or weaving) process. Then, the stereoscopic image is sent to a auto-stereoscopic display device to display the stereoscopic image.

本揭露所提供方法及演算法之步驟,可藉由執行處理器而直接應用以硬體及軟體模組或其組合。軟體模組(包含執行指令及相關資料)及其他資料可儲存在資料記憶體中,像是隨機存取記憶體(RAM)、快閃記憶體、唯讀記憶體(ROM)、可抹除可程式唯讀記憶體(EPROM)、電子可抹除可程式唯讀記憶體(EEPROM)、暫存器、硬碟、行動硬碟、CD-ROM、DVD,或本領域中任何其他電腦可讀取儲存媒體格式。舉例來說,儲存媒體可耦接機器裝置,像是電腦/處理器(為方便敘述,於本揭露中以處理器所代表)。處理器可從儲存媒體讀取資訊(例如程式碼),以及可將資訊寫入儲存媒體。儲存媒體可整合處理器。特定應用積體電路(ASIC)包含處理器及儲存媒體。觀察設備包含ASIC。換句話說,處理器及儲存媒體包含在觀察設備中,而並非直接連接觀察設備。此外,在某些實施例中,任何電腦程式適用的產品包含可讀取儲存媒體,其中儲存媒體包含關於一或多個所揭露實施例的程式碼。在某些實施例中,電腦程式產品可包含封裝材料。The steps of the methods and algorithms provided in the present disclosure can be directly applied to hardware and software modules or combinations thereof by executing a processor. The software module (including execution instructions and related data) and other data can be stored in a data memory, such as random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), electronically erasable programmable read-only memory (EEPROM), register, hard disk, removable hard disk, CD-ROM, DVD, or any other computer-readable storage medium format in the art. For example, the storage medium can be coupled to a machine device, such as a computer/processor (for ease of description, the processor is represented in the present disclosure). The processor can read information (e.g., program code) from the storage medium and can write information to the storage medium. The storage medium can integrate the processor. An application specific integrated circuit (ASIC) includes a processor and a storage medium. The observation device includes the ASIC. In other words, the processor and the storage medium are included in the observation device, but are not directly connected to the observation device. In addition, in some embodiments, any product applicable to the computer program includes a readable storage medium, wherein the storage medium includes program code related to one or more disclosed embodiments. In some embodiments, the computer program product may include packaging materials.

本揭露的方法及電腦裝置提供一種新穎的影像處理技術,藉由在同一網格上同時渲染左視圖及右視圖以生成並排影像,取代將左眼及右眼分開渲染兩次然後再對齊它們的作法。藉由僅將資源(舉例來說,網格模型、深度資訊、色彩紋理…等)載入GPU一次,可節省 CPU 呼叫次數。此外,可降低CPU呼叫與硬體執行之間出現同步問題的可能性。The disclosed method and computer device provide a novel image processing technique, which generates side-by-side images by rendering the left view and the right view simultaneously on the same grid, instead of rendering the left eye and the right eye separately twice and then aligning them. By loading resources (for example, grid models, depth information, color textures, etc.) into the GPU only once, the number of CPU calls can be saved. In addition, the possibility of synchronization problems between CPU calls and hardware execution can be reduced.

以上段落採用多種態樣作敘述。顯然地,本文之教示可以多種方式實現,而在示例中所揭露之任何特定架構或功能僅是一種代表性的情況。根據本文之教示,本領域應理解,可獨立實作本文所揭露之各個態樣,或者合併實作兩種以上之態樣。The above paragraphs are described in various ways. Obviously, the teachings of this article can be implemented in many ways, and any specific architecture or function disclosed in the examples is only a representative case. According to the teachings of this article, it should be understood in the art that each aspect disclosed in this article can be implemented independently, or two or more aspects can be implemented in combination.

雖然本揭露已以實施例敘述如上,然其並非用以限定本揭露,任何熟習此技藝者,在不脫離本揭露之精神及範圍內,當可作些許之更動與潤飾,因此發明之保護範圍當視後附之申請專利範圍所界定者為準。Although the present disclosure has been described above with reference to the embodiments, it is not intended to limit the present disclosure. Anyone skilled in the art may make some changes and modifications without departing from the spirit and scope of the present disclosure. Therefore, the protection scope of the invention shall be subject to the definition of the attached patent application scope.

10:原始影像 100:深度資訊 101:網格 102:已更新網格 103:左眼影像 111:網格 112:已更新網格 113:右眼影像 120:並排3D影像 201:網格 202:已更新網格 203:並排3D影像 300:電腦裝置 301:CPU 302:GPU 303:輸入裝置 304:儲存裝置 305:系統匯流排 306:傳輸介面 307:圖形驅動程式 308:應用程式 309:第一程式 310:裸視立體顯示裝置 311:顯示控制器 312:顯示面板 400:方法 401-405:步驟 10: Original image 100: Depth information 101: Grid 102: Updated grid 103: Left eye image 111: Grid 112: Updated grid 113: Right eye image 120: Side-by-side 3D image 201: Grid 202: Updated grid 203: Side-by-side 3D image 300: Computer device 301: CPU 302: GPU 303: Input device 304: Storage device 305: System bus 306: Transmission interface 307: Graphics driver 308: Application program 309: First program 310: Auto-stereoscopic display device 311: Display controller 312: Display panel 400: Method 401-405: Steps

本揭露將可從以下示範的實施例之敘述搭配附帶的圖式更佳地理解。此外,應被理解的是,在本揭露之流程圖中,各區塊的執行順序可被改變,且/或某些區塊可被改變、刪減或合併。 第1圖是繪示用以生成並排3D影像的示例傳統作法之概念流程的示意圖。 第2圖是根據本揭露之實施例繪示生成並排3D影像的概念流程的示意圖。 第3圖是根據本揭露之實施例繪示用以生成並排三維(3D)影像的電腦裝置的示意方塊圖。 第4圖是根據本揭露之實施例用以基於原始影像生成並排三維(3D)影像的方法的流程圖。 The present disclosure will be better understood from the following description of the exemplary embodiments with the accompanying figures. In addition, it should be understood that in the flowchart of the present disclosure, the execution order of each block can be changed, and/or certain blocks can be changed, deleted or merged. FIG. 1 is a schematic diagram of a conceptual flow of an example conventional method for generating side-by-side 3D images. FIG. 2 is a schematic diagram of a conceptual flow of generating side-by-side 3D images according to an embodiment of the present disclosure. FIG. 3 is a schematic block diagram of a computer device for generating side-by-side three-dimensional (3D) images according to an embodiment of the present disclosure. FIG. 4 is a flow chart of a method for generating side-by-side three-dimensional (3D) images based on original images according to an embodiment of the present disclosure.

400:方法 400:Method

401-405:步驟 401-405: Steps

Claims (8)

一種生成並排(side-by-side)三維(3D)影像的方法,該並排3D影像是基於一原始影像所生成,該方法由一電腦裝置所執行,包括以下步驟: 創建一3D網格(mesh),其中該3D網格包括一左網格區及一右網格區,且該左網格區及該右網格區各自具有複數個網格頂點; 估算該原始影像的深度資訊; 基於估算出的該原始影像之該深度資訊,更新該3D網格的該左網格區及該右網格區; 基於一左眼位置將該左網格區的每一網格頂點投影到該並排3D影像之一座標系統上,及基於一右眼位置將該右網格區的每一網格頂點投影到該並排3D影像之該座標系統上;以及 基於該原始影像,對投影在該並排3D影像之該座標系統上的該左網格區及該右網格區進行著色,以取得該並排3D影像。 A method for generating a side-by-side three-dimensional (3D) image, wherein the side-by-side 3D image is generated based on an original image, and the method is executed by a computer device, comprising the following steps: Creating a 3D mesh, wherein the 3D mesh includes a left mesh area and a right mesh area, and the left mesh area and the right mesh area each have a plurality of mesh vertices; Estimating the depth information of the original image; Based on the estimated depth information of the original image, updating the left mesh area and the right mesh area of the 3D mesh; Projecting each mesh vertex of the left mesh area onto a coordinate system of the side-by-side 3D image based on a left eye position, and projecting each mesh vertex of the right mesh area onto the coordinate system of the side-by-side 3D image based on a right eye position; and Based on the original image, the left grid area and the right grid area projected on the coordinate system of the side-by-side 3D image are colored to obtain the side-by-side 3D image. 如請求項1之方法,其中創建該3D網格的步驟,包括: 創建由三個彼此相鄰的該網格頂點所構成之一三角形的紋理(texture)。 As in the method of claim 1, the step of creating the 3D grid comprises: Creating a triangular texture formed by three adjacent vertices of the grid. 如請求項1之方法,其中基於該原始影像,對投影在該並排3D影像之該座標系統上的該左網格區及該右網格區進行著色,以取得該並排3D影像的步驟,包括: 將該原始影像的色彩紋理插捕(interpolate)到投影在該並排3D影像之該座標系統上的該左網格區及該右網格區。 The method of claim 1, wherein the step of coloring the left grid area and the right grid area projected on the coordinate system of the side-by-side 3D image based on the original image to obtain the side-by-side 3D image comprises: Interpolating the color texture of the original image to the left grid area and the right grid area projected on the coordinate system of the side-by-side 3D image. 如請求項1之方法,更包括: 基於該並排3D影像生成一立體影像,及將該立體影像發送給一裸視立體顯示裝置以顯示該立體影像。 The method of claim 1 further includes: Generating a stereoscopic image based on the side-by-side 3D image, and sending the stereoscopic image to a auto-stereoscopic display device to display the stereoscopic image. 一種生成並排(side-by-side)三維(3D)影像的電腦裝置,該並排3D影像是基於一原始影像所生成,該電腦裝置包括一中央處理單元(CPU)及一圖形處理單元(GPU),其中該CPU設置以運行一程式以請求該GPU執行以下步驟: 創建一3D網格(mesh),其中該3D網格包括一左網格區及一右網格區,且該左網格區及該右網格區各自具有複數個網格頂點; 估算該原始影像的深度資訊; 基於估算出的該原始影像之該深度資訊,更新該3D網格的該左網格區及該右網格區; 基於一左眼位置將該左網格區的每一網格頂點投影到該並排3D影像之一座標系統上,及基於一右眼位置將該右網格區的每一網格頂點投影到該並排3D影像之該座標系統上;以及 基於該原始影像,對投影在該並排3D影像之該座標系統上的該左網格區及該右網格區進行著色,以取得該並排3D影像。 A computer device for generating a side-by-side three-dimensional (3D) image, wherein the side-by-side 3D image is generated based on an original image, and the computer device includes a central processing unit (CPU) and a graphics processing unit (GPU), wherein the CPU is configured to run a program to request the GPU to execute the following steps: Create a 3D mesh, wherein the 3D mesh includes a left mesh area and a right mesh area, and the left mesh area and the right mesh area each have a plurality of mesh vertices; Estimate the depth information of the original image; Based on the estimated depth information of the original image, update the left mesh area and the right mesh area of the 3D mesh; Projecting each grid vertex of the left grid area onto a coordinate system of the side-by-side 3D image based on a left eye position, and projecting each grid vertex of the right grid area onto the coordinate system of the side-by-side 3D image based on a right eye position; and Based on the original image, coloring the left grid area and the right grid area projected onto the coordinate system of the side-by-side 3D image to obtain the side-by-side 3D image. 如請求項5之電腦裝置,其中創建該3D網格的步驟包括: 創建由三個彼此相鄰的該網格頂點所構成之一三角形的紋理(texture)。 A computer device as claimed in claim 5, wherein the step of creating the 3D grid includes: Creating a triangular texture formed by three adjacent vertices of the grid. 如請求項5之電腦裝置,其中基於該原始影像,對投影在該並排3D影像之該座標系統上的該左網格區及該右網格區進行著色,以取得該並排3D影像的步驟,包括: 將該原始影像的色彩紋理插捕(interpolate)到投影在該並排3D影像之該座標系統上的該左網格區及該右網格區。 The computer device of claim 5, wherein the step of coloring the left grid area and the right grid area projected on the coordinate system of the side-by-side 3D image based on the original image to obtain the side-by-side 3D image comprises: Interpolating the color texture of the original image to the left grid area and the right grid area projected on the coordinate system of the side-by-side 3D image. 如請求項5之電腦裝置,其中該CPU更設置以請求該GPU基於該並排3D影像生成一立體影像,及將該立體影像發送給一裸視立體顯示裝置以顯示該立體影像。A computer device as claimed in claim 5, wherein the CPU is further configured to request the GPU to generate a stereoscopic image based on the side-by-side 3D image, and to send the stereoscopic image to a auto-stereoscopic display device to display the stereoscopic image.
TW111144516A 2022-11-22 2022-11-22 Method and computer device for generating a side-by-side 3d image TWI812548B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW111144516A TWI812548B (en) 2022-11-22 2022-11-22 Method and computer device for generating a side-by-side 3d image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111144516A TWI812548B (en) 2022-11-22 2022-11-22 Method and computer device for generating a side-by-side 3d image

Publications (2)

Publication Number Publication Date
TWI812548B TWI812548B (en) 2023-08-11
TW202422476A true TW202422476A (en) 2024-06-01

Family

ID=88586046

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111144516A TWI812548B (en) 2022-11-22 2022-11-22 Method and computer device for generating a side-by-side 3d image

Country Status (1)

Country Link
TW (1) TWI812548B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104934B (en) * 2012-10-04 2019-02-19 陈笛 The component and method of the more spectators' Three-dimensional Displays of glasses-free
US9286718B2 (en) * 2013-09-27 2016-03-15 Ortery Technologies, Inc. Method using 3D geometry data for virtual reality image presentation and control in 3D space
TWI562590B (en) * 2014-01-03 2016-12-11 Htc Corp Apparatus and method for creating 3d scene
KR102659114B1 (en) * 2015-09-23 2024-04-23 코닌클리케 필립스 엔.브이. Generation of triangular meshes for three-dimensional images
US10733800B2 (en) * 2018-09-17 2020-08-04 Facebook Technologies, Llc Reconstruction of essential visual cues in mixed reality applications
CN113891061B (en) * 2021-11-19 2022-09-06 深圳市易快来科技股份有限公司 Naked eye 3D display method and display equipment
CN114998559A (en) * 2022-06-30 2022-09-02 刘杰 Real-time remote rendering method for mixed reality binocular stereoscopic vision image

Similar Documents

Publication Publication Date Title
EP3289761B1 (en) Stereoscopic display of objects
JP7166484B1 (en) Generate new frames with rendered and unrendered content from the previous eye
US20140375663A1 (en) Interleaved tiled rendering of stereoscopic scenes
US10217259B2 (en) Method of and apparatus for graphics processing
US20150235409A1 (en) Techniques for cut-away stereo content in a stereoscopic display
US20130210520A1 (en) Storage medium having stored therein game program, game apparatus, game system, and game image generation method
KR101874760B1 (en) Information processing device, control method and recording medium
US20230239458A1 (en) Stereoscopic-image playback device and method for generating stereoscopic images
TWI812548B (en) Method and computer device for generating a side-by-side 3d image
TW202422476A (en) Method and computer device for generating a side-by-side 3d image
US12033266B2 (en) Method and computer device for generating a side-by-side 3D image
KR101227155B1 (en) Graphic image processing apparatus and method for realtime transforming low resolution image into high resolution image
CN118115693A (en) Method and computer device for generating side-by-side three-dimensional images
TWM630947U (en) Stereoscopic image playback apparatus
EP4328657A1 (en) Method and computer device for 3d scene generation
JP6166374B2 (en) 3D image generation apparatus, 3D image generation method, program, and information storage medium
US20240221276A1 (en) Computer system and method for 3d scene generation
TW202428025A (en) Computer system and method for 3d scene generation
TW202325016A (en) Electronic device and method for generating stereoscopic light-field data
CN106231281A (en) A kind of display converting method and device
JP2014103599A (en) Image processing device and image processing method
JP2015119208A (en) Image generating method, image generating device and program