TWI438718B - Image processing method and system by using adaptive inverse hyperbolic curve - Google Patents

Image processing method and system by using adaptive inverse hyperbolic curve Download PDF

Info

Publication number
TWI438718B
TWI438718B TW99141070A TW99141070A TWI438718B TW I438718 B TWI438718 B TW I438718B TW 99141070 A TW99141070 A TW 99141070A TW 99141070 A TW99141070 A TW 99141070A TW I438718 B TWI438718 B TW I438718B
Authority
TW
Taiwan
Prior art keywords
adaptive
image
luminance data
hyperbolic
image processing
Prior art date
Application number
TW99141070A
Other languages
Chinese (zh)
Other versions
TW201222471A (en
Inventor
Yenchieh Ouyang
Chengyi Yu
Original Assignee
Univ Nat Chunghsing
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 Univ Nat Chunghsing filed Critical Univ Nat Chunghsing
Priority to TW99141070A priority Critical patent/TWI438718B/en
Publication of TW201222471A publication Critical patent/TW201222471A/en
Application granted granted Critical
Publication of TWI438718B publication Critical patent/TWI438718B/en

Links

Description

適應性反雙曲線影像處理方法及其系統Adaptive anti-hyperbolic image processing method and system thereof

本發明是有關於一種影像處理方法,且特別是有關於一種影像亮度的處理方法。The present invention relates to an image processing method, and in particular to a method for processing image brightness.

一般數位相機的要求是維持焦距裡主要目標的明亮度,例如人臉區域的亮度分布。根據此需求,大多數的數位相機皆採用伽瑪函數(gamma function)來做為影像增強的基礎。但使用此種影像增強法常會造成主要目標物與背景的對比變差。The requirement of a general digital camera is to maintain the brightness of the main target in the focal length, such as the brightness distribution of the face area. According to this requirement, most digital cameras use gamma functions as the basis for image enhancement. However, the use of such image enhancement methods often results in a deterioration of the contrast between the main target and the background.

在影像對比增強技術的領域中,伽瑪函數(gamma function)是普遍運用的方法,然而這個方法有兩個缺點:其一,在影像對比增強的過程中對於亮度分布過於極端的影像(如:背光影像、過亮影像及過暗影像)無法保留原始影像的亮度分布細節且易造成失真的現象。其二,此演算法僅能對影像做全域性(global)的對比增強並無法實現區域性(local)的對比增強,且無法滿足人類對亮度的視覺反應曲線,並使影像產生不平滑或失真的現象。In the field of image contrast enhancement technology, the gamma function is a commonly used method. However, this method has two disadvantages: First, the image with too much brightness distribution during image contrast enhancement (eg: Backlit images, over-bright images, and over-dark images cannot preserve the details of the brightness distribution of the original image and are prone to distortion. Second, this algorithm can only achieve global contrast enhancement of the image and can not achieve regional contrast enhancement, and can not meet the human visual response curve of brightness, and make the image unsmooth or distorted. The phenomenon.

因此,本揭示內容之一技術態樣是在提供一種適應性反雙曲線影像處理方法,以滿足人類對亮度的視覺反應曲線。Therefore, one aspect of the present disclosure is to provide an adaptive inverse hyperbolic image processing method to meet human visual response curves for brightness.

依據本技術態樣一實施方式,提出一種適應性反雙曲線影像處理方法,包括下列步驟:首先,進行步驟a,從一輸入影像中取出一原始亮度資料。然後,進行步驟b,根據原始亮度資料之平均值與標準差,設定一適應性反雙曲線函數。接下來,進行步驟c,利用適應性反雙曲線函數修正原始亮度資料,以產生一適應性亮度資料。最後,進行步驟d,利用適應性亮度資料修正輸入影像,以產生一輸出影像。According to an embodiment of the present invention, an adaptive inverse hyperbolic image processing method is provided, including the following steps: First, step a is performed to extract an original luminance data from an input image. Then, step b is performed to set an adaptive inverse hyperbolic function according to the average value and the standard deviation of the original luminance data. Next, step c is performed to correct the original luminance data by using an adaptive inverse hyperbolic function to generate an adaptive luminance data. Finally, step d is performed to correct the input image with adaptive brightness data to generate an output image.

另外,依據本技術態樣其他實施方式,步驟a可以是將輸入影像之三原色紅綠藍(RGB)資料格式透過色彩空間轉換取得亮度資料;步驟d可以是以適應性亮度資料取代原始亮度資料。值得注意的是,如果輸入影像的原始亮度資料分布範圍較廣或較極端,步驟b可以將原始亮度資料分割為多個頻段(band)亮度資料,再計算各別頻段亮度資料之平均值與標準差,以相應設定多個適應性反雙曲線函數來逐一對應這些頻段亮度資料。另一方面,步驟b可以根據原始亮度資料或各個頻段亮度資料之平均值計算一區域的適應性偏差參數(bias ),且根據原始亮度資料或各個頻段亮度資料之標準差計算一區域的適應性增益參數(gain ),再利用適應性偏差參數(bias )及適應性增益參數(gain )來設定適應性反雙曲線函數。In addition, according to other embodiments of the present technical aspect, step a may be to convert the three primary color red green blue (RGB) data formats of the input image through color space conversion to obtain brightness data; and step d may replace the original brightness data with adaptive brightness data. It is worth noting that if the original luminance data of the input image has a wide or extreme range of distribution, step b can divide the original luminance data into multiple band luminance data, and then calculate the average and standard of the luminance data of the respective frequency bands. Poor, correspondingly set a plurality of adaptive anti-hyperbolic functions to correspond to the luminance data of these bands one by one. On the other hand, step b can calculate the adaptive deviation parameter ( bias ) of an area according to the original brightness data or the average value of the brightness data of each frequency band, and calculate the adaptability of a region according to the original brightness data or the standard deviation of the brightness data of each frequency band. The gain parameter ( gain ) is then used to set the adaptive inverse hyperbolic function using the adaptive bias parameter ( bias ) and the adaptive gain parameter ( gain ).

本揭示內容之另一技術態樣是在提供一種適應性反雙曲線影像處理系統,以執行上述之適應性反雙曲線影像處理方法。Another aspect of the present disclosure is to provide an adaptive inverse hyperbolic image processing system for performing the adaptive inverse hyperbolic image processing method described above.

依據本技術態樣一實施方式,提出一種適應性反雙曲線影像處理系統,包括一輸入單元、一影像處理單元及一輸出單元。輸入單元係用以取得一影像;影像處理單元係用以接收影像,進而執行前述之適應性反雙曲線影像處理方法;輸出單元則用以輸出處理後的輸出影像。According to an embodiment of the present invention, an adaptive inverse hyperbolic image processing system is provided, including an input unit, an image processing unit, and an output unit. The input unit is configured to obtain an image; the image processing unit is configured to receive the image, and then perform the adaptive inverse hyperbolic image processing method; and the output unit is configured to output the processed output image.

藉此,上述諸實施方式之適應性反雙曲線影像處理方法及其系統,可以在影像亮度對比處理上,滿足人類對亮度對比的視覺反應,並避免使影像產生不平滑或失真的現象。Thereby, the adaptive anti-hyperbolic image processing method and system thereof of the above embodiments can satisfy the human visual response to the brightness contrast in the image brightness contrast processing, and avoid the phenomenon that the image is not smooth or distorted.

根據醫學相關資料顯示,在我們人類眼睛的視網膜構造中分布了許多對光與色彩的接收細胞,其接收細胞可分為兩種:(1)視杆細胞(Rod cell),(2)視錐細胞(Cone cell)。視杆細胞(Rod cell)約有一億三千萬個分布於人類眼睛的視網膜中,其對弱光相當敏感,但此細胞卻不具有辨色能力,主要是在弱光下作用。反之,在強光下視杆細胞會因感光色素的減少,而對光的敏感度降低,此種狀態即稱為光適應。視錐細胞(Cone cell)約有六百萬到七百萬個分布於人類眼睛的視網膜中,其細胞會接受強光與色光的刺激,其主要在白天觀看任何東西時作用。According to medical related data, there are many receiving cells for light and color distributed in the retinal structure of our human eyes. The receiving cells can be divided into two types: (1) Rod cells, (2) cones. Conne cell. Rod cells are about 130 million in the retina of human eyes. They are quite sensitive to low light, but this cell does not have the ability to distinguish colors, mainly in low light. Conversely, under strong light, the rod cells will be less sensitive to light due to the decrease of the photopigment, which is called light adaptation. Cone cells have about six to seven million retinas distributed in the human eye, and their cells are stimulated by intense light and shades, which act primarily when watching anything during the day.

在真實世界裡,亮度的強度分布有很大的範圍。根據人類視覺系統的響應曲線中低刻度端是星光屬於極弱光,其平均亮度的強度大約分布在10-3 cd/cm2 ,而在白天中的平均亮度的強度大約分布在105 cd/cm2 是屬於高強光。然而,人眼的可見範圍只介於1到104 cd/cm2 ;因此我們幾乎失去可見光譜中所有暗處與強光下的細節。由於人類具有視覺感官的能力,人腦具有差補點運算與影像強化的功能,是現今市面上沒有一台任何數位相機、攝影機或顯示器可以相比的,且還具有全自動的無段接圖與近乎完美的後製能力,所以使得人眼所看到的景象與其所接收到的亮度資訊比透過影像擷取裝置取得影像,再由顯示器顯示影像還要好。In the real world, the intensity distribution of brightness has a large range. According to the response curve of the human visual system, the low-scale end is that the starlight belongs to extremely weak light, and the intensity of the average brightness is about 10 -3 cd/cm 2 , and the intensity of the average brightness during the day is about 10 5 cd/ Cm 2 belongs to high glare. However, the visible range of the human eye is only between 1 and 10 4 cd/cm 2 ; therefore we almost lose all the details in the dark and the strong light in the visible spectrum. Due to the human visual sense, the human brain has the function of differential complement calculation and image enhancement. It is comparable to any digital camera, camera or display on the market today, and it also has a fully automatic non-segment connection. With the near-perfect post-production capability, it is better to see the image seen by the human eye and the brightness information it receives than to obtain the image through the image capture device, and then display the image by the display.

影像對比增強技術的主要目的是為了增強影像的視覺效果,使人眼易於辨識影像或使影像更清晰細緻,並讓電腦機械易於分析影像資料與辨識,且像人類一樣擁有視覺感官的能力。然而根據我們的觀察發現,目前市面上所販售的數位相機、攝影機等的影像擷取設備大部份皆已採用伽瑪函數來對其所擷取的數位影像做影像對比增強的調整,但此種處理方法將導致影像經過對比增強後產生主要目標物與其背景對比資訊的落差現象,且通常無法符合人類對亮度對比的視覺反應曲線;且對於影像之亮度分布過於極端的狀態下是無法符合人類的視覺需求。所以,本揭示內容提出一個可以容易使用,且能提高數位影像對比的影像處理方法,以克服上述我們所觀察到的問題。The main purpose of image contrast enhancement technology is to enhance the visual effect of the image, making it easy for the human eye to recognize the image or make the image clearer and more detailed, and to make the computer machine easy to analyze the image data and identification, and has the visual sense function like human being. However, according to our observations, most of the image capture devices currently sold on the market, such as digital cameras and cameras, have adopted gamma functions to make image contrast enhancement adjustments to the digital images captured by them. This method of processing will result in a contrast between the main target and its background contrast information after contrast enhancement, and usually cannot meet the human visual response curve of brightness contrast; and it is inconsistent with the state where the brightness distribution of the image is too extreme. Human visual needs. Therefore, the present disclosure proposes an image processing method that can be easily used and can improve digital image contrast to overcome the problems we have observed above.

從原理上來分析,請一併參考第1圖與第2圖,第1圖是各種輸入影像之亮度分布的光譜(以直方圖統計的結果),第2圖是對應第1圖之各種輸入影像的人眼最佳適應對比度調整曲線。通常,我們在日常生活中利用各種設備所能擷取到的影像對比分布可分為如第1圖所示的五種類型:過暗的影像(dark image)、過亮的影像(bright image)、背光影像(back-lighted image)、低對比度的影像(low contrast image)及高對比度的影像(high contrast image)。過暗的影像,亮度分布只分布於黑暗的區域,過亮的影像亮度分布只分布於明亮的區域,背光影像亮度則分布於黑暗區域與明亮區域兩端,低對比度的影像亮度分布都集中在中間區域,高對比度的影像亮度均勻的分布於整個光譜中。For the analysis of the principle, please refer to the first picture and the second picture together. The first picture shows the spectrum of the brightness distribution of various input images (the result of histogram statistics), and the second picture shows the various input images corresponding to the first picture. The human eye best fits the contrast adjustment curve. In general, the contrast distribution of images that we can capture in our daily life using various devices can be divided into five types as shown in Figure 1: dark image, bright image (bright image) , back-lighted image, low contrast image and high contrast image. In the dark image, the brightness distribution is only distributed in the dark area. The brightness distribution of the over-bright image is only distributed in the bright area, and the brightness of the backlight image is distributed in the dark area and the bright area. The low-contrast image brightness distribution is concentrated in the In the middle area, high-contrast image brightness is evenly distributed throughout the spectrum.

承前所述,為了符合人眼對比度的視覺反應曲線,針對不同亮度分布的影像,應採用不同的轉換曲線。如第2圖所示,我們根據醫學資訊,找出不同類型的對比影像所應使用的不同對比曲線,並據以建構其數學模型。在一般情況下,過暗的影像,意味著原始亮度資料之平均值(mean )小於0.5,宜使用如第2圖(a)所示的對應曲線。對於過亮的影像,意味著原始亮度資料之平均值大於0.5,則應使用如第2圖(b)所示的對應曲線。對於影像的原始亮度資料分布於黑暗區域和明亮區域兩端,宜使用如第2圖(c)所示的對應曲線。對於影像的原始亮度資料皆集中於中間區域,其平均值約等於0.5,應使用如第2圖(d)所示的對應曲線。對於影像原始亮度資料是均勻分布在整個光譜,則使用如第2圖(e)所示的對應曲線。As mentioned above, in order to meet the visual response curve of human eye contrast, different conversion curves should be used for images with different brightness distributions. As shown in Figure 2, we use medical information to find out the different contrast curves that should be used for different types of contrast images, and to construct their mathematical models. In general, an image that is too dark means that the average value of the original luminance data ( mean ) is less than 0.5, and the corresponding curve as shown in Fig. 2(a) should be used. For an image that is too bright, meaning that the average of the original brightness data is greater than 0.5, the corresponding curve as shown in Figure 2 (b) should be used. For the original brightness data of the image distributed at both ends of the dark area and the bright area, the corresponding curve as shown in Fig. 2(c) should be used. The original brightness data for the image is concentrated in the middle region, and the average value is approximately equal to 0.5. The corresponding curve as shown in Fig. 2(d) should be used. For the image raw luminance data to be evenly distributed throughout the spectrum, the corresponding curve as shown in Fig. 2(e) is used.

因此,本實施方式之適應性反雙曲線影像處理方法係建立一調整機制,以針對不同之亮度分布定義出不同的反應曲線,進而根據輸入影像,施予相應適切之對比度調整。藉此,本實施方式可架構於人類視覺直觀的感知上,滿足人類對亮度的視覺反應曲線,並避免使影像產生不平滑或失真的現象。Therefore, the adaptive anti-hyperbolic image processing method of the present embodiment establishes an adjustment mechanism to define different reaction curves for different brightness distributions, and then apply appropriate contrast adjustment according to the input image. Thereby, the embodiment can be constructed on the human visually intuitive perception, satisfying the human visual response curve of brightness, and avoiding the phenomenon that the image is not smooth or distorted.

請參考第3圖,第3圖是本實施方式之適應性反雙曲線影像處理方法的步驟流程圖。第3圖中,本實施方式之適應性反雙曲線影像處理方法包括下列步驟:首先,如步驟101所示,從一輸入影像中取出一原始亮度資料。然後,如步驟102所示,根據原始亮度資料之平均值與標準差,設定一適應性反雙曲線函數。接下來,如步驟103所示,利用適應性反雙曲線函數修正原始亮度資料,以產生一適應性亮度資料。最後,如步驟104所示,利用適應性亮度資料修正輸入影像,以產生一輸出影像。其中,本實施方式在步驟102中,主要是以原始亮度資料的平均值與標準差,來計算適應性偏差與適應性增益,進而設定出適應性反雙曲線函數。Please refer to FIG. 3, which is a flow chart of the steps of the adaptive inverse hyperbolic image processing method of the present embodiment. In FIG. 3, the adaptive inverse hyperbolic image processing method of the present embodiment includes the following steps: First, as shown in step 101, an original luminance data is taken out from an input image. Then, as shown in step 102, an adaptive inverse hyperbolic function is set based on the average and standard deviation of the original luminance data. Next, as shown in step 103, the original luminance data is corrected using an adaptive inverse hyperbolic function to generate an adaptive luminance data. Finally, as shown in step 104, the input image is corrected using adaptive brightness data to produce an output image. In the present embodiment, in step 102, the adaptive deviation and the adaptive gain are calculated mainly by the average value and the standard deviation of the original luminance data, and then the adaptive inverse hyperbolic function is set.

從技術上來說明,請復參考第4圖,第4圖是本揭示內容另一實施方式之步驟流程圖。首先,如步驟210所示,先將其所輸入影像的數值從原來的格式轉換為浮點表示的RGB值,並將轉換後的彩色影像從原來的影像格式做色彩空間的轉換(例如,將RGB轉HSV或將RGB轉HSI),進而如步驟220及230所示,取得原始亮度資料及原始彩度資料(諸如色度與飽和度)。然後,如步驟240所示,根據原始亮度資料進行適應性調整,例如根據原始亮度資料之平均值與標準差計算適應性偏差與適應性增益,定義出適應性調整後的反雙曲線正切函數曲線,再以適應性反雙曲線正切函數曲線進行對比度調整。接下來,如步驟250所示,將調整後的適應性亮度資料與之前分離出來的原始彩度資料整合,例如以適應性亮度資料直接取代原始亮度資料。最後,如步驟260所示,將影像色彩格式的影像轉換為紅綠藍(RGB)格式的影像,進而產生調整後的輸出影像。Technically, please refer to FIG. 4, which is a flow chart of steps of another embodiment of the present disclosure. First, as shown in step 210, the value of the input image is first converted from the original format to the RGB value of the floating point representation, and the converted color image is converted from the original image format into a color space (for example, RGB to HSV or RGB to HSI), and as shown in steps 220 and 230, raw luminance data and raw chroma data (such as chrominance and saturation) are obtained. Then, as shown in step 240, adaptive adjustment is performed according to the original luminance data, for example, the adaptive deviation and the adaptive gain are calculated according to the average value and the standard deviation of the original luminance data, and the anti-hyperbolic tangent function curve after the adaptive adjustment is defined. Then, the contrast is adjusted by the adaptive inverse hyperbolic tangent function curve. Next, as shown in step 250, the adjusted adaptive brightness data is integrated with the previously separated original chroma data, for example, the original brightness data is directly replaced by the adaptive brightness data. Finally, as shown in step 260, the image in the image color format is converted into an image in red, green, and blue (RGB) format, thereby generating an adjusted output image.

請再參考第5圖,第5圖是第4圖之步驟240的詳細步驟流程圖。具體而言,如步驟241及242所示,本實施方式係先計算出原始亮度資料之平均值與標準差,也就是意味著找出原始亮度資料在光譜上分布的類型。然後,如步驟243及244所示,分別利用平均值計算一適應性偏差參數(bias ),且利用標準差計算一適應性增益參數(gain )。最後,再如步驟245所示,利用適應性偏差參數(bias )及適應性增益參數(gain )設定適應性反雙曲線函數,也就是產生最適合此種亮度分布類型的對比度轉換曲線。Please refer to FIG. 5 again. FIG. 5 is a detailed step flow chart of step 240 of FIG. 4. Specifically, as shown in steps 241 and 242, the present embodiment first calculates the average and standard deviation of the original luminance data, that is, the type of the original luminance data that is spectrally distributed. Then, as shown in steps 243 and 244, an adaptive deviation parameter ( bias ) is calculated using the average value, and an adaptive gain parameter ( gain ) is calculated using the standard deviation. Finally, as shown in step 245, the adaptive inverse hyperbolic function is set using the adaptive bias parameter ( bias ) and the adaptive gain parameter ( gain ), that is, the contrast conversion curve most suitable for this type of luminance distribution is generated.

承前所述,本實施方式以反雙曲線正切函數為例,教示如何設定適應性偏差函數bias (x )及適應性增益函數gain (x ),進而定義出適應性反雙曲線函數。首先,請參考第6圖,第6圖是適應性反雙曲線正切函數所能對應的各種類型影像之處理曲線圖。這個函數的形式符合測量所獲得的數據,以及從電氣對各種不同種類的光視覺感受的反射響應。它同時也提供了一個良好的電流生理學和心理學量測的人眼視覺功能。為了增強影像的對比度,我們使用反雙曲線正切函數如下列方程式(1)所示。其演算法中添加了適應性偏差函數bias (x )和適應性增益函數gain (x )的參數,來控制反雙曲線正切函數的曲線形狀,如下列方程式(2)所示:As described above, the present embodiment takes an inverse hyperbolic tangent function as an example to teach how to set the adaptive deviation function bias ( x ) and the adaptive gain function gain ( x ) to define an adaptive inverse hyperbolic function. First, please refer to Figure 6, which is the processing curve of various types of images that the adaptive anti-hyperbolic tangent function can correspond to. The form of this function conforms to the data obtained from the measurements, as well as the reflected response from the electrical perception of various different kinds of light. It also provides a good current physiology and psychometric measurement of human visual function. To enhance the contrast of the image, we use the inverse hyperbolic tangent function as shown in the following equation (1). The algorithm adds the parameters of the adaptive deviation function bias ( x ) and the adaptive gain function gain ( x ) to control the curve shape of the inverse hyperbolic tangent function, as shown in the following equation (2):

從中我們可以發現,在中間的曲線有近似於線性的特性。From this we can see that the curve in the middle has a characteristic similar to linear.

請復參考第7圖,其係適應性反雙曲線正切函數的位移曲線圖。適應性反雙曲線正切函數對應曲線是一個近似人眼對明視度(Luminance)之反應曲線為基礎的演算法,可以適合於各種不同對比類型影像的亮度分布之特性函數。對於非常小或非常大的亮度值做映射,這樣可將黑暗和明亮的區域對比增強。此函數有一個一次漸近的特性,這意味著輸出映射的範圍始終為0和1之間。這個函數的另一個優點是,正切函數提供一個反雙曲線來映射過暗與過亮的細節。Please refer to Figure 7, which is a displacement curve of the adaptive inverse hyperbolic tangent function. The adaptive anti-hyperbolic tangent function correspondence curve is an algorithm based on the human eye's response curve to Luminance, and can be adapted to the characteristic function of the brightness distribution of various contrast type images. Maps for very small or very large brightness values, which enhances contrast between dark and bright areas. This function has a one-time asymptotic feature, which means that the range of the output map is always between 0 and 1. Another advantage of this function is that the tangent function provides an inverse hyperbola to map too dark and too bright details.

其中,第7圖(a)是反雙曲線正切函數曲線圖,第7圖(b)是位移至[0,1]後之曲線圖。圖中的反雙曲線正切函數的範圍落在於-1<x <1之間,如第7圖(a)所示。取其中一段並位移(shift)至[0,1]之範圍,位移後的反雙曲線正切函數的範圍為0<x <1,以達近似人眼對明視度(Luminance)的反應曲線之反曲線,以補償人類視覺反應之不足(人類視覺不敏感之區域),如第7圖(b)所示。Among them, Fig. 7(a) is a graph of the inverse hyperbolic tangent function, and Fig. 7(b) is a graph after shifting to [0, 1]. The range of the inverse hyperbolic tangent function in the figure lies between -1 < x < 1, as shown in Fig. 7(a). Take one of the sections and shift it to the range of [0,1]. The range of the inverse hyperbolic tangent function after displacement is 0< x <1, so as to approximate the response curve of the human eye to Luminance. The inverse curve compensates for the lack of human visual response (the area in which human vision is insensitive), as shown in Figure 7(b).

接下來,舉例介紹如何利用適應性偏差函數bias (x )和適應性增益函數gain (x )定義出適應性反雙曲線函數。請參考第8圖,第8圖是各種適應性反雙曲線正切函數的曲線圖。第8圖(a)是適應性增益參數(gain )固定,改變適應性偏差參數(bias )的曲線圖,第8圖(b)是適應性偏差參數(bias )固定,改變適應性增益參數(gain )的曲線圖。在第8圖中,我們可以看到,適應性偏差參數(bias )可以幫助我們確定反雙曲線正切函數的轉折點與構成的曲線形狀。若亮度資料的平均值(mean )是大約等於0.5則反雙曲線正切函數的曲線形狀為近似於直線,所映射的像素值近似於原始數值。若亮度資料的平均值小於0.5,則反雙曲線正切函數的曲線形狀要映射到更高的數值。若亮度資料的平均值大於0.5,反雙曲線正切函數的曲線變化為映射到較低的數值。bias (x )函數的定義如下:Next, an example is given of how to define an adaptive inverse hyperbolic function using the adaptive deviation function bias ( x ) and the adaptive gain function gain ( x ). Please refer to Figure 8, which is a graph of various adaptive inverse hyperbolic tangent functions. Fig. 8(a) is a graph in which the adaptive gain parameter ( gain ) is fixed and the adaptive bias parameter ( bias ) is changed, and Fig. 8(b) shows that the adaptive deviation parameter ( bias ) is fixed and the adaptive gain parameter is changed ( Gain ). In Figure 8, we can see that the adaptive bias parameter ( bias ) helps us determine the turning point of the inverse hyperbolic tangent function and the shape of the curve. If the mean value ( mean ) of the luminance data is approximately equal to 0.5, the shape of the curve of the inverse hyperbolic tangent function is approximately a straight line, and the mapped pixel value approximates the original value. If the average value of the luminance data is less than 0.5, the shape of the curve of the inverse hyperbolic tangent function is mapped to a higher value. If the average value of the luminance data is greater than 0.5, the curve change of the inverse hyperbolic tangent function is mapped to a lower value. The definition of the bias ( x ) function is as follows:

而適應性增益參數(gain ),可決定曲線陡峭的程度。斜率較大的曲線映射較小的輸入值到較大輸出的顯示範圍。如第8圖(b)顯示不同曲線所獲得的不同增益值之映射曲線。gain (x )函數的定義如下:The adaptive gain parameter ( gain ) determines the steepness of the curve. A curve with a larger slope maps a smaller input value to the display range of a larger output. Figure 8 (b) shows the mapping curves for the different gain values obtained for the different curves. The gain ( x ) function is defined as follows:

其中 among them

請參考第9圖與第10圖,第9圖是伽瑪函數與適應性反雙曲線正切函數的對應曲線之比較圖,第10圖是適應性偏差bias 參數固定於各值,適應性增益gain 參數變化下,各種狀態曲線的模擬圖。本實施方式之對應曲線可含蓋伽瑪函數之對應曲線,且其對應轉換將可適應更多變化之影像,且其效果相當理想。換句話說,本實施方式是要利用輸入影像的原始亮度資料,分析其本身的光譜狀態,定義出適合此輸入影像的對比度調整曲線,進而如第10圖所示,針對不同亮度資料,對應不同的曲線。藉此,本實施方式能有效的改善影像對比,並保留原始影像亮度分布的細節。Please refer to Figure 9 and Figure 10. Figure 9 is a comparison of the corresponding curves of the gamma function and the adaptive inverse hyperbolic tangent function. Figure 10 is the adaptive deviation bias parameter fixed to each value, adaptive gain gain A simulation of various state curves under parameter changes. The corresponding curve of the embodiment may include a corresponding curve of the cover gamma function, and the corresponding conversion will adapt to more varied images, and the effect is quite satisfactory. In other words, in the embodiment, the original brightness data of the input image is used to analyze the spectral state of the input image, and a contrast adjustment curve suitable for the input image is defined, and as shown in FIG. 10, corresponding to different brightness data. Curve. Thereby, the present embodiment can effectively improve image contrast and preserve the details of the original image brightness distribution.

另一方面,請復參考第11圖,其係本揭示內容另一實施方式之步驟流程圖。第11圖中,為實現符合人類對亮度的視覺反應曲線與有效改善影像對比,並保留原始影像亮度分布細節,讓影像之亮度分布過於極端的影像經過處理後能夠得到更好的補償;本實施方式進而發展成多刻度的適應性反雙曲線正切函數,並加入區域的適應性偏差函數bias (x )和區域的適應性增益函數gain (x ),使其能讓影像之亮度分布過於極端的影像經過處理後能夠得到更好的補償,並提升影像品質。具體而言,本實施方式係以步驟270所示之多刻度適應性反雙曲線正切函數,取代前述第4圖之步驟240。On the other hand, please refer to FIG. 11 which is a flow chart of the steps of another embodiment of the present disclosure. In Fig. 11, in order to achieve a visual response curve conforming to human brightness and effectively improve image contrast, and preserve the details of the original image brightness distribution, the image with excessive brightness distribution of the image can be better compensated after processing; The method then develops into a multi-scale adaptive anti-hyperbolic tangent function, and adds the region's adaptive deviation function bias ( x ) and the region's adaptive gain function gain ( x ), which makes the brightness distribution of the image too extreme. The image is processed to get better compensation and improve image quality. Specifically, the present embodiment replaces the step 240 of the fourth FIG. 4 with the multi-scale adaptive inverse hyperbolic tangent function shown in step 270.

請復參考第12A-D圖,第12A-D圖是第11圖之步驟270的詳細步驟流程圖。第12A-D圖中,本實施方式以前述第4圖之技術為藍本,復增加多刻度的處理技巧,以作為強化函數。我們提出的強化函數是一個多刻度適應性調整反雙曲線正切函數來決定每個像素的強度(radiance),在讀取影像檔案後,便計算出各別適應性偏差bias 和適應性增益gain 以做為多刻度參數值,並利用這些參數控制適應性反雙曲線的形狀。多刻度參數是由原始亮度資料經分頻段後,再各別針對所分頻段亮度資料計算其適應性偏差bias 和適應性增益gain 參數值。以第12A圖為例,其係為二刻度影像強化技術;首先從輸入影像中取得原始亮度資料,將原始亮度資料分割為高頻段(H Band)與低頻段(L Band)兩個頻段亮度資料。復各別針對兩個頻段亮度資料計算其適應性偏差bias 和適應性增益gain 參數值,以產生二刻度參數,亦即第一區適應性偏差參數(bias )與適應性增益參數(gain )(圖中所示之Level 1 parameters)與第二區適應性偏差參數(bias )與適應性增益參數(gain )(圖中所示之Level 2 parameters)。進而定義出各自的適應性反雙曲線函數,以執行對比度調整。最後,再將調整後的適應性亮度資料與原始彩度資料整合,來產生輸出影像。第12B圖是四刻度影像強化技術,其原始亮度資料依光譜分布,被切割為高高頻段(HH Band)、高低頻段(HL Band)、低高頻段(LH Band)與低低頻段(LL Band)共四個頻段亮度資料。同理,第12C圖是八刻度影像強化技術,其運作方式類同如上所述。依此類推,可擴充至任意的N 刻度。Please refer to FIG. 12A-D, and FIG. 12A-D is a detailed step flow chart of step 270 of FIG. In the 12A-D diagram, the present embodiment is based on the technique of the above-mentioned FIG. 4, and the processing technique of multi-scale is added as a reinforcement function. The proposed enhancement function is a multi-scale adaptive adjustment anti-hyperbolic tangent function to determine the radiance of each pixel. After reading the image file, we calculate the individual adaptive bias bias and the adaptive gain gain. Use as multi-scale parameter values and use these parameters to control the shape of the adaptive anti-hyperbolic curve. The multi-scale parameter is calculated from the original luminance data by the frequency band, and then the adaptive deviation bias and the adaptive gain gain parameter value are calculated for the luminance data of the divided frequency bands. Taking Figure 12A as an example, it is a two-scale image enhancement technique; firstly, the original luminance data is obtained from the input image, and the original luminance data is divided into two bands of high frequency band (H Band) and low band (L Band). . The adaptive deviation bias and the adaptive gain gain parameter values are calculated for the luminance data of the two frequency bands to generate a two-scale parameter, that is, a first-region adaptive deviation parameter ( bias ) and an adaptive gain parameter ( gain ) ( The Level 1 parameters shown in the figure are related to the second zone adaptive bias parameter ( bias ) and the adaptive gain parameter ( gain ) (Level 2 parameters shown in the figure). Further, respective adaptive inverse hyperbolic functions are defined to perform contrast adjustment. Finally, the adjusted adaptive brightness data is integrated with the original chroma data to generate an output image. Figure 12B is a four-scale image enhancement technique. The original luminance data is cut into high-height (HH Band), high-low (HL Band), low-high (LH Band) and low-low (LL Band) bands. A total of four bands of brightness data. Similarly, Figure 12C is an eight-scale image enhancement technique that operates in the same manner as described above. And so on, can be expanded to any N scale.

值得注意的是,以第12D圖所繪示之N 刻度影像強化技術為例;多刻度參數的方法有兩個重要的設計目的:1.避免雜訊的能見度,特別是在平滑區域,以及2.防止最大和最小的可能亮度值飽和(例如:每通道源格式為1個位元組其數值範圍為0至255)。多刻度增強方法的影像輸出結果是對輸入影像x 做處理,其描述如下:It is worth noting that the N- scale image enhancement technique depicted in Figure 12D is taken as an example; the multi-scale parameter method has two important design goals: 1. Avoiding the visibility of noise, especially in smooth areas, and 2 Prevent maximum and minimum possible luminance values from saturating (for example: 1 channel for each channel source format with values ranging from 0 to 255). The image output result of the multi-scale enhancement method is to process the input image x , which is described as follows:

其中k 是所分的頻段(band)數,x k 為分頻段(band)後每個子頻段(sub_band)的亮度資料。Where k is the number of bands to be divided, and x k is the luminance data of each sub-band (sub_band) after the band.

上述多刻度的技術是用來分離高亮度和低亮度的層次。它可以自動調整影像的高亮度和低亮度層次之局部增益。另一個特點是可以解決廣泛使用的伽瑪函數曲線所無法處理的影像類型(如背光影像)。這個轉換函數對於較高的亮度範圍具有較高的抑制率,對於低亮度區域具有較高延展率。因此,其不僅可以使用於低動態範圍影像,也適用於高動態範圍影像。The above multi-scale technique is used to separate high brightness and low brightness levels. It automatically adjusts the local brightness of the image's high brightness and low brightness levels. Another feature is the ability to solve image types (such as backlit images) that cannot be processed by widely used gamma function curves. This conversion function has a higher rejection rate for higher luminance ranges and a higher elongation for low luminance regions. Therefore, it can be used not only for low dynamic range images, but also for high dynamic range images.

綜上所述,本揭示內容之適應性反雙曲線影像處理方法主要有兩個特性:(1)提出一個多刻度(multi scale)處理方法,來實現區域性(local)的對比增強;(2)提出一個能處理極端影像的方法,並增強或保留原始影像的細節。綜合以上兩種特性,並從實驗結果中我們可以證實在影像對比增強技術中加入新的多刻度影像對比增強能改善及補強伽瑪函數與適應性反雙曲線正切函數影像對比增強的不足,以符合人類對亮度的視覺反應曲線。In summary, the adaptive anti-hyperbolic image processing method of the present disclosure has two main characteristics: (1) propose a multi-scale processing method to achieve regional contrast enhancement; (2) ) Propose a method that can handle extreme images and enhance or preserve the details of the original image. Combining the above two characteristics, and from the experimental results, we can confirm that the new multi-scale image contrast enhancement can improve the contrast enhancement of the image contrast enhancement technology and the contrast enhancement of the adaptive gamma function and the adaptive anti-hyperbolic tangent function image. It conforms to the human visual response curve of brightness.

另一方面,本揭示內容於一實施方式提出一種適應性反雙曲線影像處理系統,包括一輸入單元、一影像處理單元及一輸出單元。輸入單元係用以取得一影像;影像處理單元係用以接收影像,進而執行前述之適應性反雙曲線影像處理方法;輸出單元則係用以輸出處理後的輸出影像。In another aspect, the present disclosure provides an adaptive anti-hyperbolic image processing system including an input unit, an image processing unit, and an output unit. The input unit is configured to acquire an image; the image processing unit is configured to receive the image, and then perform the adaptive inverse hyperbolic image processing method; and the output unit is configured to output the processed output image.

其中,原始影像的對比類型是使用新的判斷準則來決定,其轉換參數是根據不同的對比類型來做適應性的調整,因此參數的縮放空間就相當廣。本實施方式不僅維持原有亮度的直方圖統計之分布形狀特徵與凸顯影像細節,且能有效地提升影像的對比品質。換句話說,本實施方式可以針對不同之亮度分布,採用不同的對應曲線進行對比度調整,以適切人眼之感受,而達到所述之適應性。Among them, the contrast type of the original image is determined by using new judgment criteria, and the conversion parameters are adaptively adjusted according to different contrast types, so the zoom space of the parameters is quite wide. The embodiment not only maintains the distribution shape feature of the histogram statistics of the original brightness and highlights the image details, but also effectively improves the contrast quality of the image. In other words, the present embodiment can adjust the contrast by using different corresponding curves for different brightness distributions, so as to adapt to the feelings of the human eye, and achieve the adaptability.

最後,請參考附圖一與附圖二,其分別是在黎明及夜晚時,光線充足與不充足條件下所拍攝之影像,經由習知之直方圖等化處理方法及上述諸實施方式之影像處理方法進行對比度處理後之比較例。附圖一與附圖二中的(A)圖為原始取得之影像。(B)圖則為經傳統直方圖等化處理後的影像,兩者顯有失真,而無法單純由其明視度直覺判斷其拍攝時間;易言之,傳統方法在亮度對比上嚴重失真。(C)圖是經前述第4圖之影像處理方法,以適應性反雙曲線作為對比度調整曲線,修正後之影像;其顯較(B)圖更貼近(A)圖之明亮度,但仍不失其細節表現上的清晰度。(D)圖則為經前述第11圖之影像處理方法,以多刻度的適應性反雙曲線作為對比度調整曲線,修正後之影像;其影像對比度與細節處理更較(C)圖為優,但因經多刻度處理程序,將影像之亮度資料依光譜分群處理,所以較佔用硬體資源。Finally, please refer to FIG. 1 and FIG. 2, which are images taken under light and insufficient conditions at dawn and night, respectively, through the conventional histogram equalization processing method and the image processing of the above embodiments. The comparative example after the contrast treatment was performed. Figure 1 and Figure 2(A) show the original image. (B) The plan is the image processed by the traditional histogram equalization. The two are distorted, and the filming time cannot be judged intuitively by its intuition. In other words, the traditional method is seriously distorted in brightness contrast. (C) is the image processing method according to the above fourth figure, using the adaptive anti-hyperbolic curve as the contrast adjustment curve, and the corrected image; the comparison (B) is closer to the brightness of the (A) picture, but still Without losing the clarity of its detailed performance. (D) The plan is the image processing method according to the above 11th image, and the multi-scale adaptive anti-hyperbolic curve is used as the contrast adjustment curve, and the corrected image; the image contrast and the detail processing are better than the (C) picture. However, due to the multi-scale processing procedure, the brightness data of the image is processed according to the spectrum, so the hardware resources are occupied.

雖然本發明已以實施方式揭露如上,然其並非用以限定本發明,任何在本發明所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。The present invention has been disclosed in the above embodiments, and is not intended to limit the present invention. Any one of ordinary skill in the art to which the present invention pertains may make various changes and modifications without departing from the spirit and scope of the invention. The scope of protection of the present invention is therefore defined by the scope of the appended claims.

101-104...步驟101-104. . . step

210-270...步驟210-270. . . step

為讓本發明之上述和其他目的、特徵、優點與實施例能更明顯易懂,所附圖式之說明如下:The above and other objects, features, advantages and embodiments of the present invention will become more apparent and understood.

第1圖是各種類型的輸入影像之亮度光譜。Figure 1 is a luminance spectrum of various types of input images.

第2圖是對應第1圖之各種類型的輸入影像之人眼最佳適應對比度調整曲線。Figure 2 is a plot of the best fit contrast adjustment for the human eye corresponding to the various types of input images of Figure 1.

第3圖是本揭示內容一實施方式之步驟流程圖。Figure 3 is a flow chart showing the steps of an embodiment of the present disclosure.

第4圖是本揭示內容另一實施方式之步驟流程圖。Figure 4 is a flow chart showing the steps of another embodiment of the present disclosure.

第5圖是第4圖之步驟204的詳細步驟流程圖。Figure 5 is a flow chart showing the detailed steps of step 204 of Figure 4.

第6圖是適應性反雙曲線正切函數所能對應的各種類型影像之處理曲線圖。Figure 6 is a graph of the processing of various types of images that the adaptive anti-hyperbolic tangent function can correspond to.

第7圖是適應性反雙曲線正切函數的位移曲線圖。Figure 7 is a displacement plot of the adaptive inverse hyperbolic tangent function.

第8圖是調整適應性反雙曲線正切函數的參數值所對應之曲線圖。Figure 8 is a graph corresponding to the parameter values of the adaptive anti-hyperbolic tangent function.

第9圖是伽瑪函數與適應性反雙曲線正切函數對應曲線之比較圖。Figure 9 is a comparison of the corresponding curves of the gamma function and the adaptive inverse hyperbolic tangent function.

第10圖是適應性偏差bias 參數固定於各值,適應性增益gain 參數變化下,各種狀態曲線的模擬圖。Fig. 10 is a simulation diagram of various state curves under which the adaptive deviation bias parameter is fixed to each value and the adaptive gain gain parameter is changed.

第11圖是本揭示內容另一實施方式之步驟流程圖。Figure 11 is a flow chart showing the steps of another embodiment of the present disclosure.

第12A-D圖是第11圖之步驟270的詳細步驟流程圖。Figure 12A-D is a detailed flow chart of step 270 of Figure 11.

101-104...步驟101-104. . . step

Claims (6)

一種適應性反雙曲線影像處理方法,包括:步驟a:從一輸入影像中取出一原始亮度資料;步驟b:根據該原始亮度資料之平均值與標準差,設定一適應性反雙曲線函數;步驟c:利用該適應性反雙曲線函數修正該原始亮度資料,以產生一適應性亮度資料;以及步驟d:利用該適應性亮度資料修正該輸入影像,以產生一輸出影像;其中步驟b係將該原始亮度資料分割為複數個頻段亮度資料,再藉由各別頻段亮度資料之平均值與標準差產生多刻度參數,以相應設定複數個適應性反雙曲線函數來逐一對應該複數個頻段亮度資料。 An adaptive anti-hyperbolic image processing method, comprising: step a: taking an original luminance data from an input image; and step b: setting an adaptive inverse hyperbolic function according to an average value and a standard deviation of the original luminance data; Step c: correcting the original luminance data by using the adaptive inverse hyperbolic function to generate an adaptive luminance data; and step d: modifying the input image by using the adaptive luminance data to generate an output image; wherein step b is The original luminance data is divided into a plurality of frequency band luminance data, and multi-scale parameters are generated by the average value and the standard deviation of the luminance data of the respective frequency bands, and a plurality of adaptive anti-hyperbolic functions are correspondingly set to one by one. Brightness data. 如請求項1所述之適應性反雙曲線影像處理方法,其中步驟a係將該輸入影像之三原色資料格式(RGB)轉換為色度、飽和度、亮度資料格式。 The adaptive anti-hyperbolic image processing method according to claim 1, wherein the step a converts the three primary color data formats (RGB) of the input image into a chroma, saturation, and luminance data format. 如請求項2所述之適應性反雙曲線影像處理方法,其中步驟d係以該適應性亮度資料取代該原始亮度資料。 The adaptive inverse hyperbolic image processing method of claim 2, wherein the step d replaces the original luminance data with the adaptive luminance data. 如請求項1所述之適應性反雙曲線影像處理方法,其中步驟b係根據每一該些頻段亮度資料之平均值計算一適應性偏差參數,且根據每一該些頻段亮度資料之標準差 計算一適應性增益參數,再利用該適應性偏差參數及該適應性增益參數設定該適應性反雙曲線函數,以對應該頻段亮度資料。 The adaptive anti-hyperbolic image processing method according to claim 1, wherein the step b is to calculate an adaptive deviation parameter according to an average value of the brightness data of each of the frequency bands, and according to the standard deviation of the brightness data of each of the frequency bands. Calculating an adaptive gain parameter, and then using the adaptive deviation parameter and the adaptive gain parameter to set the adaptive inverse hyperbolic function to correspond to the band luminance data. 如請求項1所述之適應性反雙曲線影像處理方法,其中步驟b係根據該原始亮度資料之平均值計算一適應性偏差參數,且根據該原始亮度資料之標準差計算一適應性增益參數,再利用該適應性偏差參數及該適應性增益參數設定該適應性反雙曲線函數。 The adaptive anti-hyperbolic image processing method according to claim 1, wherein the step b calculates an adaptive deviation parameter according to an average value of the original brightness data, and calculates an adaptive gain parameter according to the standard deviation of the original brightness data. And using the adaptive deviation parameter and the adaptive gain parameter to set the adaptive inverse hyperbolic function. 一種適應性反雙曲線影像處理系統,包括:一輸入單元,係用以取得一影像;一影像處理單元,係用以接收該影像,進而執行如請求項1、2、3或5所述之適應性反雙曲線影像處理方法;以及一輸出單元,係用以輸出該輸出影像。 An adaptive anti-hyperbolic image processing system includes: an input unit for acquiring an image; and an image processing unit for receiving the image, thereby performing the method as claimed in claim 1, 2, 3 or 5. An adaptive anti-hyperbolic image processing method; and an output unit for outputting the output image.
TW99141070A 2010-11-26 2010-11-26 Image processing method and system by using adaptive inverse hyperbolic curve TWI438718B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW99141070A TWI438718B (en) 2010-11-26 2010-11-26 Image processing method and system by using adaptive inverse hyperbolic curve

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW99141070A TWI438718B (en) 2010-11-26 2010-11-26 Image processing method and system by using adaptive inverse hyperbolic curve

Publications (2)

Publication Number Publication Date
TW201222471A TW201222471A (en) 2012-06-01
TWI438718B true TWI438718B (en) 2014-05-21

Family

ID=46725262

Family Applications (1)

Application Number Title Priority Date Filing Date
TW99141070A TWI438718B (en) 2010-11-26 2010-11-26 Image processing method and system by using adaptive inverse hyperbolic curve

Country Status (1)

Country Link
TW (1) TWI438718B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI519151B (en) * 2012-08-30 2016-01-21 義晶科技股份有限公司 Image processing method and image processing apparatus
TW201503057A (en) * 2013-07-08 2015-01-16 Lei Wang Method and device for enhancing partial image contrast of histogram
US10628929B2 (en) 2018-05-28 2020-04-21 Augentix Inc. Method and computer system of image enhancement

Also Published As

Publication number Publication date
TW201222471A (en) 2012-06-01

Similar Documents

Publication Publication Date Title
CN106973240B (en) Digital camera imaging method for realizing high-definition display of high-dynamic-range image
RU2647636C2 (en) Video display control with extended dynamic range
CN106663313B (en) Improvements in and relating to the display of images
CN107154059B (en) High dynamic range video processing method
US8224086B2 (en) Methods and apparatuses for restoring color and enhancing electronic images
US10021313B1 (en) Image adjustment techniques for multiple-frame images
KR100782845B1 (en) A digital image enhancement method and system using non-log domain illumination correction
CN109274985B (en) Video transcoding method and device, computer equipment and storage medium
US9087385B2 (en) Method for improving images captured underwater
CN105744118B (en) A kind of video enhancement method and video enhancement systems based on video frame adaptive
GB2549696A (en) Image processing method and apparatus, integrated circuitry and recording medium
US20130039577A1 (en) Method for improving image quality
WO2016017081A1 (en) Image correction device and video content reproduction device
Yu et al. Adaptive inverse hyperbolic tangent algorithm for dynamic contrast adjustment in displaying scenes
TWI438718B (en) Image processing method and system by using adaptive inverse hyperbolic curve
CN104599241B (en) The colour consistency method that full automatic high efficiency calculates
CN112419195A (en) Image enhancement method based on nonlinear transformation
WO2023000868A1 (en) Image processing method and apparatus, device, and storage medium
Hsu et al. A novel automatic white balance method for color constancy under different color temperatures
JP2012028937A (en) Video signal correction apparatus and video signal correction program
WO2020140241A1 (en) Adaptive adjustment method based on ambient light distribution field
CN117082222B (en) Image and video optimization toning method for rebroadcasting vehicle
TWI463879B (en) Modulated image processing method and system thereof
CN116167950B (en) Image processing method, device, electronic equipment and storage medium
CN113850743B (en) Video global tone mapping method based on self-adaptive parameters

Legal Events

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