TW201624422A - Image processing method and electronic device thereof - Google Patents

Image processing method and electronic device thereof Download PDF

Info

Publication number
TW201624422A
TW201624422A TW103144061A TW103144061A TW201624422A TW 201624422 A TW201624422 A TW 201624422A TW 103144061 A TW103144061 A TW 103144061A TW 103144061 A TW103144061 A TW 103144061A TW 201624422 A TW201624422 A TW 201624422A
Authority
TW
Taiwan
Prior art keywords
image
depth value
electronic device
depth
processing module
Prior art date
Application number
TW103144061A
Other languages
Chinese (zh)
Other versions
TWI541761B (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 TW103144061A priority Critical patent/TWI541761B/en
Publication of TW201624422A publication Critical patent/TW201624422A/en
Application granted granted Critical
Publication of TWI541761B publication Critical patent/TWI541761B/en

Links

Abstract

An image processing method and an electronic device thereof are provided. The image processing method includes the following steps. The depth values of a plurality of objects within a reference image are determined according to a depth map that corresponds to the reference image. The objects have at least one first object and at least one second object. It is noted that the depth value of the first object is less than that of the second object. Meantime, a reference depth value is obtained. The first object and a background image are obtained according to the reference image. The first object may be maintained or magnified, wherein the depth value of the first object is less than or equal to the reference depth value. A frame image is generated to make the first object overlap on the frame image and the background image overlap under the frame image.

Description

影像處理方法及其電子裝置 Image processing method and electronic device thereof

本發明關於一種影像處理方法及其電子裝置,特別是指一種能將目標物件凸顯在一外框影像前,以達到立體效果的影像處理方法及其電子裝置。 The invention relates to an image processing method and an electronic device thereof, in particular to an image processing method and an electronic device capable of highlighting a target object in front of an outer frame image to achieve a stereoscopic effect.

一般而言,若要顯示三維(3D)影像的效果,通常需提供兩個不同影像至人的雙眼,以使人的雙眼在同一時間內分別看到不同的影像而產生視差,進而造成立體視覺,例如立體顯示器透過光柵對同一影像進行分光,以讓雙眼所接收之圖像於水平軸上存在偏移量而造成視差,或者是人們可戴上特殊眼鏡(如紅藍(綠)眼鏡),以讓雙眼接收到不同顏色的影像而造成視差。如此,因雙眼看到的兩張影像存在視差,接著大腦會自動重組,而形成立體視覺。 In general, in order to display the effect of three-dimensional (3D) images, it is usually necessary to provide two different images to the eyes of the person, so that the eyes of the person respectively see different images at the same time and generate parallax, thereby causing Stereoscopic vision, for example, a stereoscopic display splits the same image through a grating, so that the image received by both eyes has an offset on the horizontal axis, causing parallax, or people can wear special glasses (such as red and blue (green) Glasses), which causes the eyes to receive images of different colors and cause parallax. In this way, since the two images seen by both eyes have parallax, the brain will automatically recombine to form stereoscopic vision.

然而,上述顯示方式通常需要外加硬體,且在雙眼看到不一樣的影像時,可能會造成人們的眼睛疲累,甚至會導致昏眩等問題。 However, the above display method usually requires the addition of hardware, and when the eyes see different images, it may cause people's eyes to be tired, and may even cause dizziness and the like.

本發明實施例提供一種影像處理方法及其電子裝置,依據深度圖判斷一影像中之多個物件間的相對深度關係,並可將一目標物件放大並疊合於一外框影像之前,藉此凸顯所述目標物件,而 達到立體效果。 The embodiment of the invention provides an image processing method and an electronic device thereof, and determines a relative depth relationship between a plurality of objects in an image according to a depth map, and can enlarge and superimpose a target object before an outer frame image, thereby Highlighting the target object, and Achieve a three-dimensional effect.

本發明實施例提供一種影像處理方法,所述影像處理方法包括以下步驟:依據對應於原始影像的深度圖決定原始影像中之多個物件的深度值,其中所述多個物件包括至少一第一物件及至少一第二物件,且所述至少一第一物件的深度值小於所述至少一第二物件的深度值;取得一基準深度值;依據所述原始影像取得該至少一第一物件及一背景影像;維持所述至少一第一物件的大小或對所述至少一第一物件進行放大,其中所述至少一第一物件的深度值小於或等於所述基準深度值,以及所述至少一第二物件的深度值大於所述基準深度值;產生一外框影像,以分別將所述至少一第一物件及背景影像疊合於所述外框影像之前及之後;以及合成疊合後的所述至少一第一物件、外框影像及背景影像,以生成一合成影像。 An embodiment of the present invention provides an image processing method, where the image processing method includes the following steps: determining a depth value of a plurality of objects in the original image according to a depth map corresponding to the original image, wherein the plurality of objects include at least one first An object and at least one second object, wherein the depth value of the at least one first object is smaller than a depth value of the at least one second object; obtaining a reference depth value; obtaining the at least one first object according to the original image and a background image; maintaining a size of the at least one first object or magnifying the at least one first object, wherein a depth value of the at least one first object is less than or equal to the reference depth value, and the at least a depth value of the second object is greater than the reference depth value; generating a frame image to superimpose the at least one first object and the background image before and after the frame image; and after synthesizing the overlay The at least one first object, the outer frame image and the background image to generate a composite image.

本發明實施例更提供一種電子裝置,所述電子裝置包括顯示模組及處理模組。處理模組耦接顯示模組。處理模組可用以執行上述之影像處理方法,以產生將所述至少一第一物件凸顯於外框影像前的合成影像。顯示模組可用以顯示所述原始影像及所述合成影像。 An embodiment of the present invention further provides an electronic device, where the electronic device includes a display module and a processing module. The processing module is coupled to the display module. The processing module can be configured to perform the image processing method described above to generate a composite image that highlights the at least one first object before the outer frame image. A display module can be used to display the original image and the composite image.

綜上所述,本發明實施例所提供的影像處理方法及其電子裝置,可依據深度圖判斷一影像中之多個物件間的相對深度關係,並可原始影像中選定一目標物件與一背景影像,接著將目標物件放大並疊合於一外框影像之前,以及將背景影像疊合於所述外框影像之後,以凸顯所述目標物件,藉此達到立體效果。換言之,所述電子裝置僅需一張原始影像及一張對應於所述原始影像之深度圖,透過執行所述影像處理方法,即可凸顯目標物件以達立體效果,故相較於習知立體顯示方式,較為簡易且成本更低。 In summary, the image processing method and the electronic device provided by the embodiments of the present invention can determine the relative depth relationship between multiple objects in an image according to the depth map, and select a target object and a background in the original image. The image is then enlarged and superimposed on an outer frame image, and the background image is superimposed on the outer frame image to highlight the target object, thereby achieving a stereoscopic effect. In other words, the electronic device only needs one original image and one depth map corresponding to the original image. By performing the image processing method, the target object can be highlighted to achieve a stereoscopic effect, so that compared with the conventional stereoscopic image The display method is simpler and lower in cost.

為使能更進一步瞭解本發明之特徵及技術內容,請參閱以下有關本發明之詳細說明與附圖,但是此等說明與所附圖式僅係用 來說明本發明,而非對本發明的權利範圍作任何的限制。 In order to further understand the features and technical aspects of the present invention, reference should be made to the detailed description of the invention and the accompanying drawings. The invention is not to be construed as limiting the scope of the invention.

1‧‧‧電子裝置 1‧‧‧Electronic device

11‧‧‧顯示模組 11‧‧‧Display module

12‧‧‧處理模組 12‧‧‧Processing module

13‧‧‧記憶模組 13‧‧‧Memory Module

21、22、23‧‧‧物件 21, 22, 23‧‧‧ objects

D1、D5‧‧‧全景深圖 D1, D5‧‧‧ panoramic depth map

D2、D3、D4、D6‧‧‧合成影像 D2, D3, D4, D6‧‧‧ synthetic images

D11‧‧‧影像 D11‧‧ images

W‧‧‧外框影像 W‧‧‧ frame image

S110~S140‧‧‧步驟 S110~S140‧‧‧Steps

S210~S240‧‧‧步驟 S210~S240‧‧‧Steps

圖1為根據本發明實施例之電子裝置的區塊示意圖。 1 is a block diagram of an electronic device in accordance with an embodiment of the present invention.

圖2為根據本發明實施例之全景深圖。 2 is a panoramic deep view of an embodiment of the present invention.

圖3為根據本發明實施例之第一合成影像。 3 is a first composite image in accordance with an embodiment of the present invention.

圖4為根據本發明實施例之第二合成影像。 4 is a second composite image in accordance with an embodiment of the present invention.

圖5為根據本發明實施例之第三合成影像。 Figure 5 is a third composite image in accordance with an embodiment of the present invention.

圖6為根據本發明另一實施例之全景深圖。 Figure 6 is a panoramic deep view of another embodiment of the present invention.

圖7為根據本發明實施例之第四合成影像。 Figure 7 is a fourth composite image in accordance with an embodiment of the present invention.

圖8為根據本發明實施例之影像處理方法之流程圖。 FIG. 8 is a flowchart of an image processing method according to an embodiment of the present invention.

圖9為根據本發明另一實施例之影像處理方法之流程圖。 FIG. 9 is a flowchart of an image processing method according to another embodiment of the present invention.

在下文將參看隨附圖式更充分地描述各種例示性實施例,在隨附圖式中展示一些例示性實施例。然而,本發明概念可能以許多不同形式來體現,且不應解釋為限於本文中所闡述之例示性實施例。確切而言,提供此等例示性實施例使得本發明將為詳盡且完整,且將向熟習此項技術者充分傳達本發明概念的範疇。在諸圖式中,可為了清楚而誇示層及區之大小及相對大小。類似數字始終指示類似元件。 Various illustrative embodiments are described more fully hereinafter with reference to the accompanying drawings. However, the inventive concept may be embodied in many different forms and should not be construed as being limited to the illustrative embodiments set forth herein. Rather, these exemplary embodiments are provided so that this invention will be in the In the drawings, the size and relative sizes of layers and regions may be exaggerated for clarity. Similar numbers always indicate similar components.

應理解,雖然本文中可能使用術語第一、第二、第三等來描述各種元件,但此等元件不應受此等術語限制。此等術語乃用以區分一元件與另一元件。因此,下文論述之第一元件可稱為第二元件而不偏離本發明概念之教示。如本文中所使用,術語「及/或」包括相關聯之列出項目中之任一者及一或多者之所有組合。 It will be understood that, although the terms first, second, third, etc. may be used herein to describe various elements, such elements are not limited by the terms. These terms are used to distinguish one element from another. Thus, a first element discussed below could be termed a second element without departing from the teachings of the inventive concept. As used herein, the term "and/or" includes any of the associated listed items and all combinations of one or more.

請同時參照圖1及圖2,圖1為根據本發明實施例之電子裝置的區塊示意圖。圖2為根據本發明實施例之全景深圖。如圖1所示, 電子裝置1包括顯示模組11、處理模組12及記憶模組13。處理模組12耦接顯示模組11及記憶模組13。在本實施例中,電子裝置1可以為智慧型手機、筆記型電腦、桌上型電腦、平板電腦、數位相機、數位相框或其他具有數位運算能力及顯示能力之電子裝置,本實施例並不限制電子裝置1的實施態樣。 Please refer to FIG. 1 and FIG. 2 simultaneously. FIG. 1 is a block diagram of an electronic device according to an embodiment of the invention. 2 is a panoramic deep view of an embodiment of the present invention. As shown in Figure 1, The electronic device 1 includes a display module 11 , a processing module 12 , and a memory module 13 . The processing module 12 is coupled to the display module 11 and the memory module 13. In this embodiment, the electronic device 1 can be a smart phone, a notebook computer, a desktop computer, a tablet computer, a digital camera, a digital photo frame, or other electronic device having digital computing capability and display capability. This embodiment is not The implementation of the electronic device 1 is limited.

記憶模組13為一儲存媒體,例如為設於電子裝置1內的嵌入式的暫存記憶體、實體記憶體或是為外接式儲存裝置(如外接式記憶卡),其中記憶模組13儲存有拍攝影像以及經影像處理後產生的深度圖,比如圖2所示之全景深圖D1(即前後景皆清晰之影像)及對應於所述全景深圖D1的深度圖。此例的全景深圖D1所包括的景物以物件21、物件22及物件23示意,物件21、物件22及物件23分別以一圓柱體、一圓錐體及一正方體來表示。在本實施例中,物件21的景深深度相較於物件22及物件23最淺,且物件23的景深深度相較於物件21及物件22最深。因此,於一種深度圖的表示方式中,對應於物件21之灰階值最小,以及對應於物件23之灰階值最大(若以256灰色色階為例,灰階值包括0至255,0是最白,255是最黑)。值得注意的是,本發明實施例並不限制記憶模組13所儲存之影像,即所述全景深圖D1亦可為其他拍攝場景,甚至可為一局部清晰之影像,本發明實施例並不限於此。另外,對應於全景深圖D1之深度圖的建立可以由雷射測距、雙眼視覺、結構光或光場效果來實現,而所述深度圖的實現方式乃是本技術領域之通常知識者的習知技術,故本發明實施例在此不贅述之。尚需注意的是,如前言所述,深度圖的表現方式,雖通常為顏色越深之像素其灰階值越高,但本發明實施例並不以此為限,即深度圖的表現方式亦可為,顏色越深之像素其灰階值越低,即0是最黑,255是最白,只要深度圖的表現方式能表示出遠近資訊即可。 The memory module 13 is a storage medium, for example, an embedded temporary storage memory, a physical memory, or an external storage device (such as an external memory card) disposed in the electronic device 1 , wherein the memory module 13 stores There are captured images and depth maps generated after image processing, such as the panoramic deep map D1 shown in FIG. 2 (ie, the image with clear front and back views) and the depth map corresponding to the panoramic deep map D1. The scene included in the panoramic deep view D1 of this example is illustrated by the object 21, the object 22 and the object 23. The object 21, the object 22 and the object 23 are respectively represented by a cylinder, a cone and a cube. In the present embodiment, the depth of field of the object 21 is shallower than that of the object 22 and the object 23, and the depth of field of the object 23 is the deepest than the object 21 and the object 22. Therefore, in a representation of the depth map, the grayscale value corresponding to the object 21 is the smallest, and the grayscale value corresponding to the object 23 is the largest (if the 256 grayscale is taken as an example, the grayscale value includes 0 to 255, 0. It is the whitest, 255 is the darkest). It should be noted that the embodiment of the present invention does not limit the image stored by the memory module 13, that is, the panoramic deep image D1 may be another shooting scene, or even a partially clear image, which is not in the embodiment of the present invention. Limited to this. In addition, the establishment of the depth map corresponding to the panoramic depth map D1 can be achieved by laser ranging, binocular vision, structured light or light field effects, and the implementation of the depth map is a common knowledge in the art. The prior art is not described here. It should be noted that, as described in the foregoing, the depth map is generally represented by a pixel having a darker color, and the grayscale value is higher. However, the embodiment of the present invention is not limited thereto, that is, the representation manner of the depth map. It can also be that the darker the pixel, the lower the grayscale value, that is, 0 is the darkest, and 255 is the whitest, as long as the depth map can express the near and far information.

處理模組12可由記憶模組13取得全景深圖D1及對應於所 述全景深圖D1的深度圖,並依據所述深度圖判斷出物件21、物件22及物件23的遠近關係,以對應決定物件21、物件22及物件23的深度值。再者,處理模組12可依據深度圖來擷取全景深圖D1中之物件21、物件22及物件23,其中處理模組12依據深度圖擷取全景深圖D1中之物件的相關技術乃是本技術領域之習知技術,故在此不贅述之。此外,處理模組12還可依據一基準深度值及各物件之深度值,來決定將目標物件疊合於一基準面之前,並將一背景影像疊合於所述基準面之後,其中所述基準面例如為一外框影像。接著,處理模組12合成疊合後的所述目標物件、外框影像及背景影像,以產生一合成影像,其中背景影像係為處理模組12依據全景深圖D1所產生,且背景影像包含有目標物件及深度值大於目標物件的物件。於本實施例中,處理模組12可為一積體電路(IC)實現,或由微控制器搭配適當的韌體來實現,或者可以是透過CPU基於軟體來實現的軟體模組,本發明並不限定處理模組12的可能態樣。 The processing module 12 can obtain the panoramic deep image D1 from the memory module 13 and corresponding to the The depth map of the panoramic depth map D1 is described, and the distance relationship between the object 21, the object 22, and the object 23 is determined according to the depth map to correspond to the depth values of the object 21, the object 22, and the object 23. In addition, the processing module 12 can capture the object 21, the object 22, and the object 23 in the panoramic deep view D1 according to the depth map, wherein the processing module 12 captures the related art of the object in the panoramic deep view D1 according to the depth map. It is a well-known technique in the art, and therefore will not be described here. In addition, the processing module 12 may further determine, after the target object is superimposed on a reference surface, and a background image is superimposed on the reference surface, according to a reference depth value and a depth value of each object. The reference plane is, for example, a frame image. Then, the processing module 12 synthesizes the superimposed target object, the outer frame image and the background image to generate a composite image, wherein the background image is generated by the processing module 12 according to the panoramic deep image D1, and the background image includes There are target objects and objects with depth values greater than the target object. In this embodiment, the processing module 12 can be implemented as an integrated circuit (IC), or can be implemented by a microcontroller with an appropriate firmware, or can be a software module implemented by a CPU based on a software. The possible aspects of the processing module 12 are not limited.

在本實施例中,處理模組12依據所述深度圖可判斷物件21、物件22及物件23各自對應於一深度值範圍,但處理模組12會依據物件21、物件22及物件23的最小深度值來作為物件21、物件22及物件23的深度值。例如,若物件21的深度值範圍為20~100,則處理模組12決定物件21的深度值為20。另一方面,記憶模組13可儲存有另一全景深圖,所述全景深圖中的物件可僅具單一深度值而未存在一深度值範圍,則處理模組12會決定所述單一深度值為物件的深度值。 In this embodiment, the processing module 12 can determine that the object 21, the object 22, and the object 23 each correspond to a range of depth values according to the depth map, but the processing module 12 is based on the minimum of the object 21, the object 22, and the object 23. The depth values are used as the depth values of the object 21, the object 22, and the object 23. For example, if the depth value of the object 21 ranges from 20 to 100, the processing module 12 determines that the depth value of the object 21 is 20. On the other hand, the memory module 13 can store another panoramic depth map, and the object in the panoramic depth map can have only a single depth value without a depth value range, and the processing module 12 determines the single depth. The value is the depth value of the object.

顯示模組11可顯示所述全景深圖D1,並可由處理模組12接收所述合成影像,以對應顯示所述合成影像。於本實施例中,顯示模組11可為液晶顯示螢幕或觸控顯示螢幕,但本發明並不限於此,亦即所屬技術領域具有通常知識者可以依據需求變換顯示模組11的實現方式。 The display module 11 can display the panoramic deep view D1, and the composite image can be received by the processing module 12 to correspondingly display the synthesized image. In this embodiment, the display module 11 can be a liquid crystal display screen or a touch display screen. However, the present invention is not limited thereto, that is, an implementation of the display module 11 can be changed according to the needs of those skilled in the art.

在本實施例中,顯示模組11可顯示所儲存之全景深圖(不限於圖2之全景深圖),以供使用者點選一物件,接著處理模組12會依據被點選之物件的深度值決定一基準深度值,即處理模組12根據被點選之位置的深度值來決定所述基準深度。抑或,於另一實施例中,顯示模組11可進一步地於所儲存之全景深圖中顯示一圖標(icon),以供使用者直接選擇一基準深度值,其中所述圖標例如為標示有深度值範圍(如介於0~255的灰階值範圍內,其中灰階值越大代表深度值越大,亦即代表景深越深)的一拉軸,但本發明實施例並不以此為限。接下來,在處理模組12獲得一基準深度值後,處理模組12會判斷所述基準深度值與多個物件間之相對深度值的關係,以將深度值小於或等於所述基準深度值之物件放大並凸顯於一外框影像前,藉此達到立體效果。 In this embodiment, the display module 11 can display the stored panoramic depth map (not limited to the panoramic deep map of FIG. 2) for the user to click on an object, and then the processing module 12 will be based on the selected object. The depth value determines a reference depth value, that is, the processing module 12 determines the reference depth based on the depth value of the selected location. Or, in another embodiment, the display module 11 can further display an icon in the stored panoramic depth map for the user to directly select a reference depth value, wherein the icon is, for example, labeled a range of depth values (such as a range of grayscale values between 0 and 255, wherein a larger grayscale value represents a larger depth value, that is, a deeper depth of field), but this embodiment of the present invention does not Limited. Next, after the processing module 12 obtains a reference depth value, the processing module 12 determines a relationship between the reference depth value and a relative depth value between the plurality of objects, so that the depth value is less than or equal to the reference depth value. The object is enlarged and highlighted in front of an outer frame image to achieve a stereoscopic effect.

於另一實施例中,在處理模組12獲得一基準深度值後,若處理模組12判斷出深度值小於或等於基準深度值的物件有複數個,處理模組12可僅選擇所述複數個物件中之具最高深度值的物件作為目標物件,並將所述目標物件疊合於外框影像前,本發明實施例並不限制電子裝置1決定目標物件的可能方式。 In another embodiment, after the processing module 12 obtains a reference depth value, if the processing module 12 determines that the object having the depth value less than or equal to the reference depth value has a plurality of objects, the processing module 12 may select only the plural number. The embodiment of the present invention does not limit the possible manner in which the electronic device 1 determines the target object before the object having the highest depth value among the objects is the target object and the target object is superimposed on the outer frame image.

值得注意的是,在本實施例中,若電子裝置1為一未包含有鏡頭模組的電子裝置(例如桌上型電腦或數位相框),則使用者可手動將所述全景深圖D1及對應於所述全景深圖D1的深度圖輸入至電子裝置1的記憶模組13,以使記憶模組13儲存有所述全景深圖D1及深度圖。另一方面,若電子裝置1是包含有鏡頭模組的電子裝置(例如智慧型手機或數位相機),則電子裝置1經由所述鏡頭模組可對一場景進行影像擷取,以產生多個影像。接著,處理模組12可依據多個影像來產生一深度圖及一全景深圖,並可將深度圖及全景深圖儲存於記憶模組13中,其中所述鏡頭模組與處理模組12耦接,且鏡頭模組可為單鏡頭模組或多鏡頭模組。 It should be noted that, in this embodiment, if the electronic device 1 is an electronic device that does not include a lens module (such as a desktop computer or a digital photo frame), the user can manually view the panoramic deep image D1 and The depth map corresponding to the panoramic depth map D1 is input to the memory module 13 of the electronic device 1 such that the memory module 13 stores the panoramic deep image D1 and the depth map. On the other hand, if the electronic device 1 is an electronic device (such as a smart phone or a digital camera) including a lens module, the electronic device 1 can perform image capturing on a scene through the lens module to generate multiple images. image. The processing module 12 can generate a depth map and a panoramic depth map according to the plurality of images, and store the depth map and the panoramic depth map in the memory module 13, wherein the lens module and the processing module 12 Coupled, and the lens module can be a single lens module or a multi-lens module.

為了更詳細地說明本發明所述之影像處理方法與其電子裝置 的工作原理,以下將舉多個實施例中至少之一來作更進一步的說明。 In order to explain in more detail the image processing method and electronic device thereof according to the present invention The working principle of the present invention will be further described below by at least one of the various embodiments.

實施例之一: One of the examples:

請同時參照圖1至圖3,圖3為根據本發明實施例之第一合成影像。假設使用者點選物件21(可視為一目標物件),則處理模組12會依據對應於全景深圖D1的深度圖,由全景深圖D1中擷取所述物件21,並放大所擷取之物件21。接著,處理模組12將全景深圖D1作為背景影像,以依序疊合外框影像W及放大後的物件21,藉此生成如圖3所示之合成影像D2,以凸顯物件21,達到立體效果。 Please refer to FIG. 1 to FIG. 3 simultaneously. FIG. 3 is a first synthesized image according to an embodiment of the present invention. Assuming that the user selects the object 21 (which can be regarded as a target object), the processing module 12 extracts the object 21 from the panoramic deep view D1 according to the depth map corresponding to the panoramic deep view D1, and enlarges the captured image. Object 21. Then, the processing module 12 uses the panoramic deep image D1 as a background image to sequentially overlay the outer frame image W and the enlarged object 21, thereby generating a composite image D2 as shown in FIG. 3 to highlight the object 21 to reach Stereo effect.

實施例之二: Embodiment 2:

請同時參照圖1、圖2及圖4,圖4為根據本發明實施例之第二合成影像。假設使用者點選物件22(可視為一目標物件),則處理模組12依據對應於全景深圖D1的深度圖,由全景深圖D1中來擷取所述物件22。此外,處理模組12還會擷取全景深圖D1中的包含有物件22及物件23的部分影像,亦即處理模組12由全景深圖D1中擷取影像D11(如圖2所示)。接著,處理模組12放大所擷取之物件22,並將影像D11作為背景影像,以依序疊合外框影像W及放大後的物件22,藉此生成如圖4所示之合成影像D3,以凸顯物件22,達到立體效果。 Please refer to FIG. 1 , FIG. 2 and FIG. 4 simultaneously. FIG. 4 is a second composite image according to an embodiment of the invention. Assuming that the user clicks on the object 22 (which can be regarded as a target object), the processing module 12 retrieves the object 22 from the panoramic deep view D1 according to the depth map corresponding to the panoramic deep view D1. In addition, the processing module 12 also captures a partial image of the object deep image D1 and the object 23 in the panoramic deep image D1, that is, the processing module 12 captures the image D11 from the panoramic deep image D1 (as shown in FIG. 2). . Then, the processing module 12 enlarges the captured object 22 and uses the image D11 as a background image to sequentially superimpose the outer frame image W and the enlarged object 22, thereby generating a composite image D3 as shown in FIG. To highlight the object 22, to achieve a three-dimensional effect.

抑或,請參照圖5,圖5為根據本發明實施例之第三合成影像。在本實施例中,與上述實施例不同的地方在於,處理模組12除了會擷取物件22外,亦會擷取深度值小於基準深度值(指依據物件22之深度值而決定之基準深度值)的物件21。即,在本實施例中,目標物件為物件21與物件22,處理模組12放大物件21與物件22,並將全景深圖D1作為背景影像,以依序疊合外框影像W、放大後的物件21及物件22,藉此生成如圖5所示之合成影像D4,以同時凸顯物件21及物件22於外框影像W前,達到立 體效果。值得注意的是,處理模組12依據物件21及物件22間之遠近關係(即依據物件的深度值大小),會對應改變物件21及物件22於合成影像D4中的位置,且物件21的放大倍率會高於物件22的放大倍率,其中深度值越小之物件,其放大倍率越大。 Alternatively, please refer to FIG. 5. FIG. 5 is a third composite image according to an embodiment of the present invention. In this embodiment, the difference from the above embodiment is that, in addition to the object 22, the processing module 12 also captures the depth value less than the reference depth value (refer to the reference depth determined according to the depth value of the object 22). Value of the object 21. That is, in the embodiment, the target object is the object 21 and the object 22, and the processing module 12 enlarges the object 21 and the object 22, and uses the panoramic deep image D1 as a background image to sequentially superimpose the outer frame image W and enlarge the image. The object 21 and the object 22, thereby generating the composite image D4 as shown in FIG. 5, simultaneously highlighting the object 21 and the object 22 before the outer frame image W, reaching the stand Body effect. It should be noted that the processing module 12 according to the distance between the object 21 and the object 22 (that is, according to the depth value of the object), correspondingly changes the position of the object 21 and the object 22 in the composite image D4, and the magnification of the object 21 The magnification will be higher than the magnification of the object 22, and the smaller the depth value, the larger the magnification.

實施例之三: Third embodiment:

在本實施例中,使用者可通過顯示模組11所顯示的圖標來選擇一基準深度值。請再次參照圖1至圖3,假設物件21、物件22與物件23的深度值分別為20、100及200,且假設使用者選擇的基準深度值為50,則處理模組12會將基準深度值與物件21、物件22與物件23的深度值進行比較,以判斷出物件21的深度值小於基準深度值。接著,處理模組12依據對應於全景深圖D1的深度圖,由全景深圖D1中擷取深度值小於基準深度值的物件21(可視為一目標物件),並放大所擷取之物件21。接著,處理模組12將全景深圖D1作為背景影像,以依序疊合外框影像W及放大後的物件21,藉此生成如圖3所示之合成影像D2,達到立體效果。 In this embodiment, the user can select a reference depth value by using the icon displayed by the display module 11. Referring again to FIG. 1 to FIG. 3, assuming that the depth values of the object 21, the object 22, and the object 23 are 20, 100, and 200, respectively, and the user selects a reference depth value of 50, the processing module 12 will calculate the reference depth. The value is compared with the depth values of the object 21, the object 22, and the object 23 to determine that the depth value of the object 21 is less than the reference depth value. Then, the processing module 12 extracts the object 21 (which can be regarded as a target object) whose depth value is smaller than the reference depth value from the panoramic depth image D1 according to the depth map corresponding to the panoramic depth map D1, and enlarges the captured object 21 . Next, the processing module 12 uses the panoramic deep image D1 as a background image to sequentially superimpose the outer frame image W and the enlarged object 21, thereby generating a composite image D2 as shown in FIG. 3 to achieve a stereoscopic effect.

實施例之四: Embodiment 4:

請再次參照圖1、圖2及圖4,假設物件21、物件22與物件23的深度值分別為20、100及200,且假設使用者通過前述之圖標選擇的基準深度值為150,則處理模組12會將基準深度值與物件21、物件22與物件23的深度值進行比較,以判斷出物件21、物件22的深度值小於基準深度值。接著,處理模組12依據對應於全景深圖D1的深度圖,由全景深圖D1中擷取深度值小於基準深度值且相對於物件21具有較高深度值的物件22(可視為一目標物件),並由全景深圖D1中擷取影像D11。接著,處理模組12放大所擷取之物件22並將影像D11作為背景影像,以依序疊合外框影像W及放大後的物件22,藉此生成如圖4所示之合成影像D3,達到立體效果。 Referring again to FIG. 1 , FIG. 2 and FIG. 4 , it is assumed that the depth values of the object 21 , the object 22 and the object 23 are 20, 100 and 200, respectively, and it is assumed that the user selects the reference depth value of 150 by the aforementioned icon. The module 12 compares the reference depth value with the depth values of the object 21, the object 22, and the object 23 to determine that the depth value of the object 21 and the object 22 is less than the reference depth value. Next, the processing module 12 extracts an object 22 having a depth value smaller than the reference depth value and having a higher depth value relative to the object 21 from the panoramic depth image D1 according to the depth map corresponding to the panoramic depth map D1 (can be regarded as a target object) ), and the image D11 is captured from the panoramic depth map D1. Then, the processing module 12 enlarges the captured object 22 and uses the image D11 as a background image to sequentially superimpose the outer frame image W and the enlarged object 22, thereby generating a composite image D3 as shown in FIG. Achieve a three-dimensional effect.

抑或,請參照圖5,在本實施例中,與上述實施例不同的地 方在於,處理模組12會擷取深度值小於基準深度值的物件21與物件22。即,在本實施例中,目標物件為物件21與物件22,處理模組12放大物件21與物件22,並將全景深圖D1作為背景影像,以依序疊合如圖5所示之外框影像W、放大後的物件21及物件22,藉此生成如圖5所示之合成影像D4,以同時凸顯物件21及物件22,達到立體效果。值得注意的是,處理模組12依據物件的深度值大小,會對應改變物件21及物件22於合成影像D4中的位置,且物件21的放大倍率會高於物件22的放大倍率,其中深度值越小之物件,其放大倍率越大。 Or, please refer to FIG. 5, in this embodiment, a place different from the above embodiment The processing module 12 captures the object 21 and the object 22 whose depth value is smaller than the reference depth value. That is, in the present embodiment, the target object is the object 21 and the object 22, and the processing module 12 enlarges the object 21 and the object 22, and uses the panoramic deep image D1 as a background image to sequentially overlap as shown in FIG. The frame image W, the enlarged object 21 and the object 22 are used to generate the composite image D4 as shown in FIG. 5 to simultaneously highlight the object 21 and the object 22 to achieve a stereoscopic effect. It should be noted that the processing module 12 correspondingly changes the position of the object 21 and the object 22 in the composite image D4 according to the depth value of the object, and the magnification of the object 21 is higher than the magnification of the object 22, wherein the depth value The smaller the object, the greater the magnification.

