[go: up one dir, main page]

TWI740145B - Method, electrical device, and computer program product for hiding information and protecting privacy of video - Google Patents

Method, electrical device, and computer program product for hiding information and protecting privacy of video Download PDF

Info

Publication number
TWI740145B
TWI740145B TW108117556A TW108117556A TWI740145B TW I740145 B TWI740145 B TW I740145B TW 108117556 A TW108117556 A TW 108117556A TW 108117556 A TW108117556 A TW 108117556A TW I740145 B TWI740145 B TW I740145B
Authority
TW
Taiwan
Prior art keywords
object area
video frame
information
video
area
Prior art date
Application number
TW108117556A
Other languages
Chinese (zh)
Other versions
TW202044844A (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 TW108117556A priority Critical patent/TWI740145B/en
Publication of TW202044844A publication Critical patent/TW202044844A/en
Application granted granted Critical
Publication of TWI740145B publication Critical patent/TWI740145B/en

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

A method for hiding information and protecting privacy of video is provided and includes: obtaining a video and performing an object detecting algorithm on a video frame to obtain at least one object area; replicating the object area to obtain recovery information, and embedding the recovery information into a non-object area of the video frame; embedding a authentication information into the object area and encrypting it to obtain an encrypted object area, and replacing the object area with the encrypted object area.

Description

視訊的資訊隱藏與隱私保護方法、電子 裝置、電腦程式產品 Video information hiding and privacy protection methods, electronic Device, computer program product

本發明是有關於一種針對視訊中特定物件的資訊隱藏與隱私保護方法。 The invention relates to a method for information hiding and privacy protection for specific objects in video.

隨著科技的發展與硬體成本的降低,視訊系統被廣泛的應用於生活中的各個角落,如手機、行車紀錄器、網路攝影機及監控系統等,也因此人們可能會在無意中侵犯到他人的隱私。而視訊系統也經常被用來做為紀錄事件發生始末的重要工具,這也導致有心人士會想竄改視訊中的感興趣區域,要如何避免視訊中的感興趣區域遭受到竄改也成為一個重要的課題。另外,資訊隱藏為一種能保護並且驗證資料真確性的技術,如何結合資訊隱藏與隱私保護,為此領域技術人員所關心的議題。 With the development of technology and the reduction of hardware costs, video systems are widely used in all corners of life, such as mobile phones, driving recorders, network cameras and surveillance systems, etc., and therefore people may inadvertently violate The privacy of others. The video system is also often used as an important tool to record the whole incident. This also leads to people who want to tamper with the area of interest in the video. How to avoid the area of interest in the video from being tampered has become an important issue. Subject. In addition, information hiding is a technology that can protect and verify the authenticity of data. How to combine information hiding and privacy protection is a topic of concern to those skilled in the art.

本發明的實施例提出一種視訊的資訊隱藏與隱私保護方法,適用於一電子裝置,方法包括:取得視訊,對視訊框執行物件偵測演算法以取得物件區域;將物件區域複製多份以得到還原資訊,並將還原資訊嵌入至視訊框的一非物件區域;以及將一驗證資訊嵌入至物件區域後加密以得到加密後物件區域,並將物件區域替換為加密後物件區域。 An embodiment of the present invention provides a method for hiding and protecting privacy of video, which is suitable for an electronic device. The method includes: obtaining a video, executing an object detection algorithm on the video frame to obtain an object area; copying multiple copies of the object area to obtain Restore the information and embed the restored information in a non-object area of the video frame; and embed a verification information in the object area and encrypt it to obtain the encrypted object area, and replace the object area with the encrypted object area.

在一些實施例中,上述的方法更包括:對物件區域執行一物件辨識方法,若物件區域不屬於一隱私保護區域,則排除此物件區域。 In some embodiments, the above method further includes: performing an object identification method on the object area, and if the object area does not belong to a privacy protection area, then the object area is excluded.

在一些實施例中,上述的方法更包括:將物件區域中多個像素的多個最高有效位元、物件區域的位置資訊與視訊框的編號輸入至雜湊函數以得到驗證資訊。 In some embodiments, the above method further includes: inputting the most significant bits of the pixels in the object area, the position information of the object area, and the number of the video frame into the hash function to obtain verification information.

在一些實施例中,上述的物件區域被複製至少3份以得到還原資訊,方法還包括:判斷非物件區域是否足夠容納還原資訊;如果非物件區域不足以容納還原資訊,將物件區域縮小以得到縮小後物件區域,並將縮小後物件區域複製至少3份以得到還原資訊。 In some embodiments, the aforementioned object area is copied at least 3 copies to obtain the restoration information, and the method further includes: determining whether the non-object area is sufficient to contain the restoration information; if the non-object area is insufficient to contain the restoration information, shrink the object area to obtain the restoration information Reduce the reduced object area, and copy at least 3 copies of the reduced object area to obtain restoration information.

在一些實施例中,上述的還原資訊還包括視訊框的編號、壓縮資訊、還原資訊隱藏次數、物件區域的數目與物件區域的位置資訊。 In some embodiments, the aforementioned restoration information further includes the number of the video frame, compression information, the number of times the restoration information is hidden, the number of object regions, and the location information of the object regions.

在一些實施例中,上述的視訊框包括第一視訊框、第二視訊框與第三視訊框,第三視訊框在第一視訊框與第二視訊框之間。方法更包括:設定時間軸上的過濾遮罩;辨識視訊框中的物件區域,以取得視訊框之間物件區域的對 應關係;當套用過濾遮罩至第一視訊框時,若在過濾遮罩內只有第一視訊框具有物件區域,則刪除第一視訊框中的物件區域;以及當第一視訊框與第二視訊框之間的距離小於等於一預設視訊框距離,且第一視訊框與第二視訊框都具有對應的物件區域,且第三視訊框不具有物件區域,填補第三視訊框使第三視訊框具有對應的物件區域。 In some embodiments, the aforementioned video frame includes a first video frame, a second video frame, and a third video frame, and the third video frame is between the first video frame and the second video frame. The method further includes: setting the filter mask on the timeline; identifying the object area in the video frame to obtain the matching of the object area between the video frames When applying a filter mask to the first video frame, if only the first video frame in the filter mask has an object area, delete the object area in the first video frame; and when the first video frame and the second video frame The distance between the video frames is less than or equal to a preset video frame distance, and both the first video frame and the second video frame have corresponding object areas, and the third video frame does not have an object area, filling the third video frame to make the third The video frame has a corresponding object area.

在一些實施例中,上述填補第三視訊框的步驟包括:根據以下方程式(1)計算第三視訊框中物件區域的位置。 In some embodiments, the step of filling the third video frame includes: calculating the position of the object area in the third video frame according to the following equation (1).

Figure 108117556-A0101-12-0003-1
Figure 108117556-A0101-12-0003-1

Xi,j為第三視訊框中第j個物件區域的位置,L j 為第一視訊框中第j個物件區域的位置,R j 為第二視訊框中第j個物件區域的位置,i為第三視訊框與第一視訊框之間的距離,n為第二視訊框與第一視訊框之間的視訊框數。 X i,j is the position of the j-th object area in the third video frame, L j is the position of the j-th object area in the first video frame, R j is the position of the j-th object area in the second video frame, i is the distance between the third video frame and the first video frame, and n is the number of video frames between the second video frame and the first video frame.

在一些實施例中,上述的方法更包括:解密加密後物件區域以得到解密後物件區域;從解密後物件區域取得一待驗證資訊;判斷待驗證資訊是否正確;若待驗證資訊正確,判斷加密後物件區域並沒有被竄改;若待驗證資訊不正確,根據還原資訊還原物件區域。 In some embodiments, the above method further includes: decrypting the encrypted object area to obtain the decrypted object area; obtaining information to be verified from the decrypted object area; judging whether the information to be verified is correct; if the information to be verified is correct, judging the encryption After that, the object area has not been tampered with; if the information to be verified is incorrect, restore the object area according to the restoration information.

以另外一個角度來說,本發明提出一種電子裝置,包括記憶體與處理器。記憶體儲存有多個指令,處理器執行這些指令以完成多個步驟:取得視訊,對視訊框執行一物件偵測演算法以取得物件區域;將物件區域複製多份以得到還原資訊,並將還原資訊嵌入至視訊框的一非物件區域; 將一驗證資訊嵌入至物件區域後加密以得到加密後物件區域,並將物件區域替換為加密後物件區域。 From another perspective, the present invention provides an electronic device including a memory and a processor. The memory stores multiple instructions, and the processor executes these instructions to complete multiple steps: obtain video, execute an object detection algorithm on the video frame to obtain the object area; copy multiple copies of the object area to obtain the restoration information, and The restoration information is embedded in a non-object area of the video frame; A piece of authentication information is embedded in the object area and then encrypted to obtain the encrypted object area, and the object area is replaced with the encrypted object area.

以另外一個角度來說,本發明的實施例提出一種電腦程式產品,由電子裝置載入並執行以完成多個步驟:取得視訊,對視訊框執行一物件偵測演算法以取得物件區域;將物件區域複製多份以得到還原資訊,並將還原資訊嵌入至視訊框的一非物件區域;將一驗證資訊嵌入至物件區域後加密以得到加密後物件區域,並將物件區域替換為加密後物件區域。 From another perspective, the embodiment of the present invention provides a computer program product that is loaded and executed by an electronic device to complete multiple steps: obtain video, execute an object detection algorithm on the video frame to obtain the object area; Copy multiple copies of the object area to obtain recovery information, and embed the recovery information in a non-object area of the video frame; embed a verification information in the object area and encrypt it to obtain the encrypted object area, and replace the object area with the encrypted object area.

為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。 In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail in conjunction with the accompanying drawings.

100‧‧‧系統 100‧‧‧System

110‧‧‧視訊擷取模組 110‧‧‧Video capture module

120‧‧‧電子裝置 120‧‧‧Electronic device

121‧‧‧處理器 121‧‧‧Processor

122‧‧‧記憶體 122‧‧‧Memory

210‧‧‧視訊 210‧‧‧Video

211~213、260‧‧‧視訊框 211~213、260‧‧‧Video frame

220、242、243、252、253‧‧‧步驟 220, 242, 243, 252, 253‧‧‧ steps

230‧‧‧資料庫 230‧‧‧Database

221、222‧‧‧物件區域 221, 222‧‧‧Object area

241‧‧‧驗證資訊 241‧‧‧Verify Information

244‧‧‧加密後物件區域 244‧‧‧Encrypted object area

251‧‧‧非物件區域 251‧‧‧Non-object area

310、320、330‧‧‧序列 310, 320, 330‧‧‧Sequence

301‧‧‧過濾遮罩 301‧‧‧Filter mask

311~316、321~323‧‧‧視訊框 311~316、321~323‧‧‧Video frame

410‧‧‧區塊 410‧‧‧block

420‧‧‧物件區域的位置資訊 420‧‧‧Location information of the object area

430‧‧‧視訊框的編號 430‧‧‧The number of the video frame

440‧‧‧雜湊函數 440‧‧‧Hash function

501~504‧‧‧視訊邊框 501~504‧‧‧Video frame

505‧‧‧中央區域 505‧‧‧Central area

601~609‧‧‧步驟 601~609‧‧‧Step

610、612‧‧‧視訊框 610, 612‧‧‧Video frame

[圖1]是根據一實施例繪示系統的示意圖。 [Fig. 1] is a schematic diagram of a system according to an embodiment.

[圖2A]與[圖2B]是根據一實施例繪示資訊隱藏與隱私保護方法的流程示意圖。 [FIG. 2A] and [FIG. 2B] are schematic diagrams illustrating the flow of information hiding and privacy protection methods according to an embodiment.

[圖3]是根據一實施例繪示過濾遮罩的運作示意圖。 [Fig. 3] is a schematic diagram showing the operation of the filter mask according to an embodiment.

[圖4]是根據一實施例繪示計算驗證資訊的示意圖。 [Fig. 4] is a schematic diagram of calculating verification information according to an embodiment.

[圖5]是根據一實施例繪示視訊邊框的示意圖。 [Fig. 5] is a schematic diagram showing a video frame according to an embodiment.

[圖6A]與[圖6B]是根據一實施例繪示驗證、回復視訊框的流程圖。 [FIG. 6A] and [FIG. 6B] are flowcharts of verifying and replying to a video frame according to an embodiment.

關於本文中所使用之『第一』、『第二』、...等,並非特別指次序或順位的意思,其僅為了區別以相同技術用語描述的元件或操作。 Regarding the "first", "second", ... etc. used in this text, it does not specifically refer to the order or sequence, but only to distinguish the elements or operations described in the same technical terms.

圖1是根據一實施例繪示系統的示意圖。請參照圖1,在此系統100包括了視訊擷取模組110與電子裝置120,其中電子裝置120包括了處理器121與記憶體122。視訊擷取模組110可包括感光耦合元件(Charge-coupled Device,CCD)感測器、互補性氧化金屬半導體(Complementary Metal-Oxide Semiconductor)感測器或其他合適的感光元件,用以擷取視訊。電子裝置120可以是智慧型手機、平板電腦、個人電腦、筆記型電腦、伺服器、工業電腦、或具有計算能力的各種電子裝置等,本發明並不在此限。處理器121可為中央處理器、微處理器、微控制器、數位信號處理器、影像處理晶片或特殊應用積體電路,記憶體122可為揮發性記憶體或非揮發性記憶體。在一些實施例中,視訊擷取模組110也可以設置在電子裝置120中,而電子裝置120也可以是監視器、行車紀錄器等。記憶體122儲存有多個指令,處理器121會執行這些指令來完成一個關於視訊的資訊隱藏與隱私保護方法,以下將詳細說明此方法。 Fig. 1 is a schematic diagram showing a system according to an embodiment. Please refer to FIG. 1, the system 100 here includes a video capture module 110 and an electronic device 120, where the electronic device 120 includes a processor 121 and a memory 122. The video capture module 110 may include a Charge-coupled Device (CCD) sensor, a Complementary Metal-Oxide Semiconductor (Complementary Metal-Oxide Semiconductor) sensor or other suitable photosensitive elements for capturing video . The electronic device 120 may be a smart phone, a tablet computer, a personal computer, a notebook computer, a server, an industrial computer, or various electronic devices with computing capabilities, etc. The present invention is not limited thereto. The processor 121 can be a central processing unit, a microprocessor, a microcontroller, a digital signal processor, an image processing chip or a special application integrated circuit, and the memory 122 can be a volatile memory or a non-volatile memory. In some embodiments, the video capture module 110 can also be provided in the electronic device 120, and the electronic device 120 can also be a monitor, a driving recorder, or the like. The memory 122 stores a plurality of instructions, and the processor 121 executes these instructions to complete a method for information hiding and privacy protection of the video. This method will be described in detail below.

圖2A與圖2B是根據一實施例繪示資訊隱藏與隱私保護方法的流程示意圖。請參照圖2A,首先取得視訊210,此視訊210包括了多個視訊框211~213,對於每一個視訊框都會進行資訊隱藏與隱私保護方法,以下以視訊框211為例繼續說明。 2A and 2B are schematic diagrams illustrating the flow of information hiding and privacy protection methods according to an embodiment. 2A, first obtain a video 210. The video 210 includes a plurality of video frames 211 to 213. For each video frame, information hiding and privacy protection methods are performed. The following uses the video frame 211 as an example to continue the description.

在步驟220中,執行物件偵測演算法以從視訊框211中取得物件區域221、222,物件區域221、222具有對應的定界框(bounding box),用以指出物件的位置。在此實施例中,上述的物件偵測演算法是要偵測人臉,但在其他實施例中也可以偵測車牌、證件、行人、車子等任意的物件。在此實施例中,物件偵測演算法為卷積神經網路,但在其他實施例中也可以是支持向量機、適應性增強(adaboost)等其他機器學習演算法。 In step 220, an object detection algorithm is executed to obtain object areas 221, 222 from the video frame 211. The object areas 221, 222 have corresponding bounding boxes for indicating the location of the object. In this embodiment, the aforementioned object detection algorithm is to detect human faces, but in other embodiments, it can also detect any objects such as license plates, certificates, pedestrians, and cars. In this embodiment, the object detection algorithm is a convolutional neural network, but in other embodiments, it can also be other machine learning algorithms such as support vector machines and adaboost.

在一些實施例中,有些人臉是需要隱私保護的,其他則否,因此必須要辨識出這些需要隱私保護的人臉。具體來說,資料庫230中儲存有多個人的人臉影像,在此可以執行一物件辨識方法,用以判斷物件區域221、222是屬於誰的人臉,需要被保護的物件區域被稱為隱私保護區域,如果有一個物件區域並不是屬於隱私保護區域,則排除此物件區域。舉例來說,資料庫230中儲存有一個社區中所有住戶的人臉,上述的物件辨識方法是要判斷物件區域221、222是否為住戶,如果是則為隱私保護區域,會繼續後續的隱私保護方法,若不是住戶則會被排除。例如,物件區域222可被排除,因此物件區域221會執行後續的步驟。在一些實施例中,上述的物件辨識方法可以採用卷積神經網路等任意合適的演算法,本發明並不在此限。在一些實施例中,當步驟220所偵測的物件為車牌時,上述的物件辨識方法是要辨識出車牌號碼為何,資料庫230也可以儲存需要隱私保護的車牌號碼,若物件區域221、222中的車牌號碼不 屬於特定的車牌號碼,便表示不是屬於隱私保護區域,並不會執行後續的步驟。 In some embodiments, some human faces need privacy protection, while others do not. Therefore, these human faces that need privacy protection must be identified. Specifically, the database 230 stores the face images of multiple people. Here, an object recognition method can be implemented to determine whose face the object areas 221 and 222 belong to. The object area that needs to be protected is called Privacy protection area, if there is an object area that does not belong to the privacy protection area, then this object area is excluded. For example, the database 230 stores the faces of all residents in a community. The above object identification method is to determine whether the object areas 221 and 222 are residents. If they are, it is a privacy protection area, and subsequent privacy protection will continue. Method, if it is not a household, it will be excluded. For example, the object area 222 can be excluded, so the object area 221 will execute the subsequent steps. In some embodiments, the above-mentioned object recognition method may use any suitable algorithm such as a convolutional neural network, and the present invention is not limited thereto. In some embodiments, when the object detected in step 220 is a license plate, the above-mentioned object identification method is to identify the license plate number. The database 230 can also store the license plate number that requires privacy protection. If the object areas 221, 222 The license plate number in is not If it belongs to a specific license plate number, it means that it does not belong to a privacy protection area, and the subsequent steps will not be executed.

不論採用哪一種物件偵測方法,都有可能會有錯誤,這些錯誤分為偽陽性(false positive)與偽陰性(false negative),在一些實施例中可以根據時間軸上的過濾遮罩來消除這些錯誤。具體來說,請參照圖3,圖3是根據一實施例繪示過濾遮罩的運作示意圖。序列310表示原始的視訊,其中視訊框311~316表示有偵測出物件區域。透過上述的物件辨識方法可以辨識出這些物件區域之間的對應關係,在此為了簡化起見,視訊框311~316中的物件區域是屬於相同的物件(例如屬於同一個人的人臉)。在此可以設定時間軸上的一個預設視訊框距離△,例如為△=3,上述過濾遮罩的大小為2×△-1=5,包括了目前視訊框、2個前視訊框與2個後視訊框,當套用此過濾遮罩時,如果過濾遮罩中只有目前視訊框中有物件區域,其餘視訊框都沒有物件區域,則很有可能目前視訊框中的物件區域為偽陽性,因此可刪除此物件區域。舉例來說,當過濾遮罩301套用在視訊框312時,由於在過濾遮罩301內只有視訊框312有物件區域,因此會刪除此物件區域。類似的,當套用過濾遮罩301至視訊框316時,也只有視訊框316具有物件區域,因此會刪除視訊框316中的物件區域。在將過濾遮罩301套用至所有的視訊框以後可得到序列320。 No matter which object detection method is used, there may be errors. These errors are divided into false positives and false negatives. In some embodiments, they can be eliminated according to the filter mask on the time axis. These errors. Specifically, please refer to FIG. 3, which is a schematic diagram illustrating the operation of the filter mask according to an embodiment. The sequence 310 represents the original video, and the video frames 311 to 316 represent the detected object area. The corresponding relationship between these object areas can be identified through the above object recognition method. For the sake of simplicity, the object areas in the video frames 311 to 316 belong to the same object (for example, the face of the same person). Here you can set a default video frame distance △ on the time axis, for example △=3, the size of the above filter mask is 2×△-1=5, including the current video frame, 2 front video frames and 2 When applying this filter mask, if only the current video frame has an object area in the filter mask, and the rest of the video frames have no object area, it is very likely that the object area in the current video frame is false positive. Therefore, this object area can be deleted. For example, when the filter mask 301 is applied to the video frame 312, since only the video frame 312 has an object area in the filter mask 301, this object area is deleted. Similarly, when the filter mask 301 is applied to the video frame 316, only the video frame 316 has an object area, so the object area in the video frame 316 is deleted. After applying the filter mask 301 to all video frames, the sequence 320 can be obtained.

接下來對剩餘的視訊框進行填補,如果兩個具有物件區域的視訊框之間的距離小於等於預設視訊框距離 △,則中間沒有物件區域的視訊框可能是偽陰性,因此可以將中間所有的視訊框都填上相同的物件區域。舉例來說,視訊框313、314之間的距離為2,因此可將視訊框321填上相同的物件區域。類似地,視訊框314、315之間的距離為3,因此可以將視訊框322、323都填上相同的物件區域,在進行填補之後可以得到序列330。以另外一個角度來說,如果有三個視訊框,分別稱為第一視訊框、第二視訊框與第三視訊框,其中第三視訊框在第一視訊框與第二視訊框之間,當第一視訊框與第二視訊框之間的距離小於等於預設視訊框距離,且第二視訊框與第三視訊框之間的距離小於等於預設視訊框距離,且第一視訊框與第二視訊框都具有物件區域,且第三視訊框不具有對應的物件區域,則填補第三視訊框使第三視訊框具有對應的物件區域。 Next, fill in the remaining video frames, if the distance between two video frames with object areas is less than or equal to the default video frame distance △, the video frame without the object area in the middle may be false negative, so all the video frames in the middle can be filled with the same object area. For example, the distance between the video frames 313 and 314 is 2, so the video frame 321 can be filled with the same object area. Similarly, the distance between the video frames 314 and 315 is 3, so the video frames 322 and 323 can be filled with the same object area, and the sequence 330 can be obtained after filling. From another perspective, if there are three video frames, they are called the first video frame, the second video frame, and the third video frame. The third video frame is between the first video frame and the second video frame. The distance between the first video frame and the second video frame is less than or equal to the preset video frame distance, and the distance between the second video frame and the third video frame is less than or equal to the preset video frame distance, and the first video frame and the second video frame are less than or equal to the preset video frame distance. Both video frames have an object area, and the third video frame does not have a corresponding object area, then the third video frame is filled so that the third video frame has a corresponding object area.

值得注意的是,上述填補物件區域的步驟並不是修改視訊框的內容,而是在視訊框中新增一個定界框。由於物件區域有可能會移動,因此新增的物件區域的位置可用內差的方式來計算。在此假設L、R為兩個具有物件區域的視訊框,在視訊框L、R之間的視訊框Fi需要進行填補,i表示視訊框Fi與視訊框L之間的距離,i=1,2,...,n,n為視訊框L、R之間的視訊框數。上述的填補可參照以下方程式(1)。 It is worth noting that the above step of filling the object area is not to modify the content of the video frame, but to add a bounding box to the video frame. Since the object area may move, the position of the newly added object area can be calculated by the method of inner difference. It is assumed here L, R is a video frame having two object region in a video frame needs to be filled between the video frame F i L, R, I represents the distance between the video frame and video block F i L, i = 1,2,...,n, n is the number of video frames between video frames L and R. The above filling can refer to the following equation (1).

Figure 108117556-A0101-12-0008-3
Figure 108117556-A0101-12-0008-3

其中Xi,j為視訊框Fi中第j個物件區域的位置,L j 為視訊框L中第j個物件區域的位置,R j 為視訊框R中第j個物件區域的位置,Round()為四則五入運算。舉例來說,當要填補視訊框322、323時,方程式(1)中的視訊框R為視訊框 314,視訊框L為視訊框315,n為2,當i=1時填補的是視訊框322,當i=2時填補的是視訊框323。上述的位置可包含定界框左上與右下兩個座標點的X與Y座標,共4個數值,而這4個數值都可以套用至方程式(1)中。 Where X i,j is the position of the j-th object area in the video frame F i , L j is the position of the j-th object area in the video frame L, R j is the position of the j-th object area in the video frame R, Round () is the four arithmetic five-entry operations. For example, when the video frames 322 and 323 are to be filled, the video frame R in equation (1) is the video frame 314, the video frame L is the video frame 315, and n is 2, and when i=1, the video frame is filled. 322. When i=2, the video frame 323 is filled. The above-mentioned position may include the X and Y coordinates of the upper left and lower right coordinate points of the bounding box, a total of 4 values, and these 4 values can be applied to equation (1).

參照圖2B,接下來在步驟242中取得驗證資訊241,並將驗證資訊241嵌入至物件區域221中。圖4是根據一實施例繪示計算驗證資訊的示意圖。請參照圖2B與圖4,在此實施例中是將物件區域221分為多個2x4像素的不重疊區域,例如區域410,然後擷取區域410內8個像素的紅、綠、藍三個通道的灰階值的7個最高有效位元(most significant bit,MSB),總共有3x8x7=168個位元。此外,取得物件區域221的位置資訊420,例如物件區域221的左上、右下兩個點的座標。另外也會取得視訊框211的編號430(亦稱流水號)。上述168個位元、物件區域221的位置資訊420與視訊框211的編號430會輸入至一個雜湊函數(hash function)440以取得驗證資訊241。在一些實施例中,驗證資訊241為24個位元,這些位元會放至區域410內8個像素各灰階值的一個最低有效位元,共8x3x1=24個位元。對於物件區域221中每個2x4像素的區域都執行上述步驟便完成驗證資訊的嵌入。 2B, in step 242, the verification information 241 is obtained, and the verification information 241 is embedded in the object area 221. FIG. 4 is a schematic diagram of calculating verification information according to an embodiment. 2B and FIG. 4, in this embodiment, the object area 221 is divided into a plurality of 2x4 pixel non-overlapping areas, such as area 410, and then capture the red, green, and blue of the 8 pixels in the area 410 The 7 most significant bits (MSB) of the grayscale value of the channel are 3x8x7=168 bits in total. In addition, the position information 420 of the object area 221 is obtained, such as the coordinates of the upper left and lower right points of the object area 221. In addition, the serial number 430 (also called serial number) of the video frame 211 is also obtained. The above-mentioned 168 bits, the position information 420 of the object area 221, and the number 430 of the video frame 211 are input into a hash function 440 to obtain the verification information 241. In some embodiments, the verification information 241 is 24 bits, and these bits are placed in a least significant bit of each gray scale value of the 8 pixels in the area 410, a total of 8×3×1=24 bits. For each 2x4 pixel area in the object area 221, the above steps are executed to complete the embedding of the verification information.

回到圖2B,在嵌入驗證資訊241以後,在步驟243中,對物件區域221加密以得到加密後物件區域244。此加密演算法可以採用進階加密標準(Advanced Encryption Standard,AES)或其他合適的加 密演算法,本發明並不在此限。 Returning to FIG. 2B, after the verification information 241 is embedded, in step 243, the object area 221 is encrypted to obtain the encrypted object area 244. This encryption algorithm can use Advanced Encryption Standard (AES) or other suitable encryption The secret algorithm, the present invention is not limited to this.

此外,從視訊框211中可以取得非物件區域251,在此可以將物件區域221隱藏至非物件區域251,當物件區域221被竄改時可以從非物件區域251取得資訊來還原出物件區域221。首先介紹影像資訊的隱藏方法,此方法是將影像中相鄰像素兩兩一組分成多個1x2的不重疊區塊,並計算各組像素的差值d,表示為以下方程式(2)。 In addition, the non-object area 251 can be obtained from the video frame 211, where the object area 221 can be hidden to the non-object area 251. When the object area 221 is tampered with, information can be obtained from the non-object area 251 to restore the object area 221. First, the method of hiding image information is introduced. This method divides adjacent pixels in the image into multiple 1x2 non-overlapping blocks in pairs, and calculates the difference d of each group of pixels, which is expressed as the following equation (2).

d=g i+1-g i …(2) d = g i+1 - g i …(2)

其中g i 表示在位置i的像素。差值d的絕對值越大表示此區塊處於邊緣區域或是影像較複雜的區域,反之表示此區塊處於平滑區域。差值d的絕對值會對應至一個量化區間表,用以決定此區塊可以嵌入多位元的機密資訊。請參照以下表1,在表1中共有6個區間,每個區間具有對應的下界限值、上界限值與隱藏量(位元數),例如第一個區間具有下界限值0與上界限值7,此區間的隱藏量為3個位元,以此類推。 Where g i represents the pixel at position i. The larger the absolute value of the difference d, it means that the block is in an edge area or a more complex image area, and vice versa, that the block is in a smooth area. The absolute value of the difference d corresponds to a quantization interval table to determine that this block can embed multi-bit confidential information. Please refer to Table 1 below. There are 6 intervals in Table 1. Each interval has a corresponding lower limit value, upper limit value and hidden value (number of bits). For example, the first interval has a lower limit value of 0 and an upper limit. Value 7, the hidden amount of this interval is 3 bits, and so on.

Figure 108117556-A0101-12-0010-5
Figure 108117556-A0101-12-0010-5

利用第k個區間的上界限值uk與下界限值lk,k=1…6,可以計算出隱藏量C(單位是位元),如以下方程式(3)。 Using the upper limit value u k and the lower limit value l k of the k-th interval, k=1...6, the hidden amount C (unit is bit) can be calculated, as shown in the following equation (3).

Figure 108117556-A0101-12-0010-40
Figure 108117556-A0101-12-0010-40

決定出隱藏量以後,便可以從機密資訊中取得 C個位元,以下表示為b。透過下界限值lk與機密資訊b可以計算出區塊的新差值d',如以下方程式(4)。 After determining the amount of concealment, C bits can be obtained from the confidential information, denoted as b below. Through the lower limit value l k and the confidential information b, the new difference value d ' of the block can be calculated, as shown in the following equation (4).

d'=lk+b…(4) d ' = l k + b …(4)

接著計算新差值d'與原始差值d之間的差m,如以下方程式(5)。 M then calculates the difference between the new difference value d 'and the original difference value d, as the following equation (5).

m=d'-d…(5) m=d ' -d…(5)

最後將機密資訊平均分配至該區塊的兩個像素中,調整後的像素值可表示為以下方程式(6)。 Finally, the confidential information is equally distributed to the two pixels of the block, and the adjusted pixel value can be expressed as the following equation (6).

Figure 108117556-A0101-12-0011-6
Figure 108117556-A0101-12-0011-6

其中f()代表一函數,用以將像素(g i ,g i+1)轉換為像素(

Figure 108117556-A0101-12-0011-25
,
Figure 108117556-A0101-12-0011-26
)。舉例來說,如果g i =35、g i+1=45,則|d|=|45-35|=10,10屬於表1中的區間[8,15],隱藏量為3位元,機密資訊b=5={101}2。新的差值d'=8+5=13,而差值m=13-10=3,調整後的像素值分別為
Figure 108117556-A0101-12-0011-23
Figure 108117556-A0101-12-0011-24
。每個區塊在隱藏機密資訊前會檢查此區塊在嵌入最大可隱藏值時是否會溢位,若會溢位(例如,嵌入機密資訊以後的像素值大於255或小於0)則此區塊不做任何的嵌入動作。具體來說,可以測試f((g i ,g i+1),uk-d)所計算出的兩個像素是否大於255或小於0,如果有其中一個像素大於255或小於0則判斷為溢位,這是因為uk為對應區間的最大值,這會使計算出的像素(
Figure 108117556-A0101-12-0011-27
,
Figure 108117556-A0101-12-0011-28
)具有最大的差值。 Where f() represents a function to convert pixels ( g i , g i +1 ) into pixels (
Figure 108117556-A0101-12-0011-25
,
Figure 108117556-A0101-12-0011-26
). For example, if g i = 35 and g i +1 = 45, then |d|=|45-35|=10, 10 belongs to the interval [8,15] in Table 1, and the hidden amount is 3 bits. Confidential information b=5={101} 2 . The new difference d ' =8+5=13, and the difference m=13-10=3, the adjusted pixel values are
Figure 108117556-A0101-12-0011-23
,
Figure 108117556-A0101-12-0011-24
. Before hiding confidential information, each block will check whether this block will overflow when embedding the maximum concealable value. If it will overflow (for example, the pixel value after embedding confidential information is greater than 255 or less than 0), then this block Do not do any embedding actions. Specifically, you can test whether the two pixels calculated by f (( g i , g i +1 ), u k - d ) are greater than 255 or less than 0. If one of the pixels is greater than 255 or less than 0, it is judged as Overflow, this is because u k is the maximum value of the corresponding interval, which will make the calculated pixel (
Figure 108117556-A0101-12-0011-27
,
Figure 108117556-A0101-12-0011-28
) Has the largest difference.

此外,上述方程式(6)具有以下方程式(7)的特性。 In addition, the above equation (6) has the characteristics of the following equation (7).

f((g i ,g i+1),m)=f(f((g i ,g i+1),m'),m") for m=m'+m"...(7) f (( g i , g i +1 ),m) = f ( f (( g i , g i +1 ), m' ), m ") for m=m ' +m"...(7)

當要還原機密資訊時,先取得像素(

Figure 108117556-A0101-12-0012-29
,
Figure 108117556-A0101-12-0012-30
),求出差值d*,如以下方程式(8)。 When you want to restore confidential information, first get the pixel (
Figure 108117556-A0101-12-0012-29
,
Figure 108117556-A0101-12-0012-30
) To find the difference d*, as shown in the following equation (8).

Figure 108117556-A0101-12-0012-9
Figure 108117556-A0101-12-0012-9

將差值d*的絕對值對應至表1找到該區塊對應的區間[lk,u k ]。接下來,檢查f((

Figure 108117556-A0101-12-0012-31
,
Figure 108117556-A0101-12-0012-32
),uk-d*)的結果,此結果會等同於f((g i ,g i+1),uk-d)的結果,證明如以下方程式(9)。 Correspond the absolute value of the difference d * to the interval [l k , u k ] corresponding to the block found in Table 1. Next, check f ((
Figure 108117556-A0101-12-0012-31
,
Figure 108117556-A0101-12-0012-32
), u k - d *), this result will be equivalent to the result of f (( g i , g i +1 ), u k - d ), which is proved as the following equation (9).

Figure 108117556-A0101-12-0012-10
Figure 108117556-A0101-12-0012-10

因此,如果f((

Figure 108117556-A0101-12-0012-33
,
Figure 108117556-A0101-12-0012-34
),uk-d*)的結果顯示溢位,則表示原本的像素(g i ,g i+1)並沒有用來嵌入機密資訊,不用進行還原。如果f((
Figure 108117556-A0101-12-0012-35
,
Figure 108117556-A0101-12-0012-36
),uk-d*)的結果並沒有溢位,根據以下方程式(10)可還原出機密資訊b。 Therefore, if f ((
Figure 108117556-A0101-12-0012-33
,
Figure 108117556-A0101-12-0012-34
), u k - d *) shows overflow, which means that the original pixels ( g i , g i +1 ) are not used to embed confidential information and do not need to be restored. If f ((
Figure 108117556-A0101-12-0012-35
,
Figure 108117556-A0101-12-0012-36
), the result of u k - d *) does not overflow. According to the following equation (10), the confidential information b can be recovered.

Figure 108117556-A0101-12-0012-7
Figure 108117556-A0101-12-0012-7

接續上述

Figure 108117556-A0101-12-0012-37
Figure 108117556-A0101-12-0012-38
的例子,首先計算出差值d*=47-34=13,查詢表1以後得到區間[8,15],判斷f((34,47),15-13)並沒有溢位,因此最後可還原出機密資訊b=13-8=5={101}2。 Continue the above
Figure 108117556-A0101-12-0012-37
,
Figure 108117556-A0101-12-0012-38
For example, first calculate the difference d*=47-34=13. After looking up the table 1, the interval [8,15] is obtained. It is judged that f ((34,47),15-13) does not overflow, so it can be finally Restore confidential information b=13-8=5={101} 2 .

值得注意的是,上述表1中的區間以及隱藏量可做適當的修改,如以下表2呈現了不同的區間與隱藏量。 It is worth noting that the intervals and concealment amounts in Table 1 above can be modified appropriately. For example, Table 2 below presents different intervals and concealment amounts.

Figure 108117556-A0101-12-0013-8
Figure 108117556-A0101-12-0013-8

上述表1的隱藏量大於表2的隱藏量,但隱藏量大也表示影像失真較多。在一些實施例中對於像素的不同通道可以設定不同的隱藏量。舉例來說,由於人眼對於綠色的敏感度較高,因此可以對於綠色的通道可採用表2,而對於藍色、紅色的通道可以採用表1。在一些實施例中,可以將紅色、綠色、藍色轉換至不同的色彩空間,例如YCbCr,並對於亮度值Y採用隱藏量較小的表2,而對於彩度值Cb、Cr則採用隱藏量較大的表1。在其他實施例中也可以採用其他色彩空間,本發明並不在此限。 The concealment amount in Table 1 above is greater than the concealment amount in Table 2, but a large amount of concealment also means more image distortion. In some embodiments, different amounts of concealment can be set for different channels of pixels. For example, since the human eye is more sensitive to green, Table 2 can be used for the green channel, and Table 1 can be used for the blue and red channels. In some embodiments, red, green, and blue can be converted to different color spaces, such as YCbCr, and Table 2 with a smaller hidden amount is used for the luminance value Y, and the hidden amount is used for the chroma values Cb and Cr. Larger table 1. In other embodiments, other color spaces may also be used, and the present invention is not limited thereto.

上述的影像資訊隱藏方法僅是範例,在其他實施例中也可以採用其他的影像資訊隱藏方法,本發明並不在此限。當採用其他影像資訊隱藏方法時,同樣可以在不同的通道設定不同的隱藏量。 The above-mentioned image information hiding method is only an example. In other embodiments, other image information hiding methods may also be used, and the present invention is not limited thereto. When other image information hiding methods are used, different hiding amounts can also be set in different channels.

回到圖2B,在此會將物件區域221複製多份,並且在步驟252中會取得標頭資訊(以下會詳細說明內容),這些物件區域221與標頭資訊會組成還原資訊,在步驟253中會將還原資訊嵌入至非物件區域251當中。具體來說,在一些實施例中,標頭資訊會嵌入至視訊框211中上下左右四個邊的各兩排像素(亦稱亦稱視訊邊框)中,如圖5所 示,此視訊框共有4個視訊邊框501~504,每個視訊邊框中都會嵌入至少一份標頭資訊,也就是說標頭資訊會重複嵌入至少4次,以降低標頭資訊被破壞的風險。此外,物件區域211可以嵌入至視訊框中除了視訊邊框501~504、物件區域221、222以外的中央區域505,此物件區域211也可以重複嵌入多次(至少3次,例如4次),以降低物件區域211被破壞的風險。在一些實施例中,還會判斷中央區域505是否足夠容納4份物件區域221。若中央區域505不足以容納4份物件區域221,可以將物件區域221縮小以得到縮小後物件區域,此縮小後物件區域便可以嵌入至中央區域505當中,在一些實施例中可以採用小波轉換並取得低頻部份來完成縮小的步驟,但在其他實施例中也可以採用任何合適的低通濾波器。在其他實施例中標頭資訊也可以嵌入至中央區域505中,物件區域221也可以嵌入至視訊邊框501~504當中,也就是說,視訊邊框501~504與中央區域505都可統稱為非物件區域,還原資訊(包括標頭資訊與物件區域221)可以用任意的順序、位置、重複次數來嵌入至非物件區域當中,本發明也不限制此非物件區域的大小、形狀、位置以及還原資訊嵌入的次數。在一些實施例中,將還原資訊嵌入至非物件區域之前,也可以對還原資訊中任何一部分(或全部)進行加密處理,例如採用AES演算法,藉此進一步保護還原資訊。在一些實施例中,上述的標頭資訊包括了標頭資訊長度、視訊框211的編號、壓縮資訊(即物件區域211是否被縮小過)、還原資訊隱藏次數(即還原資訊被重複嵌入幾次)、物件區域 的數目與物件區域的位置資訊(例如定界框的左上、右下兩個點的座標)。 Returning to Figure 2B, multiple copies of the object area 221 will be made here, and header information will be obtained in step 252 (the content will be described in detail below). These object areas 221 and the header information will form the restoration information. In step 253 The restoration information will be embedded in the non-object area 251. Specifically, in some embodiments, the header information is embedded in the two rows of pixels (also known as the video frame) on the upper, lower, left, and right sides of the video frame 211, as shown in FIG. 5 Shows that there are 4 video frames 501~504 in this video frame, and at least one piece of header information will be embedded in each video frame, which means that the header information will be embedded repeatedly at least 4 times to reduce the risk of header information being destroyed. . In addition, the object area 211 can be embedded in the central area 505 of the video frame except the video borders 501 to 504, and the object areas 221, 222. The object area 211 can also be embedded multiple times (at least 3 times, for example, 4 times). Reduce the risk of damage to the object area 211. In some embodiments, it is also determined whether the central area 505 is sufficient to accommodate 4 object areas 221. If the central area 505 is not enough to accommodate the 4 object areas 221, the object area 221 can be reduced to obtain the reduced object area. The reduced object area can be embedded in the central area 505. In some embodiments, wavelet transformation can be used. The low-frequency part is obtained to complete the reduction step, but in other embodiments, any suitable low-pass filter can also be used. In other embodiments, the header information can also be embedded in the central area 505, and the object area 221 can also be embedded in the video borders 501~504. That is to say, both the video borders 501~504 and the central area 505 can be collectively referred to as non-object areas. , The restoration information (including the header information and the object area 221) can be embedded in the non-object area in any order, position, and number of repetitions. The present invention does not limit the size, shape, location of the non-object area and the restoration information embedding The number of times. In some embodiments, before embedding the restoration information into the non-object area, any part (or all) of the restoration information can also be encrypted, for example, using the AES algorithm, thereby further protecting the restoration information. In some embodiments, the aforementioned header information includes the length of the header information, the number of the video frame 211, compression information (that is, whether the object area 211 has been reduced), the number of times the restoration information is hidden (that is, how many times the restoration information has been repeatedly embedded) ), object area The number and position information of the object area (for example, the coordinates of the upper left and lower right points of the bounding box).

最後,將物件區域221替換為加密後物件區域244以得到受保護的視訊框260。在視訊框260並不會看到物件區域221的內容,此外還可以對物件區域221進行驗證與回復等處理。具體來說,圖6A與圖6B是根據一實施例繪示驗證、回復視訊框的流程圖。請參照圖2B、圖6A與圖6B,在步驟601中,從非物件區域取得還原資訊並回復還原資訊,其中回復一份還原資訊的步驟已詳細說明如以上方程式(8)~(10),在此並不再贅述。在此假設共取得n份還原資訊,表示為Ri,i=1,2,…,n。接下來可以用多數決的方式對各個位元進行投票以產生最終的還原資訊,令還原資訊中第b個位元為ERb,則ERb可表示為以下方程式(11)。 Finally, the object area 221 is replaced with the encrypted object area 244 to obtain a protected video frame 260. The content of the object area 221 will not be seen in the video frame 260. In addition, the object area 221 can be verified and responded to. Specifically, FIG. 6A and FIG. 6B are flowcharts of verifying and replying to a video frame according to an embodiment. Please refer to Figure 2B, Figure 6A and Figure 6B. In step 601, the restoration information is obtained from the non-object area and the restoration information is restored. The steps of restoring a restoration information have been described in detail as the above equations (8)~(10). I will not repeat them here. It is assumed here that n pieces of restoration information have been obtained, expressed as R i ,i=1,2,...,n. Next, a majority vote can be used to vote on each bit to generate the final recovery information, so that the b-th bit in the recovery information is ER b , then ER b can be expressed as the following equation (11).

Figure 108117556-A0101-12-0015-12
Figure 108117556-A0101-12-0015-12

其中

Figure 108117556-A0101-12-0015-39
為第i份還原資訊中的第b個位元。在一些實施例中,還原資訊在嵌入至非物件區域之前有經過加密,因此在步驟601也需要經過解密才可以得到還原資訊。如果物件區域要先前有經過縮小的處理,則在步驟601需要將縮小後物件區域放大,在此可以採用任意合適的內差方法(interpolation),例如雙線性內插法(bilinear interpolation)。 in
Figure 108117556-A0101-12-0015-39
Restore the b-th bit in the information for the i-th copy. In some embodiments, the restoration information is encrypted before being embedded in the non-object area. Therefore, decryption is also required in step 601 to obtain the restoration information. If the object area needs to be reduced previously, then in step 601, the reduced object area needs to be enlarged. Here, any suitable interpolation method, such as bilinear interpolation, can be used.

在步驟602中,判斷視訊框的編號是否正確,例如檢查目前視訊框的編號是否與前一個視訊框與後一個視訊框連續。若步驟602的結果為否則在步驟603進行下一 個視訊框,若是則進行步驟604。在步驟604中,判斷視訊的編碼時間是否正確,例如檢查目前視訊框的編碼時間是否與前一個視訊框與後一個視訊框連續。若步驟604的結果為否則進行步驟603,若是則進行步驟605。在步驟605中,根據標頭資訊判斷視訊框260中是否有物件區域,若否則進行步驟603,若是則進行步驟606。 In step 602, it is determined whether the number of the video frame is correct, for example, it is checked whether the number of the current video frame is continuous with the previous video frame and the next video frame. If the result of step 602 is otherwise, proceed to the next step in step 603 If yes, go to step 604. In step 604, it is determined whether the encoding time of the video is correct, for example, it is checked whether the encoding time of the current video frame is continuous with the previous video frame and the next video frame. If the result of step 604 is otherwise, proceed to step 603, if yes, proceed to step 605. In step 605, determine whether there is an object area in the video frame 260 according to the header information, if not, proceed to step 603, and if yes, proceed to step 606.

在步驟606中,根據AES演算法來解密加密後物件區域244以得到解密後物件區域。在步驟607中,從解密後物件區域取得一待驗證資訊,也就是重複圖4的步驟,將解密後物件區域分為2x4像素的區塊,取得此區塊中每個像素的7個最高有效位元,從標頭資訊取得解密後物件區域的位置資訊與視訊框的編號,最後透過雜湊函數計算出一份待驗證資訊。在步驟608中,判斷待驗證資訊是否正確,具體來說,從解密後物件區域中的像素的最低有效位元取得驗證資訊241,判斷此驗證資訊241與步驟607計算出的待驗證資訊是否相同,若相同表示驗證資訊正確(加密後物件區域244並沒有被竄改),接下來進行步驟609,將加密後物件區域244替換為解密後物件區域,最後得到視訊框610。如果步驟608的結果為否,則表示加密後物件區域244已被竄改,在步驟611中,根據標頭資訊中物件區域的位置將還原的物件區域貼回視訊框260,最後可得到視訊框612。 In step 606, the encrypted object area 244 is decrypted according to the AES algorithm to obtain the decrypted object area. In step 607, obtain a piece of information to be verified from the decrypted object area, that is, repeat the steps in Figure 4, divide the decrypted object area into 2x4 pixel blocks, and obtain the 7 most effective pixels for each pixel in this block Bit, obtain the position information of the decrypted object area and the number of the video frame from the header information, and finally calculate a piece of information to be verified through the hash function. In step 608, it is determined whether the information to be verified is correct, specifically, the verification information 241 is obtained from the least significant bit of the pixel in the decrypted object area, and it is determined whether the verification information 241 is the same as the information to be verified calculated in step 607 If the same means that the verification information is correct (the encrypted object area 244 has not been tampered with), then proceed to step 609 to replace the encrypted object area 244 with the decrypted object area, and finally a video frame 610 is obtained. If the result of step 608 is no, it means that the encrypted object area 244 has been tampered with. In step 611, the restored object area is pasted back to the video frame 260 according to the position of the object area in the header information, and finally the video frame 612 can be obtained. .

以另外一個角度來說,本發明也提出了一電腦程式產品,此產品可由任意的程式語言及/或平台所撰寫,當此電腦程式產品被載入至電腦系統並執行時,可執行上述 圖2A、圖2B、圖6A、圖6B的方法。 From another perspective, the present invention also proposes a computer program product, which can be written in any programming language and/or platform. When the computer program product is loaded into the computer system and executed, it can execute the above The method of Fig. 2A, Fig. 2B, Fig. 6A, and Fig. 6B.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。 Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the relevant technical field can make some changes and modifications without departing from the spirit and scope of the present invention. The protection scope of the present invention shall be subject to those defined by the attached patent application scope.

260‧‧‧視訊框 260‧‧‧Video Frame

242、243、252、253‧‧‧步驟 242, 243, 252, 253‧‧‧ steps

221‧‧‧物件區域 221‧‧‧Object area

241‧‧‧驗證資訊 241‧‧‧Verify Information

244‧‧‧加密後物件區域 244‧‧‧Encrypted object area

251‧‧‧非物件區域 251‧‧‧Non-object area

Claims (9)

一種視訊的資訊隱藏與隱私保護方法,適用於一電子裝置,該方法包括:取得一視訊,對該視訊的至少一視訊框執行一物件偵測演算法以取得至少一物件區域;將該至少一物件區域複製至少3份以得到多份還原資訊,判斷該至少一視訊框的一非物件區域是否足夠容納該些還原資訊,若否則將該至少一物件區域縮小以得到至少一縮小後物件區域,並將該至少一縮小後物件區域複製至少3份以得到該些還原資訊;將該些還原資訊嵌入至該非物件區域;以及將一驗證資訊嵌入至該至少一物件區域後加密以得到至少一加密後物件區域,並將該至少一物件區域替換為該至少一加密後物件區域。 A video information hiding and privacy protection method is applicable to an electronic device. The method includes: obtaining a video, executing an object detection algorithm on at least one video frame of the video to obtain at least one object area; Copy at least 3 copies of the object area to obtain multiple pieces of restored information, determine whether a non-object area of the at least one video frame is sufficient to accommodate the restored information, if otherwise, reduce the at least one object area to obtain at least one reduced object area, And copy at least 3 copies of the at least one reduced object area to obtain the restoration information; embed the restoration information in the non-object area; and embed verification information in the at least one object area and encrypt it to obtain at least one encryption And replace the at least one object area with the at least one encrypted object area. 如申請專利範圍第1項所述之方法,更包括:對該至少一物件區域執行一物件辨識方法,若該至少一物件區域不屬於一隱私保護區域,則排除該至少一物件區域。 For example, the method described in claim 1 further includes: performing an object identification method on at least one object area, and if the at least one object area does not belong to a privacy protection area, excluding the at least one object area. 如申請專利範圍第1項所述之方法,更包括:將該至少一物件區域中多個像素的多個最高有效位 元、該至少一物件區域的位置資訊與該至少一視訊框的一編號輸入至一雜湊函數以得到該驗證資訊。 For example, the method described in item 1 of the scope of the patent application further includes: the most significant bits of the pixels in the at least one object area Yuan, the location information of the at least one object area, and a number of the at least one video frame are input to a hash function to obtain the verification information. 如申請專利範圍第1項所述之方法,其中每一該些還原資訊還包括該至少一視訊框的編號、一壓縮資訊、一還原資訊隱藏次數、該至少一物件區域的數目與該至少一物件區域的位置資訊。 For the method described in item 1 of the scope of patent application, each of the restored information further includes the number of the at least one video frame, a compressed information, a number of times that the restored information is hidden, the number of the at least one object area, and the at least one The location information of the object area. 如申請專利範圍第1項所述之方法,其中該至少一視訊框的數目大於1,該些視訊框包括一第一視訊框、一第二視訊框與一第三視訊框,該第三視訊框在該第一視訊框與該第二視訊框之間,該方法更包括:設定一時間軸上的一過濾遮罩;辨識每一該些視訊框中的該至少一物件區域,以取得該些視訊框之間該至少一物件區域的對應關係;當套用該過濾遮罩至該第一視訊框時,若在該過濾遮罩內只有該第一視訊框具有該至少一物件區域,則刪除該第一視訊框中的該至少一物件區域;以及當該第一視訊框與該第二視訊框之間的距離小於等於一預設視訊框距離,且該第一視訊框與該第二視訊框都具有對應的該至少一物件區域,且該第三視訊框不具有該至少一物件區域,填補該第三視訊框使該第三視訊框具有對應的該至少一物件區域。 For the method described in item 1 of the scope of patent application, wherein the number of the at least one video frame is greater than 1, the video frames include a first video frame, a second video frame, and a third video frame, and the third video frame The frame is between the first video frame and the second video frame, and the method further includes: setting a filter mask on a time axis; identifying the at least one object area in each of the video frames to obtain the The corresponding relationship between the at least one object area among the video frames; when the filter mask is applied to the first video frame, if only the first video frame in the filter mask has the at least one object area, delete The at least one object area in the first video frame; and when the distance between the first video frame and the second video frame is less than or equal to a preset video frame distance, and the first video frame and the second video frame The frames all have the corresponding at least one object area, and the third video frame does not have the at least one object area, filling the third video frame so that the third video frame has the corresponding at least one object area. 如申請專利範圍第5項所述之方法,其中填補該第三視訊框的步驟包括:根據以下方程式(1)計算該第三視訊框中該至少一物件區域的位置:
Figure 108117556-A0305-02-0023-2
其中Xi,j為該第三視訊框中該至少一物件區域中第j個物件區域的該位置,L j 為該第一視訊框中該至少一物件區域中第j個物件區域的位置,R j 為該第二視訊框中該至少一物件區域中第j個物件區域的位置,i為該第三視訊框與該第一視訊框之間的距離,n為該第二視訊框與該第一視訊框之間的視訊框數。
According to the method described in claim 5, the step of filling the third video frame includes: calculating the position of the at least one object area in the third video frame according to the following equation (1):
Figure 108117556-A0305-02-0023-2
Where X i,j is the position of the j-th object area in the at least one object area in the third video frame, L j is the position of the j-th object area in the at least one object area in the first video frame, R j is the position of the j-th object area in the at least one object area in the second video frame, i is the distance between the third video frame and the first video frame, and n is the second video frame and the The number of video frames between the first video frames.
如申請專利範圍第1項所述之方法,更包括:解密該至少一加密後物件區域以得到至少一解密後物件區域;從該至少一解密後物件區域取得一待驗證資訊;判斷該待驗證資訊是否正確;若該待驗證資訊正確,判斷該至少一加密後物件區域並沒有被竄改;以及若該待驗證資訊不正確,根據該些還原資訊還原該至少一物件區域。 For example, the method described in item 1 of the scope of patent application further includes: decrypting the at least one encrypted object area to obtain at least one decrypted object area; obtaining information to be verified from the at least one decrypted object area; determining the to-be-verified Whether the information is correct; if the information to be verified is correct, it is determined that the at least one encrypted object area has not been tampered with; and if the information to be verified is incorrect, the at least one object area is restored based on the restored information. 一種電子裝置,包括: 一記憶體,儲存有多個指令;以及一處理器,執行該些指令以完成多個步驟:取得一視訊,對該視訊的至少一視訊框執行一物件偵測演算法以取得至少一物件區域;將該至少一物件區域複製至少3份以得到多份還原資訊,判斷該至少一視訊框的一非物件區域是否足夠容納該些還原資訊,若否則將該至少一物件區域縮小以得到至少一縮小後物件區域,並將該至少一縮小後物件區域複製至少3份以得到該些還原資訊;將該些還原資訊嵌入至該非物件區域;以及將一驗證資訊嵌入至該至少一物件區域後加密以得到至少一加密後物件區域,並將該至少一物件區域替換為該至少一加密後物件區域。 An electronic device, including: A memory storing a plurality of instructions; and a processor executing the instructions to complete a plurality of steps: obtaining a video, and executing an object detection algorithm on at least one video frame of the video to obtain at least one object area ; Copy at least 3 copies of the at least one object area to obtain multiple pieces of restoration information, determine whether a non-object area of the at least one video frame is sufficient to accommodate the restoration information, if not, reduce the at least one object area to obtain at least one Reduce the reduced object area, and copy at least 3 copies of the at least one reduced object area to obtain the restoration information; embed the restoration information in the non-object area; and embed verification information into the at least one object area and then encrypt To obtain at least one encrypted object area, and replace the at least one object area with the at least one encrypted object area. 一種電腦程式產品,由一電子裝置載入並執行以完成多個步驟:取得一視訊,對該視訊的至少一視訊框執行一物件偵測演算法以取得至少一物件區域;將該至少一物件區域複製至少3份以得到多份還原資訊,判斷該至少一視訊框的一非物件區域是否足夠容納該些還原資訊,若否則將該至少一物件區域縮小以得到至少一縮小後物件區域,並將該至少一縮小後物件區域複製至少3份以得到該些還原資訊;將該些還原資訊嵌入至該非物件區域;以及 將一驗證資訊嵌入至該至少一物件區域後加密以得到至少一加密後物件區域,並將該至少一物件區域替換為該至少一加密後物件區域。 A computer program product loaded and executed by an electronic device to complete multiple steps: obtaining a video, executing an object detection algorithm on at least one video frame of the video to obtain at least one object area; and the at least one object Copy at least 3 copies of the area to obtain multiple pieces of restored information, determine whether a non-object area of the at least one video frame is sufficient to accommodate the restored information, if not, reduce the at least one object area to obtain at least one reduced object area, and Copy at least 3 copies of the at least one reduced object area to obtain the restoration information; embed the restoration information in the non-object area; and Embedding a piece of verification information into the at least one object area and encrypting it to obtain at least one encrypted object area, and replacing the at least one object area with the at least one encrypted object area.
TW108117556A 2019-05-21 2019-05-21 Method, electrical device, and computer program product for hiding information and protecting privacy of video TWI740145B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW108117556A TWI740145B (en) 2019-05-21 2019-05-21 Method, electrical device, and computer program product for hiding information and protecting privacy of video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW108117556A TWI740145B (en) 2019-05-21 2019-05-21 Method, electrical device, and computer program product for hiding information and protecting privacy of video

Publications (2)

Publication Number Publication Date
TW202044844A TW202044844A (en) 2020-12-01
TWI740145B true TWI740145B (en) 2021-09-21

Family

ID=74668210

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108117556A TWI740145B (en) 2019-05-21 2019-05-21 Method, electrical device, and computer program product for hiding information and protecting privacy of video

Country Status (1)

Country Link
TW (1) TWI740145B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW342477B (en) * 1996-11-28 1998-10-11 Nippon Ibm Kk A system for embedding authentication information into an image and an image detecting system
TW200837661A (en) * 2007-03-05 2008-09-16 Univ Nat Chiao Tung Video surveillance system hiding and video encoding method based on data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW342477B (en) * 1996-11-28 1998-10-11 Nippon Ibm Kk A system for embedding authentication information into an image and an image detecting system
TW200837661A (en) * 2007-03-05 2008-09-16 Univ Nat Chiao Tung Video surveillance system hiding and video encoding method based on data

Also Published As

Publication number Publication date
TW202044844A (en) 2020-12-01

Similar Documents

Publication Publication Date Title
Huang et al. Improved DCT-based detection of copy-move forgery in images
KR100878579B1 (en) Watermarking method, watermark checking method, watermarking device and watermark checking device
Pal et al. Weighted matrix based reversible watermarking scheme using color image
CN114037591B (en) Leakage tracing method and system based on web-based information steganography
Hadmi et al. A robust and secure perceptual hashing system based on a quantization step analysis
Chang et al. Robust image authentication using content based compression
EP2009639B1 (en) Semi fragile signature for authorising content modification if the difference between the fingerprints before and after modification is under a threshold transmitted together with the content.
CN107346528B (en) Image tampering detection method based on double-image reversible fragile watermark
Xu et al. Verifiable image revision from chameleon hashes
Lin et al. Applying projection and B-spline to image authentication and remedy
CN110400248A (en) A zero-watermark method for image security protection of medical volume data based on ring grayscale difference
TWI740145B (en) Method, electrical device, and computer program product for hiding information and protecting privacy of video
Kumar et al. A review on digital watermarking-based image forensic technique
KR101200345B1 (en) Block-bases image authentication method using reversible watermarking based on progressive differential histogram
CN117560456B (en) Large model data leakage prevention method and system
CN113486394A (en) Privacy protection and tamper-proofing method and system based on face block chain
Vairaprakash et al. A Discrete Rajan Transform-based robustness improvement encrypted watermark scheme backed by Support Vector Machine
Pinjari et al. A pixel based fragile watermarking technique using LBP (Local Binary Pattern)
Sun et al. The detecting system of image forgeries with noise features and EXIF information
Renklier et al. A novel Frei‐Chen based fragile watermarking method for authentication of an image
Yakushev et al. Docmarking: Real-time screen-cam robust document image watermarking
TWM573474U (en) Electronic device of identification mechanism
Hilal et al. Forensic Analysis of Images on Online Social Network: A Survey
CN114448687A (en) Image file encryption method and system based on RSA
Altaf et al. TDLCI: An efficient scheme for tamper detection and localization in color images

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees