[go: up one dir, main page]

TWI812548B - 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
TWI812548B
TWI812548B TW111144516A TW111144516A TWI812548B TW I812548 B TWI812548 B TW I812548B TW 111144516 A TW111144516 A TW 111144516A TW 111144516 A TW111144516 A TW 111144516A TW I812548 B TWI812548 B TW I812548B
Authority
TW
Taiwan
Prior art keywords
image
grid area
grid
mesh
area
Prior art date
Application number
TW111144516A
Other languages
Chinese (zh)
Other versions
TW202422476A (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 TW111144516A priority Critical patent/TWI812548B/en
Application granted granted Critical
Publication of TWI812548B publication Critical patent/TWI812548B/en
Publication of TW202422476A publication Critical patent/TW202422476A/en

Links

Landscapes

  • Processing Or Creating Images (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

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 in particular 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. The 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 a 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 stereoscopic display device, more technologies in the image rendering pipeline are required, such as eye tracking and image weaving (or interleaving). In some application scenarios, such as virtual reality (VR) scenes or stereoscopic 3D games, the user's position (and of course the user's eyes) may change frequently and rapidly. Whenever the user's position changes, the screen to be displayed needs to be recalculated, which consumes considerable computing resources.

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

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

在某些實施例中,創建3D網格的步驟包含創建由三個彼此相鄰的網格頂點所構成之三角形的紋理(texture)。In some embodiments, the step of creating a 3D mesh includes creating a texture of a triangle 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. Capture (interpolate) the left and right grid areas 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 set to run the program to request the GPU to perform the steps of the above method.

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

以下敘述列舉本發明的多種實施例,但並非意圖限制本發明內容。實際的發明範圍,是由申請專利範圍所界定。The following description enumerates 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 each of the embodiments listed below, the same or similar elements or components will be represented by the same reference numerals.

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

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

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

如第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 Figure 1, the created mesh 101 includes a plurality of triangles (can be replaced by other types of polygons) arranged sequentially on the X-Y plane, and each triangle has a set of vertices. By giving the vertices of each triangle in mesh 101 a specific height (ie, a scale along the Z-axis direction), mesh 101 is updated to updated mesh 102. The specific height is determined by the depth information 100 captured from the original image and stored in the depth buffer (also known as the "z-buffer"). Then, by shading the triangles in the updated mesh 102, a left eye image 103 (ie, the view of the human left eye) is generated. Similarly, the created grid 111 includes a plurality of triangles (can be replaced by other types of polygons) arranged sequentially on the X-Y plane, each triangle having a set of vertices. By giving the vertices of each triangle in mesh 111 a specific height (ie, a scale along the Z-axis direction), mesh 111 is updated to updated mesh 112 . This specific height is determined by the depth information 100 captured from the original image and stored in the depth buffer. Then, a right-eye image 113 (ie, the view of the human right eye) is generated by shading the triangles in the updated mesh 112 based on the color texture of the original image 10 . The left eye image 103 and the right eye image 113 appear to be the same, but are actually slightly different. Finally, a single side-by-side 3D image 120 is generated by aligning the left-eye image 103 and the right-eye image 113 side by side. The left part of the side-by-side 3D image 120 is from the left-eye image 103, and the right part 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 in Figure 1, the side-by-side 3D image 120 is generated by drawing the screen twice, once for each eye, which means that some of the resources used to draw the side-by-side 3D image 120 will only draw the left eye image 103 Or just draw the right eye image twice as much as 113. For example, grid 101 and grid 111 are created using the same grid model, so the grid 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 (for example, 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 memory twice to update the grid 102 and 112 once each.

第2圖是根據本揭露之實施例繪示生成並排3D影像203的概念流程的示意圖。在此示例中,網格201是以兩倍於網格101及111的寬度所創建的更大網格。將網格201更新為已更新網格202所需的原始影像10的深度資訊100,與用以取得已更新網格102 或112所需的原始影像10之深度資訊100相同。已更新網格202的左右部分,分別為左眼及右眼所準備。因此,並排3D影像203可藉由直接對單個已更新網格202的左右部分進行著色而取得,而不需要分別繪製左眼影像及右眼影像然後再對齊它們。如此一來,原始影像10的網格模型、深度資訊100及色彩紋理等資源,僅載入了一次,而不必載入兩次。 FIG. 2 is a schematic diagram illustrating a conceptual process of generating side-by-side 3D images 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 . Update the grid 201 to the depth information 100 of the original image 10 required for the updated grid 202, and obtain the updated grid 102 Or 112 the required depth information 100 of the original image 10 is the same. The left and right parts of grid 202 have been updated, respectively for the left eye and the right eye. Therefore, side-by-side 3D images 203 can be obtained by directly shading the left and right portions of a single updated mesh 202, without the need to draw the left and right eye images separately and then align them. In this way, resources such as 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 through 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 notebook computer, and a tablet computer), or a server computer.

CPU 301是一種通用處理器,設置以運行儲存在儲存裝置304中的圖形驅動程式307及應用程式308。根據本揭露之實施例,CPU 301更設置以運行儲存在儲存裝置304中的第一程式309,以請求GPU 302執行用以生成並排三維(3D)影像的方法之步驟。之後將參考第4圖敘述該方法之步驟。 The CPU 301 is a general-purpose processor configured to run graphics drivers 307 and application programs 308 stored in the 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 302 to execute steps of a method for generating side-by-side three-dimensional (3D) images. The steps of this method will be described later with reference to Figure 4.

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

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

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

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

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

在第3圖的示例情境中,由於顯示裝置是在同一螢幕中呈現左眼影像及右眼影像(即,如前所述的第一影像及第二影像) 的裸視立體顯示裝置310,所以GPU 302更設置以基於並排影像(例如第1圖中的並排影像120及第2圖中的並排影像203)執行交錯(或編織)程序,以生成立體影像。產生立體影像後,GPU 302透過傳輸介面306將立體影像傳送至裸視立體顯示裝置310。 In the example scenario in Figure 3, since the display device presents the left-eye image and the right-eye image (i.e., the first image and the second image as mentioned above) on the same screen, The naked-view stereoscopic display device 310 is configured so that the GPU 302 is further configured to execute an interlacing (or weaving) process based on the side-by-side images (such as the side-by-side images 120 in Figure 1 and the side-by-side images 203 in Figure 2) to generate a stereoscopic image. After generating the stereoscopic image, the GPU 302 transmits the stereoscopic image to the naked-eye stereoscopic display device 310 through 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. Wired transmission interfaces may include High Definition Multimedia Interface (HDMI), DisplayPort (DP) interface, embedded DisplayPort (eDP) interface, Universal Serial Bus (USB) interface, USB Type-C interface, Thunderbolt interface, Digital Video Interface (DVI) or a combination thereof. The wireless transmission interface may include fifth-generation (5G) wireless systems, Bluetooth, WiFi, near field communication (Near Field Communication; NFC) interfaces, etc., but this disclosure is not limited to this.

裸視立體顯示裝置310是能讓觀賞者在不使用穿戴式裝置(諸如3D/VR眼鏡或頭盔)的情況下顯示立體影像的顯示裝置。裸視立體顯示裝置310可包含顯示控制器311及顯示面板312。顯示控制器311用以根據來自電腦裝置300的顯示模式控制信號,切換顯示面板312的顯示模式(例如,如前所述允許觀賞者透過輸入裝置303在2D模式及3D模式之間進行切換。顯示面板312可以使用本揭露技術領域中任何合適的裸視立體技術以實現裸視立體視覺的效果,諸如視差屏障(parallax barrier)、雙凸透鏡(lenticular lenses)、定向背光(directional backlight)、積分成像(integral imaging)...等,於此不再贅述。藉此,響應於裸視立體顯示裝置310 接收到立體影像,藉由在顯示面板上顯示立體影像,可將應用程式的立體3D畫面呈現給觀賞者。 The naked-view stereoscopic display device 310 is a display device that allows viewers to display stereoscopic images without using a wearable device (such as 3D/VR glasses or a helmet). The naked-eye 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 described above, allowing the viewer to switch between the 2D mode and the 3D mode through the input device 303. Display The panel 312 can use any suitable autostereoscopic technology in the technical field of the disclosure to achieve the effect of autostereoscopic vision, such as parallax barrier, lenticular lenses, directional backlight, integral imaging ( integral imaging)...etc., which will not be described again here. Thus, in response to the naked-view stereoscopic display device 310 After receiving the stereoscopic image, the stereoscopic 3D image 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。 Figure 4 is a flowchart of a method 400 for generating side-by-side three-dimensional (3D) images based on original images 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 Figure 3 . The CPU 301 of the computer device 300 is used to run the first program 309 to request the GPU 302 to execute the steps of the method 400. As shown in Figure 4, method 400 may include steps 401-405.

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

於步驟402,估算原始影像的深度資訊。然後,方法400進行到步驟403。 In step 402, the depth information of the original image is estimated. Method 400 then 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. Method 400 then 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 based on the right eye position (i.e., the viewer's right eye position) projects each grid vertex in the right grid area onto the coordinate system of the side-by-side 3D image. Method 400 then 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 shaded to obtain the side-by-side 3D image.

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

在進一步的實施例中,深度資訊可表示為深度圖(depth map)、視差圖(parallax map)或點雲(point cloud)的形式,本揭露並不對此限定。可以在步驟402中使用基於卷積神經網路(convolution neural network;CNN)的模型以估算深度資訊,但本揭露並不對此限定。In further embodiments, 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 convolutional neural network (CNN) may be used to estimate depth information in step 402, but the present disclosure is not limited to this.

在某些實施例中,於步驟404所使用的左眼位置及右眼位置,可使用任何已知的眼睛追蹤(eye tracking)技術來測量,本揭露並不對此限定。In some embodiments, the left eye position and the right eye position used in step 404 can be measured using any known eye tracking technology, and this 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 into 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 expressed in a variety of color space formats, such as RGB, YUV, YCbCr, CMYK, sRGB, HSV, etc., and this disclosure is not limited to this.

在某些實施例中,可藉由執行交錯(或編織)程序,基於在步驟405所取得的並排3D影像生成立體影像。然後,將立體影像發送給裸視立體顯示裝置,以顯示立體影像。In some embodiments, a stereoscopic image can be generated based on the side-by-side 3D images obtained in step 405 by performing an interlacing (or weaving) process. Then, the stereoscopic image is sent to a naked-eye 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 this disclosure can be directly applied to hardware and software modules or a combination thereof by executing the processor. Software modules (including execution instructions and related data) and other data can be stored in data memory, such as random access memory (RAM), flash memory, read-only memory (ROM), erasable and Programmable read-only memory (EPROM), electronically erasable programmable read-only memory (EEPROM), scratchpad, hard drive, mobile hard drive, CD-ROM, DVD, or any other computer-readable device in the field Storage media format. For example, the storage medium may be coupled to a machine device, such as a computer/processor (for convenience of description, represented by a processor in this disclosure). The processor can read information (such as program code) from the storage medium and can write information to the storage medium. The storage medium can be integrated with the processor. Application Specific Integrated Circuits (ASICs) include processors and storage media. The observation device contains an ASIC. In other words, the processor and storage medium are included in the observation device rather than directly connected to the observation device. Additionally, in some embodiments, any computer program-enabled product includes a readable storage medium, where the storage medium contains program code related to one or more disclosed embodiments. In some embodiments, a computer program product may include packaging materials.

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

以上段落採用多種態樣作敘述。顯然地,本文之教示可以多種方式實現,而在示例中所揭露之任何特定架構或功能僅是一種代表性的情況。根據本文之教示,本領域應理解,可獨立實作本文所揭露之各個態樣,或者合併實作兩種以上之態樣。The above paragraphs are narrated in various ways. Obviously, the teachings herein may be implemented in a variety of ways, and any specific architecture or functionality disclosed in the examples is only a representative case. Based on 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 combined and implemented.

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

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:In-depth information 101:Grid 102: Grid updated 103:Left eye image 111:Grid 112: Grid updated 113:Right eye image 120: Side-by-side 3D images 201:Grid 202: Grid updated 203: Side-by-side 3D images 300:Computer device 301:CPU 302:GPU 303:Input device 304:Storage device 305: System bus 306:Transmission interface 307: Graphics driver 308:Application 309:First program 310: Naked 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 description of the following exemplary embodiments together with the accompanying drawings. In addition, it should be understood that in the flowchart of the present disclosure, the execution order of each block may be changed, and/or some blocks may be changed, deleted, or merged. Figure 1 is a schematic diagram illustrating a conceptual flow of an example conventional approach to generating side-by-side 3D images. FIG. 2 is a schematic diagram illustrating a conceptual process 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 flowchart 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 side-by-side 3D images. The side-by-side 3D images are generated based on an original image. The method is executed by a computer device and includes the following steps: creating a 3D mesh, wherein The 3D grid includes a left grid area and a right grid area, and the left grid area and the right grid area each have a plurality of grid vertices; the depth information of the original image is estimated; based on the estimated The depth information of the original image, updating the left grid area and the right grid area of the 3D grid; projecting each grid vertex of the left grid area to one of the side-by-side 3D images based on a left eye position on the coordinate system, and project 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, project the coordinates on the side-by-side 3D image The left grid area and the right grid area on the system are shaded to obtain the side-by-side 3D image. 如請求項1之方法,其中創建該3D網格的步驟,包括:創建由三個彼此相鄰的該網格頂點所構成之一三角形的紋理(texture)。 As in the method of claim 1, the step of creating the 3D mesh includes: creating a triangle texture composed of three adjacent vertices of the mesh. 如請求項1之方法,其中基於該原始影像,對投影在該並排3D影像之該座標系統上的該左網格區及該右網格區進行著色,以取得該並排3D影像的步驟,包括:將該原始影像的色彩紋理插捕(interpolate)到投影在該並排3D 影像之該座標系統上的該左網格區及該右網格區。 The method of claim 1, wherein the step of shading 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: : Interpolate the color texture of the original image into the projected side-by-side 3D The left grid area and the right grid area on the coordinate system of the 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 naked-eye 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 that generates side-by-side 3D images. The side-by-side 3D images are generated based on an original image. The computer device includes a central processing unit (CPU) and a graphics processing unit (GPU), wherein the The CPU is configured to run a program to request the GPU to perform the following steps: create a 3D mesh (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 grid area has a plurality of grid vertices; estimate the depth information of the original image; update the left grid area and the right grid area of the 3D grid based on the estimated depth information of the original image; based on A left eye position projects each grid vertex of the left grid area onto a coordinate system of the side-by-side 3D image, and a right eye position projects each grid vertex of the right grid area onto the side-by-side on the coordinate system of the 3D image; and based on the original image, coloring the left grid area and the right grid area projected on the coordinate system of the side-by-side 3D image to obtain the side-by-side 3D image. 如請求項5之電腦裝置,其中創建該3D網格的步驟包括:創建由三個彼此相鄰的該網格頂點所構成之一三角形的紋理(texture)。 The computer device of claim 5, wherein the step of creating the 3D mesh includes: creating a triangle texture composed of three adjacent vertices of the mesh. 如請求項5之電腦裝置,其中基於該原始影像,對投影在該並排3D影像之該座標系統上的該左網格區及該右網格區進行著色,以取得該並排3D影像的步驟,包括: 將該原始影像的色彩紋理插捕(interpolate)到投影在該並排3D影像之該座標系統上的該左網格區及該右網格區。 The computer device of claim 5, wherein the step of shading 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, include: Interpolate the color texture of the original image into 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影像生成一立體影像,及將該立體影像發送給一裸視立體顯示裝置以顯示該立體影像。The computer device of 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 send the stereoscopic image to a naked-eye 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 true TWI812548B (en) 2023-08-11
TW202422476A 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)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150054927A1 (en) * 2012-10-04 2015-02-26 Laurence Luju Chen Method of glassless 3D display
US20150091905A1 (en) * 2013-09-27 2015-04-02 Ortery Technologies, Inc. Method using 3d geometry data for virtual reality image presentation and control in 3d space
TW201528774A (en) * 2014-01-03 2015-07-16 Htc Corp Apparatus and method for creating 3D scene
TW201721587A (en) * 2015-09-23 2017-06-16 皇家飛利浦有限公司 Generation of triangle mesh for a three dimensional image
US20200090406A1 (en) * 2018-09-17 2020-03-19 Facebook Technologies, Llc Reconstruction of essential visual cues in mixed reality applications
CN113891061A (en) * 2021-11-19 2022-01-04 深圳市易快来科技股份有限公司 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

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150054927A1 (en) * 2012-10-04 2015-02-26 Laurence Luju Chen Method of glassless 3D display
US20150091905A1 (en) * 2013-09-27 2015-04-02 Ortery Technologies, Inc. Method using 3d geometry data for virtual reality image presentation and control in 3d space
TW201528774A (en) * 2014-01-03 2015-07-16 Htc Corp Apparatus and method for creating 3D scene
TW201721587A (en) * 2015-09-23 2017-06-16 皇家飛利浦有限公司 Generation of triangle mesh for a three dimensional image
US20200090406A1 (en) * 2018-09-17 2020-03-19 Facebook Technologies, Llc Reconstruction of essential visual cues in mixed reality applications
CN113891061A (en) * 2021-11-19 2022-01-04 深圳市易快来科技股份有限公司 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

Also Published As

Publication number Publication date
TW202422476A (en) 2024-06-01

Similar Documents

Publication Publication Date Title
TWI817335B (en) Stereoscopic image playback apparatus and method of generating stereoscopic images thereof
US10708597B2 (en) Techniques for extrapolating image frames
JP2022179473A (en) Generate new frames with rendered and unrendered content from the previous eye
US10217259B2 (en) Method of and apparatus for graphics processing
CA2913782A1 (en) Interleaved tiled rendering of stereoscopic scenes
US12432329B2 (en) Methods, systems, and media for generating and rendering immersive video content
CN111295693B (en) Image processing method and device
TWI871546B (en) Method and computer device for 3d scene generation
TWI812548B (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
US12315065B2 (en) Computer system and method for 3D scene generation
US12033266B2 (en) Method and computer device for generating a side-by-side 3D image
JP7779313B2 (en) Information processing device, program, and information processing method
CN118115693A (en) Method and computer device for generating side-by-side three-dimensional images
CN105432081B (en) Three-dimensional image generating device, three-dimensional image generating method, program, and information storage medium
TWM630947U (en) Stereoscopic image playback apparatus
TWI865370B (en) Computer system and method for generating a 3d interactive scene
JP6025519B2 (en) Image processing apparatus and image processing method
TW202512728A (en) Method and computer system for 3d scene generation
CN116708737A (en) Stereoscopic image playing device and method for generating stereoscopic image