實施例之五: Example 5:

請再次參照圖1至圖3,假設使用者通過前述之圖標選擇的基準深度值等於物件21的深度值,則處理模組12依據對應於全景深圖D1的深度圖,由全景深圖D1中擷取深度值等於基準深度值的物件21(即目標物件)。接著,處理模組12放大物件21,並將全景深圖D1作為背景影像,以依序疊合全景深圖D1、外框影像W及放大後的物件21,藉此生成如圖3所示之合成影像D2,達到立體效果。 Referring to FIG. 1 to FIG. 3 again, it is assumed that the reference depth value selected by the user through the foregoing icon is equal to the depth value of the object 21, and the processing module 12 is formed by the depth map D1 according to the depth map corresponding to the panoramic depth map D1. An object 21 (ie, a target object) having a depth value equal to the reference depth value is captured. Then, the processing module 12 enlarges the object 21 and uses the panoramic deep image D1 as a background image to sequentially overlap the panoramic deep image D1, the outer frame image W, and the enlarged object 21, thereby generating the image as shown in FIG. Synthesize image D2 to achieve a stereo effect.

實施例之六: Sixth embodiment:

請參照圖6及圖7,圖6為根據本發明另一實施例之全景深圖。圖7為根據本發明實施例之第四合成影像。在本實施例中,記憶模組13進一步儲存有全景深圖D5及對應於全景深圖D5的深度圖。此例的全景深圖D5的物件21與物件22之深度值相同,而物件23的景深深度相較於物件21及物件22最深。假設使用者通過前述之圖標選擇的基準深度值等於或大於物件21與物件22的深度值,且所述基準深度值小於物件23的深度值,則處理模組122依據對應的深度圖,由全景深圖D4擷取物件21及物件22(在此目標物件為物件21及物件22)。接著,處理模組122將全景深圖D5作為背景影像,以依序疊合外框影像W及放大後之物件21 與物件22,藉此生成一合成影像D6,其中所述合成影像之物件21及物件22係凸顯於外框影像W之前(如圖7所示)。 Please refer to FIG. 6 and FIG. 7. FIG. 6 is a panoramic deep view according to another embodiment of the present invention. Figure 7 is a fourth composite image in accordance with an embodiment of the present invention. In this embodiment, the memory module 13 further stores a panoramic depth map D5 and a depth map corresponding to the panoramic depth map D5. The object 21 of the panoramic deep view D5 of this example has the same depth value as the object 22, and the depth of depth of the object 23 is the deepest than the object 21 and the object 22. Assuming that the reference depth value selected by the user through the foregoing icon is equal to or greater than the depth value of the object 21 and the object 22, and the reference depth value is smaller than the depth value of the object 23, the processing module 122 is configured by the panorama according to the corresponding depth map. The deep drawing D4 captures the object 21 and the object 22 (the target object is the object 21 and the object 22). Then, the processing module 122 uses the panoramic deep image D5 as a background image to sequentially superimpose the outer frame image W and the enlarged object 21 And the object 22, thereby generating a composite image D6, wherein the object 21 and the object 22 of the synthetic image are highlighted before the outer frame image W (as shown in FIG. 7).

