201229961 六、發明說明: 【發明所屬之技術領域】 [0001] 本發明涉及一種電子裝置,更具體地,涉及一種電子裝 置及其圖像相似度比較的方法。 【先前技術】 [0002] 目前,在圖像分析學上,兩幅圖像都是通過單一演算法 來比較其相似度,比較的速度要麼慢或者要麼比較的準 確度不高,不能滿足用戶要求準確度高的同時還滿足速 度快的要求。尤其,若要快速比較一定數量的圖像,每 相鄰兩幅圖像之間進行比較速度就更慢。因此,現有的 圖像相似度比較方法沒有提供多種演算法供用戶選擇, 難以滿足速度和精度的要求。 【發明内容】 [0003] 為了解決上述存在的問題,本發明的目的在於,提供一 種電子裝置,其包括一輸入單元,用於接收用戶的輸入 操作產生一輸入訊號;一顯示單元,用於顯示資訊,一 存儲單元,其存儲多種圖像相似度比較演算法及每一演 算法的選擇參考值;一圖像處理單元,用於對圖像進行 處理形成圖像二維陣列資料;及一控制單元,用於回應 輸入單元產生的一第一輸入訊號導入多媒體檔,控制圖 像處理單元進行圖像處理形成圖像二維陣列資料,回應 輸入單元產生的一第二輸入訊號從存儲單元中獲取一演 算法選擇參考值及選擇一圖像相似度比較演算法,根據 該比較演算法比對圖像資料形成資料分析結果。 [0004] —種電子裝置的圖像相似度比較的方法,該電子裝置存 100100295 表單編號A0101 第4頁/共15頁 1002000495-0 201229961 儲有多種圖像相似度比較演算法、每一演算法的選擇參 考值及及每一演算法的相似預設值,該方法包括如下步 驟:回應一第一輸入訊號導入多媒體檔,進行圖像處理形 成圖像二維陣列資料;回應一第二輸入訊號獲取一演算 法選擇參考值及選擇一圖像相似度比較演算法;根據該 比較演算法比對圖像資料得出比較參數的相似值,計算 比較參數相似的百分比;如果該百分比達到一預設值, 輸出兩張圖像相同的結果;及如果該百分比未達到該預 設值’輸出兩張圖像不相同的結果。 Ο [0005] 本發明一種電子裝置及其圖像相似度比較的方法,本發 明提供三種演算法,根據用戶對精度或效率的不同要求 ,設置一個參數值選擇一演算法,從而電子裝置選擇一 滿足用戶要求的演算法。 【實施方式】 [0006] 圖1是本發明一電子裝置的硬體結構示意鼠。該電子裝置 1包括一輸入單元10、一控制單元20、一圖像處理單元30 Q 、一顯示單元40及一存儲單元50。該輸入單元10用於接 收用戶的輸入操作產生一輸入訊號。該控制單元20用於 控制整個電子裝置1。如圖2所示,該控制單元20進一步 包括一檔導入模組210、一演算法獲取模組220、一參數 比對模組230、一計算模組240、一判斷模組250及一輸 出控制模組260。該圖像處理單元30用於處理電子裝置1 中的圖像。該顯示單元40用於顯示資訊。 [0007] 該存儲單元50用於存儲一整圖比較演算法庫51、分塊比 較演算法庫52、抽選比較演算法庫53及演算法選擇參考 100100295 表單編號A0101 第5頁/共15頁 1002000495-0 201229961 值54。比較演算法庫51存儲有—針對圖像的每個 圖兀點逐-比對,得出圖元點相似值的演算法。在該整 圖比較演算法中,兩圖像的比較參數是每個圖元點。該 分塊比較演算法庫52存儲有—將圖像劃分為若干小塊, 針對每小塊進行比較,得出小塊相似值的演算法。在 該分塊比較演算法中’兩圖像的比較參數是小塊圖像的 圖元點。該抽選比較演算法庫53存儲有—根據每個圖元 點在圖像中的錢位置隨機任意座標點進行 比對的演算法。在該抽選比較演算法中,兩圖像的比較 參數是隨機抽選的圖元點。 [0008] [0009] 該演算法選擇參考值54包括各演算法的參考值。例如, 6玄整圖比較演算法的選擇參考值為a,該分塊比較演算法 ........... ... .............. 的選擇參考值為b,該抽選比較演算法的選擇參考值為c 0 該控制單元20回應輸入單元10的輸入訊號選擇多種演算 法中的一種,形成資料分析結果'該輸入單元1〇根據用 戶的輸入操作產生一第一輸入訊號,檔導入模組21〇導入 一多媒體檔,如一視頻或影片。圖像處理單元3〇對該多 媒體文進行圖像處理形成圖像二維陣列資料。該輸入單 元10根據用戶的輸入操作產生一第二輸入訊號,演算法 獲取模組220從存儲早元50中獲取一演算法選擇參考值及 選擇一圖像相似度比較演算法。用戶可根據自己的需求 控制輸入早元10產生該第二輸入訊號,例如,當用戶需 快速比對該多媒體檔時,輸入單元10產生的該第二輸入 訊號為一關於抽選比較演算法的參考值c,當用戶需分析 100100295 表單編號A0101 第6頁/共15頁 1002000495-0 201229961 某一段多媒體檔,輸入單元ίο產生的該第二輸入訊號為 一關於整圖比較演算法的參考值a。 [0010] 該參數比對模組230根據該比較演算法比對圖像資料及得 出比較參數的相似值,計算模組2 4 0計算比較參數相似的 百分比。例如,選擇了整圖比較演算法,該參數比對模 組230比對兩個圖像共100個圖元點的每個圖元點及得出 圖元點相似的為88個,計算模組240計算圖元點相似的百 分比為8 8 %。 〇 [0011] 判斷模組250判斷比較參數相似的百分比是否達到預設值 。當判斷模組250判斷出比較參數相似的百分比達到預設 值,輸出控制模組260控制顯示單元40顯示兩張圖像相同 的資訊。例如,整圖比較演算法的該預設值為85%,計算 模組240計算出所有圖元點相似的百分比為88%,則比對 的兩個圖像相同。當判斷模組250判斷出比較參數相似的 百分比沒有達到預設值,輸出控制模組260控制顯示單元 40顯示兩張圖像不相同的資訊。 ❹ [0012] 圖3是圖1的電子裝置1比較圖像相似度的方法流程圖。 [0013] 檔導入模組210回應輸入單元10產生的第一輸入訊號導入 多媒體檔,圖像處理單元30對該多媒體檔進行圖像處理 形成圖像二維陣列資料(步驟S310)。 [0014] 演算法獲取模組220回應輸入單元10的第二輸入訊號從存 儲單元50中獲取一演算法選擇參考值及選擇一圖像相似 度比較演算法(步驟S320 )。 [0015] 參數比對模組230根據該比較演算法比對圖像資料,計算 100100295 表單編號A0101 第7頁/共15頁 1002000495-0 201229961 模組240計算比較參數相似的百分比(步驟S330 )。 [0016] 判斷模組2 5 0判斷比較參數相似的百分比是否達到預設值 (步驟S340 )。 [0017] 如果判斷出比較參數相似的百分比達到預設值,輸出控 制模組26 0控制顯示單元40顯示兩張圖像相同的資訊(步 驟 S 3 5 0 )。 [0018] 如果判斷出比較參數相似的百分比沒有達到預設值,輸 出控制模組260控制顯示單元40顯示兩張圖像不相同的資 訊(步驟S360 )。 [0019] 本發明提供三種演算法,根據用戶對精度或效率的不同 要求,設置一個參數值選擇一演算法,從而電子裝置選 擇一滿足用戶要求的演算法。 [0020] 儘管對本發明的優選實施方式進行了說明和描述,但是 本領域的技術人員將領悟到,可以作出各種不同的變化 和改進,這些都不超出本發明的真正範圍。因此期望, 本發明並不局限於所公開的作為實現本發明所設想的最 佳模式的具體實施方式,本發明包括的所有實施方式都 有所附權利要求書的保護範圍内。 【圖式簡單說明】 [0021] 圖1是本發明一電子裝置的硬體結構示意圖; [0022] 圖2為圖1所示的電子裝置的控制單元的子模組示意圖; 及 [0023] 圖3是圖1的電子裝置比較圖像相似度的方法流程圖。 100100295 表單編號A0101 第8頁/共15頁 1002000495-0 201229961 【主要元件符號說明】201229961 VI. Description of the Invention: [Technical Field] [0001] The present invention relates to an electronic device, and more particularly to an electronic device and a method for comparing image similarity thereof. [Prior Art] [0002] At present, in image analysis, two images are compared by a single algorithm to compare their similarities, the speed of comparison is either slow or the accuracy of comparison is not high, and can not meet user requirements. High accuracy also meets the requirements of fast speed. In particular, if you want to quickly compare a certain number of images, the comparison between each adjacent image is slower. Therefore, the existing image similarity comparison method does not provide a variety of algorithms for the user to select, and it is difficult to meet the requirements of speed and accuracy. SUMMARY OF THE INVENTION [0003] In order to solve the above problems, an object of the present invention is to provide an electronic device including an input unit for receiving an input operation of a user to generate an input signal; a display unit for displaying Information, a storage unit, which stores a plurality of image similarity comparison algorithms and selection reference values of each algorithm; an image processing unit for processing the image to form an image two-dimensional array data; and a control The unit is configured to import a first input signal generated by the input unit into the multimedia file, control the image processing unit to perform image processing to form an image two-dimensional array data, and obtain a second input signal generated by the input unit from the storage unit. An algorithm selects a reference value and selects an image similarity comparison algorithm, and forms a data analysis result according to the comparison algorithm. [0004] A method for comparing image similarity of an electronic device, the electronic device is stored 100100295 Form No. A0101 Page 4 / 15 pages 1002000495-0 201229961 There are various image similarity comparison algorithms, each algorithm Selecting a reference value and a similar preset value for each algorithm, the method comprising the steps of: importing a first input signal into a multimedia file, performing image processing to form an image two-dimensional array data; and responding to a second input signal Obtaining an algorithm selection reference value and selecting an image similarity comparison algorithm; obtaining a similarity value of the comparison parameter according to the comparison algorithm to compare the image data, and calculating a percentage of the comparison parameter similarity; if the percentage reaches a preset The value, the same result is output for both images; and if the percentage does not reach the preset value, the output of the two images is not the same result. [0005] An electronic device and a method for comparing image similarity thereof, the present invention provides three algorithms, and according to different requirements of the user for accuracy or efficiency, setting a parameter value to select an algorithm, so that the electronic device selects one An algorithm that meets user requirements. [Embodiment] FIG. 1 is a view showing a hardware structure of an electronic device according to the present invention. The electronic device 1 includes an input unit 10, a control unit 20, an image processing unit 30Q, a display unit 40, and a storage unit 50. The input unit 10 is configured to receive an input operation of the user to generate an input signal. The control unit 20 is used to control the entire electronic device 1. As shown in FIG. 2, the control unit 20 further includes a file import module 210, an algorithm acquisition module 220, a parameter comparison module 230, a calculation module 240, a determination module 250, and an output control. Module 260. The image processing unit 30 is for processing an image in the electronic device 1. The display unit 40 is for displaying information. [0007] The storage unit 50 is configured to store a whole graph comparison algorithm library 51, a block comparison algorithm library 52, a lottery comparison algorithm library 53, and an algorithm selection reference 100100295. Form number A0101 Page 5 / 15 pages 1002000495 -0 201229961 Value 54. The comparison algorithm library 51 stores an algorithm for finding a similar value of a primitive point for each point-to-point comparison of the image. In the integer comparison algorithm, the comparison parameters of the two images are each primitive point. The block comparison algorithm library 52 stores an algorithm for dividing the image into a plurality of small blocks and comparing them for each small block to obtain a small block similarity value. In the block comparison algorithm, the comparison parameter of the two images is the pixel point of the tile image. The decimation comparison algorithm library 53 stores an algorithm for performing an alignment based on random position points of the money positions in the image according to each primitive point. In the lottery comparison algorithm, the comparison parameters of the two images are randomly selected pixel points. [0008] The algorithm selection reference value 54 includes reference values for each algorithm. For example, the selection reference value of the algorithm for comparing the algorithm is a, the block comparison algorithm................................... The selection reference value is b, and the selection reference value of the decimation comparison algorithm is c 0. The control unit 20 selects one of a plurality of algorithms in response to the input signal of the input unit 10 to form a data analysis result 'the input unit 1 〇 according to the user The input operation generates a first input signal, and the file import module 21 imports a multimedia file, such as a video or a movie. The image processing unit 3 performs image processing on the multimedia text to form image two-dimensional array data. The input unit 10 generates a second input signal according to the input operation of the user, and the algorithm acquisition module 220 acquires an algorithm selection reference value from the storage early element 50 and selects an image similarity comparison algorithm. The user can control the input early element 10 to generate the second input signal according to his own needs. For example, when the user needs to quickly compare the multimedia file, the second input signal generated by the input unit 10 is a reference for the lottery comparison algorithm. The value c, when the user needs to analyze 100100295 Form No. A0101 Page 6 / Total 15 Page 1002000495-0 201229961 A certain multimedia file, the input signal ίο generated the second input signal is a reference value a for the whole picture comparison algorithm. [0010] The parameter comparison module 230 compares the image data according to the comparison algorithm with the similarity value of the comparison parameter, and the calculation module calculates a similar percentage of the comparison parameter. For example, the whole picture comparison algorithm is selected, and the parameter comparison module 230 compares each picture element point of the total of 100 picture element points of the two images with 88 picture points, and the calculation module is similar. The percentage of 240 calculated primitive points is 8 8 %. [0011] The determining module 250 determines whether the percentage of the similarity of the comparison parameters reaches a preset value. When the judging module 250 judges that the percentage of the comparison parameters is similar to the preset value, the output control module 260 controls the display unit 40 to display the same information of the two images. For example, the default value of the whole graph comparison algorithm is 85%, and the calculation module 240 calculates that the percentage of similarity of all the primitive points is 88%, and the two images of the comparison are the same. When the judging module 250 judges that the percentage of the comparison parameter is not up to the preset value, the output control module 260 controls the display unit 40 to display the information that the two images are different. 3 is a flow chart of a method for comparing image similarities of the electronic device 1 of FIG. 1. [0013] The file importing module 210 imports the multimedia file in response to the first input signal generated by the input unit 10, and the image processing unit 30 performs image processing on the multimedia file to form image two-dimensional array data (step S310). [0014] The algorithm acquisition module 220 obtains an algorithm selection reference value from the storage unit 50 in response to the second input signal of the input unit 10 and selects an image similarity comparison algorithm (step S320). [0015] The parameter comparison module 230 compares the image data according to the comparison algorithm, and calculates 100100295 Form No. A0101 Page 7 / Total 15 Page 1002000495-0 201229961 The module 240 calculates a percentage similar to the comparison parameter (Step S330). [0016] The judging module 250 determines whether the percentage of the comparison parameter similarity reaches a preset value (step S340). [0017] If it is determined that the percentage of the comparison parameter similarity reaches the preset value, the output control module 26 0 controls the display unit 40 to display the same information of the two images (step S 3 5 0 ). [0018] If it is determined that the percentage of the comparison parameter similarity does not reach the preset value, the output control module 260 controls the display unit 40 to display the information that the two images are different (step S360). [0019] The present invention provides three algorithms for setting a parameter value to select an algorithm according to different requirements of the user for accuracy or efficiency, so that the electronic device selects an algorithm that satisfies the user's requirements. [0020] While the invention has been described and described with respect to the preferred embodiments of the present invention, it will be understood that various changes and modifications may be made without departing from the true scope of the invention. It is therefore intended that the invention not be limited to the particular embodiments of the invention disclosed herein, BRIEF DESCRIPTION OF THE DRAWINGS [0021] FIG. 1 is a schematic diagram of a hardware structure of an electronic device of the present invention; [0022] FIG. 2 is a schematic diagram of a sub-module of a control unit of the electronic device shown in FIG. 1; 3 is a flow chart of a method for comparing image similarities of the electronic device of FIG. 1. 100100295 Form No. A0101 Page 8 of 15 1002000495-0 201229961 [Main component symbol description]
[0024] 電子裝置:1 [0025] 輸入單元:1 0 [0026] 控制單元:20 [0027] 圖像處理單元:30 [0028] 顯示單元:40 [0029] 存儲單元:50 [0030] 整圖比較演算法庫: 51 [0031] 分塊比較演算法庫: 52 [0032] 抽選比較演算法庫: 53 [0033] 演算法選擇參考值: 54 [0034] 檔導入模組:210 [0035] 演算法獲取模組:220 [0036] 參數比對模組:230 [0037] 計算模組:240 [0038] 判斷模組:250 [0039] 輸出控制模組:260 100100295 表單編號A0101 第9頁/共15頁 1002000495-0[0024] Electronic device: 1 [0025] Input unit: 1 0 [0026] Control unit: 20 [0027] Image processing unit: 30 [0028] Display unit: 40 [0029] Storage unit: 50 [0030] Comparison Algorithm Library: 51 [0031] Block Comparison Algorithm Library: 52 [0032] Lottery Comparison Algorithm Library: 53 [0033] Algorithm Selection Reference Value: 54 [0034] File Import Module: 210 [0035] Calculus Method acquisition module: 220 [0036] Parameter comparison module: 230 [0037] Calculation module: 240 [0038] Judgment module: 250 [0039] Output control module: 260 100100295 Form number A0101 Page 9 / total 15 pages 1002000495-0