TWI864390B - Image processing apparatus for video adjustment and video enhancement method - Google Patents
Image processing apparatus for video adjustment and video enhancement method Download PDFInfo
- Publication number
- TWI864390B TWI864390B TW111115705A TW111115705A TWI864390B TW I864390 B TWI864390 B TW I864390B TW 111115705 A TW111115705 A TW 111115705A TW 111115705 A TW111115705 A TW 111115705A TW I864390 B TWI864390 B TW I864390B
- Authority
- TW
- Taiwan
- Prior art keywords
- value
- color
- pixel
- face
- block
- Prior art date
Links
- 238000012545 processing Methods 0.000 title claims abstract description 25
- 238000000034 method Methods 0.000 title claims abstract description 22
- 230000001815 facial effect Effects 0.000 claims abstract description 72
- 230000006870 function Effects 0.000 claims description 29
- 238000006243 chemical reaction Methods 0.000 claims description 18
- 239000003086 colorant Substances 0.000 claims description 15
- 210000000056 organ Anatomy 0.000 claims description 9
- 230000000694 effects Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 12
- 238000010801 machine learning Methods 0.000 description 4
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 3
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 3
- 230000011218 segmentation Effects 0.000 description 3
- 230000009466 transformation Effects 0.000 description 3
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 2
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 2
- ATJFFYVFTNAWJD-UHFFFAOYSA-N Tin Chemical compound [Sn] ATJFFYVFTNAWJD-UHFFFAOYSA-N 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000012706 support-vector machine Methods 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 206010048245 Yellow skin Diseases 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 210000004709 eyebrow Anatomy 0.000 description 1
- 210000001061 forehead Anatomy 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 210000003128 head Anatomy 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000000306 recurrent effect Effects 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 238000013316 zoning Methods 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Processing Of Color Television Signals (AREA)
Abstract
Description
本發明是有關於一種影像處理技術,且特別是有關於一種用於調整視訊的影像處理裝置及視訊增進方法。 The present invention relates to an image processing technology, and in particular to an image processing device and a video enhancement method for adjusting video.
遠端視訊會議可讓不同位置或空間中的人進行對話,且會議相關設備、協定及/應用程式也發展相當成熟。此外,近年來視訊直播也是相當熱門的產業,且視訊直播可讓觀眾、粉絲或客戶即時觀賞直播主的談話內容或分享畫面。 Remote video conferencing allows people in different locations or spaces to have conversations, and conference-related equipment, protocols and/or applications have also developed quite maturely. In addition, live video broadcasting has also been a very popular industry in recent years, and live video broadcasting allows viewers, fans or customers to watch the live broadcaster's conversation content or shared screens in real time.
無可避免地,使用者或直播主的所處環境可能有光線不足的問題,從而降低另一端觀賞者的視覺體驗。部分使用者或錄影設備會設置發光元件,以對臉部、其他身體部位或所處環境額外打光。然而,額外的發光元件會增加硬體成本,甚至有亮度分布不均、色溫偏差等問題。 Inevitably, the user or live streamer may be in an environment with insufficient light, which reduces the visual experience of the viewer on the other end. Some users or recording devices will set up light-emitting elements to provide additional light to the face, other body parts or the environment. However, additional light-emitting elements will increase hardware costs and even cause problems such as uneven brightness distribution and color temperature deviation.
有鑑於此,本發明實施例提供一種用於調整視訊的影像 處理裝置及視訊增進方法,直接調整視訊中的影像的亮度,以達到打光的效果。 In view of this, the present invention provides an image processing device and a video enhancement method for adjusting the video, which directly adjusts the brightness of the image in the video to achieve a lighting effect.
本發明實施例的視訊增進方法包括(但不僅限於)下列步驟:分割視訊的影像訊框成為一個或更多個臉部區塊。臉部區塊對應於影像訊框所擷取到的臉部。依據轉換曲線調整各臉部區塊中的一個或更多個像素的亮度值。某一像素的初始亮度值在轉換曲線中對應有調整亮度值,且轉換曲線相關於依據初始亮度值及調整亮度值所形成的多項式。依據臉部區塊中的像素的原色比值調整像素的調整色階值。原色比值為一個原色的調整色階值在一個臉部區塊中的所占比例。調整色階值為形成調整亮度值中的原色的色階值。 The video enhancement method of the embodiment of the present invention includes (but is not limited to) the following steps: segmenting the video image frame into one or more face blocks. The face block corresponds to the face captured by the image frame. Adjusting the brightness value of one or more pixels in each face block according to the conversion curve. The initial brightness value of a pixel corresponds to an adjusted brightness value in the conversion curve, and the conversion curve is related to a polynomial formed according to the initial brightness value and the adjusted brightness value. Adjusting the adjusted color value of the pixel according to the primary color ratio of the pixel in the face block. The primary color ratio is the proportion of the adjusted color value of a primary color in a face block. The adjusted color value is the color value of the primary color that forms the adjusted brightness value.
本發明實施例的影像處理裝置包括(但不僅限於)儲存器及處理器。儲存器用以儲存程式碼。處理器耦接儲存器。處理器經配置用以載入且執行程式碼以分割視訊的影像訊框成為一個或更多個臉部區塊,依據轉換曲線調整各臉部區塊中的一個或更多個像素的亮度值,並依據臉部區塊中的像素的原色比值調整像素的調整色階值。臉部區塊對應於影像訊框所擷取到的臉部。某一像素的初始亮度值在轉換曲線中對應有調整亮度值,且轉換曲線相關於依據初始亮度值及調整亮度值所形成的多項式。原色比值為一個原色的色階值在一個臉部區塊中的所占比例。調整色階值為形成調整亮度值中的原色的色階值。 The image processing device of the embodiment of the present invention includes (but is not limited to) a memory and a processor. The memory is used to store program code. The processor is coupled to the memory. The processor is configured to load and execute the program code to divide the image frame of the video into one or more face blocks, adjust the brightness value of one or more pixels in each face block according to the transformation curve, and adjust the adjusted color level value of the pixel according to the primary color ratio of the pixel in the face block. The face block corresponds to the face captured by the image frame. The initial brightness value of a pixel corresponds to the adjusted brightness value in the transformation curve, and the transformation curve is related to a polynomial formed according to the initial brightness value and the adjusted brightness value. The primary color ratio is the proportion of the color level value of a primary color in a face block. The adjusted chromaticity value is the chromaticity value of the primary color that forms the adjusted brightness value.
基於上述,依據本發明實施例的用於調整視訊的影像處 理裝置及視訊增進方法,針對影像訊框中的一個或更多個臉部區塊,利用調整曲線平滑地調整亮度,並依據原色比例微調色階值。藉此,可提供自然且分布平均的亮度,進而提升觀賞體驗。此外,本發明實施例可免除額外增設發光元件。 Based on the above, according to the image processing device and video enhancement method for adjusting video according to the embodiment of the present invention, the brightness of one or more face blocks in the image frame is smoothly adjusted using an adjustment curve, and the color scale value is fine-tuned according to the primary color ratio. In this way, a natural and evenly distributed brightness can be provided, thereby improving the viewing experience. In addition, the embodiment of the present invention can avoid the need for additional light-emitting elements.
為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。 In order to make the above features and advantages of the present invention more clearly understood, the following is a detailed description of the embodiments with the accompanying drawings.
100:電子裝置 100: Electronic devices
100:影像處理裝置 100: Image processing device
110:儲存器 110: Storage
111:初始化模組 111: Initialize module
113:亮度調整模組 113: Brightness adjustment module
115:比值調整模組 115: Ratio adjustment module
117:差異調整模組 117: Differential adjustment module
130:處理器 130: Processor
S210~S250:步驟 S210~S250: Steps
FP:臉部特徵點 FP: Facial feature points
IF1、IF2:影像訊框 IF1, IF2: Image frame
RB1~RB4:區域區塊 RB1~RB4: Regional block
PB1~PB3:個人化區塊 PB1~PB3: Personalized area
Lbrt:經調整色階值 L brt : adjusted color gradation value
Lin:初始色階值 Lin : Initial color level value
TL、LL、BL、P:位置 TL, LL, BL, P: Position
SF:S函數 SF:S function
圖1是依據本發明一實施例的影像處理裝置的元件方塊圖。 FIG1 is a block diagram of components of an image processing device according to an embodiment of the present invention.
圖2是依據本發明一實施例的視訊增進方法的流程圖。 Figure 2 is a flow chart of a video enhancement method according to an embodiment of the present invention.
圖3是依據本發明一實施例的臉部特徵點的示意圖。 Figure 3 is a schematic diagram of facial feature points according to an embodiment of the present invention.
圖4是依據本發明一實施例的臉部區塊-區域區塊的示意圖。 FIG4 is a schematic diagram of a facial block-regional block according to an embodiment of the present invention.
圖5是依據本發明一實施例的臉部區塊-個人化區塊的示意圖。 Figure 5 is a schematic diagram of a facial block-personalized block according to an embodiment of the present invention.
圖6是依據本發明一實施例的調整曲線的示意圖。 Figure 6 is a schematic diagram of an adjustment curve according to an embodiment of the present invention.
圖7是依據本發明一實施例的S函數(Sigmoid)的示意圖。 Figure 7 is a schematic diagram of the S function (Sigmoid) according to an embodiment of the present invention.
圖1是依據本發明一實施例的影像處理裝置100的元件方塊圖。請參照圖1,影像處理裝置100包括(但不僅限於)儲存器
110及處理器130。影像處理裝置100可以是桌上型電腦、筆記型電腦、智慧型手機、平板電腦、伺服器或其他運算裝置。
FIG1 is a block diagram of components of an
儲存器110可以是任何型態的固定或可移動隨機存取記憶體(Radom Access Memory,RAM)、唯讀記憶體(Read Only Memory,ROM)、快閃記憶體(flash memory)、傳統硬碟(Hard Disk Drive,HDD)、固態硬碟(Solid-State Drive,SSD)或類似元件。在一實施例中,儲存器110用以記錄程式碼、軟體模組(例如,初始化模組111、亮度調整模組113、比值調整模組115及差異調整模組117)、組態配置、資料(例如,影像、數值、特徵點、曲線、區塊等)或檔案,並待後文詳述其實施例。
The
處理器130耦接儲存器110,處理器130並可以是中央處理單元(Central Processing Unit,CPU)、圖形處理單元(Graphic Processing unit,GPU),或是其他可程式化之一般用途或特殊用途的微處理器(Microprocessor)、數位信號處理器(Digital Signal Processor,DSP)、可程式化控制器、現場可程式化邏輯閘陣列(Field Programmable Gate Array,FPGA)、特殊應用積體電路(Application-Specific Integrated Circuit,ASIC)、神經網路加速器或其他類似元件或上述元件的組合。在一實施例中,處理器130用以執行影像處理裝置100的所有或部份作業。處理器130可載入並執行儲存器110所儲存的各程式碼、軟體模組、檔案及資料。
The
下文中,將搭配影像處理裝置100中的各項裝置、元件及模組說明本發明實施例所述之方法。本方法的各個流程可依照
實施情形而隨之調整,且並不僅限於此。
In the following, the method described in the embodiment of the present invention will be described with various devices, components and modules in the
圖2是依據本發明一實施例的視訊增進方法的流程圖。請參照圖2,處理器130透過初始化模組111分割視訊的影像訊框(frame)成為一個或更多個臉部區塊(步驟S210)。具體而言,視訊是針對人、特定目標物或場景進行錄影所取得的多媒體串流。一張或更多張影像訊框的集合可稱為視訊。在一實施例中,處理器130可透過內建或外接的影像擷取裝置(例如,攝影機、相機或監視器)取得視訊。在另一實施例中,處理器130可自伺服器、電腦或儲存媒體下載視訊。
FIG2 is a flow chart of a video enhancement method according to an embodiment of the present invention. Referring to FIG2, the
一般而言,視訊會議或直播的拍攝主體是人臉。即,影像擷取裝置朝向人臉拍攝。而臉部區塊對應於影像訊框所擷取到的臉部。換句而言,初始化模組111將臉部分割成一個或更多個臉部區域。這些臉部區域是用於後續亮度或色階調整的分區處理。
Generally speaking, the subject of a video conference or live broadcast is a human face. That is, the image capture device faces the human face. The face block corresponds to the face captured by the image frame. In other words, the
而分割影像訊框的方法有很多種。在一實施例中,初始化模組111可依據影像訊框中的一個或更多個臉部特徵點分割影像訊框。而一個或更多個臉部區塊包括一個或更多個臉部特徵點。臉部特徵點可能是臉部上的器官、輪廓、邊緣或特定位置。例如,眼角、嘴角、鼻頭等。換句而言,臉部區塊的分割相關於臉部特徵點的所處位置。
There are many ways to segment the image frame. In one embodiment, the
針對臉部特徵點的辨識,在一實施例中,初始化模組111可利用基於機器學習(machine learning)演算法(例如,卷積神經網
絡(Convolutional Neural Network,CNN)、遞迴神經網路(Recurrent Neural Network,RNN)、多層感知器(Multi-Layer Perceptron,MLP)或支持向量機(Support Vector Machine,SVM))所訓練的辨識模組辨識這些臉部特徵點。機器學習演算法可分析訓練樣本以自中獲得規律,從而透過規律對未知資料預測。而辨識模組是經學習後所建構出的機器學習模型,並據以辨識或分類影像訊框中臉部特徵點。
For the recognition of facial feature points, in one embodiment, the
例如,圖3是依據本發明一實施例的臉部特徵點FP的示意圖。請參照圖3,透過基於機器學習的臉部定位(Facial landmark)模型可標記68的臉部特徵點FP。數個臉部特徵點FP連接可形成諸如眼睛、眉毛、鼻子、嘴巴、下巴或額頭區域的輪廓。 For example, FIG3 is a schematic diagram of facial feature points FP according to an embodiment of the present invention. Referring to FIG3, facial landmark points FP of 68 can be marked by a facial landmark model based on machine learning. Several facial landmark points FP can be connected to form contours of areas such as eyes, eyebrows, nose, mouth, chin or forehead.
在另一實施例中,初始化模組111可使用諸如Harr特徵、加速穩健特徵(Speeded Up Robust Features,SURF)、尺度不變特徵轉換(scale-invariant feature transform,SIFT)、Adaboost或其他影像辨識及/或特徵比對技術來辨識臉部關鍵點。
In another embodiment, the
在一實施例中,臉部區塊包括數個臉部區塊,且這些臉部區塊中的一者的一邊界相鄰於這些臉部區塊中的另一者的邊界。舉例而言,臉部區塊包括區域區塊。圖4是依據本發明一實施例的臉部區塊-區域區塊RB1~RB4的示意圖。請參照圖4,初始化模組111將影像訊框IF1等分成四個區域區塊RB1~RB4,並據以將臉部F等分成左上、右上、左下及右下區塊。其中,區域區塊RB1的右邊界相鄰於區域區塊RB2的左邊界,且區域區塊RB1的下邊
界相鄰於區域區塊RB3的上邊界,其餘依此類推。臉部F的外輪廓上所標記的數個臉部特徵點FP將被分配到所處位置對應的區域區塊。
In one embodiment, the face block includes a plurality of face blocks, and a boundary of one of the face blocks is adjacent to a boundary of another of the face blocks. For example, the face block includes a region block. FIG. 4 is a schematic diagram of a face block-region block RB1-RB4 according to an embodiment of the present invention. Referring to FIG. 4, the
須說明的是,圖4所示分割大小、數量及位置僅是用於範例說明,並可依據設計需求而改變。此外,不同臉部區塊的大小也可能不同。 It should be noted that the segmentation size, number and position shown in Figure 4 are only for illustrative purposes and can be changed according to design requirements. In addition, the sizes of different facial blocks may also be different.
在一實施例中,一個或更多個臉部區塊中的一個或更多個臉部特徵點對應於臉部中的器官(例如,眼睛、鼻子、或嘴巴)。換句而言,這些臉部區域是針對特定的臉部器官。舉例而言,臉部區塊包括個人化區塊。圖5是依據本發明一實施例的臉部區塊-個人化區塊PB1~PB3的示意圖。請參照圖5,初始化模組111將影像訊框IF2分割成三個個人化區塊PB1~PB3。其中,個人化區塊PB1框選眼睛的臉部特徵點FP。個人化區塊PB2框選鼻子的臉部特徵點FP。個人化區塊PB3框選嘴巴的臉部特徵點FP。
In one embodiment, one or more facial feature points in one or more facial blocks correspond to organs in the face (e.g., eyes, nose, or mouth). In other words, these facial regions are targeted at specific facial organs. For example, the facial block includes a personalized block. FIG5 is a schematic diagram of a facial block-personalized block PB1~PB3 according to an embodiment of the present invention. Referring to FIG5, the
須說明的是,圖5所示分割大小、數量及位置僅是用於範例說明,並可依據設計需求而改變。此外,任二個人化區塊可能部分重疊、相鄰或遠離。 It should be noted that the size, number and location of the partitions shown in Figure 5 are only for illustrative purposes and can be changed according to design requirements. In addition, any two personalized blocks may partially overlap, be adjacent or distant.
在一些實施例中,初始化模組111可對影像訊框分割出區域區塊及個人化區塊兩者。此外,在其他實施例中,影像訊框的分割不限於參考臉部特徵點的位置。例如,初始化模組111依據臉部的幾何中心、輪廓等分割影像訊框。
In some embodiments, the
請參照圖2,處理器130透過亮度調整模組113依據轉換
曲線調整各臉部區塊中的一個或更多個像素的亮度值(步驟S230)。具體而言,轉換曲線相關於依據初始亮度值及調整亮度值所形成的多項式。初始亮度值代表影像訊框中的一個像素的原始亮度值,且調整亮度值代表這像素的亮度值已被調整(可能相同或不同於原始亮度值)。這多項式的定義域例如是初始亮度值的最低值至最高值,且其值域例如是調整亮度值的最低值至最高值。而這像素的初始亮度值在轉換曲線中對應有調整亮度值。
Referring to FIG. 2 , the
在一實施例中,多項式是二次曲線方程式。初始化模組111可取得臉部區塊中的一個或更多個像素的亮度代表值。亮度代表值相關於這些像素的亮度值的統計指標(例如,平均值、中位數、或眾數)。例如,針對某一臉部區塊,初始化模組111計算所有像素的三原色(即,紅、綠及藍)的色階值的算術平均值:
值得注意的是,亮度代表值及目標亮度值可通過那二次曲線方程式。圖6是依據本發明一實施例的調整曲線的示意圖。請參照圖6,以二維直角座標系而言,這二次曲線方程式所形成的調整曲線可通過座標(亮度代表值,目標亮度值)的位置TL。此外,
調整曲線更通過座標(亮度最低值,亮度最低值)的位置LL及座標(亮度最高值,亮度最高值)的位置BL。例如,亮度最低值為零,且亮度最高值為255。初始化模組111可將這些座標輸入至尚未決定係數的二次方程式,並據以決定其係數。例如,二次曲線方程式的數學表示式為:Lbrt=((Tbj-Taj)/(Taj 2-k * Taj)) * Lin 2+((1-k * (Tbj-Taj)/(Taj-k * Taj)) * Lin...(2)Lbrt為第j臉部區塊中的某一像素的某一原色的經調整色階值,Lin為這像素的這原色的初始色階值,Tbj為第j臉部區塊的目標亮度值,Taj為第j臉部區塊的代表亮度值,k為色階最高值(例如,255)。
It is worth noting that the brightness representative value and the target brightness value can pass through the quadratic curve equation. FIG. 6 is a schematic diagram of an adjustment curve according to an embodiment of the present invention. Referring to FIG. 6, in terms of a two-dimensional rectangular coordinate system, the adjustment curve formed by the quadratic curve equation can pass through the position TL of the coordinate (brightness representative value, target brightness value). In addition, the adjustment curve further passes through the position LL of the coordinate (brightness minimum value, brightness minimum value) and the position BL of the coordinate (brightness maximum value, brightness maximum value). For example, the brightness minimum value is zero, and the brightness maximum value is 255. The
亮度調整模組113可依據各臉部區塊中的一個或更多個像素的色階值及二次曲線方程式,得出這些臉部區塊中的像素的經調整亮度值。例如,亮度調整模組113將某一像素的某一原色的色階值帶入前述方程式(2),並據以得出這原色的經調整色階值。亮度調整模組113依據這像素的三原色的經調整色階值決定這像素的經調整亮度值。例如,RGB(紅、綠、藍)色彩空間與HSV(色相、飽和度、明度)色彩空間的轉換中,明度(即,亮度值)為三原色中色階值的最高者與最低者的平均值。即,調整色階值為形成調整亮度值中的原色的色階值。而其他臉部區塊及/或像素的經調整亮度值可依此類推。
The
在另一實施例中,多項式不限於二次曲線方程式並可通過其他指定座標點。例如,亮度調整模組113更將臉部區塊的亮
度值的中位數或眾數調整至另一目標亮度值。
In another embodiment, the polynomial is not limited to the quadratic equation and can be passed through other specified coordinate points. For example, the
請參照圖2,處理器130透過比值調整模組115依據經亮度調整區塊中的像素的原色比值調整像素的調整色階值(步驟S250)。具體而言,原色比值為一個原色(例如,紅色、綠色或藍色)的調整色階值在一個臉部區塊中的所占比例。原色比值的數學表示式為:
比值調整模組115定義目標比值。這目標比值可能是所有臉部區塊的比值的統計指標或其他合適於觀賞的比值。例如,提高黃皮膚的原色比值Rbj與Gbj可使皮膚偏黃、提高原色比值Bbj可使皮膚變白。在一些實施例中,處理器130可進一步優化個人化區塊對應的器官。例如,針對嘴巴,處理器130可提高原色比值Rbj使嘴唇變紅;針對眼部,處理器130可同時提高原色比值Rbj、Gbj、Bbj,以減少黑眼圈。
The
比值調整模組115是將各臉部區塊的原色比值調整至目標比值作為目標調整各臉部區塊中的像素。在一實施例中,比值
調整模組115可依據S函數(Sigmoid)特性將原色比值調整至目標比值。值得注意的是,S函數特性在於,當定義域中的值越接近負無窮時,其在值域對應的值趨近於零;當定義域中的值越接近正無窮時,其在值域對應的值趨近於一。基於這特性,比值調整模組115設定原色比值相關於S函數的定義域,且設定目標比值相關於S函數的值域。例如,S函數的數學表示式為:
此外,圖7是依據本發明一實施例的S函數SF的示意圖。請參照圖7,S函數SF的輸入輸出關係如圖7所示。例如,位置P表示輸入的經調整色階值接近最大值(例如,經調整色階值為4.25),則輸出的微調色階值接近1(例如,微調色階值為0.9859)。藉此,可避免轉換曲線造成輸出顏色過深或過淺。 In addition, FIG. 7 is a schematic diagram of an S function SF according to an embodiment of the present invention. Referring to FIG. 7, the input-output relationship of the S function SF is shown in FIG. 7. For example, position P indicates that the input adjusted color scale value is close to the maximum value (for example, the adjusted color scale value is 4.25), and the output fine-tuning color scale value is close to 1 (for example, the fine-tuning color scale value is 0.9859). In this way, the conversion curve can be prevented from causing the output color to be too dark or too light.
須說明的是,原色比值的調整不限於S函數特性,其他 限制極大值或極小值的函數也可應用。 It should be noted that the adjustment of the primary color ratio is not limited to the S function characteristics, and other functions that limit the maximum or minimum values can also be applied.
在一實施例中,不同臉部區塊之間的交界處的顏色可能差異較大。處理器130透過差異調整模組117調整兩個臉部區塊之間的交界處的數個相鄰像素的色階值,以減少那些相鄰像素的色階值之間的差異。交界處代表兩臉部區塊的重疊或連接部分。相鄰像素代表與交界處相距特定範圍內的一個或更多個像素。由於前述亮度及比值的調整都是針對各臉部區塊個別進行,因此不同臉部區塊所用的轉換曲線及/或原色比值可能不同,並使得區塊交界處的部分像素有明顯色階差異。差異調整模組117對這些相鄰像素進行模糊/平滑處理,以減少色階差異。
In one embodiment, the colors of the borders between different facial blocks may differ greatly. The
降低差異的方法有很多種。在一實施例中,差異調整模組117可對那些相鄰像素分別賦予距離權重及區塊權重。距離權重與相距交界處的距離成反比,且區塊權重相關於所屬臉部區塊的器官的重要性。例如,表(1)是距離權重與相距交界處的距離的對應關係:
表(2)是區塊權重與臉部區塊的對應關係:
差異調整模組117可依據那些相鄰像素的距離權重及區塊權重決定那些相鄰像素的色階值。例如,差異調整模組117依據距離權重及區塊權重對某一像素及其特定方向上的一個或更多個相鄰像素計算加權平均數,並以這加權平均數決定差異調整後的色階值:Lout=(ΣWdul * Wtul * Lul+ΣWdur * Wtur * Lur+ΣWddl * Wtdl * Ldl+ΣWddr * Wtdr * Ldr+Wtin * Lin)/(ΣWdul * Wtul+ΣWdur * Wtur+ΣWtdl * Wddl+ΣWddr * Wtdr+Wtin)...(7)Lout為某一像素的某一原色經差異調整後的色階值,Lin為這像素的微調色階值(即,經比值調整後的色階值),Lul、Lur、Ldl、Ldr為這像素在左上方、右上方、左下方及右下方的相鄰像素的微調色階值,Wd為這像素與交界處的距離權重(如表(1)所示),Wtin為這像素所處臉部區塊的區塊權重(如表(2)所示),Wtul、Wtur、Wtdl、
Wtdr為這像素所處臉部區塊的相鄰臉部區塊的區塊權重(如表(2)所示)。
The
須說明的是,前述特定方向不以左上方、右上方、左下方及右下方為限,上方、左方、右方、下方或其他方向也可應用。 It should be noted that the aforementioned specific directions are not limited to the upper left, upper right, lower left and lower right, and the upper, left, right, lower or other directions may also be applied.
這些臉部區塊經亮度、比值及/或差異調整後所形成的影像訊框即可輸出。例如,影像訊框經由網路封包輸出,或透過顯示器顯示。此外,一張或更多張影像訊框所形成的視訊經播放後,可改善顯示器所顯示的影像訊框中的亮度。 The image frames formed by adjusting the brightness, ratio and/or difference of the face blocks can be output. For example, the image frames are output via network packets or displayed on a monitor. In addition, the video formed by one or more image frames can be played back to improve the brightness of the image frames displayed on the monitor.
綜上所述,在本發明實施例的用於調整視訊的影像處理裝置及視訊增進方法中,分區優化亮度、比值及/或差異,以達成打光效果。即便頭部擺動或光源移動,影像訊框中的亮度仍可均勻分布且自然。此外,透過軟體打光,可免去設置發光元件的硬體成本。 In summary, in the image processing device and video enhancement method for adjusting video of the embodiment of the present invention, the brightness, ratio and/or difference are optimized in different regions to achieve the lighting effect. Even if the head moves or the light source moves, the brightness in the image frame can still be evenly distributed and natural. In addition, by using software lighting, the hardware cost of setting up light-emitting elements can be avoided.
雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。 Although the present invention has been disclosed as above by the 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. Therefore, the scope of protection of the present invention shall be subject to the scope of the attached patent application.
S210~S250:步驟 S210~S250: Steps
Claims (14)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW111115705A TWI864390B (en) | 2022-04-25 | 2022-04-25 | Image processing apparatus for video adjustment and video enhancement method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW111115705A TWI864390B (en) | 2022-04-25 | 2022-04-25 | Image processing apparatus for video adjustment and video enhancement method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW202344035A TW202344035A (en) | 2023-11-01 |
| TWI864390B true TWI864390B (en) | 2024-12-01 |
Family
ID=89720223
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW111115705A TWI864390B (en) | 2022-04-25 | 2022-04-25 | Image processing apparatus for video adjustment and video enhancement method |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI864390B (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI401963B (en) * | 2009-06-25 | 2013-07-11 | Pixart Imaging Inc | Dynamic image compression method for face detection |
| TWI444041B (en) * | 2009-07-23 | 2014-07-01 | Casio Computer Co Ltd | Image processing device, image processing method, and recording medium |
-
2022
- 2022-04-25 TW TW111115705A patent/TWI864390B/en active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI401963B (en) * | 2009-06-25 | 2013-07-11 | Pixart Imaging Inc | Dynamic image compression method for face detection |
| TWI444041B (en) * | 2009-07-23 | 2014-07-01 | Casio Computer Co Ltd | Image processing device, image processing method, and recording medium |
Also Published As
| Publication number | Publication date |
|---|---|
| TW202344035A (en) | 2023-11-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Li et al. | Learning to enhance low-light image via zero-reference deep curve estimation | |
| CN113034358B (en) | A super-resolution image processing method and related device | |
| CN104978710B (en) | A kind of method and apparatus that face brightness is adjusted based on identification of taking pictures | |
| CN112381743B (en) | Image processing methods, apparatus, devices and storage media | |
| CN112614060A (en) | Method and device for rendering human face image hair, electronic equipment and medium | |
| CN108537749A (en) | Image processing method, device, mobile terminal and computer readable storage medium | |
| CN108537155A (en) | Image processing method, device, electronic equipment and computer readable storage medium | |
| WO2014187223A1 (en) | Method and apparatus for identifying facial features | |
| CN110827204B (en) | Image processing method and device and electronic equipment | |
| US20240296531A1 (en) | System and methods for depth-aware video processing and depth perception enhancement | |
| CN105096267B (en) | A kind of method and apparatus that eye brightness is adjusted based on identification of taking pictures | |
| CN107800966A (en) | Method, apparatus, computer-readable recording medium and the electronic equipment of image procossing | |
| CN115496668A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
| CN108846807A (en) | Light efficiency processing method, device, terminal and computer readable storage medium | |
| Li et al. | An adaptive enhancement method for low illumination color images | |
| CN115587948B (en) | Image dark field correction method and device | |
| CN108198155A (en) | A kind of self application tone mapping method and system | |
| WO2023000868A1 (en) | Image processing method and apparatus, device, and storage medium | |
| Yuan et al. | Adaptive histogram equalization with visual perception consistency | |
| CN115100240A (en) | Object tracking method and device in video, electronic device, storage medium | |
| WO2020107646A1 (en) | Image processing method | |
| WO2022135579A1 (en) | Skin color detection method and device, mobile terminal, and storage medium | |
| TWI864390B (en) | Image processing apparatus for video adjustment and video enhancement method | |
| US20230206592A1 (en) | Method and electronic device for digital image enhancement on display | |
| CN110033412A (en) | A kind of image processing method and device |