由上可知,所述之電子裝置1利用外框影像W區隔在前景物與後景物之間,從而可在人眼神經中產生視覺上的立體效果,如此可以簡單快速的方式,達到所欲之立體效果。 As can be seen from the above, the electronic device 1 is separated between the foreground object and the foreground object by using the outer frame image W, so that a visual stereoscopic effect can be generated in the human eye nerve, so that the desired method can be achieved in a simple and quick manner. The three-dimensional effect.

另外,由上述圖4、圖5與圖7實施例可知,不管使用者是通過顯示模組11來點選特定物件,以讓處理模組12據以決定一基準深度值,抑或直接藉由上述圖標來選擇一基準深度值,若深度值小於基準深度值的物件有兩個以上,處理模組12可擷取深度值大於基準深度值的所有物件,並將所擷取的物件疊合於外框影像及背景影像前;抑或,處理模組12可僅擷取深度值小於基準深度值的所有物件中之具最高深度值的至少一物件,並將之疊合於外框影像及背景影像前,本發明實施例並不限制電子裝置1生成合成影像的可能方式,即凡舉利用外框影像來凸顯目標物件之實施方式皆屬本發明之範疇。 In addition, as can be seen from the above embodiments of FIG. 4, FIG. 5 and FIG. 7, whether the user selects a specific object through the display module 11 so that the processing module 12 determines a reference depth value, or directly by the above The icon selects a reference depth value. If there are more than two objects whose depth value is less than the reference depth value, the processing module 12 can capture all objects whose depth value is greater than the reference depth value, and superimpose the captured objects. Before the frame image and the background image; or the processing module 12 can only capture at least one object having the highest depth value among all the objects whose depth value is less than the reference depth value, and superimpose the image on the frame image and the background image The embodiment of the present invention does not limit the possible manner in which the electronic device 1 generates a synthetic image, that is, the embodiment in which the outer frame image is used to highlight the target object is within the scope of the present invention.

