1234997 _案號 92134510_年月日__ 五、發明說明(1) 發明所屬之技術領域 本發明是有關於一種影像資料處理,且特別是有關於 一種利用影像資料改變物件與物件型態的方法。 先前技術 隨著科技的進步,各種影音設備的功能不但越來越強 大,而且體積越來越小,例如現今的行動電話已經不止是 單純地用來作為通訊聯絡的工具,同時也具備了其它多媒 體裝置的功能,例如具備了遊戲、拍攝照片、錄音以及錄 影..等等功能。 在習知技術中,譬如以具備照相功能的行動電話而 言,通常所拍攝下來的照片很少用來作更進一步的應用, 且行動電話中的遊戲通常是單一且獨立的。例如在行動電 話中進行電子雞飼養的遊戲,但通常在遊戲進行的過程 中,背景圖片與主角通常是固定而且不變的,並且不能利 用所拍攝的照片與遊戲作進一步的結合與互動。 發明内容 本發明的目的就是在提供一種利用影像資料改變物件 與物件型態之方法,利用所輸入實景影像資料,即時改變 物件及其物件型態,以達到實景影像與虛擬結合的效果。 本發明提出一種利用影像資料改變物件與物件型態之 方法,首先藉由各種影像裝置取得影像資料,然後輸入此 影像資料,並根據所輸入的影像資料進行平均顏色與平均 亮度等參數的分析,以取得此影像資料的相關參數,接著 並根據這些參數來決定改變物件以及其物件型態,最後將1234997 _Case No. 92134510_Year Month Date__ V. Description of the Invention (1) The technical field to which the invention belongs The invention relates to a method for processing image data, and more particularly to a method for changing objects and object types using image data . With the advancement of science and technology, the functions of various audio and video equipment are not only more powerful, but also smaller and smaller. For example, today's mobile phones are not only used as a communication tool, but also have other multimedia. The functions of the device, for example, have functions such as games, taking photos, recording and recording ... In the conventional technology, for example, a mobile phone with a camera function, the photographs usually taken are rarely used for further applications, and the games in the mobile phone are usually single and independent. For example, a game of electronic chicken breeding is carried out in a mobile phone, but usually during the game, the background picture and the protagonist are usually fixed and unchanged, and the photos taken and the game cannot be used to further combine and interact. SUMMARY OF THE INVENTION The object of the present invention is to provide a method for changing objects and object types by using image data, and using input real-world image data to change objects and their object types in real time, so as to achieve the effect of real-world images and virtual combination. The invention proposes a method for changing objects and object types by using image data. First, image data is obtained through various image devices, and then the image data is input, and parameters such as average color and average brightness are analyzed according to the input image data. In order to obtain the relevant parameters of this image data, then according to these parameters to decide to change the object and its object type, and finally
12226twfl.ptc 第6頁 1234997 _案號92134510_年月日__ 五、發明說明(2) 所決定的物件及其物件型態輸出並顯示於顯示裝置上。 在本發明的一個較佳實施例中,其中根據參數來決定 物件以及其物件型態,更包括以此參數來比對資料庫,以 取得與此參數所對應的物件及其物件型態。 本發明藉由分析影像資料,來取得此影像資料的參 數,並依據此參數以決定物件及其型態以進行改變,進而 達到虛擬與實景影像結合的效果。 為讓本發明之上述和其他目的、特徵和優點能更明顯 易懂,下文特舉一較佳實施例,並配合所附圖式,作詳細 說明如下。 實施方式 _第1圖繪示依照本發明一較佳實施例的一種利用影像 資料改變物件與物件型態之方法之流程圖。請參照第1 圖,首先藉由影像擷取裝置取得影像資料,並輸入此影像 資料(如步驟S 1 0 2 )。接著計算此影像資料的平均顏色以取 得參數(如步驟S 1 0 4 )。之後計算此影像資料的平均亮度來 取得參數(如步驟S 1 0 6 )。然後依據計算平均顏色所得到的 參數來決定物件(如步驟S 1 0 8 )。之後根據平均亮度所得到 的參數來決定物件的型態(如步驟S 1 1 0 )。最後將所決定的 物件及其物件型態顯示於顯示裝置上(如步驟S 1 1 2 )。 在上述實施例中,舉例來說,目前有些行動電話已經 具備有數位相機的功能,可以進行各種影像的攝影,也因 此可以隨時拍攝周遭的影像,並將此影像直接儲存至行動 電話中。例如使用者使用行動電話進行一項遊戲,在此遊12226twfl.ptc Page 6 1234997 _Case No. 92134510_Year Month Day__ V. Description of the invention (2) The determined object and its object type are output and displayed on the display device. In a preferred embodiment of the present invention, determining an object and its object type according to a parameter further includes comparing a database with this parameter to obtain the object and its object type corresponding to the parameter. The present invention obtains parameters of the image data by analyzing the image data, and determines objects and their types to be changed according to the parameters, thereby achieving the effect of combining virtual and real-world images. In order to make the above and other objects, features, and advantages of the present invention more comprehensible, a preferred embodiment is given below and described in detail with reference to the accompanying drawings. Embodiment _ Figure 1 shows a flowchart of a method for changing objects and object types using image data according to a preferred embodiment of the present invention. Please refer to FIG. 1, first obtain image data through an image capturing device, and input the image data (eg, step S 102). Then calculate the average color of the image data to obtain the parameters (eg, step S 104). Then calculate the average brightness of the image data to obtain the parameters (eg, step S 106). Then, the object is determined according to the parameter obtained by calculating the average color (such as step S 108). Then, the type of the object is determined according to the parameters obtained by the average brightness (such as step S 1 1 0). Finally, the determined object and its object type are displayed on the display device (eg, step S 1 1 2). In the above embodiments, for example, some mobile phones now have the function of a digital camera, which can take a variety of images. Therefore, it is possible to take surrounding images at any time and store the images directly to the mobile phone. For example, a user uses a mobile phone to play a game
12226twf1.ptc 第7頁 1234997 _案號 92134510_年月日___ 五、發明說明(3) 戲中,使用者首先操作具備照相功能的行動電話拍攝一張 樹林的圖片。接著,計算此圖片的平均顏色與平均亮度分 別得到不同的參數。然後,根據所得到的參數來決定物件 及其物件型態,例如計算這張圖片的平均顏色得到一結果 為綠色,接著選出與綠色有相關的物件,譬如鱷魚即為一 例,並根據圖片分析其平均亮度所得到參數來決定鱷魚的 型態。假使圖片是於夜晚中所拍攝的,則根據此圖片所計 算出的平均亮度自然偏低,因此遊戲中的鱷魚便可能呈現 如睡眠的型態;如果圖片是於白天所拍攝的,而根據此圖 片所計算出的平均亮度則自然偏高,而此遊戲中的鱷魚便 會改變其型態,呈現如覓食的型態。 在上述實施例中,更可以根據分析圖片所得到的參數 來比對資料庫所内建的資料,例如使用者臨時拍攝一張沙 漠的圖片以取代原本樹林的圖片,接著根據分析沙漠的平 均顏色以及平均亮度所得到的參數,來和資料庫中的物件 或資料進行比對,進而選出有關於沙漠的物件以及決定其 物件的型態,例如駱駝、老鷹與綠洲..等物件,並根據平 均亮度來決定物件的型態,例如以平均亮度的高低來決定 駱駝是否處於奔跑的狀態。而在此實施例中,圖片的變換 由樹林轉變成沙漠,此時原本的鱷魚也會轉變為駱駝與老 鷹..等其它物件。 本發明利用即時拍攝的實景影像來當作遊戲的背景影 像,並根據此背景影像計算其平均顏色及平均亮度來得到 參數,然後根據此參數來改變物件及其物件型態,讓物件12226twf1.ptc Page 7 1234997 _ Case No. 92134510_ Year Month ___ V. Description of the invention (3) In the play, the user first operates a mobile phone with a camera function to take a picture of the woods. Then, calculate the average color and average brightness of this picture to get different parameters. Then, determine the object and its object type according to the obtained parameters. For example, calculate the average color of this picture to get a result as green, and then select the object related to green, such as a crocodile as an example, and analyze it based on the picture. The parameters obtained from the average brightness determine the shape of the crocodile. If the picture was taken at night, the average brightness calculated from this picture is naturally low, so the crocodile in the game may show a sleep-like pattern; if the picture was taken during the day, according to this The average brightness calculated in the picture is naturally high, and the crocodile in this game will change its shape to appear like foraging. In the above embodiment, the data built in the database can be compared according to the parameters obtained by analyzing the pictures. For example, the user temporarily takes a picture of the desert to replace the picture of the original forest, and then analyzes the average color of the desert. The parameters obtained from the average brightness are compared with the objects or data in the database, and then objects related to the desert and the type of the objects are determined, such as camels, eagles, and oasis .. The brightness determines the type of the object, for example, the average brightness determines whether the camel is running. In this embodiment, the transformation of the picture is transformed from the woods to the desert, and the original crocodile will also be transformed into other objects such as camels and eagles. The invention uses the real-time shooting real-time image as the background image of the game, and calculates the average color and average brightness according to the background image to obtain the parameter, and then changes the object and its object type according to this parameter, so that the object
12226twf1.ptc 第8頁 1234997 _案號92134510_年月日__ 五、發明說明(4) · 及其物件型態能和背景產生關連,進而達到虛擬與實景影 像互動結合的效果。 如熟習此技藝者可知,可以不限定同時計算背景影像 的平均顏色以及平均亮度來改變物件及其物件型態,亦可 依照平均顏色與平均亮度的其中之一,分別只改變物件與 _ 物件型態,或同時改變物件與物件型態。例如只計算背景 . 影像的平均顏色,並利用此平均顏色所得到的參數只改變 物件,或是同時改變物件及其物件型態。 雖然本發明已以較佳實施例揭露如上,然其並非用以 限定本發明,任何熟習此技藝者,在不脫離本發明之精神 和範圍内,當可作些許之更動與潤飾,因此本發明之保護 φ 範圍當視後附之申請專利範圍所界定者為準。12226twf1.ptc Page 8 1234997 _Case No. 92134510_Year Month and Day__ V. Description of the Invention (4) · The type energy and background of its objects are related, and the effect of interaction between virtual and real images is achieved. If you are familiar with this art, you can change the object and its object type without calculating the average color and average brightness of the background image at the same time. You can also change only the object and _ object type according to one of the average color and average brightness. State, or change both object and object type. For example, only the average color of the background. Image is calculated, and the parameters obtained by using this average color only change the object, or change the object and its type at the same time. Although the present invention has been disclosed in the preferred embodiment as above, it is not intended to limit the present invention. Any person skilled in the art can make some modifications and retouching without departing from the spirit and scope of the present invention. Therefore, the present invention The scope of protection φ shall be determined by the scope of the attached patent application.
12226twf1.ptc 第9頁 1234997 _案號92134510_年月日_1Mz_ 圖式簡單說明 第1圖繪示依照本發明一較佳實施例的一種利用影像 資料改變物件與物件型態之方法之流程圖。 圖式標示說明: S1 02 輸 入 影 像 S1 04 計 算 影 像 資 料 的 平 均 顏 色 S1 06 計 算 影 像 資 料 的 平 均 亮 度 S1 08 根 據 平 均 顏 色 決 定 物 件 S1 10 根 據 平 均 亮 度 決 定 物 件 型 態 S1 12 顯 示 物 件 及 其 物 件 型 態 於 顯示裝置上12226twf1.ptc Page 9 1234997 _Case No. 92134510_Year Month and Day_1Mz_ Brief Description of the Drawings Figure 1 shows a flowchart of a method for changing objects and object types using image data according to a preferred embodiment of the present invention . Graphical description: S1 02 Input image S1 04 Calculate the average color of the image data S1 06 Calculate the average brightness of the image data S1 08 Determine the object based on the average color S1 10 Determine the object type based on the average brightness S1 12 Display object and its object type On the display
12226twf1.ptc 第10頁12226twf1.ptc Page 10