TWI507045B - Adjusting video contrast method - Google Patents

Adjusting video contrast method Download PDF

Info

Publication number
TWI507045B
TWI507045B TW102143446A TW102143446A TWI507045B TW I507045 B TWI507045 B TW I507045B TW 102143446 A TW102143446 A TW 102143446A TW 102143446 A TW102143446 A TW 102143446A TW I507045 B TWI507045 B TW I507045B
Authority
TW
Taiwan
Prior art keywords
contrast
value
image quality
quality evaluation
image
Prior art date
Application number
TW102143446A
Other languages
Chinese (zh)
Other versions
TW201521455A (en
Inventor
Chengmou Tsai
Weiting Pong
Huah Tu
Original Assignee
Aver Information Inc
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 Aver Information Inc filed Critical Aver Information Inc
Priority to TW102143446A priority Critical patent/TWI507045B/en
Publication of TW201521455A publication Critical patent/TW201521455A/en
Application granted granted Critical
Publication of TWI507045B publication Critical patent/TWI507045B/en

Links

Landscapes

  • Television Receiver Circuits (AREA)
  • Transforming Electric Information Into Light Information (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
  • Studio Devices (AREA)

Description

視訊對比度之調整方法Video contrast adjustment method

本發明係關於一種調整方法,且特別是有關於一種視訊對比度之調整方法。The present invention relates to an adjustment method, and more particularly to a method of adjusting video contrast.

對比指的是在一幅影像中,最亮的白和最暗的黑之間不同亮度層級的量測。當其亮度層級差異範圍越大,則代表對比越大。相對地,當其亮度層級差異範圍越小,則代表對比越小。好的對比率可以容易地顯示生動、豐富的色彩,也能支援各階的顏色。Contrast refers to the measurement of different brightness levels between the brightest white and the darkest black in one image. The greater the range of brightness level differences, the greater the contrast. In contrast, the smaller the range of brightness level differences, the smaller the contrast. Good contrast ratios can easily display vivid, rich colors, as well as support for various levels of color.

傳統上調整對比度之方法,有利用軟體直接進行視訊影像之對比調整,但是當所擷取之視訊影像對比度本身就較差時,因為視訊影像本身的內容就不完整,即使再使用軟體調整處理,效果通常會比較不好。例如在視訊上較暗的區域,即使在軟體端把對比度調到最高,其內容依然無法完整顯示出來。因此,亦有以調整擷取視訊影像端之方式,直接改變來源視訊影像的對比度,然而,依此方式,必須使用人眼主觀判斷視訊品質的好壞,直到找到最佳對比度為止。由於需要反覆的調整和使用人眼做確認,所以 過程是非常不方便而且浪費時間的。Traditionally, the method of adjusting the contrast is to use the software to directly adjust the contrast of the video image. However, when the contrast of the captured video image is poor, the content of the video image itself is incomplete, even if the software adjustment process is used. Usually it is not good. For example, in a darker area of the video, even if the contrast is adjusted to the highest on the software side, the content cannot be completely displayed. Therefore, the contrast of the source video image is directly changed by adjusting the video image end. However, in this way, the human eye must be subjectively judged whether the video quality is good or not until the best contrast is found. Due to the need for repeated adjustments and confirmation using the human eye, The process is very inconvenient and time consuming.

因此,在習知之技術中,若要提高對比度,是相當困難的。Therefore, in the conventional technique, it is quite difficult to increase the contrast.

鑑於上述,本發明提供一種可由軟體控制韌體的視訊對比度之調整方法,利用軟體端的演算法判斷視訊畫面的影像品質,並依判斷結果動態調整擷取視訊影像端鏡頭的光圈,直接改變來源視訊影像的對比度,使輸出的視訊具有更好的對比度。In view of the above, the present invention provides a method for adjusting the video contrast of a firmware controlled by a software, and uses the algorithm of the software end to determine the image quality of the video image, and dynamically adjusts the aperture of the video image lens according to the judgment result, and directly changes the source video. The contrast of the image gives the output video a better contrast.

本發明之一態樣係在提供一種視訊對比度之調整方法,係用以調整一視訊影像擷取端到一最佳對比度。首先由一軟體端部分擷取一第一影像畫面以及此第一影像畫面之一第一對比度。接著,根據第一影像畫面產生一參考畫面,並比較第一影像畫面和參考畫面來產生一第一影像品質評估值。其次,判斷第一影像品質評估值是否大於一第一門檻值。當第一影像品質評估值小於第一門檻值時,根據該第一對比度和一對比度動態調整量決定一第二對比度。並由軟體端部分將第二對比度傳送到一韌體端部分。由韌體端部分將視訊影像擷取端之對比度調整為第二對比度。One aspect of the present invention provides a method for adjusting video contrast to adjust a video image capture end to an optimal contrast. First, a first image frame and a first contrast of the first image frame are captured by a software end portion. Then, a reference picture is generated according to the first image frame, and the first image picture and the reference picture are compared to generate a first image quality evaluation value. Next, it is determined whether the first image quality evaluation value is greater than a first threshold value. When the first image quality evaluation value is less than the first threshold value, a second contrast is determined according to the first contrast and a contrast dynamic adjustment amount. And transmitting the second contrast to the end of the firmware by the soft end portion. The contrast of the video image capturing end is adjusted to the second contrast by the firmware end portion.

在一實施例中,根據該第一影像畫面產生一參考畫面,更包括:使用一直方圖等化方法處理該第一影像畫面來產生該參考畫面。In an embodiment, generating a reference picture according to the first image frame further includes: processing the first image frame by using a histogram equalization method to generate the reference picture.

在一實施例中,比較該第一影像畫面和該參考畫面產生該第一影像品質評估值,更包括:使用一結構相似性(Structural similarity,SSIM)影像評估方法比較該第一影像畫面和該參考畫面的相似性,以產生該第一影像品質評估值。In an embodiment, comparing the first image frame and the reference image to generate the first image quality evaluation value, further comprising: comparing the first image frame with the structural similarity (SSIM) image evaluation method and the Referencing the similarity of the pictures to generate the first image quality evaluation value.

在一實施例中,第一門檻值為0.95。In an embodiment, the first threshold is 0.95.

在一實施例中,調整該視訊影像擷取端之對比度,係由該韌體端部分將該視訊影像擷取端之鏡頭光圈的對比度調整為該第二對比度。In one embodiment, the contrast of the video image capturing end is adjusted, and the contrast of the lens aperture of the video image capturing end is adjusted to the second contrast by the firmware end portion.

在一實施例中,當該第一影像品質評估值大於該第一門檻值時,該第一對比度為該最佳對比度。In an embodiment, when the first image quality evaluation value is greater than the first threshold, the first contrast is the optimal contrast.

在一實施例中,根據該第一對比度決定該第二對比度,更包括:量化處理該第一對比度,使該第一對比度值位於0~100間;當該第一對比度值小於或等於一第二門檻值時,設定該對比度動態調整量為一第一正值;以及當該第一對比度值大於該第二門檻值時,設定該對比度動態調整量為一第一負值,其中該第一正值和該第一負值具有相同之絕對值大小;其中該第二對比度為第一對比度值加上該對比度動態調整量。該第二門檻值為95,該第一正值為5,該第一負值為-5。In an embodiment, determining the second contrast according to the first contrast, further comprising: quantizing the first contrast, so that the first contrast value is between 0 and 100; and when the first contrast value is less than or equal to one When the threshold value is two, the contrast dynamic adjustment amount is set to a first positive value; and when the first contrast value is greater than the second threshold value, the contrast dynamic adjustment amount is set to a first negative value, wherein the first The positive value and the first negative value have the same absolute value size; wherein the second contrast is the first contrast value plus the contrast dynamic adjustment amount. The second threshold is 95, the first positive value is 5, and the first negative value is -5.

在一實施例中,視訊對比度調整方法,更包括:由該視訊影像擷取端根據該第二對比度擷取一第二影像畫面;比較該第二影像畫面和該參考畫面產生一第二影像品質評估值;判斷該第二影像品質評估值是否大於該第一門 檻值;當該第二影像品質評估值小於該第一門檻值時,判斷該第二影像品質評估值是否大於該第一影像品質評估值;當該第二影像品質評估值大於該第一影像品質評估值,根據該第二對比度和該對比度動態調整量決定一第三對比度;判斷該第三對比度值是否位於0~100間;當該第三對比度值位於0~100間,由該軟體端部分將該第三對比度傳送置該韌體端部分;以及由該韌體端部分將該視訊影像擷取端之對比度調整為該第三對比度。In an embodiment, the video contrast adjustment method further includes: capturing, by the video image capturing end, a second image frame according to the second contrast; comparing the second image frame and the reference image to generate a second image quality An evaluation value; determining whether the second image quality evaluation value is greater than the first door Determining whether the second image quality evaluation value is greater than the first image quality evaluation value when the second image quality evaluation value is less than the first threshold value; and when the second image quality evaluation value is greater than the first image quality evaluation value; a quality evaluation value, determining a third contrast according to the second contrast and the contrast dynamic adjustment amount; determining whether the third contrast value is between 0 and 100; and when the third contrast value is between 0 and 100, by the software end And partially transmitting the third contrast to the end portion of the firmware; and adjusting the contrast of the video image capturing end to the third contrast by the end portion of the firmware.

在一實施例中,當該第二影像品質評估值大於該第一門檻值時,該第二對比度為該最佳對比度。In an embodiment, when the second image quality evaluation value is greater than the first threshold, the second contrast is the optimal contrast.

在一實施例中,當該第三對比度值非位於0~100間,該第二對比度為該最佳對比度。In an embodiment, when the third contrast value is not between 0 and 100, the second contrast is the optimal contrast.

在一實施例中,根據該第二對比度決定一第三對比度,更包括將該第二對比度值加上該對比度動態調整量來成為該第三對比度。In an embodiment, determining a third contrast according to the second contrast, further comprising adding the second contrast value to the contrast dynamic adjustment amount to become the third contrast.

在一實施例中,當該第二影像品質評估值小於該第一影像品質評估值時,更包括:判斷該第一對比度值是否位於5~95間,和判斷該對比度動態調整量是否尚未反轉過;當該第二對比度值位於5~95間,且該對比度動態調整量未被反轉過,判斷是否有一影像品質評估值大於兩倍之該第一影像品質評估值;當未有一影像品質評估值大於兩倍之該第一影像品質評估值時,將該對比度動態調整量反轉;根據該第一對比度和該反轉後之對比度動態調整量決定一第四對比度;由該軟體端部分將該第四對比度傳送置 該韌體端部分;以及由該韌體端部分將該視訊影像擷取端之對比度調整為該第四對比度。In an embodiment, when the second image quality evaluation value is smaller than the first image quality evaluation value, the method further includes: determining whether the first contrast value is between 5 and 95, and determining whether the contrast dynamic adjustment amount has not been reversed. Turning; when the second contrast value is between 5 and 95, and the contrast dynamic adjustment amount is not reversed, it is determined whether there is an image quality evaluation value greater than twice the first image quality evaluation value; when there is no image When the quality evaluation value is greater than twice the first image quality evaluation value, the contrast dynamic adjustment amount is inverted; determining a fourth contrast according to the first contrast and the inverted contrast dynamic adjustment amount; by the software end Partially transmitting the fourth contrast The firmware end portion; and the contrast of the video image capturing end is adjusted to the fourth contrast by the end portion of the firmware.

在一實施例中,當該第一對比度值並未位於5~95間時,將所有影像品質評估值中最大者設為一最佳影像品質評估值,該最佳影像品質評估值對應之對比度值為該最佳對比度值。In an embodiment, when the first contrast value is not between 5 and 95, the largest of all image quality evaluation values is set as an optimal image quality evaluation value, and the contrast of the optimal image quality evaluation value is corresponding. The value is the best contrast value.

在一實施例中,當該對比度動態調整量曾被反轉過,將所有影像品質評估值中最大者設為一最佳影像品質評估值,該最佳影像品質評估值對應之對比度值為該最佳對比度值。In an embodiment, when the contrast dynamic adjustment amount has been reversed, the largest of all image quality evaluation values is set as an optimal image quality evaluation value, and the contrast value corresponding to the optimal image quality evaluation value is The best contrast value.

在一實施例中,當有一影像品質評估值大於兩倍之該第一影像品質評估值時,更包括設定該影像品質評估值為一最佳影像品質評估值,該最佳影像品質評估值對應之對比度值為該最佳對比度值。In an embodiment, when there is an image quality evaluation value greater than twice the first image quality evaluation value, the image quality evaluation value is further set to an optimal image quality evaluation value, where the optimal image quality evaluation value corresponds to The contrast value is the best contrast value.

在一實施例中,判斷該對比度動態調整量是否曾被反轉過,更包括:判斷是否曾以該對比度動態調整量遞增且遞減該第一對比度值。In an embodiment, determining whether the contrast dynamic adjustment amount has been reversed further comprises: determining whether the first contrast value has been incremented and decremented by the contrast dynamic adjustment amount.

在一實施例中,將該對比度動態調整量反轉,更包括:將以該對比度動態調整量遞增該第一對比度值反轉成以該對比度動態調整量遞減該第一對比度值;或是將以該對比度動態調整量遞減該第一對比度值反轉成以該對比度動態調整量遞增該第一對比度值。In an embodiment, the contrast dynamic adjustment amount is reversed, and the method further includes: inverting, by the contrast dynamic adjustment amount, the first contrast value is inverted to decrement the first contrast value by the contrast dynamic adjustment amount; or The first contrast value is inverted by the contrast dynamic adjustment amount to increase the first contrast value by the contrast dynamic adjustment amount.

在一實施例中,根據該第一對比度和該反轉後之對比度動態調整量決定該第四對比度,更包括將該第一對比 度值加上該反轉後之對比度動態調整量來成為該第四對比度。In an embodiment, the fourth contrast is determined according to the first contrast and the inverted contrast dynamic adjustment amount, and the first comparison is further included. The degree value is added to the inverted contrast dynamic adjustment amount to become the fourth contrast.

綜上所述,本發明藉由軟體端的演算法判斷視訊畫面的影像品質,並以此結果反過來控制韌體端,動態調整視訊影像擷取端鏡頭的光圈,使輸出的視訊具有更好的對比度。。In summary, the present invention determines the image quality of the video image by the algorithm of the software end, and in turn controls the firmware end, and dynamically adjusts the aperture of the video image capturing end lens to make the output video better. Contrast. .

101‧‧‧視訊影像擷取端101‧‧‧Video Image Capture

102‧‧‧視訊影像輸出端102‧‧‧Video image output

103‧‧‧視訊影像處理端103‧‧‧Video Image Processing End

1031‧‧‧軟體端部分1031‧‧‧Soft end

1032‧‧‧韌體端部分1032‧‧‧ Firmware end

Y0~Yn‧‧‧視訊畫面Y0~Yn‧‧‧ video screen

201-207,301-311‧‧‧步驟201-207, 301-311‧‧‧ steps

第1圖,其繪示依照本發明一較佳實施例的調整視訊對比度示意圖。FIG. 1 is a schematic diagram of adjusting video contrast according to a preferred embodiment of the present invention.

第2圖,其繪示依照本發明一較佳實施例於軟體端部分決定第一對比度C1的流程圖。2 is a flow chart showing the determination of the first contrast C1 at the software end portion in accordance with a preferred embodiment of the present invention.

第3圖,其繪示依照本發明一較佳實施例軟體端部分根據第一對比度C1決定後續對比度的流程圖。FIG. 3 is a flow chart showing the determination of the subsequent contrast according to the first contrast C1 according to a preferred embodiment of the present invention.

以下為本發明較佳具體實施例以所附圖示加以詳細說明,下列之說明及圖示使用相同之參考數字以表示相同或類似元件,並且在重複描述相同或類似元件時則予省略。The following description of the preferred embodiments of the invention is in the

請參照第1圖,其繪示依照本發明一較佳實施例的調整視訊對比度示意圖。包括一視訊影像擷取端101、一視訊影像輸出端102以及一視訊影像處理端103。其中視訊影 像處理端103更包括一軟體端部分1031以及一韌體端部分1032。視訊影像處理端103可根據視訊影像擷取端101依序擷取之視訊畫面Y0~Yn,動態調整視訊影像擷取端101之對比度,使視訊影像擷取端101根據調整後之對比度擷取下一視訊畫面並由影像輸出端102顯示。在一實施例中,視訊影像擷取端101為一鏡頭,影像輸出端102為一螢幕。當視訊影像處理端103進行視訊對比度調整時,首先會擷取視訊影像擷取端101所擷取之第一視訊畫面,在本實施例中,為初始視訊畫面Y0,並根據視訊影像擷取端101擷取初始視訊畫面Y0所使用之對比度,判斷初始視訊畫面Y0之對比度C0。再由軟體端部分1031根據初始視訊畫面Y0之對比度C0計算欲調整之對比度,亦即第一對比度C1,並將第一對比度C1送至韌體端部分1032。由韌體端部分1032根據此第一對比度C1動態調整視訊影像擷取端101的對比度後,再擷取下一視訊畫面Y1,並由軟體端部分1031進一步比較視訊畫面Y0和視訊畫面Y1的影像品質,並依此比較結果決定下一欲調整對比度,亦即第二對比度C2,並將第二對比度C2送至韌體端部分1032。韌體端部分1032會根據此第二對比度C2動態調整視訊影像擷取端101的對比度後,再擷取下一視訊畫面Y2,並由軟體端部分1031進一步比較視訊畫面Y1和視訊畫面Y2的影像品質,並依此比較結果決定欲調整對比度,亦即第三對比度C3,並將第三對比度C3送至韌體端部分1032。韌體端部分1032根據此第三對比度C3動態調整視訊影像擷取端101的對比度 後,再擷取下一視訊畫面Y3。依此重複的比較影像品質和調整對比度,直到所擷取視訊畫面的影像品質滿足一門檻值時,此時之對比度即可視為最佳對比度。Please refer to FIG. 1 , which illustrates a schematic diagram of adjusting video contrast according to a preferred embodiment of the present invention. The system includes a video image capturing end 101, a video image output end 102, and a video image processing end 103. Videoconferencing The processing end 103 further includes a soft end portion 1031 and a firmware end portion 1032. The video image processing end 103 can dynamically adjust the contrast of the video image capturing end 101 according to the video images Y0~Yn sequentially captured by the video image capturing end 101, so that the video image capturing end 101 can be extracted according to the adjusted contrast. A video frame is displayed by the video output 102. In one embodiment, the video image capturing end 101 is a lens, and the image output terminal 102 is a screen. When the video image processing end 103 performs the video contrast adjustment, the first video picture captured by the video image capturing end 101 is first captured. In this embodiment, it is the initial video picture Y0, and according to the video image capturing end. 101 captures the contrast used by the initial video picture Y0, and determines the contrast C0 of the initial video picture Y0. Further, the software end portion 1031 calculates the contrast to be adjusted based on the contrast C0 of the initial video picture Y0, that is, the first contrast C1, and sends the first contrast C1 to the firmware end portion 1032. After the firmware end portion 1032 dynamically adjusts the contrast of the video image capturing end 101 according to the first contrast C1, the next video frame Y1 is captured, and the image of the video frame Y0 and the video frame Y1 is further compared by the software end portion 1031. The quality, and accordingly the result of the comparison determines the next contrast to be adjusted, that is, the second contrast C2, and the second contrast C2 is sent to the firmware end portion 1032. The firmware end portion 1032 dynamically adjusts the contrast of the video image capturing end 101 according to the second contrast C2, and then captures the next video frame Y2, and further compares the video image Y1 and the video image Y2 by the software end portion 1031. The quality, and accordingly, determines the desire to adjust the contrast, that is, the third contrast C3, and sends the third contrast C3 to the firmware end portion 1032. The firmware end portion 1032 dynamically adjusts the contrast of the video image capturing end 101 according to the third contrast C3. Then, take the next video screen Y3. The image quality is compared and the contrast is adjusted accordingly, until the image quality of the captured video image satisfies a threshold value, and the contrast is considered as the best contrast.

請參照第2圖,其繪示依照本發明一較佳實施例於軟體端部分決定第一對比度C1的流程圖,請同時參閱第1圖。首先於步驟201,擷取初始視訊畫面Y0和其對比度C0。在一實施例中,擷取視訊影像擷取端101所擷取之第一視訊畫面,初始視訊畫面Y0和初始對比度C0,其中,初始視訊畫面Y0可用來產生參考影像X,而初始對比度C0可決定對比度動態調整量ΔC。接著,於步驟202,產生參考影像X。在一實施例中,將初始視訊畫面Y0經過一直方圖等化方法,產生視覺品質較好的影像,並將此影像稱為參考影像X。例如:使用T.Arici提出的直方圖等化方法。直方圖等化方法使用機率分佈,將原先的亮度分佈重新均勻的等化到新的亮度值。原來在直方圖分佈中低對比度的影像,透過直方圖等化的過程,其亮度灰階的分佈變成均勻分散,因而成為高對比度的影像。另外,對於影像偏暗的部分則提高亮度,偏亮的部分則降低亮度,使得畫面品質更佳。其中,初始視訊畫面Y0經直方圖等化方法處理後產生之參考影像X,其影像品質係作為本案進行對比度調整後,影像輸出端102可呈現出之目標影像品質。Please refer to FIG. 2, which illustrates a flow chart for determining the first contrast C1 at the software end portion according to a preferred embodiment of the present invention. Please refer to FIG. First, in step 201, the initial video picture Y0 and its contrast C0 are captured. In one embodiment, the first video picture captured by the video image capturing end 101, the initial video picture Y0 and the initial contrast C0 are captured, wherein the initial video picture Y0 can be used to generate the reference image X, and the initial contrast C0 can be Determine the contrast dynamic adjustment amount ΔC. Next, in step 202, a reference image X is generated. In one embodiment, the initial video picture Y0 is subjected to a histogram equalization method to generate an image with better visual quality, and this image is referred to as a reference image X. For example: use the histogram equalization method proposed by T.Arici. The histogram equalization method uses the probability distribution to re-equalize the original luminance distribution to a new luminance value. In the process of the low-contrast image in the histogram distribution, the distribution of the luminance gray scale becomes uniform and dispersed through the process of the histogram equalization, thus becoming a high-contrast image. In addition, the brightness is increased for portions of the image that are darker, and the brightness is reduced for brighter portions, resulting in better picture quality. The reference video X generated by the initial video screen Y0 is processed by the histogram equalization method, and the image quality is used as the target image quality after the contrast adjustment in the present case.

接著於步驟203,進行結構相似性(Structural similarity,SSIM)影像評估以產生影像品質評估值Q0。結構相似性影像評估係分別比較兩張影像局部的亮度l (x,y)、對 比度c (x,y)和結構s (x,y),其中,兩張影像的結構相似性定義為:SSIM(x,y)=[l (x,y)] α [c (x,y)] β [s (x,y)] γ ,SSIM的評估值Q0最大值為1。依此,藉由使用SSIM影像評估方法比較初始視訊畫面Y0與參考影像X的相似性,產生SSIM的影像品質評估值Q0。SSIM的影像品質評估值Q0越大,代表初始視訊畫面Y0與參考影像X的相似性越高。也就是初始視訊畫面Y0之畫面影像品質相近於參考影像X之畫面影像品質。因此,於步驟204,判斷影像品質評估值Q0是否大於0.95。如果影像品質評估值Q0大於0.95,表示初始視訊畫面Y0與參考影像X的相似性非常高,初始視訊畫面Y0已經具有非常好的影像品質,所以不需要再調整對比度,此時本案之自動調整對比度的流程結束。Next, in step 203, a structural similarity (SSIM) image evaluation is performed to generate an image quality evaluation value Q0. The structural similarity image evaluation system compares the brightness l (x, y), the contrast c (x, y) and the structure s (x, y) of the two images, respectively, wherein the structural similarity of the two images is defined as: SSIM (x, y) = [ l (x, y)] α [ c (x, y)] β [ s (x, y)] γ , and the evaluation value Q0 of SSIM has a maximum value of 1. Accordingly, the image quality evaluation value Q0 of the SSIM is generated by comparing the similarity between the initial video picture Y0 and the reference image X by using the SSIM image evaluation method. The larger the image quality evaluation value Q0 of the SSIM, the higher the similarity between the initial video picture Y0 and the reference image X. That is, the image quality of the initial video frame Y0 is similar to the image quality of the reference image X. Therefore, in step 204, it is determined whether the image quality evaluation value Q0 is greater than 0.95. If the image quality evaluation value Q0 is greater than 0.95, it indicates that the initial video picture Y0 has a very high similarity with the reference image X, and the initial video picture Y0 already has a very good image quality, so there is no need to adjust the contrast, and the case automatically adjusts the contrast. The process ends.

反之,如果影像品質評估值Q0小於0.95,表示初始視訊畫面Y0與參考影像X不夠相似,初始視訊畫面Y0的影像品質仍需調整。此時,執行步驟205,根據初始對比度C0來決定動態調整量ΔC。因為,初始視訊畫面Y0的影像品質和參考影像X的影像品質間相似性,亦即SSIM的影像品質評估值Q0,低於門檻值0.95,因此,初始視訊畫面Y0仍需再次調整。根據一實施例,為方便進行後續之流程,將所擷取之影像對比度值進行量化處理,使對比度值位於0~100間,當初始視訊畫面Y0的對比度值C0小於或等於95,將動態調整量ΔC設為第一正值,例如5;反之,則將動態調整量ΔC設為第一負值,例如-5,也就是說,第一正 值和第一負值具有相同之絕對值大小。值得注意的是,動態調整量ΔC之設定值並不以上述為限。此外,當初始視訊畫面Y0的對比度值C0小於或等於95,代表以動態調整量ΔC來遞增對比度值Y0,遞增後之下一對比度值並不會大於對比度值之上限值100,在此情況下會將動態調整量ΔC設為5。反之,若初始視訊畫面Y0的對比度值C0大於95,此時若以動態調整量ΔC遞增對比度值Y0將造成遞增後之下一對比度值大於對比度值之上限值100,因此在此情況下會將將動態調整量ΔC設為-5。On the other hand, if the image quality evaluation value Q0 is less than 0.95, it means that the initial video picture Y0 is not similar to the reference picture X, and the image quality of the initial video picture Y0 still needs to be adjusted. At this time, step 205 is executed to determine the dynamic adjustment amount ΔC based on the initial contrast C0. Because the image quality of the initial video picture Y0 and the image quality of the reference image X are similar, that is, the image quality evaluation value Q0 of the SSIM is lower than the threshold value of 0.95, the initial video picture Y0 still needs to be adjusted again. According to an embodiment, in order to facilitate the subsequent process, the captured image contrast value is quantized so that the contrast value is between 0 and 100, and the contrast value C0 of the initial video frame Y0 is less than or equal to 95, and is dynamically adjusted. The quantity ΔC is set to a first positive value, for example 5; otherwise, the dynamic adjustment amount ΔC is set to a first negative value, for example -5, that is, the first positive The value has the same absolute value as the first negative value. It is worth noting that the set value of the dynamic adjustment amount ΔC is not limited to the above. In addition, when the contrast value C0 of the initial video picture Y0 is less than or equal to 95, it means that the contrast value Y0 is incremented by the dynamic adjustment amount ΔC, and the lower contrast value is not greater than the upper limit value 100 of the contrast value. The dynamic adjustment amount ΔC is set to 5. On the other hand, if the contrast value C0 of the initial video picture Y0 is greater than 95, if the contrast value Y0 is incremented by the dynamic adjustment amount ΔC, the contrast value after the increment is greater than the upper limit value 100 of the contrast value, so in this case, The dynamic adjustment amount ΔC will be set to -5.

接著進行步驟206,計算欲調整的對比度C1,亦即計算第一欲調整對比度C1,其中第一欲調整的對比度,亦及第一對比度C1等於初始對比度C0加上動態調整量ΔC(C1=C0+ΔC)。其中從步驟201到步驟206均是由軟體端部分1031進行執行,以在初始視訊畫面Y0的影像品質和參考影像X的影像品質間相似性Q0低於門檻值0.95時,根據初始視訊畫面Y0之初始對比度C0計算第一對比度C1。接著,將第一對比度C1送至韌體端部分1032。並於步驟207,在韌體端部分將對比度設為第一對比度C1。亦即,由軟體端部分1031控制韌體端部分1032將其對比度設為第一對比度C1。接著進行根據第一對比度C1決定後續欲調整對比度的流程。Then proceed to step 206, calculate the contrast C1 to be adjusted, that is, calculate the first contrast ratio C1 to be adjusted, wherein the first contrast to be adjusted, and the first contrast C1 is equal to the initial contrast C0 plus the dynamic adjustment amount ΔC (C1=C0) +ΔC). The steps from step 201 to step 206 are performed by the software end portion 1031, so that the similarity Q0 between the image quality of the initial video picture Y0 and the image quality of the reference image X is lower than the threshold value of 0.95, according to the initial video picture Y0. The initial contrast C0 calculates the first contrast C1. Next, the first contrast C1 is sent to the firmware end portion 1032. And in step 207, the contrast is set to the first contrast C1 at the end of the firmware. That is, the firmware end portion 1032 is controlled by the soft end portion 1031 to set its contrast to the first contrast C1. Next, a flow for determining the subsequent contrast to be adjusted according to the first contrast C1 is performed.

請參照第3圖,其繪示依照本發明一較佳實施例軟體端部分根據第一對比度C1決定後續欲調整對比度的流程圖。首先於步驟301,擷取根據第一對比度產生之新畫面 Yi。在本實施例中,例如擷取視訊影像擷取端101根據第一對比度C1調整對比度後所擷取之新的視訊畫面,亦即初始視訊畫面Y0後之視訊畫面Y1。Please refer to FIG. 3, which illustrates a flow chart of determining the subsequent contrast to be adjusted according to the first contrast C1 according to a preferred embodiment of the present invention. First, in step 301, a new screen generated according to the first contrast is captured. Yi. In this embodiment, for example, a new video picture captured by the video image capturing end 101 after adjusting the contrast according to the first contrast C1, that is, the video picture Y1 after the initial video picture Y0 is captured.

接著於步驟302,進行結構相似性(SSIM)影像評估以產生評估值Qi。亦即,再次使用SSIM影像評估方法比較視訊畫面Yi與參考影像X的相似性,產生影像品質評估值Qi。在本實施例中,也就是評估視訊畫面Y1之畫面影像品質和參考影像X之畫面影像品質來產生此影像品質評估值Q1。Next at step 302, a structural similarity (SSIM) image evaluation is performed to generate an evaluation value Qi. That is, the similarity between the video picture Yi and the reference picture X is compared using the SSIM image evaluation method again, and the image quality evaluation value Qi is generated. In this embodiment, the image quality of the screen image Y1 and the image quality of the reference image X are evaluated to generate the image quality evaluation value Q1.

接著,於步驟303,判斷影像品質評估值Qi是否大於0.95。如果影像品質評估值Qi大於0.95,表示視訊畫面Yi與參考影像X的相似性非常高,視訊畫面Yi已經具有非常好的影像品質,所以不需要再調整對比度,此時本案之自動調整對比度的流程結束。反之,如果影像品質評估值Qi小於0.95,表示視訊畫面Yi與參考影像X不夠相似,視訊畫面Yi的影像品質仍需調整。此時,執行步驟304,判斷影像品質評估值Qi是否大於上一個影像品質評估值Qi-1。當影像品質評估值Qi大於影像品質評估值Qi-1,代表對比度調整ΔC後,新的視訊畫面的影像品質有提升的趨勢,可繼續往前調整對比度。此時執行步驟305,計算欲調整的對比度Ci+1(Ci+1=Ci+ΔC),亦即下一對比度。在本實施例中,亦即計算第二欲調整對比度C2,亦即第二對比度,其中第二對比度C2等於第一對比度C1加上動態調整量ΔC(C2=C1+ΔC)。Next, in step 303, it is determined whether the image quality evaluation value Qi is greater than 0.95. If the image quality evaluation value Qi is greater than 0.95, it means that the similarity between the video image Yi and the reference image X is very high, and the video image Yi has a very good image quality, so there is no need to adjust the contrast. End. On the other hand, if the image quality evaluation value Qi is less than 0.95, it means that the video picture Yi is not similar to the reference picture X, and the image quality of the video picture Yi still needs to be adjusted. At this time, step 304 is executed to determine whether the image quality evaluation value Qi is greater than the previous image quality evaluation value Qi-1. When the image quality evaluation value Qi is larger than the image quality evaluation value Qi-1, the image quality of the new video screen is improved after the contrast adjustment ΔC, and the contrast can be continuously adjusted. At this time, step 305 is executed to calculate the contrast Ci+1 (Ci+1=Ci+ΔC) to be adjusted, that is, the next contrast. In the present embodiment, the second contrast ratio C2, that is, the second contrast, is calculated, wherein the second contrast C2 is equal to the first contrast C1 plus the dynamic adjustment amount ΔC (C2=C1+ΔC).

接著於步驟306,判斷Ci+1的值是否在0~100之間。由於,在本發明中,對比度值得容許範圍是設定在0~100間,因此如果對比度Ci+1的值不在0~100之間,代表調整後之對比度Ci+1值超過容許範圍,此對比度Ci+1值是一不被接受之值,因此無法繼續調整對比度,整個流程結束,此時調整後之最佳對比度為Ci。也就是說,在本實施例中,若第二對比度C2的值不在0~100之間,代表第二對比度C2超過容許範圍,因此無法繼續調整對比度,整個流程結束,此時調整後之最佳對比度為C1。其中從步驟301到步驟306均是由軟體端部分1031進行執行,接著,軟體端部分1031將欲調整對比度Ci+1送至韌體端部分1032。並於步驟307,在韌體端部分將對比度設為Ci+1。亦即,由軟體端部分1031控制韌體端部分1032將其對比度設為欲調整對比度Ci+1,並依此來對視訊影像擷取端101進行調整。接著會回到步驟301,再次截取視訊影像擷取端101根據對比度Ci+1所擷取之畫面,並重複上述的方法,直到找到最佳對比度為止。Next, in step 306, it is determined whether the value of Ci+1 is between 0 and 100. Therefore, in the present invention, the contrast value tolerance range is set between 0 and 100, so if the contrast value of Ci+1 is not between 0 and 100, it means that the adjusted contrast ratio Ci+1 exceeds the allowable range, and the contrast Ci The +1 value is an unacceptable value, so the contrast cannot be adjusted continuously, and the whole process ends. At this time, the optimal contrast after adjustment is Ci. That is to say, in the present embodiment, if the value of the second contrast C2 is not between 0 and 100, it means that the second contrast C2 exceeds the allowable range, so the contrast cannot be continuously adjusted, and the whole process ends, and the adjustment is optimal. The contrast is C1. The steps from step 301 to step 306 are all performed by the software end portion 1031. Then, the software end portion 1031 sends the contrast ratio Ci+1 to the firmware end portion 1032. And in step 307, the contrast is set to Ci+1 at the end of the firmware. That is, the firmware end portion 1032 controls the firmware end portion 1032 to set its contrast to adjust the contrast Ci+1, and accordingly adjusts the video image capturing end 101. Then, returning to step 301, the video image capturing end 101 captures the image captured according to the contrast Ci+1 again, and repeats the above method until the best contrast is found.

另一方面,若於步驟304,判斷出影像品質評估值Qi並未大於上一個影像品質評估值Qi-1。代表對比度調整ΔC後,視訊畫面的影像品質並沒有提升,因此將ΔC乘上負號後,並回到初始對比度C0,往反方向重新調整對比度。在本實施例中,新擷取的視訊畫面為視訊畫面Y1,視訊畫面Y1與參考畫面X比較後產生一影像品質評估值Q1,步驟304即是判斷影像品質評估值Q1是否大於初始視訊畫面 Y0與參考畫面X比較後之影像品質評估值Q0。一旦,影像品質評估值Q1大於影像品質評估值Q0,代表視訊畫面Y1的影像品質比初始視訊畫面Y0的影像品質更接近於參考畫面X的影像品質,因此原本動態調整量ΔC之設定方式是有益於影像品質的提升。反之,若影像品質評估值Q1小於影像品質評估值Q0,代表調整後之視訊畫面Y1的影像品質比初始視訊畫面Y0的影像品質還差,代表原本動態調整量ΔC之設定方式並無助於影像品質的提升,此時,本發明會將動態調整量ΔC乘上負號,改以相反之設定方式來進行對比度之重新進行調整。由於,已經進行評估過之對比度值不須重新進行評估,因此本發明會由初始視訊畫面Y0的對比度C0重新進行。此外,為避免調整後之對比度值超出對比度之限制範圍0~100,以及避免重複執行對比度調整。因此本發明在改以相反之設定方式進行對比度調整前會先於步驟308,判斷初始視訊畫面Y0的對比度C0是否在5~95之間以及動態調整量ΔC是否尚未乘過負號。其中,若初始視訊畫面Y0的對比度值C0大於95,此時若以動態調整量ΔC遞增對比度值Y0,將造成遞增後之下一對比度值大於對比度值之容許上限值100。反之,若初始視訊畫面Y0的對比度值C0小於5,此時若以動態調整量ΔC遞減對比度值Y0,將造成遞減後之下一對比度值小於對比度值之容許下限值0。因此本發明限制可再次進行調整之對比度值是在5~95間。依此,如果初始視訊畫面Y0的對比度C0不在5~95之間或動態調整量ΔC是否已經乘過負號, 則代表對比度沒有反向調整的空間,因此流程結束。此時在所有影像品質評估值中找出最大的影像品質評估值,此時所對應的對比度即為調整後的最佳對比度。On the other hand, if it is determined in step 304, the image quality evaluation value Qi is not larger than the previous image quality evaluation value Qi-1. After the contrast adjustment ΔC, the image quality of the video screen is not improved. Therefore, after multiplying ΔC by a negative sign, it returns to the initial contrast C0 and re-adjusts the contrast in the opposite direction. In this embodiment, the newly captured video picture is the video picture Y1, and the video picture Y1 is compared with the reference picture X to generate an image quality evaluation value Q1. Step 304 is to determine whether the image quality evaluation value Q1 is larger than the initial video picture. The image quality evaluation value Q0 after Y0 is compared with the reference picture X. Once the image quality evaluation value Q1 is greater than the image quality evaluation value Q0, the image quality of the video image Y1 is closer to the image quality of the reference picture X than the image quality of the initial video picture Y0. Therefore, the setting method of the original dynamic adjustment amount ΔC is beneficial. For the improvement of image quality. On the other hand, if the image quality evaluation value Q1 is smaller than the image quality evaluation value Q0, it means that the image quality of the adjusted video picture Y1 is worse than the image quality of the initial video picture Y0, and the setting method of the original dynamic adjustment amount ΔC does not contribute to the image. The quality is improved. At this time, the present invention multiplies the dynamic adjustment amount ΔC by a minus sign, and changes the contrast by the opposite setting method. Since the evaluated contrast value does not need to be re-evaluated, the present invention is re-executed from the contrast C0 of the initial video picture Y0. In addition, to avoid the adjusted contrast value beyond the contrast range of 0 to 100, and to avoid repeating the contrast adjustment. Therefore, before the contrast adjustment is performed in the opposite setting mode, the present invention determines whether the contrast C0 of the initial video picture Y0 is between 5 and 95 and whether the dynamic adjustment amount ΔC has not been multiplied by the negative sign. If the contrast value C0 of the initial video picture Y0 is greater than 95, if the contrast value Y0 is incremented by the dynamic adjustment amount ΔC, the next contrast value after the increment is greater than the allowable upper limit value 100 of the contrast value. On the other hand, if the contrast value C0 of the initial video picture Y0 is less than 5, if the contrast value Y0 is decremented by the dynamic adjustment amount ΔC, the lower contrast value after decrementing is smaller than the allowable lower limit value 0 of the contrast value. Therefore, the present invention limits the contrast value that can be adjusted again from 5 to 95. Accordingly, if the contrast C0 of the initial video picture Y0 is not between 5 and 95 or if the dynamic adjustment amount ΔC has been multiplied by a minus sign, It means that there is no room for contrast adjustment, so the flow ends. At this time, the maximum image quality evaluation value is found among all image quality evaluation values, and the corresponding contrast is the adjusted optimal contrast.

反之,若初始視訊畫面Y0的對比度C0是在5~95之間且動態調整量ΔC並未乘過負號。此時執行步驟309,判斷目前最好的影像品質評估值Qbest是否大於兩倍的影像品質評估值Q0。因為若此時最佳之影像品質評估值Qbest若大於兩倍的影像品質評估值Q0,代表影像品質已經有非常顯著的提升,此時亦例外的將流程結束,使用影像品質評估值Qbest所對應的對比度作為調整後的最佳對比度,來對視訊影像擷取端101進行調整。On the other hand, if the contrast C0 of the initial video picture Y0 is between 5 and 95 and the dynamic adjustment amount ΔC is not multiplied by the negative sign. At this time, step 309 is executed to determine whether the current best image quality evaluation value Qbest is greater than twice the image quality evaluation value Q0. Because if the optimal image quality evaluation value Qbest is more than twice the image quality evaluation value Q0 at this time, the image quality has been significantly improved. At this time, the process ends, and the image quality evaluation value Qbest is used. The contrast is adjusted as the optimal contrast to adjust the video image capturing end 101.

反之,若於步驟309判斷出目前最佳的影像品質評估值Qbest並未大於兩倍的影像品質評估值Q0。此時執行步驟310,反向調整對比度ΔC並計算下一對比度,亦即欲調整的對比度Ci+1。將動態調整量ΔC乘上負號後,回到初始對比度C0,往反方向重新調整對比度,Ci+1(Ci+1=C0+ΔC)。並於步驟311,在韌體端部分將對比度設為Ci+1。亦即,由軟體端部分1031控制韌體端部分1032將其對比度設為欲調整對比度Ci+1,並依此來對視訊影像擷取端101進行調整。接著會回到步驟301,再次截取視訊影像擷取端101根據對比度Ci+1所擷取之畫面,並重複上述的方法,直到找到最佳對比度為止。On the other hand, if it is determined in step 309 that the current optimum image quality evaluation value Qbest is not more than twice the image quality evaluation value Q0. At this time, step 310 is performed to adjust the contrast ΔC in the reverse direction and calculate the next contrast, that is, the contrast Ci+1 to be adjusted. After multiplying the dynamic adjustment amount ΔC by the negative sign, the initial contrast C0 is returned, and the contrast is re-adjusted in the opposite direction, Ci+1 (Ci+1=C0+ΔC). And in step 311, the contrast is set to Ci+1 at the end of the firmware. That is, the firmware end portion 1032 controls the firmware end portion 1032 to set its contrast to adjust the contrast Ci+1, and accordingly adjusts the video image capturing end 101. Then, returning to step 301, the video image capturing end 101 captures the image captured according to the contrast Ci+1 again, and repeats the above method until the best contrast is found.

由上述本發明較佳實施例可知,本發明藉由軟體端的演算法判斷視訊畫面的影像品質,並以此結果反過來控 制韌體端,動態調整視訊影像擷取端鏡頭的光圈,使輸出的視訊具有更好的對比度。According to the preferred embodiment of the present invention, the present invention determines the image quality of the video screen by the algorithm of the software end, and the result is reversely controlled. The firmware end dynamically adjusts the aperture of the video image to capture the aperture of the end lens, so that the output video has better contrast.

雖然本發明已以實施方式揭露如上,然其並非用以限定本發明,任何熟習此技藝者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention, and the present invention can be modified and modified without departing from the spirit and scope of the present invention. The scope is subject to the definition of the scope of the patent application attached.

201-207‧‧‧步驟201-207‧‧‧Steps

Claims (19)

一種視訊對比度之調整方法,係用以調整一視訊影像擷取端到一最佳對比度,至少包含:由一軟體端部分擷取一第一影像畫面以及該第一影像畫面之一第一對比度;根據該第一影像畫面產生一參考畫面;比較該第一影像畫面和該參考畫面產生一第一影像品質評估值;判斷該第一影像品質評估值是否大於一第一門檻值;當該第一影像品質評估值小於該第一門檻值時,根據該第一對比度和一對比度動態調整量決定一第二對比度;由該軟體端部分將該第二對比度傳送到一韌體端部分;以及由該韌體端部分將該視訊影像擷取端之對比度調整為該第二對比度。A method for adjusting a video contrast is to adjust a video image capturing end to an optimal contrast, and at least: capturing a first image frame and a first contrast of the first image frame by a software end portion; Generating a reference picture according to the first image frame; comparing the first image frame and the reference picture to generate a first image quality evaluation value; determining whether the first image quality evaluation value is greater than a first threshold value; When the image quality evaluation value is less than the first threshold value, determining a second contrast according to the first contrast and a contrast dynamic adjustment amount; transmitting the second contrast to the one firmware end portion by the software end portion; The firmware end portion adjusts the contrast of the video image capturing end to the second contrast. 如申請專利範圍第1項所述之調整方法,其中根據該第一影像畫面產生一參考畫面,更包括:使用一直方圖等化方法處理該第一影像畫面來產生該參考畫面。The method of claim 1, wherein the generating a reference picture according to the first image frame further comprises: processing the first image frame by using a histogram equalization method to generate the reference picture. 如申請專利範圍第1項所述之調整方法,其中比較該第一影像畫面和該參考畫面產生該第一影像品質評估值,更包括:使用一結構相似性(Structural similarity,SSIM) 影像評估方法比較該第一影像畫面和該參考畫面的相似性,以產生該第一影像品質評估值。The adjustment method of claim 1, wherein comparing the first image frame and the reference image to generate the first image quality evaluation value further comprises: using a structural similarity (SSIM) The image evaluation method compares the similarity between the first image frame and the reference image to generate the first image quality evaluation value. 如申請專利範圍第1項所述之調整方法,其中調整該視訊影像擷取端之對比度,係由該韌體端部分將該視訊影像擷取端之鏡頭光圈的對比度調整為該第二對比度。The adjustment method of claim 1, wherein the contrast of the video image capturing end is adjusted, and the contrast of the lens aperture of the video image capturing end is adjusted to the second contrast by the end portion of the firmware. 如申請專利範圍第1項所述之調整方法,其中當該第一影像品質評估值大於該第一門檻值時,該第一對比度為該最佳對比度。The adjustment method of claim 1, wherein the first contrast is the optimal contrast when the first image quality evaluation value is greater than the first threshold value. 如申請專利範圍第1項所述之調整方法,其中根據該第一對比度決定該第二對比度,更包括:量化處理該第一對比度,使該第一對比度值位於0~100間;當該第一對比度值小於或等於一第二門檻值時,設定該對比度動態調整量為一第一正值;以及當該第一對比度值大於該第二門檻值時,設定該對比度動態調整量為一第一負值,其中該第一正值和該第一負值具有相同之絕對值大小;其中該第二對比度為第一對比度值加上該對比度動態調整量。The adjustment method of claim 1, wherein determining the second contrast according to the first contrast further comprises: quantizing the first contrast, so that the first contrast value is between 0 and 100; Setting a contrast dynamic adjustment amount to a first positive value when a contrast value is less than or equal to a second threshold value; and setting the contrast dynamic adjustment amount to a first value when the first contrast value is greater than the second threshold value a negative value, wherein the first positive value and the first negative value have the same absolute value size; wherein the second contrast is the first contrast value plus the contrast dynamic adjustment amount. 如申請專利範圍第6項所述之調整方法,其中該 第二門檻值為100-n,該第一正值為n,該第一負值為-n。For example, the adjustment method described in claim 6 of the patent scope, wherein The second threshold is 100-n, the first positive value is n, and the first negative value is -n. 如申請專利範圍第1項所述之調整方法,更包括:由該視訊影像擷取端根據該第二對比度擷取一第二影像畫面;比較該第二影像畫面和該參考畫面產生一第二影像品質評估值;判斷該第二影像品質評估值是否大於該第一門檻值;當該第二影像品質評估值小於該第一門檻值時,判斷該第二影像品質評估值是否大於該第一影像品質評估值;當該第二影像品質評估值大於該第一影像品質評估值,根據該第二對比度和該對比度動態調整量決定一第三對比度;判斷該第三對比度值是否位於0~100間;當該第三對比度值位於0~100間,由該軟體端部分將該第三對比度傳送到該韌體端部分;以及由該韌體端部分將該視訊影像擷取端之對比度調整為該第三對比度。The method for adjusting the method of claim 1, further comprising: capturing, by the video image capturing end, a second image frame according to the second contrast; comparing the second image frame with the reference image to generate a second image The image quality evaluation value is determined whether the second image quality evaluation value is greater than the first threshold value; and when the second image quality evaluation value is less than the first threshold value, determining whether the second image quality evaluation value is greater than the first The image quality evaluation value; when the second image quality evaluation value is greater than the first image quality evaluation value, determining a third contrast according to the second contrast and the contrast dynamic adjustment amount; determining whether the third contrast value is located at 0 to 100 When the third contrast value is between 0 and 100, the third contrast is transmitted to the firmware end portion by the soft end portion; and the contrast of the video image capturing end is adjusted by the firmware end portion to The third contrast. 如申請專利範圍第8項所述之調整方法,其中當該第二影像品質評估值大於該第一門檻值時,該第二對比度為該最佳對比度。The adjustment method of claim 8, wherein the second contrast is the optimal contrast when the second image quality evaluation value is greater than the first threshold value. 如申請專利範圍第8項所述之調整方法,其中比 較該第二影像畫面和該參考畫面產生該第二影像品質評估值,更包括:使用一結構相似性(Structural similarity,SSIM)影像評估方法比較該第二影像畫面和該參考畫面的相似性,以產生該第二影像品質評估值。For example, the adjustment method described in item 8 of the patent application scope, The second image quality evaluation value is generated by the second image frame and the reference image, and the method further comprises: comparing a similarity between the second image frame and the reference image by using a structural similarity (SSIM) image evaluation method, To generate the second image quality evaluation value. 如申請專利範圍第8項所述之調整方法,其中當該第三對比度值非位於0~100間,該第二對比度為該最佳對比度。The adjustment method of claim 8, wherein the second contrast value is not between 0 and 100, and the second contrast is the optimal contrast. 如申請專利範圍第8項所述之調整方法,其中根據該第二對比度決定一第三對比度,更包括將該第二對比度值加上該對比度動態調整量來成為該第三對比度。The adjustment method of claim 8, wherein determining a third contrast according to the second contrast further comprises adding the contrast value to the second contrast value to become the third contrast. 如申請專利範圍第8項所述之調整方法,其中當該第二影像品質評估值小於該第一影像品質評估值時,更包括:判斷該第一對比度值是否位於n~(100-n)間,和判斷該對比度動態調整量是否尚未反轉過;當該第二對比度值位於n~(100-n)間,且該對比度動態調整量未被反轉過,判斷是否有一影像品質評估值大於兩倍之該第一影像品質評估值;當未有一影像品質評估值大於兩倍之該第一影像品質評估值時,將該對比度動態調整量反轉;根據該第一對比度和該反轉後之對比度動態調整量決 定一第四對比度;由該軟體端部分將該第四對比度傳送到該韌體端部分;以及由該韌體端部分將該視訊影像擷取端之對比度調整為該第四對比度。The adjustment method of claim 8, wherein when the second image quality evaluation value is smaller than the first image quality evaluation value, the method further comprises: determining whether the first contrast value is located at n~(100-n) And determining whether the contrast dynamic adjustment amount has not been reversed; when the second contrast value is between n~(100-n), and the contrast dynamic adjustment amount is not reversed, determining whether there is an image quality evaluation value More than twice the first image quality evaluation value; when there is no image quality evaluation value greater than twice the first image quality evaluation value, the contrast dynamic adjustment amount is inverted; according to the first contrast and the inversion Contrast dynamic adjustment And determining a fourth contrast; the fourth contrast is transmitted from the soft end portion to the end portion of the firmware; and the contrast of the video image capturing end is adjusted to the fourth contrast by the end portion of the firmware. 如申請專利範圍第13項所述之調整方法,其中當該第一對比度值並未位於n~(100-n)間時,將所有影像品質評估值中最大者設為一最佳影像品質評估值,該最佳影像品質評估值對應之對比度值為該最佳對比度值。The adjustment method according to claim 13 , wherein when the first contrast value is not located between n and (100-n), the largest one of all image quality evaluation values is set as an optimal image quality evaluation. The value, the contrast value corresponding to the optimal image quality evaluation value is the optimal contrast value. 如申請專利範圍第13項所述之調整方法,其中當該對比度動態調整量曾被反轉過,將所有影像品質評估值中最大者設為一最佳影像品質評估值,該最佳影像品質評估值對應之對比度值為該最佳對比度值。The adjustment method according to claim 13 , wherein when the contrast dynamic adjustment amount has been reversed, the largest one of all image quality evaluation values is set as an optimal image quality evaluation value, and the optimal image quality is obtained. The contrast value corresponding to the evaluation value is the optimum contrast value. 如申請專利範圍第13項所述之調整方法,其中當有一影像品質評估值大於兩倍之該第一影像品質評估值時,更包括設定該影像品質評估值為一最佳影像品質評估值,該最佳影像品質評估值對應之對比度值為該最佳對比度值。The adjustment method of claim 13, wherein when there is an image quality evaluation value greater than twice the first image quality evaluation value, the image quality evaluation value is further set to an optimal image quality evaluation value, The contrast value corresponding to the optimal image quality evaluation value is the optimum contrast value. 如申請專利範圍第13項所述之調整方法,其中判斷該對比度動態調整量是否曾被反轉過,更包括:判斷是 否曾以該對比度動態調整量遞增且遞減該第一對比度值。The adjustment method described in claim 13 , wherein determining whether the contrast dynamic adjustment amount has been reversed, further comprising: determining that Whether the first contrast value has been incremented and decremented by the contrast dynamic adjustment amount. 如申請專利範圍第17項所述之調整方法,其中將該對比度動態調整量反轉,更包括:將以該對比度動態調整量遞增該第一對比度值反轉成以該對比度動態調整量遞減該第一對比度值;或是將以該對比度動態調整量遞減該第一對比度值反轉成以該對比度動態調整量遞增該第一對比度值。The adjustment method of claim 17, wherein the contrast dynamic adjustment amount is reversed, further comprising: inverting the contrast dynamic adjustment amount, the first contrast value is inverted to decrement the contrast dynamic adjustment amount. The first contrast value; or the first contrast value is inversely decremented by the contrast dynamic adjustment amount to increase the first contrast value by the contrast dynamic adjustment amount. 如申請專利範圍第13項所述之調整方法,其中根據該第一對比度和該反轉後之對比度動態調整量決定該第四對比度,更包括將該第一對比度值加上該反轉後之對比度動態調整量來成為該第四對比度。The adjustment method of claim 13, wherein the fourth contrast is determined according to the first contrast and the inverted contrast dynamic adjustment amount, and further comprising adding the first contrast value to the inverted The contrast is dynamically adjusted to become the fourth contrast.
TW102143446A 2013-11-28 2013-11-28 Adjusting video contrast method TWI507045B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW102143446A TWI507045B (en) 2013-11-28 2013-11-28 Adjusting video contrast method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW102143446A TWI507045B (en) 2013-11-28 2013-11-28 Adjusting video contrast method

Publications (2)

Publication Number Publication Date
TW201521455A TW201521455A (en) 2015-06-01
TWI507045B true TWI507045B (en) 2015-11-01

Family

ID=53935195

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102143446A TWI507045B (en) 2013-11-28 2013-11-28 Adjusting video contrast method

Country Status (1)

Country Link
TW (1) TWI507045B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1516087A (en) * 1997-12-10 2004-07-28 ���µ�����ҵ��ʽ���� Display device for regulating subdomain quantity according to luminance
TW200704211A (en) * 2005-05-31 2007-01-16 Kolorific Inc Method and system for automatic brightness and contrast adjustment of a video source
TW200711482A (en) * 2005-07-15 2007-03-16 Enuclia Semiconductor Inc Video processing system and method with dynamic tag architecture
CN101686402A (en) * 2008-09-23 2010-03-31 美国博通公司 Video dataprocessing method and system
TW201134228A (en) * 2010-03-17 2011-10-01 Ili Technology Corp Real-time image contrast enhancement and color gain circuit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1516087A (en) * 1997-12-10 2004-07-28 ���µ�����ҵ��ʽ���� Display device for regulating subdomain quantity according to luminance
TW200704211A (en) * 2005-05-31 2007-01-16 Kolorific Inc Method and system for automatic brightness and contrast adjustment of a video source
TW200711482A (en) * 2005-07-15 2007-03-16 Enuclia Semiconductor Inc Video processing system and method with dynamic tag architecture
CN101686402A (en) * 2008-09-23 2010-03-31 美国博通公司 Video dataprocessing method and system
TW201134228A (en) * 2010-03-17 2011-10-01 Ili Technology Corp Real-time image contrast enhancement and color gain circuit

Also Published As

Publication number Publication date
TW201521455A (en) 2015-06-01

Similar Documents

Publication Publication Date Title
US9077906B1 (en) Video contrast adjusting method
US7352410B2 (en) Method and system for automatic brightness and contrast adjustment of a video source
US9218653B2 (en) Method and apparatus for dynamic range enhancement of an image
CN109785240B (en) Low-illumination image enhancement method and device and image processing equipment
US9307162B2 (en) Local enhancement apparatus and method to generate high dynamic range images by blending brightness-preserved and brightness-adjusted blocks
JP2006146178A (en) Generating method for transfer curve for adaptive contrast enhancement
KR20030067037A (en) Contrast enhancement apparatus using histogram matching and method thereof
KR20090032385A (en) Apparatus and method of stretching histogram for enhancing contrast of image
WO2021218603A1 (en) Image processing method and projection system
WO2016155125A1 (en) Image processing method and apparatus
US20130084005A1 (en) Image processing device and method for processing image
US8711250B2 (en) Image signal processing apparatus and image signal processing method
US9571744B2 (en) Video processing method and apparatus
JP2024086904A (en) Encoder, Decoder, System, and Method for Determining Tone Mapping Curve Parameters - Patent application
JP5410378B2 (en) Video signal correction apparatus and video signal correction program
JP2012235465A (en) Apparatus and method for processing image in digital camera
TWI507045B (en) Adjusting video contrast method
TW200812369A (en) Dynamic softclipping of video levels
KR101634652B1 (en) Method and apparatus for intensificating contrast in image
JP6397261B2 (en) Image processing apparatus and method
JP6024876B2 (en) Noise removal device
JP2006295595A (en) Image display device, and image processing method
Torres et al. An adaptive real-time method for controlling the luminosity in digital video acquisition
CN111275636B (en) Brightness enhancement method for dark image
TWI545952B (en) A pixel value correcting method for adjusting brightness of an image