簡言之,依據上述圖2至圖7實施例可知,本發明實施例所提出之電子裝置1可將深度值小於或等於所述基準深度值之至少一目標物件疊合於外框影像W之前,並將一背景影像疊合於外框影像W之後,如此可幫助凸顯目標物件,以營照立體視覺效果。 In short, according to the embodiment of FIG. 2 to FIG. 7 , the electronic device 1 of the embodiment of the present invention can superimpose at least one target object having a depth value less than or equal to the reference depth value before the outer frame image W. And superimposing a background image on the outer frame image W, this can help highlight the target object to serve stereoscopic visual effects.

值得一提的是,本發明的目標物件的放大倍率可大於或等於1(即維持原比例),且背景影像的放大倍率可大於、等於或小於1,上述實施例並不限制本發明的所述目標物件的放大倍率需大於1,以及背景影像的放大倍率需等於1。在本發明實施例中,只要疊合於所述背景影像上的外框影像W可完全覆蓋背景影像之外邊緣,且背景影像的放大倍率能小於或等於目標物件的放大倍率即可,藉此以有效凸顯所選取的目標物件,營造出較佳的立體效果。 It should be noted that the magnification of the target object of the present invention may be greater than or equal to 1 (ie, maintain the original ratio), and the magnification of the background image may be greater than, equal to, or less than 1. The above embodiment does not limit the scope of the present invention. The magnification of the target object needs to be greater than 1, and the magnification of the background image needs to be equal to 1. In the embodiment of the present invention, as long as the outer frame image W superimposed on the background image can completely cover the outer edge of the background image, and the magnification of the background image can be less than or equal to the magnification of the target object, thereby In order to effectively highlight the selected target object, a better stereoscopic effect is created.

值得注意的是,圖3、圖4、圖5及圖7所示之外框影像W為一中空矩形黑框影像,但本發明實施例並不限制外框影像W的 形狀及顏色,本技術領域具有通常知識者可視其實際需求加以變更。另外,由於目標物件之放大倍率係大於或等於背景影像之放大倍率,故於疊合後,可完全覆蓋背景影像中對應於目標物件之物件影像。 It should be noted that the outer frame image W shown in FIG. 3, FIG. 4, FIG. 5 and FIG. 7 is a hollow rectangular black frame image, but the embodiment of the present invention does not limit the outer frame image W. The shape and color can be changed by those skilled in the art according to their actual needs. In addition, since the magnification of the target object is greater than or equal to the magnification of the background image, after the overlay, the image of the object corresponding to the target object in the background image can be completely covered.

此外,於另一實施例中,處理模組12還可於一時間內,對所擷取之物件21、物件22或物件23進行連續放大,並即時控制顯示模組於此時間內連續顯示,以達到動態顯示的效果。 In addition, in another embodiment, the processing module 12 can continuously enlarge the captured object 21, the object 22, or the object 23 in a time, and instantly control the display module to continuously display during this time. To achieve the effect of dynamic display.

請參照圖8,圖8為根據本發明實施例之影像處理方法之流程圖。所述影像處理方法係可以執行於圖1所示的電子裝置1中,請一併照圖1至圖8以利理解,而影像處理方法包括以下步驟。 Please refer to FIG. 8. FIG. 8 is a flowchart of an image processing method according to an embodiment of the present invention. The image processing method can be implemented in the electronic device 1 shown in FIG. 1 . Please refer to FIG. 1 to FIG. 8 for understanding. The image processing method includes the following steps.

在步驟S110中,依據一深度圖決定一原始影像中之多個物件的深度值。在此步驟中,所述原始影像可為圖2所示之全景深圖D1或圖6所示之全景深圖D5,且所述深度圖對應於所述原始影像。由於深度圖可表示出原始影像中之物件21、物件22及物件23的遠近關係,故電子裝置1依據所述深度圖,可決定原始影像中之多個物件的深度值。關於電子裝置1依據所述深度圖決定多個物件的深度值的相關細節,乃是本技術之習知技術,故在此不詳加說明之。 In step S110, a depth value of a plurality of objects in an original image is determined according to a depth map. In this step, the original image may be the panoramic deep image D1 shown in FIG. 2 or the panoramic deep image D5 shown in FIG. 6, and the depth map corresponds to the original image. Since the depth map can represent the near and far relationship of the object 21, the object 22, and the object 23 in the original image, the electronic device 1 can determine the depth values of the plurality of objects in the original image according to the depth map. Regarding the details of determining the depth value of a plurality of objects based on the depth map, the electronic device 1 is a prior art technique of the present technology, and therefore will not be described in detail herein.

在步驟S120中,選擇一基準深度值。在此步驟中,使用者可通過電子裝置1所顯示之影像畫面(如顯示圖2所示之全景深圖D1或圖6所示之全景深圖D5),來點選物件21、物件22或物件23,如此電子裝置1會依據所點選之物件21的深度值來決定一基準深度值。或者,使用者可通過上述之圖標(如上述標示有深度值範圍的一拉軸)來直接選取一深度值,以讓電子裝置1依據此深度值作為一基準深度值。 In step S120, a reference depth value is selected. In this step, the user can select the object 21, the object 22 or the image image displayed by the electronic device 1 (such as the panoramic deep image D1 shown in FIG. 2 or the panoramic deep image D5 shown in FIG. 6). The object 23, such that the electronic device 1 determines a reference depth value according to the depth value of the selected object 21. Alternatively, the user can directly select a depth value by using the icon (such as the above-mentioned pull axis indicating the range of depth values), so that the electronic device 1 can use the depth value as a reference depth value.

在步驟S130中,由所述原始影像中取得至少一目標物件及一背景影像。在此步驟中,依據所述基準深度值,電子裝置1會由原始影像取出至少一目標物件,其中所述目標物件的深度值小於 或等於所述基準深度值。此外,在此步驟中,電子裝置1亦可由原始影像取得一背景影像,其中所述背景影像為原始影像或原始影像的部分影像。 In step S130, at least one target object and a background image are obtained from the original image. In this step, according to the reference depth value, the electronic device 1 extracts at least one target object from the original image, wherein the target object has a depth value smaller than Or equal to the reference depth value. In addition, in this step, the electronic device 1 can also obtain a background image from the original image, wherein the background image is a partial image of the original image or the original image.

在步驟S140中,產生一外框影像並依序疊合所述背景影像、外框影像及目標物件,以生成具立體視覺效果的一合成影像。在本步驟中,電子裝置1會將一外框影像(如圖3、圖4、圖5及圖7所示外框影像W)疊合於所述背景影像的外周圍。接著,電子裝置1將所擷取的目標物件疊合於外框影像之上,以覆蓋背景影像中對應於目標物件的影像部分。接著,電子裝置1合成疊合後的背景影像、外框影像及目標物件,以達到凸顯所述目標物件而營造出立體視覺效果的目的。 In step S140, a frame image is generated and the background image, the frame image and the target object are sequentially superimposed to generate a composite image having a stereoscopic effect. In this step, the electronic device 1 superimposes an outer frame image (such as the outer frame image W shown in FIGS. 3, 4, 5, and 7) on the outer periphery of the background image. Then, the electronic device 1 superimposes the captured target object on the outer frame image to cover the image portion corresponding to the target object in the background image. Then, the electronic device 1 synthesizes the superimposed background image, the outer frame image, and the target object, so as to achieve the purpose of highlighting the target object to create a stereoscopic visual effect.

請參照圖9,圖9為根據本發明另一實施例之影像處理方法之流程圖。所述影像處理方法係可以執行於圖1所示的電子裝置1中,請一併照圖1至圖7及圖9以利理解,而影像處理方法包括以下步驟。 Please refer to FIG. 9. FIG. 9 is a flowchart of an image processing method according to another embodiment of the present invention. The image processing method can be implemented in the electronic device 1 shown in FIG. 1 . Please refer to FIG. 1 to FIG. 7 and FIG. 9 for understanding. The image processing method includes the following steps.

在步驟S210中,依據一深度圖決定一原始影像中之多個物件的深度值,且依據所述深度圖擷取所述多個物件,其中所述深度圖對應於所述原始影像。值得注意的是,電子裝置1依據深度圖擷取一影像中之物件的技術細節,乃是本技術領域之習知技術,故在此不詳加說明之。 In step S210, a depth value of a plurality of objects in an original image is determined according to a depth map, and the plurality of objects are captured according to the depth map, wherein the depth map corresponds to the original image. It should be noted that the technical details of the object in an image taken by the electronic device 1 according to the depth map are known in the art, and therefore will not be described in detail herein.

在步驟S220中,可依據如步驟S120所述之方式,來選擇一基準深度值。 In step S220, a reference depth value may be selected according to the manner as described in step S120.

在步驟S230中,由被擷取的多個物件中選擇至少一目標物件,並由原始影像中取得一背景影像。在此步驟中,因於前述之步驟S210中,電子裝置1已由原始影像中擷取出多個物件,故依據步驟S220中選擇的基準深度值,電子裝置1可直接由被擷取的多個物件中,選擇至少一目標物件(深度值小於或等於所述基準深度值),以及由原始影像中取得一背景影像。 In step S230, at least one target object is selected from the plurality of captured objects, and a background image is obtained from the original image. In this step, because the electronic device 1 has extracted a plurality of objects from the original image in the foregoing step S210, the electronic device 1 can directly be captured by the plurality of objects according to the reference depth value selected in step S220. In the object, at least one target object is selected (the depth value is less than or equal to the reference depth value), and a background image is obtained from the original image.

在步驟S240中,如步驟S140所言,產生一外框影像並依序疊合背景影像、外框影像及至少一物件,以生成具立體視覺效果的一合成影像。藉此,凸顯所述目標物件,以達到立體視覺效果。 In step S240, as described in step S140, a frame image is generated and the background image, the frame image, and at least one object are sequentially superimposed to generate a composite image having a stereoscopic effect. Thereby, the target object is highlighted to achieve a stereoscopic effect.

值得一提的是,為能更凸顯所述目標物件之立體效果,於執行步驟S130及步驟S140之間或步驟S230及步驟S240之間,電子裝置1可先進一步地放大所述目標物件或縮小所述背景影像,接著才執行步驟S140或步驟S240,來依序疊合所述背景影像、外框影像及目標物件,以更凸顯所述目標物件。需注意的是,如前言所述,本發明實施例並不限制目標物件與背景影像的放大倍率之大小,亦即背景影像的放大倍率可小於、等於或大於1,且目標物件的放大倍率可大於或等於1。但,需注意的是,背景影像的放大倍率須小於或等於目標物件的放大倍率,以有效凸顯所選取的目標物件,從而達到較佳的立體效果。 It is to be noted that, in order to further highlight the stereoscopic effect of the target object, the electronic device 1 may further enlarge the target object or zoom out between steps S130 and S140 or between steps S230 and S240. The background image is then executed in step S140 or step S240 to sequentially superimpose the background image, the outer frame image and the target object to further highlight the target object. It should be noted that, as described in the foregoing, the embodiment of the present invention does not limit the magnification of the target object and the background image, that is, the magnification of the background image may be less than, equal to or greater than 1, and the magnification of the target object may be Greater than or equal to 1. However, it should be noted that the magnification of the background image must be less than or equal to the magnification of the target object to effectively highlight the selected object, thereby achieving a better stereoscopic effect.

尚需一提的是,於一實施例中,電子裝置1決定目標物件與背景影像的放大倍率之方式可例如為:計算基準深度值與目標物件的深度值間之一差異值,以決定目標物件的放大倍率,亦即若所得之差異值越大,則目標物件的放大倍率越大。 It should be noted that, in an embodiment, the manner in which the electronic device 1 determines the magnification of the target object and the background image may be, for example, calculating a difference between the reference depth value and the depth value of the target object to determine the target. The magnification of the object, that is, if the difference value obtained is larger, the magnification of the target object is larger.

關於影像處理方法之各步驟的相關細節在上述圖1至圖4實施例已詳細說明,故在此恕不贅述。 The details of the steps of the image processing method have been described in detail in the above-described embodiments of FIGS. 1 to 4, and thus will not be described herein.

在此須說明的是,圖8及圖9實施例之各步驟僅為方便說明之須要,本發明實施例並不以各步驟彼此間的順序作為實施本發明各個實施例的限制條件。 It should be noted that the steps of the embodiment of FIG. 8 and FIG. 9 are only for convenience of description, and the embodiments of the present invention do not take the steps of the steps as a limitation of implementing various embodiments of the present invention.

綜合以上所述,本發明實施例所提供的影像處理方法及其電子裝置,可依據深度圖判斷一影像中之多個物件間的相對深度關係,並可原始影像中選定一目標物件與一背景影像,接著將目標物件放大並疊合於一外框影像之前,以及將背景影像疊合於所述外框影像之後,以凸顯所述目標物件,藉此達到立體效果。換言之,所述電子裝置僅需一張原始影像及一張對應於所述原始影像 之深度圖,透過執行所述影像處理方法,即可凸顯目標物件以達立體效果,故相較於習知立體顯示方式,較為簡易且成本更低。 In summary, the image processing method and the electronic device provided by the embodiments of the present invention can determine the relative depth relationship between multiple objects in an image according to the depth map, and select a target object and a background in the original image. The image is then enlarged and superimposed on an outer frame image, and the background image is superimposed on the outer frame image to highlight the target object, thereby achieving a stereoscopic effect. In other words, the electronic device only needs one original image and one corresponding to the original image. By performing the image processing method, the target object can be highlighted to achieve a stereoscopic effect, which is simpler and less costly than the conventional stereoscopic display mode.

以上所述,僅為本發明最佳之具體實施例,惟本發明之特徵並不侷限於此,任何熟悉該項技藝者在本發明之領域內,可輕易思及之變化或修飾,皆可涵蓋在本發明專利範圍。 The above description is only the preferred embodiment of the present invention, but the features of the present invention are not limited thereto, and any one skilled in the art can easily change or modify it in the field of the present invention. It is covered by the scope of the invention.

S110~S140‧‧‧步驟 S110~S140‧‧‧Steps

Claims (10)

一種影像處理方法,包括:依據一深度圖決定一原始影像中之多個物件的深度值,其中該深度圖對應於該原始影像,且該些物件包括至少一第一物件及至少一第二物件,且該至少一第一物件的深度值小於該至少一第二物件的深度值;取得一基準深度值;依據該原始影像取得該至少一第一物件及一背景影像;維持該至少一第一物件的大小或對該至少一第一物件進行放大,其中該至少一第一物件的深度值小於或等於該基準深度值,以及該至少一第二物件的深度值大於該基準深度值;產生一外框影像,以分別將該至少一第一物件及該背景影像疊合於該外框影像之前及之後;以及合成疊合後的該至少一第一物件、該外框影像及該背景影像,以生成一合成影像。 An image processing method includes: determining a depth value of a plurality of objects in an original image according to a depth map, wherein the depth map corresponds to the original image, and the objects include at least one first object and at least one second object And the depth value of the at least one first object is smaller than the depth value of the at least one second object; obtaining a reference depth value; obtaining the at least one first object and a background image according to the original image; maintaining the at least one first The size of the object or the at least one first object is enlarged, wherein the depth value of the at least one first object is less than or equal to the reference depth value, and the depth value of the at least one second object is greater than the reference depth value; An outer frame image to superimpose the at least one first object and the background image before and after the outer frame image; and synthesizing the superimposed at least one first object, the outer frame image, and the background image, To generate a composite image. 如請求項1所述之影像處理方法,更包括:維持該背景影像的大小或對該背景影像進行放大,其中該背景影像的放大倍率小於或等於該至少一第一物件的放大倍率。 The image processing method of claim 1, further comprising: maintaining a size of the background image or magnifying the background image, wherein the magnification of the background image is less than or equal to a magnification of the at least one first object. 如請求項1所述之影像處理方法,更包括:計算該基準深度值與該至少一第一物件的深度值間之一差異值,以決定該至少一第一物件的放大倍率,其中若該差異值越大,則該至少一第一物件的放大倍率越大。 The image processing method of claim 1, further comprising: calculating a difference value between the reference depth value and a depth value of the at least one first object to determine a magnification of the at least one first object, wherein The larger the difference value, the larger the magnification of the at least one first object. 如請求項1所述之影像處理方法,其中該背景影像包含有該至少一第一物件及該至少一第二物件。 The image processing method of claim 1, wherein the background image comprises the at least one first object and the at least one second object. 如請求項1所述之影像處理方法,其中該外框影像係疊合於該背景影像的外周圍。 The image processing method of claim 1, wherein the frame image is superimposed on an outer periphery of the background image. 一種電子裝置,包括:一處理模組,用以執行如請求項1、2、3、4或5所述之影像處理方法,以產生將該至少一第一物件凸顯於該外框影像前的該合成影像;以及一顯示模組;耦接該處理模組,用以顯示該原始影像及該合成影像。 An electronic device, comprising: a processing module, configured to perform the image processing method according to claim 1, 2, 3, 4 or 5, to generate the at least one first object before the outer frame image And the display module is coupled to the processing module for displaying the original image and the composite image. 如請求項6所述之電子裝置,其中該顯示模組顯示有一圖標,以供一使用者選擇該基準深度值。 The electronic device of claim 6, wherein the display module displays an icon for a user to select the reference depth value. 如請求項6所述之電子裝置,更包括:一記憶模組,耦接該處理模組,該記憶模組儲存有該原始影像及該深度圖。 The electronic device of claim 6, further comprising: a memory module coupled to the processing module, the memory module storing the original image and the depth map. 如請求項6所述之電子裝置,更包括:一鏡頭模組,耦接該處理模組,該鏡頭模組用以對一場景進行影像擷取,以產生複數個影像;其中,該處理模組對該些影像進行處理以產生該深度圖及該原始影像。 The electronic device of claim 6, further comprising: a lens module coupled to the processing module, wherein the lens module is configured to perform image capturing on a scene to generate a plurality of images; wherein the processing module The images are processed to generate the depth map and the original image. 如請求項6所述之電子裝置,其中一使用者通過該顯示模組點選該至少一第一物件,藉此該處理模組依據該至少一第一物件的深度值決定該基準深度值。 The electronic device of claim 6, wherein a user selects the at least one first object through the display module, whereby the processing module determines the reference depth value according to the depth value of the at least one first object.
TW103144061A 2014-12-17 2014-12-17 Image processing method and electronic device thereof TWI541761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW103144061A TWI541761B (en) 2014-12-17 2014-12-17 Image processing method and electronic device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW103144061A TWI541761B (en) 2014-12-17 2014-12-17 Image processing method and electronic device thereof

Publications (2)

Publication Number Publication Date
TW201624422A true TW201624422A (en) 2016-07-01
TWI541761B TWI541761B (en) 2016-07-11

Family

ID=56984796

Family Applications (1)

Application Number Title Priority Date Filing Date
TW103144061A TWI541761B (en) 2014-12-17 2014-12-17 Image processing method and electronic device thereof

Country Status (1)

Country Link
TW (1) TWI541761B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI635323B (en) * 2017-10-13 2018-09-11 中強光電股份有限公司 Light field display apparatus and light field image display method thereof
TWI765587B (en) * 2021-02-26 2022-05-21 聯策科技股份有限公司 Intelligent imaging and measurement system and method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI635323B (en) * 2017-10-13 2018-09-11 中強光電股份有限公司 Light field display apparatus and light field image display method thereof
US10571706B2 (en) 2017-10-13 2020-02-25 Coretronic Corporation Light field display apparatus and display method of light field image
TWI765587B (en) * 2021-02-26 2022-05-21 聯策科技股份有限公司 Intelligent imaging and measurement system and method

Also Published As

Publication number Publication date
TWI541761B (en) 2016-07-11

Similar Documents

Publication Publication Date Title
CN109961406B (en) Image processing method and device and terminal equipment
JP6595726B2 (en) Transition between binocular and monocular fields
US20120274626A1 (en) Stereoscopic Image Generating Apparatus and Method
US9679415B2 (en) Image synthesis method and image synthesis apparatus
EP3547672A1 (en) Data processing method, device, and apparatus
WO2009149413A1 (en) Blur enhancement of stereoscopic images
US9154762B2 (en) Stereoscopic image system utilizing pixel shifting and interpolation
JP5464279B2 (en) Image processing apparatus, program thereof, and image processing method
US20160180514A1 (en) Image processing method and electronic device thereof
WO2018188277A1 (en) Sight correction method and device, intelligent conference terminal and storage medium
TWI613904B (en) Stereo image generating method and electronic apparatus utilizing the method
JP2018500690A (en) Method and system for generating magnified 3D images
US11019323B2 (en) Apparatus and method for 3D like camera system in a handheld mobile wireless device
TWI541761B (en) Image processing method and electronic device thereof
US20230281916A1 (en) Three dimensional scene inpainting using stereo extraction
WO2021145913A1 (en) Estimating depth based on iris size
US20140362197A1 (en) Image processing device, image processing method, and stereoscopic image display device
TWI531213B (en) Image conversion method and module for naked-eye 3d display
US20150215602A1 (en) Method for ajdusting stereo image and image processing device using the same
CN105100769B (en) The generation method and device of a kind of visual effect image or video pair
KR101219859B1 (en) Apparatus and method for semi-auto convergence in 3d photographing apparatus
WO2016107531A1 (en) Image conversion method and apparatus
KR101488647B1 (en) Virtual illumination of operating method and apparatus for mobile terminal
Chappuis et al. Subjective evaluation of an active crosstalk reduction system for mobile autostereoscopic displays
Cho et al. A new visual comfort-based stereoscopic image retargeting method