WO2007147363A1 - A method and an apparatus for correcting the gamma characteristic of the video communication - Google Patents

A method and an apparatus for correcting the gamma characteristic of the video communication Download PDF

Info

Publication number
WO2007147363A1
WO2007147363A1 PCT/CN2007/070121 CN2007070121W WO2007147363A1 WO 2007147363 A1 WO2007147363 A1 WO 2007147363A1 CN 2007070121 W CN2007070121 W CN 2007070121W WO 2007147363 A1 WO2007147363 A1 WO 2007147363A1
Authority
WO
WIPO (PCT)
Prior art keywords
gamma
function
luminance signal
luminance
gamma characteristic
Prior art date
Application number
PCT/CN2007/070121
Other languages
French (fr)
Chinese (zh)
Inventor
Zhong Luo
Original Assignee
Huawei Technologies Co., Ltd.
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 Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Publication of WO2007147363A1 publication Critical patent/WO2007147363A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/20Circuitry for controlling amplitude response
    • H04N5/202Gamma control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/82Camera processing pipelines; Components thereof for controlling camera response irrespective of the scene brightness, e.g. gamma correction

Definitions

  • the present invention relates to the field of video communication technologies, and in particular, to a method and apparatus for correcting gamma characteristics of video communication. Background of the invention
  • the process of video communication is: optical signals that need to be transmitted, such as people, backgrounds, files, etc., enter the video communication terminal (hereinafter referred to as the terminal) such as a camera/camera, etc., are converted into digital image signals by A/D, and then pressed. The code is reduced, transmitted, and reaches the other terminal. Then, it is decompressed and decoded to be restored to a digital image signal, and then displayed on the display device, and finally becomes an optical signal that is perceived by the human eye.
  • the image brightness signal has gone through multiple steps.
  • the Gamma property is a link where the input-output relationship of the image luminance signal is not linear, but a nonlinear relationship.
  • the image luminance signal (Luminance) here is a generalized luminance signal, that is, the initial optical signal, the electrical signal, and then the digitized image luminance/gray signal, and the signal of each phase contains the information of the image luminance signal. Therefore, in a broad sense, the image brightness signal passes through multiple links.
  • the numbers indicated in each of the blocks in Fig. 2 are luminance values, and the gray scale of the squares indicates the brightness of the luminance signal.
  • the brightness of the upper row of gray squares is linearly increasing, that is, increasing from 0.1 to 1.0, and the brightness of the next row of gray squares is incremented according to the power function, that is, the next line of gray
  • the brightness of the square is affected by the distortion of the Gamma nonlinearity.
  • the Gamma characteristic shown by the curve is given in Figure 2 (b).
  • the total Gamma property is equal to the composition of the Gamma function of each link.
  • G CT ⁇ .) G (1) (.) oG (2) (.) oG (3) (.) . ⁇ .. ⁇ Q oG ⁇ Q (j)
  • CT indicates cascaded total, which means the total gamma of the cascade.
  • Gamma nonlinearity is caused by different causes.
  • the Gamma characteristics of display devices such as CRT monitors are ideally:
  • the Gamma problem originated from the CRT display because its Gamma value is 2.2. To compensate for this nonlinearity, a Gamma value of 0.45 was introduced into the camera.
  • the form of the Gamma property is a Power Function. It should be noted that the input and output luminance signals here are normalized in their respective coordinate spaces, that is, 0 ⁇ L. ut ⁇ l, 0 ⁇ L in ⁇ l. While other types of displays such as liquid crystals, the form of the Gamma function may be different, or although it is also a power function in form, the parameters are different.
  • Gg(.) and Gc(.) are inverse functions of each other.
  • the inverse function is not necessarily solved, and even if there is an inverse function, it cannot be obtained by calculation.
  • the above-described Gamma correction method is implemented with the premise that the Gamma characteristic parameter can be determined for a given Gamma link or a cascade of a given Gamma link.
  • the Gamma characteristic parameter here is the parameter of the Gamma characteristic function curve.
  • the correction needs to involve more than two communication terminals.
  • the video of terminal A is transmitted to terminal B, and the correction of the video involves both the Gamma link on terminal A and the Gamma link on terminal B.
  • the Gamma characteristic parameters need to be determined during the gamma correction process.
  • Method 1 Instrument measurement method. The input luminance signal and the output luminance signal are measured, that is, some points on the Gamma characteristic function curve are measured by a special instrument, and then the data fitting method is used to perform curve fitting to determine the Gamma characteristic parameter.
  • the current implementation method for determining the Gamma characteristic parameter has a precondition, that is, the specific value of the input luminance signal and the output luminance signal of the Gamma link that needs to be determined by the Gamma characteristic parameter is clearly known. It is to know all the knowledge of the input luminance signal and the output luminance signal of the Gamma link, that is, the input luminance signal and the output luminance signal can be obtained. Therefore, the above two methods for determining the Gamma characteristic parameters are non-blind measurement methods.
  • the Gamma characteristic parameter measurement system uses the knowledge of the input luminance signal of the Gamma link and the full knowledge of the output luminance signal to measure the Gamma characteristic parameter.
  • the Gamma link can be a single Gamma link or a cascaded Gamma link.
  • Application scenario 1 For streaming media services and applications such as IPTV (Internet Protocol Television), since the program production process has been affected by the Gamma characteristics of the video input device, when the program is broadcast, especially on-demand, etc., It is not possible to obtain the Gamma characteristic of the video input device used to acquire the video signal during the original program production, and it is also impossible to measure the Gamma characteristic parameter of the video input device.
  • IPTV Internet Protocol Television
  • Application Scenario 2 The above problems also exist for applications such as data conferencing.
  • applications such as data conferencing.
  • the development of video conferencing and the development of data conferencing are synchronized, and the perfect combination of the two has great significance for collaborative applications.
  • the above-mentioned collaborative application business has strong market demand.
  • data conferencing applications the source of many multimedia materials such as pictures is untestable, it is difficult to obtain the Gamma characteristics of the video input device that generated the data at the time, and it is also impossible to perform the Gamma characteristic parameters of the video input device. Measured. '
  • the current non-blind measurement method for determining the Gamma characteristic parameter makes the Gamma correction difficult to apply, and the method of special instrument measurement improves the implementation cost of the video communication service.
  • Embodiments of the present invention provide a method and apparatus for correcting gamma characteristics of video communication, which reduces the cost of video communication and improves the ease of use of Gamma correction.
  • Embodiments of the present invention provide a method for correcting gamma characteristics of a video communication, including:
  • the mathematical relationship between the luminance density probability density function of the input and output luminance signals and the Gamma characteristic function is converted into: at the extreme point, the luminance signal is output a mathematical relationship between a luminance distribution probability density function and a Gamma characteristic function;
  • Gamma correction is performed on the gamma link according to the gamma characteristic parameter.
  • Obtaining a histogram module a luminance histogram for obtaining an output luminance signal, and outputting to the first conversion module;
  • a first conversion module configured to convert a luminance histogram of the received output luminance signal into an output luminance signal luminance distribution probability density function, and output to the extreme point calculation module and the second conversion module;
  • An extreme point calculation module configured to calculate respective extreme points of the brightness distribution probability density function of the received output luminance signal, and output to the second conversion module;
  • the storage module a mathematical relationship between an extreme point of the probability density function of the luminance distribution of the output luminance signal and an extreme point of the luminance density distribution probability density function of the input luminance signal, and a probability density of the luminance distribution of each of the input and output luminance signals
  • the mathematical relationship between the function and the gamma property function
  • the second conversion module is configured to: according to the extreme point received, the luminance signal distribution probability density function of the output luminance signal, and the mathematical relationship of the extreme points stored in the storage module, the respective brightness of the input and output luminance signals stored in the storage module
  • the mathematical relationship between the distributed probability density function and the gamma characteristic function is converted to: at the extreme point, the mathematical relationship between the luminance density distribution probability density function of the luminance signal and the Gamma characteristic function is output;
  • the Gamma characteristic parameter solving module is configured to solve and calculate the converted mathematical relationship to determine a gamma characteristic parameter; and the gamma correction module is configured to perform gamma correction on the gamma link according to the gamma characteristic parameter.
  • the gamma correction method provided by the embodiment of the present invention only needs to output a histogram of the luminance signal, and thus the gamma parameter determination method of the embodiment of the present invention may be referred to as a full blind measurement method.
  • the method does not require any knowledge of the input of the luminance signal. Therefore, the gamma correction method of the embodiment of the present invention has high application feasibility; thereby improving the gamma correction ease of use and broadening the gamma correction by the technical solution provided by the embodiment of the present invention.
  • the scope of application has improved the user experience and service quality.
  • Figure 1 is a schematic diagram of a model of the link Gamma characteristics
  • Figure 2 (a) is a schematic diagram of the Gamma characteristic
  • Figure 2 (b) is a schematic diagram 2 of the Gamma characteristic
  • Figure 3 is a schematic diagram of a model of gamma cascading with multiple links:
  • Figure 4 is a schematic diagram of the gamma correction principle for a Gamma link;
  • Figure 5 is a schematic diagram of the Gamma correction principle for a plurality of Gamma links
  • FIG. 6 is a schematic diagram of an implementation principle of a non-blind measurement method in the prior art
  • FIG. 7 is a schematic diagram showing an implementation principle of a method for determining a full-blind Gamma characteristic parameter according to an embodiment of the present invention.
  • Figure 8 is a diagram showing an example of a luminance histogram of a video signal
  • FIG. 9 is a schematic diagram showing a relationship between an input luminance signal and an output luminance signal luminance distribution probability density function according to an embodiment of the present invention.
  • FIG. 10 (a) is a frame input image in the prior art;
  • Figure 10 (b) is a frame output image in the prior art
  • Figure 10 (c) is a schematic diagram showing the correspondence between the extreme values of the luminance density distribution probability density function of the input luminance signal and the output luminance signal in the prior art;
  • FIG. 11 is a schematic diagram showing a probability density function of luminance distribution of an output luminance signal obtained by interpolation and data fitting according to an embodiment of the present invention
  • FIG. 12 is a schematic diagram showing the principle of a brute force search method according to an embodiment of the present invention.
  • Figure 13 is a schematic diagram of the initial hypercube and its peripheral multilayer hypercube in a two-dimensional case according to an embodiment of the present invention
  • Figure 14 is a schematic diagram of a brute force search method according to an embodiment of the present invention. Mode for carrying out the invention
  • Embodiments of the present invention may utilize only knowledge of the output luminance signal to determine Gamma characteristic parameters and perform Gamma correction. Since any knowledge of the input luminance signal is not utilized in the technical solution of the embodiment of the present invention, the method for determining the Gamma characteristic parameter in the technical solution of the embodiment of the present invention may be referred to as a full blind Gamma characteristic parameter determining method.
  • the embodiment of the present invention determines the Gamma characteristic parameter of the link based on the knowledge of the known output luminance signal.
  • all knowledge of the output luminance signal is known, but the embodiment of the present invention does not necessarily utilize the entire knowledge of the output luminance signal.
  • the entire knowledge of the output luminance signal is known as the output luminance signal.
  • the Gamma loop can be Gamma corrected according to the Gamma characteristic parameters.
  • the link that needs to determine the Gamma characteristic can be a single given Gamma link, or a cascade combination of multiple given Gamma links.
  • the embodiment of the present invention needs to obtain a luminance histogram of the output luminance signal, and the luminance histogram is as shown in FIG. 8.
  • the brightness of the set image is 0 to 255 levels, and the different brightness levels correspond to a brightness distribution probability.
  • a histogram is a technical term in the field of image processing technology.
  • a histogram can be a discrete form of distributed probability density function.
  • the video signal is composed of a continuous image of one frame and one frame, and the histogram of the output luminance signal can be obtained from a certain frame image.
  • the method of obtaining a histogram of a luminance signal from an image is a conventional technique and will not be described in detail herein.
  • the histogram of the output luminance signal can also be performed in other stages, such as obtaining a histogram of the output luminance signal when the output luminance signal is also a one-dimensional signal, and at this time, the output luminance signal is not converted into an image.
  • the luminance histogram can be directly obtained from the continuous distribution probability density function; conversely, the continuous distribution probability density function can also be obtained from the luminance histogram by means of data interpolation or fitting.
  • the histogram information can be obtained from the continuous distribution probability density function.
  • the overall set of luminance signals is
  • the entire set of luminance signals is a set of non-negative time signals whose overall signal amplitude is less than or equal to one.
  • the luminance signal here is a luminance signal in a general sense, so the following description of the relationship between the histogram information and the continuous distribution probability density function is applicable to both the input luminance signal and the output luminance signal. For the sake of simplicity of description, the relationship between the histogram information and the continuous distribution probability density function will be described below by taking the output luminance signal as an example.
  • these output luminance signals can be viewed as a random process.
  • the statistical characteristics of these output luminance signals may vary, but the output signals can be classified according to the statistical characteristics of the signals, especially according to the distribution probability characteristics.
  • Any signal as a stochastic process has a distribution probability density function corresponding to it. If the stochastic process is stationary (where the stationary is strictly in the sense of stability), then the distribution probability density function is independent of time; if the stochastic process is not stationary Then, this distribution probability density function may be related to time. Therefore, in general, for a stochastic process s(t) (tER, 0 ⁇ s(t) ⁇ 1 ), f s (x, t), te R can be used to represent its distribution probability density function.
  • n in equation (4) means English normalized, meaning normalization.
  • the distribution probability density function has the following properties:
  • the [0, 1] interval can be equally divided into N subintervals, each of which has a length of 1/N.
  • the normalized signal is restored to the unregulated signal space.
  • the luminance signal usually takes an integer of 0-255, and a total of 256 levels of brightness.
  • the luminance signal can also be generalized to 2 D -level brightness. In this case, it is necessary to linearly map the unit interval [0, 1] into a set ⁇ 0, 1, 2, 3, 2° -2, 2° -1 ⁇ , and each sub-interval is expanded by 2 D times. (1/N) 2 D . Then the corresponding probability sequence becomes a continuous probability density function -
  • the histogram can be directly obtained from the continuous distribution probability density function of the luminance signal.
  • the continuous distribution probability density function of the luminance signal can also be processed by data interpolation, fitting, etc. of the histogram. After getting it.
  • the gamma characteristic function may be selected from one of two gamma characteristic functions provided by the following embodiments.
  • the gamma characteristic function can also be other forms of function, as long as the gamma characteristic function satisfies continuous smoothness and at least second order is achievable.
  • the Gamma property function [ ⁇ , ⁇ , ..., is a parameter vector.
  • the parameter vector consists of ⁇ parameters. All or part of these parameters need to be determined. Therefore, according to this very general form, the Gamma property function only needs to satisfy the condition that the function is continuous, and, in general, the Gamma property function is smooth and steerable, at least segmentally smooth and steerable, therefore, assuming Gamma It is reasonable for the characteristic function to exist for the first and second derivatives of the variable X.
  • the first derivative of the Gamma property function can be represented by the following symbol: dx ( 15)
  • equation (20) is independent of time variable t.
  • the Gamma property function itself is independent of the time variable. Therefore, a set of gamma characteristic parameters are measured over a period of time, and the gamma characteristic parameters can be used throughout the communication during the period of time, such as in IPTV, a program.
  • the Gamma characteristic parameters can be considered to be the same, so that the Gamma characteristic parameters can be measured at the beginning of each program, and the Gamma characteristic parameters can be used throughout the implementation of the program.
  • (a) is a frame of the input video signal
  • (b) is a frame of the output video signal corresponding to (a)
  • the two curves in (c) are the brightness of the input luminance signal.
  • Distribution probability density function and output luminance signal luminance distribution probability density function are the two curves in (c) as the brightness of the input luminance signal.
  • the input luminance signal brightness distribution probability density function and the output luminance signal luminance distribution probability density function have J extreme points, respectively e, e 2 , ...., and n, r 2 Rj.
  • the extreme point of the luminance density distribution probability density function of the input luminance signal and the extreme value point of the luminance density distribution probability density function of the output luminance signal have the following two relationships: relationship 1, qualitative geometric topological relationship, ie two There is a one-to-one correspondence between the extreme points of the luminance density probability density function, that is, the number of extreme points of the two luminance distribution probability density functions is the same. Relationship 2, quantitative mathematical relationship: rk gp ⁇ p - Q ⁇ ; ⁇ ; ⁇ ...,; ⁇ ] . Of course, the mathematical relationship here allows A little change.
  • ⁇ ⁇ dc ⁇ - 1 + (d- l)c d , r d - 2 +(d- 2)c d . 2 r d - 3 +whi + c, .
  • the Gamma property function is monotonic, so the Gamma property function has an inverse function.
  • This inverse function can be written as g_ '( ⁇ ; ⁇ ).
  • the inverse of the Gamma property function is also dependent on the gamma parameter vector p.
  • Equation (26) does not contain any information about the input signal. Equation (26) is completely dependent on the output luminance signal brightness distribution probability density function and the output luminance signal luminance distribution probability density function. Value point. Thus, embodiments of the present invention are capable of determining Gamma characteristic parameters based solely on the output signal and its luminance distribution probability density function.
  • the histogram of the output luminance signal obtained by setting the embodiment of the present invention is: .., Nl ⁇ . That is, each histogram contains N items, and in the histogram terminology, each item is called a "bin".
  • the luminance density distribution probability density function of the output luminance signal can be obtained from the output image luminance histogram, and thus:
  • c d , c d-1 , c d-2 , ... c c is d+1 polynomial coefficients, and r is the amplitude of the output luminance signal.
  • This expression is a polynomial including a polynomial spline function.
  • N 256, at which point N is already large enough.
  • interpolation or data fitting techniques There are various implementation methods of interpolation or data fitting techniques, and embodiments of the present invention do not limit the specific implementation of interpolation or data fitting.
  • condition J ⁇ M-1 can be satisfied.
  • J equations are obtained from equation (26), and M-1 equations are arbitrarily selected to form a simultaneous solution of equations.
  • this set of equations is non-linear and transcendental, such as the Gamma property function in the form of a power function. Therefore there is no closed-form solution.
  • a numerical solution method is required. The numerical solution of the system of equations is a conventional technique and will not be described in detail in this embodiment.
  • the problem of determining the parameter vector p is transformed into a mathematical problem of finding the global minimum point of the cost function J(p).
  • the parameter vector p can be determined in the following three ways.
  • Method (3) Brutal Force Search Method.
  • brute force search is to search for all possibilities.
  • the set of all possible values of the parameter is a finite set. Then, by searching each point in the set one by one, the point that minimizes J(p) can be found, and thus the global minimum is found. Point p true . However, this situation is rare. In most cases, the parameters take continuous values. Therefore, the set of all possible values of the parameters is an infinite set, and the exhaustive search cannot be performed.
  • the brute force search method can divide the parameter space into a plurality of small hypercubes, and then take a point in each hypercube as a sample point, such as the geometric center point of the hypercube. Etc. Finally, calculate the function value of the cost function at the sampling point of each hypercube, find the sampling point of the hypercube that minimizes the cost function, and use the sampling point as the global minimum point.
  • a prior knowledge of the parameters can be utilized to find a suitable starting search point, so that Large reductions in the number of searches required, thereby increasing the efficiency of the brute force search method.
  • the set of all possible values of the M-1 parameters constitutes a parameter space (PS), and the parameter space is a subset of the M-1 dimensional European space RM- 1 .
  • the implementation method of the brute force search includes the following steps: Step 1: Hypercube partitioning.
  • the PS is divided into a plurality of M-1 hypercubes, in Fig. 12, ABCDEFGH, 8 points form a hypercube. Since each parameter has a different range of values, each side of the hypercube has a different length.
  • the geometric center of the hypercube is ⁇ 3 ⁇ 4 coordinates -
  • the initial value is generally around 2.2 for the video input device.
  • the Gamma parameter may be positive or negative due to manufacturing technology and product quality. Deviated from 2.2, but in most cases, it is closer to 2.2. In this case, if the search is started with 2.2 as the initial search point, since 2.2 is closer to the true value, the number of attempts to find the real value is less.
  • the search After determining the hypercube in which the initial search point is located, the search starts from the hypercube. Calculating J ( Pint ) according to the formula (30), if J (Piêt t ) can make the formula (36 ), or the searched hypercube satisfies a predetermined condition, such as the number of searched hypercubes reaches a predetermined value, etc., then , the entire search process ends, to step 5. At this point, Ptrue
  • the advantage is the parameter vector of the finally obtained Gamma property function.
  • Jthre S h. Ld is a predefined threshold.
  • Step 4. Continue searching.
  • the continuation search in step four can be done hierarchically.
  • the hypercube surrounding the outside of the initial hypercube can be one or more layers.
  • the middle gray square is the initial hypercube
  • the cube adjacent to the edge of the initial hypercube is the first layer hypercube
  • the cube adjacent to the edge of the first layer hypercube is the second layer hypercube
  • the second The cheap cube on the side of the layer hypercube is the third layer of hypercube.
  • the hierarchical search method of the embodiment of the present invention is: successively searching each of the hypercubes in each layer except the initial hypercube, and in each layer of the search for the hypercube, each of the layers should be traversed in a predetermined order.
  • the predetermined order may be varied, and the embodiment of the present invention does not limit the form of the predetermined order as long as it can traverse the hypercube in one layer.
  • the search process will end regardless of whether or not the geometric center Q of the hypercube that satisfies the condition (37) is found. At this time, the Q in the smallest J (Q) searched should be taken as Ptrue. Go to step five.
  • L is a predetermined threshold value indicating the number of layers that need to be searched at most.
  • Step five the search process ends.
  • the above search method can also be applied to achieve the fastest and best search effect in the process from coarse to fine.
  • the first search is performed in accordance with the above steps 1 through 5.
  • the first search can be seen as a rough search, this In this way, you can set the side length of the hypercube in the parameter space to be larger, so that the number of hypercubes in the parameter space is small.
  • the predetermined condition that the hypercube searched in step 3 satisfies may be whether the division granularity is coarser than the predetermined division granularity.
  • First search If a hypercube that satisfies condition (36) or (37) is found, the search process ends.
  • the first search process can use a hierarchical search method.
  • the second finer search is performed in the corresponding hypercube.
  • the smallest J (Q) corresponding hypercube searched for the first time should be regarded as the new entire parameter space.
  • the length of each hypercube in the new parameter space becomes smaller, and the search process from the first step to the fifth step is repeated.
  • the second search process ends.
  • the second search process can employ a hierarchical search method.
  • the hypercube that satisfies the condition (36) or (37) is not found in the second finer search process, and the granularity of the hypercube has not reached the predetermined granularity, the smallest one found in the second search.
  • the third finer search is performed in the corresponding hypercube of J (Q), and so on, the geometric center of the hypercube that satisfies the condition (36) or (37) found by the last fine search is taken as the global best advantage Pttue, That is, the parameter vector of the Gamma property function.
  • the search process ends. At this point, the collection center of the hypercube corresponding to the smallest J (Q) found should be taken as the global best advantage Ptrue, the parameter vector of the SPGamma property function.
  • a hierarchical search method can be employed in each of the above-described search processes from coarse to fine.
  • the Gamma link can be corrected by Gamma.
  • the link that needs to perform the gamma correction may be a video data source device, an intermediate device in the video communication network, or a video data destination device.
  • the gamma correction method provided by the embodiment of the present invention only needs to know the histogram of the output luminance signal and a set of loose assumptions to determine the gamma characteristic parameter of a given gamma link, thereby
  • the multimedia communication system provides an easy-to-implement gamma correction method.
  • the gamma correction method provided by the embodiment of the present invention has high application feasibility, thereby greatly broadening the application range of gamma correction, especially for IPTV, collaborative data conference, Public video communication using low-end video input devices provides a good gamma correction function, greatly improving user experience and service quality, further enhancing the competitiveness of these services, and bringing huge benefits to telecom operators, service providers and equipment manufacturers. Economic benefits.
  • the apparatus for correcting video communication gamma characteristics mainly includes: acquiring a histogram module, a first conversion module, an extreme point calculation module, a storage module, a second conversion module, a Gamma characteristic parameter solving module, and a gamma correction Module.
  • the acquisition histogram module is mainly used to obtain a luminance histogram of the output luminance signal, and output the obtained luminance histogram to the first conversion module.
  • the acquisition histogram module can obtain a luminance histogram of the output luminance signal before converting the output luminance signal into an output image frame, and can also obtain a luminance histogram of the output luminance signal from the output image frame. Specifically, it is described in the above method.
  • the first conversion module is mainly configured to convert a luminance histogram of the received output luminance signal into a luminance density distribution probability density function of the output luminance signal, and output the luminance signal distribution probability density function of the output luminance signal to the extreme point calculation module and the second conversion respectively.
  • the extreme point calculation module is mainly configured to calculate each extreme point of the brightness distribution probability density function of the output brightness signal after receiving the brightness distribution probability density function of the output brightness signal, and transmit the calculated extreme points to the second conversion Module.
  • the method of calculating the extreme point of the luminance density distribution probability density function of the luminance signal is a conventional technique and will not be described in detail herein.
  • the storage module is mainly used for storing the mathematical relationship between the extreme point of the luminance density distribution probability density function of the output luminance signal and the extreme point of the luminance density distribution probability density function of the input luminance signal, and storing the luminance density probability density of each of the input and output luminance signals.
  • the mathematical relationship between the extreme point of the brightness distribution probability density function of the output luminance signal and the extreme point of the luminance density distribution probability density function of the input luminance signal may be: rk gie ppf; ⁇ / ⁇ , ⁇ ,...,/ ⁇ ] ⁇
  • the mathematical relationship here allows for a slight transformation, as described in the above method.
  • the second conversion module is mainly used for respectively distributing the brightness distribution of the input and output luminance signals in the storage module according to the extreme points received, the luminance density distribution probability density function of the output luminance signal, and the mathematical relationship of the extreme points stored in the storage module.
  • k l , 2, 3 , J
  • J is the number of extreme points of the luminance distribution probability density function
  • r k is the extreme point of the luminance distribution probability function of the output luminance signal
  • the derivative function ⁇ ⁇ is:
  • the Gamma characteristic parameter solving module is mainly used to solve the mathematical relationship after the conversion of the second conversion module to determine the gamma characteristic parameter.
  • the Gamma characteristic parameter solving module can determine the gamma characteristic parameters by directly solving the equation method, the nonlinear function optimization method, and the like.
  • the nonlinear function optimization methods herein include conventional mathematical optimization methods, neural network methods, brute force search, and the like.
  • the Gamma characteristic parameter solving module can adopt a hierarchical search method when using the brute force search method, or a hierarchical search method from coarse to fine, as described in the above method.
  • the gamma correction module is mainly used for gamma correction of the gamma link according to the Gamma characteristic parameter obtained by the Gamma characteristic parameter solving module.
  • the gamma link here includes: a cascading combination of a given Gamma link or multiple given Gamma links.
  • the device provided by the embodiment of the present invention is located in a video device, such as in a video data source device, in an intermediate device of a video communication network, and in a video data destination device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Picture Signal Circuits (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

A method and an apparatus for correcting the gamma characteristic of the video communication are provided, the method comprises: obtaining the luminance histogram of the output signal, converting the luminance histogram of the output luminance signal into the luminance distribution probability density function of the output luminance signal, determining the extremal points of the luminance distribution probability density function of the output luminance signal; building the mathematic relation between the extremal points of the luminance distribution probability density function of the output luminance signal and the extremal points of the luminance distribution probability density function of the input luminance signal; converting the mathematic relation between the luminance distribution probability density functions of the input and the output luminance signal respectively and the Gamma characteristic function into the mathematic relation between the luminance distribution probability density function of the output luminance signal and the Gamma characteristic function on the extremal points by using the mathematic relation on the extremal points; solving the converted mathematic relation to determine the Gamma characteristic parameter and executing the Gamma correction in the Gamma step. The method for determining the entirely blind Gamma characteristic parameter of the embodiment makes the Gamma correction more convenient, and extends the applying field of the Gamma correction.

Description

一种视频通信伽玛特性的校正方法和装置  Method and device for correcting gamma characteristic of video communication
技术领域 Technical field
本发明涉及视频通讯技术领域, 具体涉及一种视频通信伽玛特性的校正方法和装置。 发明背景  The present invention relates to the field of video communication technologies, and in particular, to a method and apparatus for correcting gamma characteristics of video communication. Background of the invention
对于视频通讯中, 各个环节引起的 Gamma (伽玛) 非线性问题造成的对亮度信号的畸变  For video communication, the distortion of the luminance signal caused by the Gamma nonlinear problem caused by each link
(Distortion) , 是影响最终用户体验的一个重要因素。  (Distortion) is an important factor affecting the end user experience.
目前, 对于提高端到端用户体验的方法和技术主要集中在保证网络 QoS和视频压縮编码相关的 前后处理(Pre-processing, post-processing)方面。 对于 Gamma特性引起的亮度畸变问题, 缺乏关注 和系统的解决方法。  At present, methods and techniques for improving the end-to-end user experience mainly focus on pre-processing (post-processing) related to ensuring network QoS and video compression coding. There is a lack of attention and systematic solutions to the problem of brightness distortion caused by Gamma characteristics.
下面对 Gamma特性进行简要介绍。  The following is a brief introduction to the Gamma feature.
视频通信的过程为: 需要被传送的场景如人物、背景、文件等的光信号进入到视频通信终端(下 文简称终端) 如摄像机 /摄像头等, 经过 A/D转换成数字图像信号, 再经过压縮编码, 传送出去, 到 达对方终端, 然后, 经过去压缩 (decompression)解码还原为数字图像信号, 再在显示设备上显示 出来, 最终又变成光信号被人眼感知。 在上述过程中, 图像亮度信号经过了多个环节。 根据定义, Gamma特性就是一个环节的图像亮度信号的输入-输出关系不是线性的, 而是一种非线性的关系。这 里的图像亮度信号(Luminance)是一种广义的亮度信号, 即一开始的光信号, 到电信号, 再到数字 化的图像亮度 /灰度信号, 每个阶段的信号都含有图像亮度信号的信息, 因此, 广义地说, 图像亮度 信号经过了多个环节。  The process of video communication is: optical signals that need to be transmitted, such as people, backgrounds, files, etc., enter the video communication terminal (hereinafter referred to as the terminal) such as a camera/camera, etc., are converted into digital image signals by A/D, and then pressed. The code is reduced, transmitted, and reaches the other terminal. Then, it is decompressed and decoded to be restored to a digital image signal, and then displayed on the display device, and finally becomes an optical signal that is perceived by the human eye. In the above process, the image brightness signal has gone through multiple steps. By definition, the Gamma property is a link where the input-output relationship of the image luminance signal is not linear, but a nonlinear relationship. The image luminance signal (Luminance) here is a generalized luminance signal, that is, the initial optical signal, the electrical signal, and then the digitized image luminance/gray signal, and the signal of each phase contains the information of the image luminance signal. Therefore, in a broad sense, the image brightness signal passes through multiple links.
单个环节 Gamma特性的一般模型如附图 1所示。  A general model of the Gamma characteristics of a single link is shown in Figure 1.
图 1中, 输入亮度信号和输出亮度信号的非线性的关系可以表示为: L。ut=G (Lin) , 其中, Lout 为输出亮度信号, Lin为输入亮度信号, 函数 G ( .) 为一个非线性函数。 In Figure 1, the nonlinear relationship between the input luminance signal and the output luminance signal can be expressed as: L. Ut = G (L in ) , where L out is the output luminance signal, L in is the input luminance signal, and the function G ( . ) is a nonlinear function.
典型的 Gamma特性示例如附图 2所示。  An example of a typical Gamma characteristic is shown in Figure 2.
图 2中的每一个方块中标注的数字为亮度值, 方块的灰度表示亮度信号的明亮程度。图 2 (a)中, 上面的一行灰度方块的亮度是线性递增的, 即从 0.1递增到 1.0, 下面一行灰度方块的亮度是按照幂函 数规律递增的, 也就是说, 下面一行灰度方块的亮度经过了 Gamma非线性的失真影响。 图 2 (b) 中 给出的是以曲线表示的 Gamma特性。  The numbers indicated in each of the blocks in Fig. 2 are luminance values, and the gray scale of the squares indicates the brightness of the luminance signal. In Figure 2 (a), the brightness of the upper row of gray squares is linearly increasing, that is, increasing from 0.1 to 1.0, and the brightness of the next row of gray squares is incremented according to the power function, that is, the next line of gray The brightness of the square is affected by the distortion of the Gamma nonlinearity. The Gamma characteristic shown by the curve is given in Figure 2 (b).
当多个环节级联 (cascading)起来或者说串联起来时, 则总的 Gamma特性等于各个环节 Gamma 函数的复合 (composition) 。  When multiple links are cascading or connected in series, the total Gamma property is equal to the composition of the Gamma function of each link.
多个环节级联的 Gamma特性的一般模型如附 S3所示。  The general model of the Gamma characteristics of multiple links is shown in Appendix S3.
图 3中, 每个环节的输入亮度信号和输出亮度信号的非线性的关系分别为: £out=G(1)(Zin)、 Zout=G(2)( in) , out=G(3)(^in In Figure 3, the nonlinear relationship between the input luminance signal and the output luminance signal at each link is: £out=G (1) (Zin), Zout=G (2) (in) , out=G (3) (^in
由此可以得知各个环节 Gamma函数的复合为公式 (1 ) 所示: GCT{.) = G(1)(.) oG(2)(.) oG(3)(.) .·.·.·.. ^ Q oG^Q (j) It can be seen that the compound of each link Gamma function is shown as formula (1): G CT {.) = G (1) (.) oG (2) (.) oG (3) (.) .·····.. ^ Q oG^Q (j)
l0Ul-GCT (lin ) = G("„ ("-2) ( ....... G(2)(G(1)(/,, ))))) l 0Ul -G CT (l in ) = G ("„ ( "- 2) ( ....... G (2) (G (1) (/,, ) )))))
其中, "。 "表示函数的复合运算。 CT表示 cascaded total, 即级联总 Gamma的意思。  Where "." means the compound operation of the function. CT indicates cascaded total, which means the total gamma of the cascade.
在实际中, Gamma非线性是由不同原因引起的。 显示设备如 CRT显示器的 Gamma特性在理想状 况下是:  In practice, Gamma nonlinearity is caused by different causes. The Gamma characteristics of display devices such as CRT monitors are ideally:
L„ut= Lin 2 2 (2) L„ ut = L in 2 2 (2)
而对应的摄像机 /摄像头的理想的 Gamma特性是: The ideal Gamma characteristics of the corresponding camera/camera are:
Figure imgf000004_0001
Figure imgf000004_0001
从 Gamma问题的起源来看, Gamma问题起源于 CRT显示器, 因为其 Gamma值是 2.2, 为了补偿掉 这个非线性, 在摄像机中引入了 Gamma值 0.45。 在这个例子中, Gamma特性的形式是一个幂函数 (Power Function) 。 需要说明的是, 这里的输入和输出亮度信号都是在各自的坐标空间中进行了规 一化 (Normalized) 的, 即 0≤L。ut≤l, 0≤Lin≤l。 而其它类型的显示器比如液晶等, 其 Gamma函数的形 式或者会有所不同, 或者虽然在形式上也是幂函数, 但是参数不同。 From the origin of the Gamma problem, the Gamma problem originated from the CRT display because its Gamma value is 2.2. To compensate for this nonlinearity, a Gamma value of 0.45 was introduced into the camera. In this example, the form of the Gamma property is a Power Function. It should be noted that the input and output luminance signals here are normalized in their respective coordinate spaces, that is, 0 ≤ L. ut ≤l, 0≤L in ≤l. While other types of displays such as liquid crystals, the form of the Gamma function may be different, or although it is also a power function in form, the parameters are different.
理想的情况是输入亮度信号和输出亮度信号之间存在线性关系, 即 L。ut= Lta。 要获得线性关系, 必须对于具有非线性 Gamma特性的环节进行 Gamma校正 (Gamma Correction) 。 Ideally, there is a linear relationship between the input luminance signal and the output luminance signal, that is, L. Ut = L ta . To obtain a linear relationship, Gamma Correction must be performed for links with nonlinear Gamma characteristics.
对一个 Gamma环节的 Gamma校正原理图如附图 4所示。  The principle of Gamma correction for a Gamma link is shown in Figure 4.
图 4中, 对于一个环节来说, 其 Gamma特性给定即 L。ut=Gg(Lin), 这样, 可以用另外一个校正环 节1^1=0£;(1^)和它进行级联,来使得总的 Gamma特性成为真正的线性关系,从而达到校正掉给定环 节的非线性的目的。 In Figure 4, for a link, its Gamma characteristic is given as L. Ut = Gg(L in ), so that another correction link 1^1=0 £ ;(1^) can be cascaded with it to make the total Gamma characteristic a true linear relationship, thus achieving correction The purpose of the nonlinearity of the link.
显然, Gg(.)和 Gc(.)互为反函数。 在一般情况下, 对于一个函数, 要获得其反函数不一定有解, 而且, 即使存在反函数, 也无法用计算的方法获得。  Obviously, Gg(.) and Gc(.) are inverse functions of each other. In general, for a function, the inverse function is not necessarily solved, and even if there is an inverse function, it cannot be obtained by calculation.
实际应用中, 更多的情况是存在多个 Gamma环节的情况, 对多个 Gamma环节的 Gamma校正原理 图如附图 5所示。  In practical applications, more cases are the case of multiple Gamma links, and the principle of Gamma correction for multiple Gamma links is shown in Fig. 5.
图 5中, 校正环节需要插入到前后两个给定 Gamma环节之间。 前给定环节的 Gamma特性即 L。ut= Ga(Lin), 后给定环节的 Gamma特性即 L。ut=Gp(Lin)。此时, 校正环节中的 Gc(.)非常复杂, Gc(.)和 Ga(.) 或者 Gp(.)之间不再是简单的反函数关系了。 In Figure 5, the correction link needs to be inserted between the two given Gamma links. The Gamma characteristic of the given given link is L. Ut = Ga(L in ), the gamma characteristic of a given link is L. Ut = Gp(L in ). At this point, the Gc(.) in the correction link is very complicated, and the Gc(.) and Ga(.) or Gp(.) are no longer simple inverse functions.
实现上述 Gamma校正方法, 其前提是: 能够对于一个给定的 Gamma环节或者多个给定的 Gamma 环节的级联确定 Gamma特性参数。 这里的 Gamma特性参数就是 Gamma特性函数曲线的参数。  The above-described Gamma correction method is implemented with the premise that the Gamma characteristic parameter can be determined for a given Gamma link or a cascade of a given Gamma link. The Gamma characteristic parameter here is the parameter of the Gamma characteristic function curve.
在通信的一般情况下, 校正需要涉及到两个以上的通信终端。 比如在一个两方视频通信中, 终 端 A的视频传送到终端 B, 那么这路视频的校正就同时涉及到终端 A上的 Gamma环节和终端 B上的 Gamma环节。  In the general case of communication, the correction needs to involve more than two communication terminals. For example, in a two-party video communication, the video of terminal A is transmitted to terminal B, and the correction of the video involves both the Gamma link on terminal A and the Gamma link on terminal B.
在伽玛校正过程中需要确定 Gamma特性参数。 目前, 确定 Gamma特性参数的方法主要有两种: 方法一:仪器测量方法。对输入亮度信号、输出亮度信号进行测量,即通过专用仪器测量出 Gamma 特性函数曲线上的一些点, 然后, 采用数据拟合的方法来进行曲线拟合, 以确定 Gamma特性参数。  The Gamma characteristic parameters need to be determined during the gamma correction process. At present, there are two main methods for determining the Gamma characteristic parameters: Method 1: Instrument measurement method. The input luminance signal and the output luminance signal are measured, that is, some points on the Gamma characteristic function curve are measured by a special instrument, and then the data fitting method is used to perform curve fitting to determine the Gamma characteristic parameter.
方法二: 采用输入亮度信号和输出亮度信号的方法。 即对于单个给定的 Gamma环节,、只要 Gg(.) 满足一定条件,就可以找到对 Gg(.)进行 Gamma校正的 Gc(.);对于多个给定的 Gamma环节,只要 Ga(.)、 Gp(.)满足一定条件, 就可以找到对 Ga(.)和 Gp(.)进行 Gamma校正的 Gc(.)。 Method 2: A method of inputting a luminance signal and outputting a luminance signal. That is, for a given Gamma link, as long as Gg(.) Gc(.) for Gamma correction of Gg(.) can be found by satisfying certain conditions . For a given Gamma link, as long as Ga(.) and Gp(.) satisfy certain conditions, Ga can be found. .) Gmma-corrected Gc(.) with Gp(.).
从上述两种方法的描述可以看出, 目前确定 Gamma特性参数的实现方法都有一个前提条件, 即 明确知道需要被确定 Gamma特性参数的 Gamma环节的输入亮度信号和输出亮度信号的具体数值, 也 就是明确知道 Gamma环节的输入亮度信号和输出亮度信号的全部知识, 即输入亮度信号和输出亮度 信号可以获得, 因此, 上述两种确定 Gamma特性参数的实现方法均属于非盲测量方法。  It can be seen from the description of the above two methods that the current implementation method for determining the Gamma characteristic parameter has a precondition, that is, the specific value of the input luminance signal and the output luminance signal of the Gamma link that needs to be determined by the Gamma characteristic parameter is clearly known. It is to know all the knowledge of the input luminance signal and the output luminance signal of the Gamma link, that is, the input luminance signal and the output luminance signal can be obtained. Therefore, the above two methods for determining the Gamma characteristic parameters are non-blind measurement methods.
非盲测量方法的实现原理如附图 6所示。  The principle of implementation of the non-blind measurement method is shown in Figure 6.
图 6中, Gamma特性参数测量系统利用 Gamma环节的输入亮度信号全部知识、 输出亮度信号全 部知识测量出 Gamma特性参数,这里的 Gamma环节可以是单个 Gamma环节,也可以是级联的 Gamma 环节。  In Fig. 6, the Gamma characteristic parameter measurement system uses the knowledge of the input luminance signal of the Gamma link and the full knowledge of the output luminance signal to measure the Gamma characteristic parameter. Here, the Gamma link can be a single Gamma link or a cascaded Gamma link.
但是, 非盲测量方法在实际应用中的适用范围是非常有限的, 也就是说, 上述前提条件在很多 情况下是不能满足的, 下面例举目前常见的三种不能满足上述前提条件的应用。  However, the scope of application of the non-blind measurement method in practical applications is very limited, that is to say, the above preconditions cannot be satisfied in many cases. The following three common applications that cannot satisfy the above preconditions are exemplified below.
应用情景一: 对于 IPTV (Internet Protocol Television)等流媒体业务和应用, 由于节目制作过程 中, 已经受到了视频输入设备的 Gamma特性的影响, 在节目播出的时候, 尤其是点播等情况, 已经 无法获得原来节目制作时候用于采集视频信号的视频输入设备的 Gamma特性, 而且, 也不可能对视 频输入设备的 Gamma特性参数进行测量了。  Application scenario 1: For streaming media services and applications such as IPTV (Internet Protocol Television), since the program production process has been affected by the Gamma characteristics of the video input device, when the program is broadcast, especially on-demand, etc., It is not possible to obtain the Gamma characteristic of the video input device used to acquire the video signal during the original program production, and it is also impossible to measure the Gamma characteristic parameter of the video input device.
应用情景二: 对于数据会议等应用也存在上述问题。 目前, 视频会议的发展和数据会议的发展 同步, 两者完善的结合, 对于协作应用(collaborative applications)有很大的意义。在企业等环境中, 上述协作应用业务有强烈的市场需求。 但是, 在数据会议应用中, 很多多媒体资料比如图片等的来 源是不可考的, 很难获得当时生成这些数据的视频输入设备的 Gamma特性, 而且, 也不可能对视频 输入设备的 Gamma特性参数进行测量了。 '  Application Scenario 2: The above problems also exist for applications such as data conferencing. At present, the development of video conferencing and the development of data conferencing are synchronized, and the perfect combination of the two has great significance for collaborative applications. In an enterprise environment, the above-mentioned collaborative application business has strong market demand. However, in data conferencing applications, the source of many multimedia materials such as pictures is untestable, it is difficult to obtain the Gamma characteristics of the video input device that generated the data at the time, and it is also impossible to perform the Gamma characteristic parameters of the video input device. Measured. '
应用情景三: 对于面向千万家庭用户的公众视频通信业务来说, 为了降低成本和视频通信业务 使用门槛, 往往大量的采用廉价摄像头, 尤其是那些非常便宜的 USB接口摄像头。 这些廉价的视频 输入设备的 Gamma特性曲线和标准的 L。ut= Ι^ 45相差很远, 甚至根本不是幂函数的形式。 而且从这 些廉价摄像头的出厂技术资料中一般无法获取其 Gamma特性参数。 甚至有些廉价的摄像头根本就没 有出厂技术资料。 用户在家里使用这些摄像头时, 也不可能通过上述确定 Gamma特性参数的方法来 获得 Gamma特性参数。 Application Scenario 3: For the public video communication service for millions of home users, in order to reduce the cost and the threshold of video communication service usage, a large number of inexpensive cameras are often used, especially those which are very cheap USB interface cameras. The Gamma characteristic curve and standard L of these inexpensive video input devices. Ut = Ι^ 45 is far apart, not even a power function at all. Moreover, the Gamma characteristic parameters are generally not available from the factory technical data of these inexpensive cameras. Even some cheap cameras simply do not have factory technical information. When the user uses these cameras at home, it is also impossible to obtain the Gamma characteristic parameters by the above method of determining the Gamma characteristic parameters.
从上述描述可知, 目前确定 Gamma特性参数的非盲测量方法使 Gamma校正难于应用, 而且, 通 过专用仪器测量的方法提高了视频通信业务的实现成本。 发明内容  As can be seen from the above description, the current non-blind measurement method for determining the Gamma characteristic parameter makes the Gamma correction difficult to apply, and the method of special instrument measurement improves the implementation cost of the video communication service. Summary of the invention
本发明实施方式提供一种视频通信伽玛特性的校正方法和装置, 降低了视频通信成本, 提高了 Gamma校正易用性的目的。  Embodiments of the present invention provide a method and apparatus for correcting gamma characteristics of video communication, which reduces the cost of video communication and improves the ease of use of Gamma correction.
本发明实施方式提供一种视频通信伽玛特性的校正方法, 包括:  Embodiments of the present invention provide a method for correcting gamma characteristics of a video communication, including:
获取输出亮度信号的亮度直方图; 将输出亮度信号的亮度直方图转换为输出亮度信号亮度分布概率密度函数, 并确定输出亮度信 号亮度分布概率密度函数的极值点; Obtaining a luminance histogram of the output luminance signal; Converting a luminance histogram of the output luminance signal into a luminance density distribution probability density function of the output luminance signal, and determining an extreme point of the luminance density distribution probability density function of the output luminance signal;
建立输出亮度信号亮度分布概率密度函数的极值点与输入亮度信号亮度分布概率密度函数的极 值点之间的数学关系;  Establishing a mathematical relationship between an extreme point of the luminance density distribution probability density function of the output luminance signal and an extreme point of the luminance density distribution probability density function of the input luminance signal;
利用所述极值点、 以及极值点之间的数学关系将输入、 输出亮度信号各自的亮度分布概率密度 函数和 Gamma特性函数之间的数学关系转换为: 在极值点处, 输出亮度信号亮度分布概率密度函数 与 Gamma特性函数之间的数学关系;  Using the extreme value and the mathematical relationship between the extreme points, the mathematical relationship between the luminance density probability density function of the input and output luminance signals and the Gamma characteristic function is converted into: at the extreme point, the luminance signal is output a mathematical relationship between a luminance distribution probability density function and a Gamma characteristic function;
对所述转换后的数学关系进行求解, 以确定伽玛特性参数;  Solving the converted mathematical relationship to determine a gamma characteristic parameter;
根据所述伽玛特性参数对伽玛环节进行伽玛校正。  Gamma correction is performed on the gamma link according to the gamma characteristic parameter.
本发明实施方式还提供一种视频通信伽玛特性的校正装置, 所述装置包括:  An embodiment of the present invention further provides a device for correcting gamma characteristics of a video communication, the device comprising:
获取直方图模块: 用于获取输出亮度信号的亮度直方图, 并输出至第一转换模块;  Obtaining a histogram module: a luminance histogram for obtaining an output luminance signal, and outputting to the first conversion module;
第一转换模块: 用于将其接收的输出亮度信号的亮度直方图转换为输出亮度信号亮度分布概率 密度函数, 并输出至极值点计算模块和第二转换模块;  a first conversion module: configured to convert a luminance histogram of the received output luminance signal into an output luminance signal luminance distribution probability density function, and output to the extreme point calculation module and the second conversion module;
极值点计算模块: 用于计算其接收的输出亮度信号亮度分布概率密度函数的各个极值点, 并输 出至第二转换模块;  An extreme point calculation module: configured to calculate respective extreme points of the brightness distribution probability density function of the received output luminance signal, and output to the second conversion module;
存储模块: 用于存储输出亮度信号亮度分布概率密度函数的极值点与输入亮度信号亮度分布概 率密度函数的极值点之间的数学关系、 以及存储输入、 输出亮度信号各自的亮度分布概率密度函数 和 Gamma特性函数之间的数学关系;  The storage module: a mathematical relationship between an extreme point of the probability density function of the luminance distribution of the output luminance signal and an extreme point of the luminance density distribution probability density function of the input luminance signal, and a probability density of the luminance distribution of each of the input and output luminance signals The mathematical relationship between the function and the gamma property function;
第二转换模块: 用于根据其接收到的极值点、 输出亮度信号亮度分布概率密度函数、 存储模块 中存储的极值点的数学关系将存储模块中存储的输入、 输出亮度信号各自的亮度分布概率密度函数 和 Gamma特性函数之间的数学关系转换为: 在极值点处, 输出亮度信号亮度分布概率密度函数与 Gamma特性函数之间的数学关系;  The second conversion module is configured to: according to the extreme point received, the luminance signal distribution probability density function of the output luminance signal, and the mathematical relationship of the extreme points stored in the storage module, the respective brightness of the input and output luminance signals stored in the storage module The mathematical relationship between the distributed probability density function and the gamma characteristic function is converted to: at the extreme point, the mathematical relationship between the luminance density distribution probability density function of the luminance signal and the Gamma characteristic function is output;
Gamma特性参数求解模块:用于对所述转换后的数学关系进行求解计算, 以确定伽玛特性参数; 伽玛校正模块: 用于根据所述伽玛特性参数对伽玛环节进行伽玛校正。  The Gamma characteristic parameter solving module is configured to solve and calculate the converted mathematical relationship to determine a gamma characteristic parameter; and the gamma correction module is configured to perform gamma correction on the gamma link according to the gamma characteristic parameter.
通过上述技术方案的描述可知,本发明实施方式提供的 Gamma校正方法仅需要输出亮度信号的 直方图即可, 这样, 本发明实施方式的 Gamma参数确定方法可以称为全盲测量方法; 由于本发明实 施方式不需要输入亮度信号的任何知识, 因此,本发明实施方式的 Gamma校正方法具有很高的应用 可行性; 从而通过本发明实施方式提供的技术方案提高了 Gamma校正易用性, 拓宽了 Gamma校正 的应用范围, 提高了用户体验和服务质量。 附图简要说明  The gamma correction method provided by the embodiment of the present invention only needs to output a histogram of the luminance signal, and thus the gamma parameter determination method of the embodiment of the present invention may be referred to as a full blind measurement method. The method does not require any knowledge of the input of the luminance signal. Therefore, the gamma correction method of the embodiment of the present invention has high application feasibility; thereby improving the gamma correction ease of use and broadening the gamma correction by the technical solution provided by the embodiment of the present invention. The scope of application has improved the user experience and service quality. BRIEF DESCRIPTION OF THE DRAWINGS
图 1是环节 Gamma特性的模型示意图;  Figure 1 is a schematic diagram of a model of the link Gamma characteristics;
图 2 (a) 是 Gamma特性示意图一;  Figure 2 (a) is a schematic diagram of the Gamma characteristic;
图 2 (b) 是 Gamma特性示意图二;  Figure 2 (b) is a schematic diagram 2 of the Gamma characteristic;
图 3是多个环节级联的 Gamma特性的模型示意图: 图 4是对一个 Gamma环节的 Gamma校正原理示意图; Figure 3 is a schematic diagram of a model of gamma cascading with multiple links: Figure 4 is a schematic diagram of the gamma correction principle for a Gamma link;
图 5是对多个 Gamma环节的 Gamma校正原理示意图;  Figure 5 is a schematic diagram of the Gamma correction principle for a plurality of Gamma links;
图 6是现有技术中的非盲测量方法的实现原理示意图;  6 is a schematic diagram of an implementation principle of a non-blind measurement method in the prior art;
图 7是本发明实施例的全盲 Gamma特性参数确定方法的实现原理示意图;  7 is a schematic diagram showing an implementation principle of a method for determining a full-blind Gamma characteristic parameter according to an embodiment of the present invention;
图 8是视频信号的亮度直方图示例图;  Figure 8 is a diagram showing an example of a luminance histogram of a video signal;
图 9是本发明实施例的输入亮度信号、输出亮度信号亮度分布概率密度函数之间的关系示意图; 图 10 (a) 是现有技术中的一帧输入图像;  9 is a schematic diagram showing a relationship between an input luminance signal and an output luminance signal luminance distribution probability density function according to an embodiment of the present invention; FIG. 10 (a) is a frame input image in the prior art;
图 10 (b) 是现有技术中的一帧输出图像;  Figure 10 (b) is a frame output image in the prior art;
图 10 (c) 是现有技术中的输入亮度信号、 输出亮度信号亮度分布概率密度函数极值点之间的 对应关系示意图;  Figure 10 (c) is a schematic diagram showing the correspondence between the extreme values of the luminance density distribution probability density function of the input luminance signal and the output luminance signal in the prior art;
图 11是本发明实施例的通过插值和数据拟合得到的输出亮度信号亮度分布概率密度函数示意 图;  11 is a schematic diagram showing a probability density function of luminance distribution of an output luminance signal obtained by interpolation and data fitting according to an embodiment of the present invention;
图 12是本发明实施例的蛮力搜索方法的原理示意图;  12 is a schematic diagram showing the principle of a brute force search method according to an embodiment of the present invention;
图 13本发明实施例的初始超立方体和其外围多层超立方体在二维情况下的示意图; 图 14是本发明实施例的蛮力搜索方法示意图。 实施本发明的方式  Figure 13 is a schematic diagram of the initial hypercube and its peripheral multilayer hypercube in a two-dimensional case according to an embodiment of the present invention; Figure 14 is a schematic diagram of a brute force search method according to an embodiment of the present invention. Mode for carrying out the invention
在很多应用场景中, 输出亮度信号的具体数值即全部知识是可知的, 而输入亮度信号的具体数 值是不可知的, 甚至输入亮度信号的任何知识均不可知。 本发明实施方式可以仅利用了输出亮度信 号的知识来确定 Gamma特性参数, 并进行 Gamma校正。 由于在本发明实施方式的技术方案中, 没有 利用输入亮度信号的任何知识, 所以, 本发明实施方式技术方案中确定 Gamma特性参数的方法可以 称为全盲 Gamma特性参数确定方法。  In many application scenarios, the specific value of the output luminance signal is known, and the specific value of the input luminance signal is unknown, and even any knowledge of the input luminance signal is unknown. Embodiments of the present invention may utilize only knowledge of the output luminance signal to determine Gamma characteristic parameters and perform Gamma correction. Since any knowledge of the input luminance signal is not utilized in the technical solution of the embodiment of the present invention, the method for determining the Gamma characteristic parameter in the technical solution of the embodiment of the present invention may be referred to as a full blind Gamma characteristic parameter determining method.
本发明实施方式的全盲 Gamma特性参数确定方法的实现原理如附图 7所示。  The implementation principle of the method for determining the full-blind Gamma characteristic parameter of the embodiment of the present invention is as shown in FIG.
图 7中,对于需要确定 Gamma特性的环节,本发明实施方式根据已知的输出亮度信号的知识来确 定该环节的 Gamma特性参数。 在本发明实施方式的全盲 Gamma特性参数确定方法中, 输出亮度信号 的全部知识是已知的, 但是, 本发明实施方式并不一定利用输出亮度信号的全部知识。 输出亮度信 号的全部知识已知即输出亮度信号可以获得。  In Fig. 7, for a link in which the Gamma characteristic needs to be determined, the embodiment of the present invention determines the Gamma characteristic parameter of the link based on the knowledge of the known output luminance signal. In the method of determining the full blind Gamma characteristic parameter of the embodiment of the present invention, all knowledge of the output luminance signal is known, but the embodiment of the present invention does not necessarily utilize the entire knowledge of the output luminance signal. The entire knowledge of the output luminance signal is known as the output luminance signal.
在根据输出亮度信号的知识确定了 Gamma特性参数后,就能够根据 Gamma特性参数对 Gamma环 节进行 Gamma校正了。需要确定 Gamma特性的环节可以为单个给定的 Gamma环节, 也可以为多个给 定的 Gamma环节的级联组合。  After the Gamma characteristic parameters are determined based on the knowledge of the output luminance signal, the Gamma loop can be Gamma corrected according to the Gamma characteristic parameters. The link that needs to determine the Gamma characteristic can be a single given Gamma link, or a cascade combination of multiple given Gamma links.
下面结合附图对本发明实施方式提供的视频通信伽玛特性的校正方法进行详细描述。  The method for correcting the gamma characteristic of the video communication provided by the embodiment of the present invention will be described in detail below with reference to the accompanying drawings.
本发明实施方式需要获取输出亮度信号的亮度直方图, 亮度直方图如附图 8所示。 图 8中, 设定 图像的亮度为 0到 255个等级, 则不同亮度等级均对应于一个亮度分布概率。  The embodiment of the present invention needs to obtain a luminance histogram of the output luminance signal, and the luminance histogram is as shown in FIG. 8. In Fig. 8, the brightness of the set image is 0 to 255 levels, and the different brightness levels correspond to a brightness distribution probability.
直方图是图像处理技术领域的技术术语,其实直方图可以是一种离散形式的分布概率密度函数。 视频信号是由一帧一帧的连续图像组成的, 输出亮度信号的直方图可以从某一帧图像中获得。 从图像中获得亮度信号的直方图的方法属于常规技术, 在此不再详细描述。 A histogram is a technical term in the field of image processing technology. In fact, a histogram can be a discrete form of distributed probability density function. The video signal is composed of a continuous image of one frame and one frame, and the histogram of the output luminance signal can be obtained from a certain frame image. The method of obtaining a histogram of a luminance signal from an image is a conventional technique and will not be described in detail herein.
获取输出亮度信号的直方图也可以在其它阶段进行, 如在输出亮度信号还为一维信号的时候, 获取输出亮度信号的直方图, 此时, 输出亮度信号并没有转化成图像。  The histogram of the output luminance signal can also be performed in other stages, such as obtaining a histogram of the output luminance signal when the output luminance signal is also a one-dimensional signal, and at this time, the output luminance signal is not converted into an image.
直方图信息和连续的分布概率密度函数之间存在着密切的关系。 一般来说, 由连续的分布概率 密度函数可以直接得到亮度直方图; 反过来, 也可以通过数据插值或者拟合等方法由亮度直方图得 到连续的分布概率密度函数。 事实上, 直方图信息和连续的分布概率密度函数存在严格的比例数量 关系。 以上关系说明如下。  There is a close relationship between histogram information and continuous distribution probability density functions. In general, the luminance histogram can be directly obtained from the continuous distribution probability density function; conversely, the continuous distribution probability density function can also be obtained from the luminance histogram by means of data interpolation or fitting. In fact, there is a strict proportional relationship between the histogram information and the continuous distribution probability density function. The above relationship is explained below.
对于单个给定 Gamma环节或者多个给定 Gamma环节的级联组合来说, 亮度信号的全体集合是 For a cascading combination of a given Gamma link or multiple given Gamma links, the overall set of luminance signals is
{s(t)|teR,0<s(t) <l } , 其中, R表示全体实数集合。 也就是说, 亮度信号的全体集合是全体信号幅值 (amplitude)小于等于 1的非负值时间信号的集合。这里的亮度信号是普遍意义上的亮度信号, 因此 下面对直方图信息和连续的分布概率密度函数之间关系的描述对于输入亮度信号、 输出亮度信号都 适用。 为了描述简单起见, 下面以输出亮度信号为例, 对直方图信息和连续的分布概率密度函数之 间的关系进行说明。 {s(t)|teR,0<s(t) <l } , where R represents the entire set of real numbers. That is, the entire set of luminance signals is a set of non-negative time signals whose overall signal amplitude is less than or equal to one. The luminance signal here is a luminance signal in a general sense, so the following description of the relationship between the histogram information and the continuous distribution probability density function is applicable to both the input luminance signal and the output luminance signal. For the sake of simplicity of description, the relationship between the histogram information and the continuous distribution probability density function will be described below by taking the output luminance signal as an example.
由于存在随机干扰, 所以, 这些输出亮度信号可以看成是随机过程。 这些输出亮度信号的统计 特性可能各不相同, 但是, 按照信号的统计特性, 特别是按照分布概率特性, 可以对输出信号进行 分类。任何信号作为一个随机过程都有一个分布概率密度函数与之对应,如果随机过程是平稳的(这 里的平稳是严格意义上的平稳) , 那么这个分布概率密度函数和时间无关; 如果随机过程不是平稳 的,那么这个分布概率密度函数可能和时间有关。因此,一般来说,对于一个随机过程 s(t) (tER,0≤s(t) <1 ) , 可以用 fs(x,t),t e R表示其分布概率密度函数。 如果是严格意义上的平稳的随机过程, 则 fs(x,t),t e R和 t无关, 即分布概率密度函数不随时间变化而变化, 此时, fs(x,t) = fs(x) o Due to random interference, these output luminance signals can be viewed as a random process. The statistical characteristics of these output luminance signals may vary, but the output signals can be classified according to the statistical characteristics of the signals, especially according to the distribution probability characteristics. Any signal as a stochastic process has a distribution probability density function corresponding to it. If the stochastic process is stationary (where the stationary is strictly in the sense of stability), then the distribution probability density function is independent of time; if the stochastic process is not stationary Then, this distribution probability density function may be related to time. Therefore, in general, for a stochastic process s(t) (tER, 0 ≤ s(t) < 1 ), f s (x, t), te R can be used to represent its distribution probability density function. If it is a stationary stochastic process in a strict sense, f s (x, t), te R and t are independent, that is, the distribution probability density function does not change with time, in this case, f s (x, t) = f s (x) o
信号的规一化处理方法如下- 如果一个亮度信号 s(t)不满足条件 tE R,o≤s(t)≤l, 那么, 需要对该亮度信号进行规一化处理, 使 其满足1 1,0≤8(1)≤1。 例如: 如果信号实际的取值范围是 [0, SJ , 则规一化处理后的信号3„0)为- (t)=s(t)/ S max (4)  The normalization processing of the signal is as follows - if a luminance signal s(t) does not satisfy the condition tE R, o ≤ s(t) ≤ 1, then the luminance signal needs to be normalized to satisfy 1 1 , 0 ≤ 8 (1) ≤ 1. For example: If the actual value range of the signal is [0, SJ, then the normalized signal 3„0) is - (t)=s(t)/ S max (4)
公式 (4) 中的下标 n表示英文 normalized, 意思为规一化。  The subscript n in equation (4) means English normalized, meaning normalization.
相应地, 如果将信号从规一化的值还原到实际的取值, 即对信号进行逆规一化处理, 其计算公 式如下: Correspondingly, if the signal is restored from the normalized value to the actual value, that is, the signal is inverse normalized, the calculation formula is as follows:
Figure imgf000008_0001
Figure imgf000008_0001
根据分布概率密度函数的定义, 分布概率密度函数有如下属性:  According to the definition of the distribution probability density function, the distribution probability density function has the following properties:
£^^,1)(1 = 1,对于任何1  £^^,1)(1 = 1, for any 1
并且 (6) And (6)
^ ≥0,对于任何1  ^ ≥ 0, for any 1
而且, 对于信号幅值小于等于 1的非负值信号, 满足:  Moreover, for a non-negative signal with a signal amplitude of 1 or less, it satisfies:
fs(x,t) = 0, x < 0^c x > l (7) 也就是说, 信号值大于 1或者小于 0是不可能的, 概率为零。 f s (x,t) = 0, x < 0^cx > l (7) That is to say, it is impossible for the signal value to be greater than 1 or less than 0, and the probability is zero.
作为一个自然推论就是:  As a natural inference is:
]^^,1)€^ = 1,对于任何1 (8) 按照概率密度函数的定义, 对于很小的区间长度 δ和区间 [0, 1]上一点 χο来说, fs(x0, t) * Prob{x。 < s(t) < x0 + (9) ]^^,1)€^ = 1, for any 1 (8) according to the definition of the probability density function, for a small interval length δ and a range [0, 1] on a point χο, f s (x 0 , t) * Prob{x. < s(t) < x 0 + (9)
或者等效地 fs(x。,t) * Prob{x0 - ^δ < s(t)≤ x。 δ} ( 10) 其中: 符号 Prob表示概率 (Probability) 。 其直观意义是说, 在时刻 t, 亮度信号落在区间 [x。,x。+ ]或者 [x。- x。+ ^的概率近 似等于 fs(xa,t) 。这其实是一种把连续分布概率密度函数变成离散概率密度的方法。 由此可知, 由 连续概率密度函数, 通过这样的离散化可以得到信号的亮度直方图。 Or equivalently f s (x., t) * Prob{x 0 - ^δ < s(t) ≤ x. δ} ( 10) where: The symbol Prob represents Probability. The intuitive meaning is that at time t, the luminance signal falls within the interval [x. , x. + ] or [x. - x. The probability of + ^ is approximately equal to f s (x a , t) . This is actually a way to turn the continuous distribution probability density function into a discrete probability density. From this, it can be seen that the luminance histogram of the signal can be obtained by such discretization from the continuous probability density function.
对于规一化的亮度信号, 可以把 [0, 1]区间等分成 N个子区间, 每个子区间的长度是 1/N。 第 k(k=0,l,2,....,N-l)个子区间是 [k N,(k+l) N]。 如果 N足够大, 1/N足够小, 那么, 可以认为:  For a normalized luminance signal, the [0, 1] interval can be equally divided into N subintervals, each of which has a length of 1/N. The k (k = 0, l, 2, ..., N - l) subintervals are [k N, (k + l) N]. If N is large enough, 1/N is small enough, then you can think of it:
^^(^N1'1) - Prob^ N≤ SW ^ N ' k=0,l,2,....,N ^^(^N 1 ' 1 ) - Prob ^ N ≤ S W ^ N ' k=0,l,2,....,N
N 2 -l ( 11 )  N 2 -l ( 11 )
于是, 可以形成一个概率序列 (sequence) : Thus, a sequence of probabilities can be formed:
| A: = 0,l,2...,N - 1} ( 12)
Figure imgf000009_0001
| A: = 0,l,2...,N - 1} ( 12)
Figure imgf000009_0001
归一化的信号还原到非规一化的信号空间中, 如在视频通信中通常亮度信号取 0-255的整数, 共 256级亮度, 当然, 也可以将亮度信号一般化为 2D级亮度的情况, 此时, 需要将单位区间即 [0, 1]线 性映射成集合 {0, 1, 2, 3, 2° -2, 2° -1} , 每个子区间相应扩大 2D倍, 成为 (1/N) 2D。 于是相 应的概率序列变成连续概率密度函数- The normalized signal is restored to the unregulated signal space. For example, in video communication, the luminance signal usually takes an integer of 0-255, and a total of 256 levels of brightness. Of course, the luminance signal can also be generalized to 2 D -level brightness. In this case, it is necessary to linearly map the unit interval [0, 1] into a set {0, 1, 2, 3, 2° -2, 2° -1}, and each sub-interval is expanded by 2 D times. (1/N) 2 D . Then the corresponding probability sequence becomes a continuous probability density function -
{h(k) I h(k) = - 1} ( 13){h(k) I h(k) = - 1} ( 13)
Figure imgf000009_0002
Figure imgf000009_0002
根据公式 (8) 和公式 (10) , 显然可以得出:  According to formula (8) and formula (10), it is obvious that:
∑h( = l ( 14) 公式 (13 ) 中的这个概率序列就叫做亮度信号 s(t)的直方图。 ∑h( = l ( 14) This sequence of probabilities in equation (13) is called the histogram of the luminance signal s(t).
从上述推导中可以明显看出: 直方图是可以由亮度信号的连续分布概率密度函数直接得到的, 反过来, 亮度信号的连续分布概率密度函数也可以由直方图经过数据插值、 拟合等处理后得到。  It can be clearly seen from the above derivation that the histogram can be directly obtained from the continuous distribution probability density function of the luminance signal. Conversely, the continuous distribution probability density function of the luminance signal can also be processed by data interpolation, fitting, etc. of the histogram. After getting it.
下面给出一个直方图的具体例子。 当亮度信号的亮度包括 256亮度级时, 概率序列和直方图中具 体数值的对应关系为: h(0)=0 A specific example of a histogram is given below. When the brightness of the luminance signal includes 256 brightness levels, the correspondence between the probability sequence and the specific values in the histogram is: h(0)=0
h(l)=0 h(64)=0.005  h(l)=0 h(64)=0.005
h(65)=0.006 h(190)=0.006  h(65)=0.006 h(190)=0.006
h(l 91 )=0.005  h(l 91 )=0.005
h(192)=0.001  h(192)=0.001
h(193)=0 h(255)=0  h(193)=0 h(255)=0
在本发明实施方式中,伽码特性函数可以从下述实施方式提供的两种伽码特性函数中选择一种。 当然伽码特性函数也可以是其它形式的函数, 只要伽码特性函数满足连续光滑并且至少二阶可导即 可。  In the embodiment of the present invention, the gamma characteristic function may be selected from one of two gamma characteristic functions provided by the following embodiments. Of course, the gamma characteristic function can also be other forms of function, as long as the gamma characteristic function satisfies continuous smoothness and at least second order is achievable.
下面用函数 Υ
Figure imgf000010_0001
来表示 Gamma特性参数未知的 Gamma环节的 Gamma特性,这里的 Gamma环节包括单个 Gamma环节或者多个 Gamma环节的级联组合的情况。上述
The following function Υ
Figure imgf000010_0001
To represent the Gamma feature of the Gamma link whose Gamma characteristic parameter is unknown, where the Gamma link includes a single Gamma link or a cascade combination of multiple Gamma links. Above
Gamma特性函数的表示方式中, P = [Α,Α,···, 是一个参数向量, 一般情况下, 参数向量由 Μ 个参数组成。 这些参数的全部或者部分是需要确定的。 因此, 按照这个很一般的形式, Gamma特性 函数只要满足函数是连续的条件即可, 而且, 一般来说, Gamma特性函数是光滑可导的, 至少是分 段光滑可导的, 因此, 假设 Gamma特性函数关于变量 X的一阶和二阶导函数存在是合理的。 Gamma 特性函数的一阶导函数可以用如下符号表示: dx ( 15) In the representation of the Gamma property function, P = [Α, Α, ..., is a parameter vector. In general, the parameter vector consists of 参数 parameters. All or part of these parameters need to be determined. Therefore, according to this very general form, the Gamma property function only needs to satisfy the condition that the function is continuous, and, in general, the Gamma property function is smooth and steerable, at least segmentally smooth and steerable, therefore, assuming Gamma It is reasonable for the characteristic function to exist for the first and second derivatives of the variable X. The first derivative of the Gamma property function can be represented by the following symbol: dx ( 15)
并且, Gamma特性函数, 还应该满足:  And, the Gamma property function should also satisfy:
g(l;P) = l ( 16)  g(l;P) = l ( 16)
一般来说, Gamma特性函数可以用如下两种常用的方式来表示:  In general, Gamma property functions can be represented in two common ways:
方式一、 幂函数:  Method 1, power function:
y = g(x;p) = p,xP2 + ρ3,ρ = [Α, ½, 73 ]Γ ( 1 7 ) y = g(x;p) = p,x P2 + ρ 3 ,ρ = [Α, 1⁄2, 7 3 ] Γ ( 1 7 )
方式二、 多项式函数:  Method 2, polynomial function:
y = g(x; p) = Ριχκ + ρ2χκ1 +....+ ρκχ + ρκ+1,其中, ρ = [ , , ,…, ρκ+1 ΐ ( is) 上述公式 (18) 也可以变换成公式 (19) 的表达形式: y = g(x; p) = Ριχ κ + ρ 2 χ κ1 +....+ ρ κ χ + ρ κ+1 , where ρ = [ , , ,..., ρ κ+1 ΐ ( is The above formula (18) can also be transformed into the expression of the formula (19):
y = g(x; p) = Pi (χ-χ。 )K + ρ2 (χ-χ。 )κ 1 +… · + ρκ (χ-χ。) + Ρκ+ι ( 19 ) y = g(x; p) = Pi (χ-χ.) K + ρ 2 (χ-χ. ) κ 1 +... · + ρ κ (χ-χ.) + Ρ κ+ ι ( 19 )
其中' p
Figure imgf000010_0002
如果用 e (t)和 r (t)分别表示输入亮度信号和输出亮度信号, 那么, e (t)和 r (t)各自对应的 分布概率密度函数是: fe (χ, t) 和 fr (x, t) , 并且, e (t)、 r (t) 和 Gamma特性函数之间存在如 下关系: r(t) = g(e(t); p), p = [pi ,p2, p3,..., pu f。
Where 'p
Figure imgf000010_0002
If e (t) and r (t) are used to represent the input luminance signal and the output luminance signal, respectively, then the distribution probability density functions corresponding to e (t) and r (t) are: f e (χ, t) and f r (x, t) , and the following relationship exists between e (t), r (t) and Gamma property functions: r(t) = g(e(t); p), p = [p i ,p 2 , p 3 ,..., p u f.
根据概率理论, 可以推导出如附图 9所示的关系, 即:  According to the probability theory, the relationship as shown in Fig. 9 can be derived, namely:
d(e; p)fr(r) = fe(e),其中 (20) d(e; p)f r ( r ) = f e (e), where ( 20 )
r = g(e;p),Ve G [0,l]  r = g(e;p),Ve G [0,l]
推导出公式 (20) 的具体过程可以参见常用的概率书籍, 在本实施例中不再详细描述。  The specific process of deriving the formula (20) can be referred to the commonly used probability book, which will not be described in detail in this embodiment.
从公式 (20)可以看出, 公式(20) 和时间变量 t无关。 其实, Gamma特性函数本身和时间变量 无关, 因此, 在一段时间内测定一组 Gamma特性参数, 在该段时间的整个通信过程中就可以一直使 用这组 Gamma特性参数, 如在 IPTV中, 一个节目的 Gamma特性参数可以认为是相同的, 这样, 可以 在每个节目开始的时候测量一次 Gamma特性参数, 就可以在该节目的实现过程中一直使用该 Gamma 特性参数了。  As can be seen from equation (20), equation (20) is independent of time variable t. In fact, the Gamma property function itself is independent of the time variable. Therefore, a set of gamma characteristic parameters are measured over a period of time, and the gamma characteristic parameters can be used throughout the communication during the period of time, such as in IPTV, a program. The Gamma characteristic parameters can be considered to be the same, so that the Gamma characteristic parameters can be measured at the beginning of each program, and the Gamma characteristic parameters can be used throughout the implementation of the program.
在获得了输出亮度信号亮度分布概率密度函数后, 需要计算输出亮度信号亮度分布概率密度函 数的各个极值点。 计算函数的各个极值点属于常规技术, 在本发明的实施例中不再详细描述。  After obtaining the luminance density distribution probability density function of the output luminance signal, it is necessary to calculate the respective extreme points of the luminance density distribution probability density function of the output luminance signal. The various extreme points of the calculation function are conventional techniques and will not be described in detail in the embodiments of the present invention.
输入亮度信号亮度分布概率密度函数的极值点与输出亮度信号亮度分布概率密度函数的极值点 之间存在很严格的一一对应关系。 这个对应关系如附图 10所示。  There is a strict one-to-one correspondence between the extreme point of the input luminance signal luminance distribution probability density function and the extreme value of the output luminance signal luminance distribution probability density function. This correspondence is shown in Figure 10.
在图 10中, 图 (a) 是输入视频信号的一帧, 图 (b)是图 (a)对应的输出视频信号的一帧, 图 (c)中的两条曲线分别是输入亮度信号亮度分布概率密度函数和输出亮度信号亮度分布概率密度函 数。  In Fig. 10, (a) is a frame of the input video signal, (b) is a frame of the output video signal corresponding to (a), and the two curves in (c) are the brightness of the input luminance signal. Distribution probability density function and output luminance signal luminance distribution probability density function.
从图 (c) 中可以看出, 两条曲线的极值点是严格一一对应的。 这个对应关系为:  As can be seen from Figure (c), the extreme points of the two curves are strictly one-to-one correspondence. This correspondence is:
er^ (极大点), e2->r2(极小点), e3->r3(极大点), e4->r4(极小点), e5->r5(极大点)。 Er^ (maximum point), e 2 ->r 2 (minimum point), e 3 ->r 3 (maximum point), e 4 ->r 4 (minimum point), e 5 ->r 5 (maximum point).
不失一般性, 设定输入亮度信号亮度分布概率密度函数和输出亮度信号亮度分布概率密度函数 均有 J个极值点, 分别是 e,, e2, ...., 和 n, r2 rj。 Without loss of generality, the input luminance signal brightness distribution probability density function and the output luminance signal luminance distribution probability density function have J extreme points, respectively e, e 2 , ...., and n, r 2 Rj.
在这个极值点对应关系的基础上, 可以对输入亮度信号亮度分布概率密度函数的极值点 ek、 及 对应的输出亮度信号亮度分布概率密度函数的极值点 rk(k=l,2,...,J)进行了一个合理的近似处理,即设 定公式 (21 ) 成立: Based on the correspondence of the extreme points, the extreme point e k of the luminance density distribution probability density function of the input luminance signal and the extreme value point r k of the corresponding luminance signal distribution probability density function (k=l, 2,...,J) A reasonable approximation is performed, that is, the setting formula (21) is established:
rk = g(ek ;p), P = [A, A, ,···,/½ k=l,2,3 .,J (21 ) r k = g(e k ;p), P = [A, A, ,···,/1⁄2 k=l,2,3 .,J (21 )
其中: k=l, 2, 3, ......, J; J为亮度分布概率密度函数的极值点数量。  Where: k = l, 2, 3, ..., J; J is the number of extreme points of the luminance distribution probability density function.
对公式 (21 ) 进行稍加变动后, 对伽码参数进行确定的过程与下面的描述基本相同, 在此不再 详细描述。  After slightly changing the formula (21), the process of determining the gamma parameter is basically the same as the following description, and will not be described in detail here.
从上述描述中可以看出, 输入亮度信号亮度分布概率密度函数的极值点与输出亮度信号亮度分 布概率密度函数的极值点存在如下两个关系: 关系 1、 定性的几何拓扑关系, 即两个亮度分布概率 密度函数的极值点之间存在一一对应关系, 也就是说, 两个亮度分布概率密度函数的极值点的数量 相同。 关系 2、 定量的数学关系: rk g p^ p - Q^;^;^...,;^] 。 当然, 这里的数学关系允 许稍加变换。 It can be seen from the above description that the extreme point of the luminance density distribution probability density function of the input luminance signal and the extreme value point of the luminance density distribution probability density function of the output luminance signal have the following two relationships: relationship 1, qualitative geometric topological relationship, ie two There is a one-to-one correspondence between the extreme points of the luminance density probability density function, that is, the number of extreme points of the two luminance distribution probability density functions is the same. Relationship 2, quantitative mathematical relationship: rk gp^ p - Q^;^;^...,;^] . Of course, the mathematical relationship here allows A little change.
设定 fe(x)和 ff(x)是连续可导的, 并且 d(x;p)是连续可导的, 即 g(x;p)二阶连续可导。 这样, 可以对公式 (20) 两边进行求导, 可以得到: It is set that f e (x) and f f (x) are continuously steerable, and d(x; p) is continuously steerable, that is, g(x; p) is second-order continuous steerable. In this way, you can derive the two sides of the formula (20), you can get:
Z(e;P)fr + d2 (e;P)^ = ^,其中 Z (e;P) f r + d 2 (e;P) ^ = ^, where
dr de  Dr de
r = g(e;p), (22)
Figure imgf000012_0001
r = g(e;p), (22)
Figure imgf000012_0001
由于 ei, e2 , ej是 fe(x)的极值点, 因此, 在这些极值点上 fe(x)的导数为零。 这样, 存在 如下公式: Since ei, e 2, ej is f e (x) of the extreme point, therefore, in these extreme point derivative f e (x) is zero. Thus, the following formula exists:
¾^|e_e =0,k = l,2,3"..,J (23) 3⁄4^| e _ e =0,k = l,2,3"..,J (23)
de k De k
结合公式 (22)和公式 (23) 有如下关系成立: z(ek;p)fr(r) + d2(ek;p)^ = 0 (24) Combining equation (22) with equation (23), the following relationship holds: z(e k ;p)f r (r) + d 2 (e k ;p)^ = 0 (24)
r = g(ek;p),k = l,2,3,....,J r = g(e k ;p),k = l,2,3,....,J
由于公式 (21)近似成立, 因此公式 (24) 可以变换为如下关系: z(ek; p)fr (rk) + d2 (ek; p) = 0, k = 1,2,3,...., J (25) Since the formula (21) is approximately true, the formula (24) can be transformed into the following relationship: z(e k ; p)f r (r k ) + d 2 (e k ; p) = 0, k = 1,2, 3,...., J (25)
dr z(g_1 (rk; P); P)fr (rk ) + d2 (g-1 (rk; p); p) = 0,k = 1,2,3,...., J (26) Dr z(g _1 (r k ; P); P)f r (r k ) + d 2 (g- 1 (r k ; p); p) = 0,k = 1,2,3,... ., J (26)
dr  Dr
公式 (26) 中, k=l, 2, 3 , J, J为亮度分布概率密度函数的极值点数量, rk为输出亮度 信 号 亮 度 分 布 概 率 函 数 的 极 值 点 , 而 且 , 导 函 数 为 : In equation (26), k = l, 2, 3, J, J is the number of extreme points of the luminance distribution probability density function, r k is the extreme point of the luminance function of the output luminance signal, and the derivative function is:
dr  Dr
^ ^ = dc^-1 + (d- l)cd,rd-2 +(d- 2)cd.2rd-3 +….. + c, 。 ^ ^ = dc^- 1 + (d- l)c d , r d - 2 +(d- 2)c d . 2 r d - 3 +..... + c, .
dr  Dr
在实际应用中, Gamma特性函数都是单调的, 因此, Gamma特性函数存在反函数。 这个反函数 可以记作 g— '(χ;ρ), 显然, Gamma特性函数的反函数也是依赖于伽玛参数向量 p的。  In practical applications, the Gamma property function is monotonic, so the Gamma property function has an inverse function. This inverse function can be written as g_ '(χ;ρ). Obviously, the inverse of the Gamma property function is also dependent on the gamma parameter vector p.
从公式 (26) 中可以看出, 公式 (26) 中不含有关于输入信号的任何信息, 公式 (26) 完全取 决于输出亮度信号亮度分布概率密度函数和输出亮度信号亮度分布概率密度函数的极值点。 从而本 发明实施方式能够仅仅根据输出信号及其亮度分布概率密度函数来确定 Gamma特性参数。  It can be seen from equation (26) that equation (26) does not contain any information about the input signal. Equation (26) is completely dependent on the output luminance signal brightness distribution probability density function and the output luminance signal luminance distribution probability density function. Value point. Thus, embodiments of the present invention are capable of determining Gamma characteristic parameters based solely on the output signal and its luminance distribution probability density function.
设定本发明实施方式获得的输出亮度信号的直方图为:
Figure imgf000012_0002
..,N-l}。 也就是说, 每个 直方图中包含有 N个项, 在直方图术语中, 每一个项叫做 "柱"(bin)。
The histogram of the output luminance signal obtained by setting the embodiment of the present invention is:
Figure imgf000012_0002
.., Nl}. That is, each histogram contains N items, and in the histogram terminology, each item is called a "bin".
根据公式 (12)可以由输出图像亮度直方图获得输出亮度信号亮度分布概率密度函数- , 于是: According to the formula (12), the luminance density distribution probability density function of the output luminance signal can be obtained from the output image luminance histogram, and thus:
Figure imgf000012_0003
?k + 1
Figure imgf000012_0003
?k + 1
+ i = Nh (k) ^ - = 0,1,2..., N - 1 (27) + i = Nh (k) ^ - = 0,1,2..., N - 1 (27)
' 2N r 对于均匀分布在 [0, 1]区间上的 N个点 ak = ^~5",1^ = 1,2,....,:^可以得到函数 )在这些离 ' 2N r for N points uniformly distributed over the interval [0, 1] a k = ^~5", 1^ = 1, 2, ...., :^ can get the function)
2N 散点上的数值, 即 ff (^^)A: = 0,l,2...,N - l。 这些离散点在坐标系 r轴上的位置如图 11所示。 The value on the 2N scatter, ie f f (^^) A: = 0, l, 2..., N - l. The position of these discrete points on the r-axis of the coordinate system is as shown in FIG.
2N  2N
如果 N足够大, 那么, 可以通过插值或者数据拟合方式得到输出亮度分布概率密度的表达式: fr(r) = cdrd + cd.,rd-1 + cd.2rd-2 +―. + c,r + c0 (28) If N is large enough, the expression of the probability density of the output luminance distribution can be obtained by interpolation or data fitting: f r (r) = c d r d + c d ., r d - 1 + c d . 2 r d - 2 +―. + c,r + c 0 (28)
其中: cd, cd-1, cd-2, ...... cc为 d+1个多项式系数, r为输出亮度信号的幅值。 Where: c d , c d-1 , c d-2 , ... c c is d+1 polynomial coefficients, and r is the amplitude of the output luminance signal.
该表达式为包括多项式样条函数在内的多项式。  This expression is a polynomial including a polynomial spline function.
在一般情况下, 对于 256级亮度的图像, N=256, 此时, N已经足够大了。 插值或者数据拟合技 术的实现方法有多种, 本发明实施方式不限制插值或者数据拟合的具体实现方式。  In general, for an image of 256 levels of brightness, N = 256, at which point N is already large enough. There are various implementation methods of interpolation or data fitting techniques, and embodiments of the present invention do not limit the specific implementation of interpolation or data fitting.
公式 (28) 的导数为:  The derivative of equation (28) is:
= dcZ1 + (d - l)cd- -2 + (d - 2)cd.2rd-3 +…-. + Cl (29) = dcZ 1 + (d - l)c d - - 2 + (d - 2)c d . 2 r d - 3 +...-. + Cl (29)
dr  Dr
本发明可以选用 (17)、 ( 18)、 ( 19) 中给出的任何一种表现形式的伽玛特性函数的表达式, 此时, 获得了 Gamma特性函数的具体形式, 只是参数向量 p需要确定。 对于参数向量 p的每一个给定 的值计算出公式 (26) 中的任何一项, 即计算出公式 (26) 中的各个相乘因子和相加项。  The present invention can select the expression of the gamma characteristic function of any one of the expressions given in (17), (18), (19). At this time, the specific form of the Gamma characteristic function is obtained, but only the parameter vector p needs determine. Calculate any of the equations (26) for each given value of the parameter vector p, that is, calculate each multiplication factor and addition term in equation (26).
如果有 J个方程, 只要 J≥M-1, 其中, M为需要确定伽玛特性参数的个数, 那么, 一定可以通过 这组方程求解出唯一的解作为其中 M-1个伽玛参数的确定值, 然后, 再利用公式 (16) 作为一个约 束条件来确定常数项, 即确定剩余的一个伽玛参数。  If there are J equations, as long as J ≥ M-1, where M is the number of parameters that need to determine the gamma characteristic, then the only solution can be solved by this set of equations as the M-1 gamma parameters. The value is determined, and then the constant term is determined by using equation (16) as a constraint, that is, determining the remaining one gamma parameter.
也就是说, 由于公式 (16) 的存在, 使得所有的伽码参数之间都满足一个约束条件, 这些伽码 参数如果是 M个, 那么, 只有 M-1个参数是独立的, 只要确定出 M个伽码参数中的任意 M-1个参数, 剩下的一个伽玛参数通过公式 (16) 来求解即可, 从而确定出了 Gamma特性函数的所有参数。  That is to say, due to the existence of the formula (16), all the gamma parameters satisfy a constraint condition. If these gamma parameters are M, then only M-1 parameters are independent, as long as it is determined Any M-1 parameters of the M gamma parameters, and the remaining gamma parameter can be solved by the formula (16), thereby determining all the parameters of the Gamma characteristic function.
在一般情况下, 条件 J≥M-1都能满足。  In general, the condition J ≥ M-1 can be satisfied.
根据公式 (26) 获得参数向量 p的方法有多种, 下面主要介绍两种确定参数向量 p的方法: 方法一、 直接求解方程法。  There are various methods for obtaining the parameter vector p according to the formula (26). The following mainly introduces two methods for determining the parameter vector p: Method 1. Solve the equation directly.
由公式 (26) 获得 J个方程, 从中任意选择 M-1个方程, 形成方程组联立求解。 一般来说, 这组 方程是非线性的, 而且是超越 (Transcendental) 的, 如对于幂函数形式的 Gamma特性函数等。 因此 不存在解析解 (closed-form solution) 。 需要用数值解法 (numerical solution method) 。 关于方程组 的数值解法, 属于常规技术, 在本实施例中不在详细描述。  J equations are obtained from equation (26), and M-1 equations are arbitrarily selected to form a simultaneous solution of equations. In general, this set of equations is non-linear and transcendental, such as the Gamma property function in the form of a power function. Therefore there is no closed-form solution. A numerical solution method is required. The numerical solution of the system of equations is a conventional technique and will not be described in detail in this embodiment.
方法二、 非线性函数优化方法。  Method two, nonlinear function optimization method.
根据公式 (26) 构造一个代价函数:
Figure imgf000013_0001
显然, 对于 Gamma特性函数的真正的参数向量 ptrae, 在理论上应该使得 J(ptnie)=0, 由于参数向量 Ptrue满足公式 (30 ) 中的每一个方程, 因此, 公式 (30) 中的每个求和项都是零。 但是在实际应用 中, 因为存在误差和近似如获得直方图过程中的近似等, 所以, 公式 (30) 中的每个求和项不会都 等于零,但是,应该是一个很小的数值,并且应该满足如下条件:对于任何 PERM,都有 J(p J(ptrue)。 也就是说, p,rae是函数 J(p)的全局最小点 (global minimal point) 。
Construct a cost function according to formula (26):
Figure imgf000013_0001
Obviously, for the true parameter vector p trae of the Gamma property function, it should theoretically make J(p tnie )=0, since the parameter vector Ptrue satisfies each equation in equation (30), therefore, in equation (30) Each summation is zero. However, in practical applications, because there are errors and approximations such as approximations in obtaining the histogram process, each summation term in equation (30) will not be equal to zero, but it should be a small value, and The following conditions should be met: For any P ER M , there is J(p J(p true ). That is, p, rae is the global minimal point of the function J(p).
从上述描述中可以知道, 对于采用公式 (17) 、 (18 ) 、 (19) 给出的任意一种形式的 Gamma 特性函数, 都可以根据参数向量 p的每个给定数值, 计算出 g— i(rk;p), zCg-'Cr^p^p) , d2(g_1(rk;p);p),同时,输出亮度信号亮度分布概率密度函数是已知的,这样,就可以按照公式(28)、 As can be seen from the above description, for any of the Gamma characteristic functions given by equations (17), (18), and (19), g- can be calculated based on each given value of the parameter vector p. i(r k ;p), zCg-'Cr^p^p) , d 2 (g _1 (r k ;p); p), meanwhile, the luminance density distribution probability density function of the output luminance signal is known, such that You can follow formula (28),
^fr(rk) ^f r (r k )
(29)计算出 f r(fk)和 dr , 从而就可以计算出公式 (30) 中的每个求和项, 也就可以计算出总 的求和结果 J。 (29) Calculate f r ( f k) and dr so that each summation term in equation (30) can be calculated, and the total summation result J can be calculated.
因此, 在非线性函数优化方法中, 确定参数向量 p的问题就转化成对代价函数 J(p)求其全局最小 点的数学问题。  Therefore, in the nonlinear function optimization method, the problem of determining the parameter vector p is transformed into a mathematical problem of finding the global minimum point of the cost function J(p).
在非线性函数优化方法中, 可以采用如下三种方式来确定参数向量 p。  In the nonlinear function optimization method, the parameter vector p can be determined in the following three ways.
方式 (1 ) 、 常规数学优化方法。  Mode (1), conventional mathematical optimization method.
由于 J(p)中存在导数, 因此, 可以釆用经典的数学优化方法如梯度方法、共轭梯度方法等来确定 参数向 fip。  Since there are derivatives in J(p), classical mathematical optimization methods such as gradient method, conjugate gradient method, etc. can be used to determine the parameter to fip.
通过常规数学优化方法来确定参数向量 P的具体过程属于常规技术, 在本实施例中不再详细描 述。  The specific process of determining the parameter vector P by the conventional mathematical optimization method is a conventional technique and will not be described in detail in this embodiment.
方式 (2) 、 神经网络方法。  Mode (2), neural network method.
'通过神经网络方法来确定参数向量 p的具体过程属于常规技术, 在本实施例中不再详细描述。 方式 (3 ) 、 蛮力搜索方法 (Brutal Force Search Method) 。 所谓蛮力搜索, 顾名思义, 就是穷 尽搜索所有的可能性。  The specific process of determining the parameter vector p by the neural network method is a conventional technique and will not be described in detail in this embodiment. Method (3), Brutal Force Search Method. The so-called brute force search, as the name suggests, is to search for all possibilities.
对于参数取离散值的情况, 则参数所有可能取值的集合是有限集合, 那么, 逐一搜索集合中的 每个点, 就能够找到使得 J(p)最小的点, 这样, 就找到了全局最小点 ptrue。 但是, 这种情况很少, 在 绝大多数情况下, 参数是取连续值的, 因此, 参数所有可能取值的集合是无限集合, 无法真正进行 穷尽搜索。 For the case where the parameter takes a discrete value, then the set of all possible values of the parameter is a finite set. Then, by searching each point in the set one by one, the point that minimizes J(p) can be found, and thus the global minimum is found. Point p true . However, this situation is rare. In most cases, the parameters take continuous values. Therefore, the set of all possible values of the parameters is an infinite set, and the exhaustive search cannot be performed.
对于参数取连续值的情况,蛮力搜索方法可以将参数空间分成多个小的超立方体(Hypercube), 然后, 在每个超立方体中取一个点作为釆样点, 如超立方体的几何中心点等, 最后, 计算代价函数 在各个超立方体的采样点上的函数值, 找到使得代价函数最小的超立方体的采样点, 将该采样点作 为全局最小点。  For the case where the parameter takes a continuous value, the brute force search method can divide the parameter space into a plurality of small hypercubes, and then take a point in each hypercube as a sample point, such as the geometric center point of the hypercube. Etc. Finally, calculate the function value of the cost function at the sampling point of each hypercube, find the sampling point of the hypercube that minimizes the cost function, and use the sampling point as the global minimum point.
下面针对参数取连续值的情况、 结合附图对利用蛮力搜索方法确定 Gamma特性函数的参数的实 现过程进行详细描述。  The implementation process of determining the parameters of the Gamma characteristic function by the brute force search method will be described in detail below with reference to the case where the parameters take continuous values.
在本发明实施方式中, 可以利用关于参数的先验知识, 找到合适的起始搜索点, 这样, 可以大 大降低需要搜索的次数, 从而提高蛮力搜索方法的效率。 In the embodiment of the present invention, a prior knowledge of the parameters can be utilized to find a suitable starting search point, so that Large reductions in the number of searches required, thereby increasing the efficiency of the brute force search method.
蛮力搜索方法的原理如附图 12所示。  The principle of the brute force search method is shown in Figure 12.
图 12中, M-1个参数所有可能取值的集合构成了参数空间 (Parameter Space, 简称 PS) , 参数空 间是 M-1维欧式空间 RM—1的一个子集。 在确定了参数空间后, 蛮力搜索的实现方法包括如下步骤: 步骤一、 超立方体划分。 In Fig. 12, the set of all possible values of the M-1 parameters constitutes a parameter space (PS), and the parameter space is a subset of the M-1 dimensional European space RM- 1 . After the parameter space is determined, the implementation method of the brute force search includes the following steps: Step 1: Hypercube partitioning.
将 PS划分成多个 M-1超立方体 (Hypercube) , 附图 12中, ABCDEFGH, 8个点组成一个超立方 体。 由于每个参数的取值范围大小不同, 所以, 超立方体的每个边长也不同。  The PS is divided into a plurality of M-1 hypercubes, in Fig. 12, ABCDEFGH, 8 points form a hypercube. Since each parameter has a different range of values, each side of the hypercube has a different length.
设定第 k (k=l , 2 M-1 ) 个参数 pk的取值范围是 [mink, maxj, 对第 k个维度进行 Pk等分, 从而该维度上每个超立方体的边长是
Figure imgf000015_0001
Set the k (k=l, 2 M-1) parameter p k to the range of [min k , maxj, P k aliquots the kth dimension, so that the edge of each hypercube in this dimension Long is
Figure imgf000015_0001
从而每个超立方体的体积为:
Figure imgf000015_0002
Thus the volume of each hypercube is:
Figure imgf000015_0002
因此, 总的超立方体个数大于 Τ - Π^Ρ^。这个数值是可能的最大值, 如果 PS的形状不是一个 超立方体, 那么其包含的长立方体个数可能远远小于 T = π^-'ρ,。  Therefore, the total number of hypercubes is greater than Τ - Π^Ρ^. This value is the maximum possible. If the shape of the PS is not a hypercube, then the number of long cubes it contains may be much smaller than T = π^-'ρ.
对于每个超立方体用指标向量!: ,,…,^—^来表示, 其中 ik (k=l, 2, ..., M-1 , ik=l , 2,Use the indicator vector for each hypercube! : , ,...,^—^ to represent, where i k (k=l, 2, ..., M-1 , i k =l , 2,
3 Pk) 表示在第 k个维度上, 该超立方体是第 ik个。 3 P k ) indicates that in the kth dimension, the hypercube is the i kth .
因此, 对于第!二^^…^^^ 个超立方体来说, 其在各个维度上的坐标范围是:  So, for the first! For the two ^^...^^^ hypercubes, the coordinate range in each dimension is:
[mink + (ik - l)Ak , mink + ikAk] (33) [min k + (i k - l)A k , min k + i k A k ] (33)
该超立方体的几何中心<¾的坐标是- The geometric center of the hypercube is <3⁄4 coordinates -
[min! + Ί - Ι^Δ,,πώ^ + ( 2 - 1/2)Δ2, ,ιηΐη^ + ( Μ., - 1/2)ΔΜ.,]Τ (34) 步骤二、 选取初始搜索点。 [min! + Ί - Ι^Δ,, πώ^ + ( 2 - 1/2) Δ 2 , , ιηΐη^ + ( Μ ., - 1/2) Δ Μ .,] Τ (34) Step 2, Select Initial search point.
一般来说, 对于某个参数 Pk, 都存在一个比较合理的值, 可以作为初始值。 如 Gamma特性函数 釆用幂函数形式时, 对于视频输入设备来说, Gamma参数的取值一般在 2.2左右, 因为工业标准要求 是 2.2, 由于制造技术和产品品质的原因, Gamma参数可能会正负偏离 2.2, 但是在多数情况下, 比较 接近 2.2。 这样的话, 如果以 2.2作为初始搜索点开始搜索, 由于 2.2比较接近真实值, 则找到真实值 需要尝试的次数就比较少。 同样的道理, 可以为每个参数pk(k=l,2,...,M-l)找到其合适的初始值pintk, 那么这些初始值形成一个向量, 就是参数向量 p的初始值 Pint= [pintll, Pintk , Pin,, pint - n ] 步骤三, 根据选取的初始搜索点开始搜索。 In general, for a parameter Pk, there is a reasonable value, which can be used as the initial value. For example, when the Gamma characteristic function is in the form of a power function, the value of the Gamma parameter is generally around 2.2 for the video input device. Because the industry standard requires 2.2, the Gamma parameter may be positive or negative due to manufacturing technology and product quality. Deviated from 2.2, but in most cases, it is closer to 2.2. In this case, if the search is started with 2.2 as the initial search point, since 2.2 is closer to the true value, the number of attempts to find the real value is less. By the same token, each parameter p k (k=l, 2, ..., Ml) can be found with its appropriate initial value p intk , then these initial values form a vector, which is the initial value of the parameter vector p Pint = [p intll , Pintk , Pin,, p int - n ] Step 3, Start the search based on the selected initial search point.
首先判断 Pint落在哪个超立方体中, 通过比较坐标等方法可以判定出 Pint 在哪个超立方体中。 比 较坐标方法的具体实现过程为: First, determine which hypercube Pint falls in, and compare the coordinates and other methods to determine which hypercube Pint is in. The specific implementation process of the comparison coordinate method is:
设定该超立方体的坐标是 Itat
Figure imgf000015_0003
, 判断条件是: 对于 k=0, 1, 2..... M-1时, 当且仅当下述公式(35 )成立,则确定出 pint落在坐标为: ^^ [^,^,…^^(^ 的超立方体中。 mink + (iMk - l)Ak < pintk < mink + ϊ^Δ, ( 35 )
Set the coordinates of the hypercube to be I tat
Figure imgf000015_0003
, the judgment condition is: For k=0, 1, 2..... M-1, If and only if the following formula (35) holds, it is determined that p int falls in the hypercube with the coordinates: ^^ [^,^,...^^(^. min k + (i Mk - l)A k < p intk < min k + ϊ^Δ, ( 35 )
在确定了初始搜索点所在的超立方体后, 从该超立方体开始搜索。根据公式(30 )计算 J ( Pint), 如果 J ( Pi„t)能够使公式(36 )成立, 或者搜索过的超立方体满足预定条件, 如搜索过的超立方体的 数量达到预定数值等, 那么, 整个搜索过程结束, 到步骤五。 此时, Ptrue
Figure imgf000016_0001
After determining the hypercube in which the initial search point is located, the search starts from the hypercube. Calculating J ( Pint ) according to the formula (30), if J (Pi „ t ) can make the formula (36 ), or the searched hypercube satisfies a predetermined condition, such as the number of searched hypercubes reaches a predetermined value, etc., then , the entire search process ends, to step 5. At this point, Ptrue
Figure imgf000016_0001
优点, 即最终获得的 Gamma特性函数的参数向量。 The advantage is the parameter vector of the finally obtained Gamma property function.
J ( Pint) ≤Jthreshold ( 36)  J ( Pint) ≤ Jthreshold ( 36)
其中, JthreSh。ld是一个预先给定的门限值。 Among them, Jthre S h. Ld is a predefined threshold.
如果 J ( Pint) 不能够使公式 (36) 成立, 则到步骤四。 If J ( Pint ) does not make equation (36) true, go to step four.
步骤四、 继续搜索。  Step 4. Continue searching.
在步骤四中的继续搜索可以是分层进行的。 包围在初始超立方体外部的超立方体可以为一层或 多层。  The continuation search in step four can be done hierarchically. The hypercube surrounding the outside of the initial hypercube can be one or more layers.
在二维情况下, 初始超立方体和其外围多层超立方体如附图 13所示。  In the two-dimensional case, the initial hypercube and its peripheral multi-layer hypercube are shown in Figure 13.
图 13中, 中间灰色的正方形为初始超立方体, 与初始超立方体的边邻接的立方体为第一层超立 方体, 与第一层超立方体的边邻接的立方体为第二层超立方体, 与第二层超立方体的边廉价的立方 体为第三层超立方体。  In Fig. 13, the middle gray square is the initial hypercube, the cube adjacent to the edge of the initial hypercube is the first layer hypercube, the cube adjacent to the edge of the first layer hypercube is the second layer hypercube, and the second The cheap cube on the side of the layer hypercube is the third layer of hypercube.
本发明实施方式的分层搜索方法为: 逐次搜索初始超立方体之外的每一层中的每个超立方体, 在每一层超立方体的搜索中, 应按照预定顺序遍历该层中的每一个超立方体。 预定顺序可以是多种 多样的, 本发明实施方式不限制预定顺序的形式, 只要能够遍历一层中的超立方体就可以。  The hierarchical search method of the embodiment of the present invention is: successively searching each of the hypercubes in each layer except the initial hypercube, and in each layer of the search for the hypercube, each of the layers should be traversed in a predetermined order. Hypercube. The predetermined order may be varied, and the embodiment of the present invention does not limit the form of the predetermined order as long as it can traverse the hypercube in one layer.
在某一层超立方体搜索过程中, 当根据预定顺序搜索到某个超立方体时, 需要按照公式 (34 ) 计算该超立方体的几何中心 Q的坐标, 然后, 计算函数值 J ( Q) , 如果 J ( Q) 能够使公式 (37) 成 立, 或者搜索过的超立方体的数量达到预定数值, 那么, 整个搜索过程结束, 到步骤五。 此时, Ptrue In a layer of hypercube search, when searching for a hypercube according to a predetermined order, the coordinates of the geometric center Q of the hypercube need to be calculated according to formula (34), and then the function value J (Q) is calculated. J ( Q) can make formula (37), or the number of searched hypercubes reaches a predetermined value, then the entire search process ends, to step 5. At this point, Ptrue
= Q; = Q;
J ( Q ≤Jthreshold ( 37 )  J ( Q ≤ Jthreshold ( 37 )
如果 J ( Q) 不能够使公式 (37 ) 成立, 而且, 搜索过的超立方体的数量也没有达到预定数值, 继续根据预定顺序在本层超立方体中搜索。如果本层的超立方体搜索完成、且本层各超立方体的 K Q) 均不能够使公式 (37 ) 成立, 则继续搜索下一层超立方体。  If J ( Q) does not enable equation (37 ) and the number of searched hypercubes does not reach the predetermined value, continue searching in this layer of hypercubes according to the predetermined order. If the hypercube search for this layer is completed and the K Q) of each supercube in this layer is unable to make equation (37) true, continue searching for the next layer of hypercube.
当搜索完第 L层后, 不论是否找到满足条件(37)的超立方体的几何中心 Q, 搜索过程都将结束, 此时, 应将搜索到的最小的 J ( Q) 中的 Q作为 Ptrue。 到步骤五。 这里的 L是预先给定的一个门限值, 表示最多需要搜索的层数。  When the L-th layer is searched, the search process will end regardless of whether or not the geometric center Q of the hypercube that satisfies the condition (37) is found. At this time, the Q in the smallest J (Q) searched should be taken as Ptrue. Go to step five. Here, L is a predetermined threshold value indicating the number of layers that need to be searched at most.
步骤五, 搜索过程结束。  Step five, the search process ends.
上述搜索方法还可以应用于按照从粗到细的搜索过程中, 达到最快最好的搜索效果。  The above search method can also be applied to achieve the fastest and best search effect in the process from coarse to fine.
从粗到细的搜索过程如附图 14所示。  The search process from coarse to fine is as shown in Fig. 14.
图 14中, 首先, 按照上述步骤一到步骤五进行第一次搜索。 第一次搜索可以看成是粗搜索, 这 样, 可以将参数空间中的超立方体的边长设置的大一些, 这样, 参数空间中超立方体的数量较少。 在从粗到细的搜索过程中, 步骤三中搜索过的超立方体满足的预定条件可以为划分粒度是否粗于预 定划分粒度。 第一次搜索如果找到了满足条件 (36 ) 或者 (37 ) 的超立方体, 则搜索过程结束。 第 一次搜索过程可以采用分层搜索的方法。 In Fig. 14, first, the first search is performed in accordance with the above steps 1 through 5. The first search can be seen as a rough search, this In this way, you can set the side length of the hypercube in the parameter space to be larger, so that the number of hypercubes in the parameter space is small. In the search process from coarse to fine, the predetermined condition that the hypercube searched in step 3 satisfies may be whether the division granularity is coarser than the predetermined division granularity. First search If a hypercube that satisfies condition (36) or (37) is found, the search process ends. The first search process can use a hierarchical search method.
如果在第一次搜索过程中没有搜索到满足条件 (36 ) 或者 (37 ) 的超立方体, 而且, 超立方体 的粒度划分还没有达到预定粒度, 则在第一次搜索到的最小的 J ( Q) 对应的超立方体中进行第二次 较细的搜索, 此时, 应将第一次搜索到的最小的 J (Q) 对应的超立方体当成新的整个参数空间。 此 时的新的参数空间中的每个超立方体的边长变小了, 重复上述步骤一至步骤五的搜索过程。 同样, 在第二次较细的搜索过程中, 如果找到了满足条件 (36 ) 或者 (37 ) 的超立方体, 第二次搜索过程 结束。 第二次搜索过程可以采用分层搜索的方法。  If the hypercube that satisfies condition (36) or (37) is not searched during the first search, and the granularity of the hypercube has not reached the predetermined granularity, the smallest J (Q) found in the first time. The second finer search is performed in the corresponding hypercube. At this time, the smallest J (Q) corresponding hypercube searched for the first time should be regarded as the new entire parameter space. At this time, the length of each hypercube in the new parameter space becomes smaller, and the search process from the first step to the fifth step is repeated. Similarly, in the second, thinner search process, if a hypercube that satisfies condition (36) or (37) is found, the second search process ends. The second search process can employ a hierarchical search method.
如果在第二次较细的搜索过程中, 没有找到满足条件 (36 ) 或者 (37 ) 的超立方体, 而且, 超 立方体的粒度划分还没有达到预定粒度, 则在第二次搜索到的最小的 J ( Q) 对应的超立方体中进行 第三次更细的搜索, 依此类推, 将最后一次精细搜索找到的满足条件 (36 ) 或者 (37 ) 的超立方体 的几何中心作为全局最优点 Pttue, 即 Gamma特性函数的参数向量。  If the hypercube that satisfies the condition (36) or (37) is not found in the second finer search process, and the granularity of the hypercube has not reached the predetermined granularity, the smallest one found in the second search. The third finer search is performed in the corresponding hypercube of J (Q), and so on, the geometric center of the hypercube that satisfies the condition (36) or (37) found by the last fine search is taken as the global best advantage Pttue, That is, the parameter vector of the Gamma property function.
如果超立方体的粒度划分达到了预定粒度, 但是仍然没有找到满足条件 (36 ) 或 (37 ) 的超立 方体, 则搜索过程结束。 此时, 应将査找到的最小的 J ( Q)对应的超立方体的集合中心作为全局最 优点 Ptrue, SPGamma特性函数的参数向量。  If the granularity of the hypercube reaches the predetermined granularity, but the hyperelement satisfying the condition (36) or (37) is still not found, the search process ends. At this point, the collection center of the hypercube corresponding to the smallest J (Q) found should be taken as the global best advantage Ptrue, the parameter vector of the SPGamma property function.
在上述从粗到细的每一次的搜索过程中都可以采用分层搜索的方法。  A hierarchical search method can be employed in each of the above-described search processes from coarse to fine.
在通过上述方法确定了 Gamma特性函数的参数向量后, 就能够对 Gamma环节进行 Gamma校正 了。 这里, 需要进行 Gamma校正的环节可以为视频数据源设备, 也可以为视频通信网络中的中间设 备, 还可以为视频数据目的设备。  After the parameter vector of the Gamma characteristic function is determined by the above method, the Gamma link can be corrected by Gamma. Here, the link that needs to perform the gamma correction may be a video data source device, an intermediate device in the video communication network, or a video data destination device.
从上述技术方案的描述中可以看出, 本发明实施方式提供的 Gamma校正方法仅需要知道输出亮 度信号的直方图和一组宽松的假设条件就可以确定给定 Gamma环节的 Gamma特性参数, 从而为多媒 体通信系统提供了一种易于实现的 Gamma校正方法, 本发明实施方式提供的 Gamma校正方法具有很 高的应用可行性, 从而大大拓宽了 Gamma校正的应用范围, 特别能够针对 IPTV、 协作数据会议、 广 泛使用低端视频输入设备的公众视频通信提供了很好的 Gamma校正功能, 大大提高用户体验和服务 质量, 进一步提升上述业务的竞争力, 为电信运营商、服务提供商和设备厂商带来巨大的经济效益。  As can be seen from the description of the above technical solution, the gamma correction method provided by the embodiment of the present invention only needs to know the histogram of the output luminance signal and a set of loose assumptions to determine the gamma characteristic parameter of a given gamma link, thereby The multimedia communication system provides an easy-to-implement gamma correction method. The gamma correction method provided by the embodiment of the present invention has high application feasibility, thereby greatly broadening the application range of gamma correction, especially for IPTV, collaborative data conference, Public video communication using low-end video input devices provides a good gamma correction function, greatly improving user experience and service quality, further enhancing the competitiveness of these services, and bringing huge benefits to telecom operators, service providers and equipment manufacturers. Economic benefits.
本发明实施方式提供的视频通信伽玛特性的校正装置主要包括: 获取直方图模块、 第一转换模 块、 极值点计算模块、 存储模块、 第二转换模块、 Gamma特性参数求解模块和伽玛校正模块。  The apparatus for correcting video communication gamma characteristics provided by the embodiments of the present invention mainly includes: acquiring a histogram module, a first conversion module, an extreme point calculation module, a storage module, a second conversion module, a Gamma characteristic parameter solving module, and a gamma correction Module.
获取直方图模块主要用于获取输出亮度信号的亮度直方图, 并将其获得的亮度直方图输出至第 一转换模块。 获取直方图模块可以在输出亮度信号转换为输出图像帧之前获取输出亮度信号的亮度 直方图, 也可以从输出图像帧中获取输出亮度信号的亮度直方图。 具体如上述方法中的描述。  The acquisition histogram module is mainly used to obtain a luminance histogram of the output luminance signal, and output the obtained luminance histogram to the first conversion module. The acquisition histogram module can obtain a luminance histogram of the output luminance signal before converting the output luminance signal into an output image frame, and can also obtain a luminance histogram of the output luminance signal from the output image frame. Specifically, it is described in the above method.
第一转换模块主要用于将其接收的输出亮度信号的亮度直方图转换为输出亮度信号亮度分布概 率密度函数,并将输出亮度信号亮度分布概率密度函数分别输出至极值点计算模块和第二转换模块。 这 里 的 输 出 亮 度 信 号 亮 度 分 布 概 率 密 度 函 数 可 以 为 - fr (r) = cdrd + Cd— -1 + cd.2rd"2 + -…. + c】r + c0The first conversion module is mainly configured to convert a luminance histogram of the received output luminance signal into a luminance density distribution probability density function of the output luminance signal, and output the luminance signal distribution probability density function of the output luminance signal to the extreme point calculation module and the second conversion respectively. Module. Here the output luminance signal brightness distribution probability density function can be - f r (r) = c d r d + Cd - - 1 + c d . 2 r d " 2 + -.... + c]r + c 0 .
极值点计算模块主要用于在接收到输出亮度信号亮度分布概率密度函数后, 计算输出亮度信号 亮度分布概率密度函数的各个极值点, 并将计算获得的各个极值点传输至第二转换模块。 计算输出 亮度信号亮度分布概率密度函数的极值点的方法属于常规技术, 在此不再详细描述。  The extreme point calculation module is mainly configured to calculate each extreme point of the brightness distribution probability density function of the output brightness signal after receiving the brightness distribution probability density function of the output brightness signal, and transmit the calculated extreme points to the second conversion Module. The method of calculating the extreme point of the luminance density distribution probability density function of the luminance signal is a conventional technique and will not be described in detail herein.
存储模块主要用于存储输出亮度信号亮度分布概率密度函数的极值点与输入亮度信号亮度分布 概率密度函数的极值点之间的数学关系, 并存储输入、 输出亮度信号各自的亮度分布概率密度函数 和 Gamma特性函数之间的数学关系 d(e;p)ff (r) = fe(e)。 The storage module is mainly used for storing the mathematical relationship between the extreme point of the luminance density distribution probability density function of the output luminance signal and the extreme point of the luminance density distribution probability density function of the input luminance signal, and storing the luminance density probability density of each of the input and output luminance signals. The mathematical relationship between the function and the gamma property function is d(e;p)f f (r) = f e (e).
这里的输出亮度信号亮度分布概率密度函数的极值点与输入亮度信号亮度分布概率密度函数的 极值点之间的数学关系可以为: rk gie p p f;^/^, ^,...,/^]^ 当然, 这里的数学关系允 许稍加变换, 具体如上述方法中的描述。  Here, the mathematical relationship between the extreme point of the brightness distribution probability density function of the output luminance signal and the extreme point of the luminance density distribution probability density function of the input luminance signal may be: rk gie ppf;^/^, ^,...,/ ^]^ Of course, the mathematical relationship here allows for a slight transformation, as described in the above method.
第二转换模块主要用于根据其接收到的极值点、 输出亮度信号亮度分布概率密度函数、 存储模 块中存储的极值点的数学关系将存储模块中的输入、 输出亮度信号各自的亮度分布概率密度函数和 Gamma特性函数之间的数学关系 d(e;p)ff (r) = fe(e)转换为:在极值点处,输出亮度信号亮度分布概 率密度函数及其导函数与 Gamma特性函数及其反函数、 一阶导函数、 二阶导函数之间的数学关系: z(g-1(rk;p);p)fr(rk) + d2(g-1(rk;p);p)^¾) = 0,k = 1,2,3,....,J; The second conversion module is mainly used for respectively distributing the brightness distribution of the input and output luminance signals in the storage module according to the extreme points received, the luminance density distribution probability density function of the output luminance signal, and the mathematical relationship of the extreme points stored in the storage module. The mathematical relationship d(e;p)ff (r) = f e (e) between the probability density function and the gamma characteristic function is converted into: the probability density function of the luminance distribution of the output luminance signal and its derivative function at the extreme point The mathematical relationship between the Gamma characteristic function and its inverse, first derivative, and second derivative: z(g - 1 (r k ;p); p)f r (r k ) + d 2 (g- 1 (r k ;p);p)^3⁄4) = 0 ,k = 1,2,3,....,J;
dr  Dr
其中: k=l , 2, 3 , J, J为亮度分布概率密度函数的极值点数量, rk为输出亮度信号亮度 分布概率函数的极值点, 而且, 导函数^ ^为: Where: k = l , 2, 3 , J, J is the number of extreme points of the luminance distribution probability density function, r k is the extreme point of the luminance distribution probability function of the output luminance signal, and the derivative function ^ ^ is:
dr  Dr
= 1 + (d - l)cd,rd-2 + (d - 2)cd.2rd-3 + ..... + Cl= 1 + (d - l)c d , r d - 2 + (d - 2)c d . 2 r d - 3 + ..... + Cl .
dr  Dr
Gamma特性参数求解模块主要用于对第二转换模块转换后的数学关系进行求解计算, 以确定伽 玛特性参数。 Gamma特性参数求解模块可以采用直接求解方程法、 非线性函数优化方法等来确定伽 玛特性参数。这里的非线性函数优化方法包括常规数学优化方法、神经网络方法、蛮力搜索等。 Gamma 特性参数求解模块在采用蛮力搜索方法时, 可以采用分层搜索方法, 也可以采用从粗到细的分层搜 索方法等, 具体如上述方法中的描述。  The Gamma characteristic parameter solving module is mainly used to solve the mathematical relationship after the conversion of the second conversion module to determine the gamma characteristic parameter. The Gamma characteristic parameter solving module can determine the gamma characteristic parameters by directly solving the equation method, the nonlinear function optimization method, and the like. The nonlinear function optimization methods herein include conventional mathematical optimization methods, neural network methods, brute force search, and the like. The Gamma characteristic parameter solving module can adopt a hierarchical search method when using the brute force search method, or a hierarchical search method from coarse to fine, as described in the above method.
伽玛校正模块主要用于根据 Gamma特性参数求解模块获得的 Gamma特性参数对伽玛环节进行 伽玛校正。 这里的伽码环节包括: 单个给定 Gamma环节或者多个给定 Gamma环节的级联组合。  The gamma correction module is mainly used for gamma correction of the gamma link according to the Gamma characteristic parameter obtained by the Gamma characteristic parameter solving module. The gamma link here includes: a cascading combination of a given Gamma link or multiple given Gamma links.
本发明实施方式提供的装置位于视频设备中, 如位于视频数据源设备中、 位于视频通信网络的 中间设备中, 再如位于视频数据目的设备中。  The device provided by the embodiment of the present invention is located in a video device, such as in a video data source device, in an intermediate device of a video communication network, and in a video data destination device.
虽然通过实施例描绘了本发明, 本领域普通技术人员知道, 本发明有许多变形和变化而不脱离 本发明的精神, 本发明的申请文件的权利要求包括这些变形和变化。  While the invention has been described by the embodiments of the invention, it will be understood that

Claims

权利要求 Rights request
1、 一种视频通信伽玛特性的校正方法, 其特征在于, 包括: A method for correcting gamma characteristics of a video communication, comprising:
获取输出亮度信号的亮度直方图;  Obtaining a luminance histogram of the output luminance signal;
将输出亮度信号的亮度直方图转换为输出亮度信号亮度分布概率密度函数, 并确定输出亮度信 号亮度分布概率密度函数的极值点;  Converting a luminance histogram of the output luminance signal into a luminance density distribution probability density function of the output luminance signal, and determining an extreme point of the luminance density distribution probability density function of the output luminance signal;
建立输出亮度信号亮度分布概率密度函数的极值点与输入亮度信号亮度分布概率密度函数的极 值点之间的数学关系;  Establishing a mathematical relationship between an extreme point of the luminance density distribution probability density function of the output luminance signal and an extreme point of the luminance density distribution probability density function of the input luminance signal;
利用所述极值点、 以及极值点之间的数学关系将输入、 输出亮度信号各自的亮度分布概率密度 函数和 Gamma特性函数之间的数学关系转换为: 在极值点处, 输出亮度信号亮度分布概率密度函数 与 Gamma特性函数之间的数学关系;  Using the extreme value and the mathematical relationship between the extreme points, the mathematical relationship between the luminance density probability density function of the input and output luminance signals and the Gamma characteristic function is converted into: at the extreme point, the luminance signal is output a mathematical relationship between a luminance distribution probability density function and a Gamma characteristic function;
对所述转换后的数学关系进行求解, 以确定伽玛特性参数;  Solving the converted mathematical relationship to determine a gamma characteristic parameter;
根据所述伽玛特性参数对伽玛环节进行伽玛校正。  Gamma correction is performed on the gamma link according to the gamma characteristic parameter.
2、 如权利要求 1所述的方法, 其特征在于, 所 将输出亮度信号的亮度直方图转换为输出亮度 信号亮度分布概率密度函数的步骤包括:  2. The method of claim 1 wherein the step of converting the luminance histogram of the output luminance signal to the output luminance signal luminance distribution probability density function comprises:
将输出亮度信号的亮度直方图转换为多项式形式的输出亮度信号亮度分布概率密度函数: fr (r) = cdrd + Cd- -1 + cd.2rd-2 +…-. + c】r + c0Converting the luminance histogram of the output luminance signal into a polynomial form of the output luminance signal luminance distribution probability density function: f r (r) = c d r d + Cd- - 1 + c d . 2 r d - 2 +...-. + c]r + c 0 ;
其中: cd, cd-1 > cd-2 , cQ为 d+1个多项式系数, r为输出亮度信号的幅值。 Where: c d , c d-1 > c d-2 , c Q is d+1 polynomial coefficients, and r is the amplitude of the output luminance signal.
3、 如权利要求 2所述的方法, 其特征在于:  3. The method of claim 2, wherein:
设定输入、 输出亮度信号各自的亮度分布概率密度函数 fe(x,t;)、 fr(x,t) , 以及 Gamma特性函 数之间的数学关系为: The mathematical relationship between the luminance distribution probability density function f e (x, t;), f r (x, t) , and the Gamma characteristic function of each of the input and output luminance signals is set as follows:
d(e;p)fr(r) = fe(e) ; d(e;p)f r (r) = f e (e) ;
其中: r = g(e,p),Ve e [0,l] ; Where: r = g(e,p), Ve e [0,l] ;
设定输入、 输出亮度信号各自的亮度分布概率密度函数的极值点数量相同, 且定量的数学关系 为:  Set the maximum number of extreme points of the luminance distribution probability density function of the input and output luminance signals, and the quantitative mathematical relationship is:
rk = g(ek; P), P = [A , A, A,… , ΡΜΪ Rk = g(e k ; P), P = [A , A, A,... , ΡΜΪ
其中: k=l , 2, 3, ......, J; J为亮度分布概率密度函数的极值点数量;  Where: k = l , 2, 3, ..., J; J is the number of extreme points of the luminance distribution probability density function;
在极值点处,转换后的输出亮度信号亮度分布概率密度函数及其导函数与 Gamma特性函数及其 反函数、 导函数之间的数学关系为: z(g-1(rk;p);p)fr(rk) + d^g-'ir^p^p)^^ = 0,k = 1,2,3,...., J; At the extreme point, the mathematical relationship between the converted luminance signal density distribution density function and its derivative function and the Gamma characteristic function and its inverse and derivative functions is: z(g- 1 (r k ;p) ;p)f r (r k ) + d^g-'ir^p^p)^^ = 0,k = 1,2,3,...., J;
or  Or
其中: k=l, 2, 3 , J, J为亮度分布概率密度函数的极值点数量, rk为输出亮度信号亮度 分布概率函数的极值点, 而且, 导函数 为: Where: k = l, 2, 3, J, J is the number of extreme points of the luminance distribution probability density function, r k is the extreme point of the luminance distribution probability function of the output luminance signal, and the derivative function is:
dr = dcdrd-' + (d - l)cd,rd-2 + (d - 2)cd.2rd-3 +….. + c, 。 Dr = dc d r d -' + (d - l)c d , r d - 2 + (d - 2)c d . 2 r d - 3 +..... + c, .
dr  Dr
4、 如权利要求 3所述的方法, 其特征在于, 所述对所述转换后的数学关系进行求解, 以确定伽 玛特性参数的步骤包括: 4. The method according to claim 3, wherein the step of solving the converted mathematical relationship to determine a gamma characteristic parameter comprises:
利用直接求解方程法、 或者非线性函数优化方法对数学关系: z(g_1(rk;P);P)fr(rk) + 1,2,3,„..,J进行求解, 以确定伽玛特性参数。Solve the mathematical relationship by using the direct solution equation method or the nonlinear function optimization method: z(g _1 (r k ;P); P)f r (rk) + 1,2,3,„..,J Determine the gamma characteristic parameters.
Figure imgf000020_0001
Figure imgf000020_0001
5、 如权利要求 4所述的方法, 其特征在于, 利用非线性函数优化方法确定伽玛特性参数的步骤 包括: 5. The method of claim 4, wherein the step of determining a gamma characteristic parameter using a nonlinear function optimization method comprises:
根据所述输出亮度信号亮度分布概率密度函数与 Gamma特性函数之间的数学关系构造代价函 数: ' J(P) = ; Constructing a cost function according to the mathematical relationship between the brightness distribution probability density function of the output luminance signal and the Gamma characteristic function: ' J(P) = ;
Figure imgf000020_0002
在 M个伽玛特性参数中任意选取 M-1个伽玛特性参数,将伽玛特性参数空间的维度降低为 M-1 维;
Figure imgf000020_0002
Selecting M-1 gamma characteristic parameters arbitrarily from M gamma characteristic parameters, and reducing the dimension of the gamma characteristic parameter space to M-1 dimension;
确定 M-1个伽玛特性参数的方法为: 确定伽玛特性参数向量 Ptrue,使对于任意 p e RM1, 关系 JThe method for determining the M-1 gamma characteristic parameters is: determining the gamma characteristic parameter vector Ptrue so that for any pe R M - 1 , the relationship J
( P)
Figure imgf000020_0003
即为对于这
(P)
Figure imgf000020_0003
That is for this
M-1个伽玛特性参数所确定的数值; The value determined by the M-1 gamma characteristic parameters;
利用关系 g(1;P) = 1结合
Figure imgf000020_0004
, 确定剩下一个伽玛特性参数。
Use the relationship g (1; P) = 1 to combine
Figure imgf000020_0004
, determine the remaining gamma characteristic parameter.
6、 如权利要求 5所述的方法, 其特征在于, 确定 F e的方法包括: 组合优化方法、 或神经网络 方法、 或蛮力搜索方法。  6. The method of claim 5, wherein the method of determining F e comprises: a combined optimization method, or a neural network method, or a brute force search method.
7、 如权利要求 6所述的方法, 其特征在于, 所述蛮力搜索方法包括步骤:  7. The method of claim 6, wherein the brute force search method comprises the steps of:
将维度降低一维的伽玛特性参数空间划分为多个超立方体;  Dividing the dimensionally reduced one-dimensional gamma characteristic parameter space into multiple hypercubes;
选取初始搜索点, 并根据预定顺序从该初始搜索点所在的超立方体开始进行遍历搜索; 计算搜索过程中进入的每个超立方体的几何中心坐标 Q, 并根据所述代价函数以及搜索过程中 进入的超立方体计算 J (Q);  Selecting an initial search point, and performing a traversal search from the hypercube in which the initial search point is located according to a predetermined order; calculating a geometric center coordinate Q of each hypercube that enters during the search, and entering according to the cost function and the search process Hypercube calculation J (Q);
如果 J (Q)小于等于预定门限, 或者搜索过的超立方体满足预定条件, 则将本次搜索进入的超 立方体的几何中心坐标 Q作为 Ρ(ηκIf J (Q) is less than or equal to the predetermined threshold, or the searched hypercube satisfies the predetermined condition, the geometric center coordinate Q of the hypercube entered in this search is taken as Ρ(ηκ) .
8、 如权利要求 7所述的方法, 其特征在于, 所述初始搜索点根据实际应用中伽玛特性参数的经 验数值来设置。  8. The method of claim 7, wherein the initial search point is set according to an empirical value of a gamma characteristic parameter in an actual application.
9、 如权利要求 7所述的方法, 其特征在于, 所述遍历搜索包括: 以初始搜索点所在的超立方体  9. The method of claim 7, wherein the traversal search comprises: a hypercube in which an initial search point is located
1 X 作为初始超立方体, 将包围初始超立方体的超立方体按照距离初始超立方体的远近划分为依次包裹 前一层的多层超立方体阵列, 并逐层进行搜索。 1 X As the initial hypercube, the hypercube surrounding the initial hypercube is divided into a multi-layered hypercube array that sequentially wraps the previous layer according to the distance from the initial hypercube, and searches layer by layer.
10、 如权利要求 7所述的方法, 其特征在于:  10. The method of claim 7 wherein:
在蛮力搜索方法中, 维度降低一维的伽玛特性参数空间被划分为多个粗粒度的超立方体,所述 遍历搜索包括:  In the brute force search method, the dimensionally reduced one-dimensional gamma characteristic parameter space is divided into a plurality of coarse-grained hypercubes, and the traversal search includes:
以初始搜索点所在的超立方体作为初始超立方体, 将包围初始超立方体的超立方体按照距离初 始超立方体的远近划分为依次包裹前一层的多层超立方体阵列, 并逐层进行搜索;  Taking the hypercube in which the initial search point is located as the initial hypercube, the hypercube surrounding the initial hypercube is divided into multi-layer hypercube arrays which are sequentially wrapped in the previous layer according to the distance from the initial hypercube, and searched layer by layer;
将搜索到的满足条件的超立方体作为新的伽玛特性参数空间,并将其划分为更细粒度的超立方 体, 依次类推, 进行从粗到细的逐层搜索。  The searched hypercube that satisfies the condition is used as a new gamma characteristic parameter space, and is divided into finer-grained hypercubes, and so on, and a layer-by-layer search from coarse to fine.
11、 一种视频通信伽玛特性的校正装置, 其特征在于, 所述装置包括:  11. A device for correcting gamma characteristics of a video communication, the device comprising:
获取直方图模块: 用于获取输出亮度信号的亮度直方图, 并输出至第一转换模块;  Obtaining a histogram module: a luminance histogram for obtaining an output luminance signal, and outputting to the first conversion module;
第一转换模块: 用于将其接收的输出亮度信号的亮度直方图转换为输出亮度信号亮度分布概率 密度函数, 并输出至极值点计算模块和第二转换模块;  a first conversion module: configured to convert a luminance histogram of the received output luminance signal into an output luminance signal luminance distribution probability density function, and output to the extreme point calculation module and the second conversion module;
极值点计算模块: 用于计算其接收的输出亮度信号亮度分布概率密度函数的各个极值点, 并输 出至第二转换模块;  An extreme point calculation module: configured to calculate respective extreme points of the brightness distribution probability density function of the received output luminance signal, and output to the second conversion module;
存储模块: 用于存储输出亮度信号亮度分布概率密度函数的极值点与输入亮度信号亮度分布概 率密度函数的极值点之间的数学关系、 以及存储输入、 输出亮度信号各自的亮度分布概率密度函数 和 Gamma特性函数之间的数学关系;  The storage module: a mathematical relationship between an extreme point of the probability density function of the luminance distribution of the output luminance signal and an extreme point of the luminance density distribution probability density function of the input luminance signal, and a probability density of the luminance distribution of each of the input and output luminance signals The mathematical relationship between the function and the gamma property function;
第二转换模块: 用于根据其接收到的极值点、 输出亮度信号亮度分布概率密度函数、 存储模块 中存储的极值点的数学关系将存储模块中存储的输入、 输出亮度信号各自的亮度分布概率密度函数 和 Gamma特性函数之间的数学关系转换为: 在极值点处, 输出亮度信号亮度分布概率密度函数与 Gamma特性函数之间的数学关系;  The second conversion module is configured to: according to the extreme point received, the luminance signal distribution probability density function of the output luminance signal, and the mathematical relationship of the extreme points stored in the storage module, the respective brightness of the input and output luminance signals stored in the storage module The mathematical relationship between the distributed probability density function and the gamma characteristic function is converted to: at the extreme point, the mathematical relationship between the luminance density distribution probability density function of the luminance signal and the Gamma characteristic function is output;
Gamma特性参数求解模块:用于对所述转换后的数学关系进行求解计算, 以确定伽玛特性参数; 伽玛校正模块: 用于根据所述伽玛特性参数对伽玛环节进行伽玛校正。  The Gamma characteristic parameter solving module is configured to solve and calculate the converted mathematical relationship to determine a gamma characteristic parameter; and the gamma correction module is configured to perform gamma correction on the gamma link according to the gamma characteristic parameter.
12、 如权利要求 11 所述的装置, 其特征在于, 所述装置位于视频数据源设备中、 和 /或位于视 频通信网络的中间设备中、 和 /或位于视频数据目的设备。  12. Apparatus according to claim 11 wherein said apparatus is located in a video data source device, and/or in an intermediate device of a video communication network, and/or is located in a video data destination device.
1 Q 1 Q
PCT/CN2007/070121 2006-06-15 2007-06-15 A method and an apparatus for correcting the gamma characteristic of the video communication WO2007147363A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200610082861.4 2006-06-15
CN2006100828614A CN101047869B (en) 2006-06-15 2006-06-15 Method and device for correction gamma property of video communication

Publications (1)

Publication Number Publication Date
WO2007147363A1 true WO2007147363A1 (en) 2007-12-27

Family

ID=38772013

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2007/070121 WO2007147363A1 (en) 2006-06-15 2007-06-15 A method and an apparatus for correcting the gamma characteristic of the video communication

Country Status (2)

Country Link
CN (1) CN101047869B (en)
WO (1) WO2007147363A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI556643B (en) * 2015-01-26 2016-11-01 Senao Networks Inc Image adjustment method
CN118298779A (en) * 2024-06-05 2024-07-05 杭州群核信息技术有限公司 Gamma correction approximation method and device for color conversion

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110580690B (en) * 2019-09-02 2021-05-14 杭州雄迈集成电路技术股份有限公司 Image enhancement method for identifying peak value transformation nonlinear curve
CN111402147B (en) * 2020-02-26 2023-04-07 浙江大华技术股份有限公司 Video image processing method, video image processing device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1158531A (en) * 1996-01-18 1997-09-03 三星电子株式会社 Adaptive gamma correction device using integral look-up table
JP2000069327A (en) * 1998-08-24 2000-03-03 Matsushita Electric Ind Co Ltd Gamma-correction device
US20060023273A1 (en) * 2004-07-30 2006-02-02 Casio Computer Co., Ltd. Image pickup device with brightness correcting function and method of correcting brightness of image
CN1852414A (en) * 2005-11-28 2006-10-25 华为技术有限公司 Video code-flow gamma characteristic correction method and multi-point control unit
CN1852396A (en) * 2005-11-28 2006-10-25 华为技术有限公司 Video signal collection apparatus
CN1889693A (en) * 2005-06-30 2007-01-03 华为技术有限公司 Gamma characteristic correcting method and detecting method for determining equivalent model and parameter thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1158531A (en) * 1996-01-18 1997-09-03 三星电子株式会社 Adaptive gamma correction device using integral look-up table
JP2000069327A (en) * 1998-08-24 2000-03-03 Matsushita Electric Ind Co Ltd Gamma-correction device
US20060023273A1 (en) * 2004-07-30 2006-02-02 Casio Computer Co., Ltd. Image pickup device with brightness correcting function and method of correcting brightness of image
CN1889693A (en) * 2005-06-30 2007-01-03 华为技术有限公司 Gamma characteristic correcting method and detecting method for determining equivalent model and parameter thereof
CN1852414A (en) * 2005-11-28 2006-10-25 华为技术有限公司 Video code-flow gamma characteristic correction method and multi-point control unit
CN1852396A (en) * 2005-11-28 2006-10-25 华为技术有限公司 Video signal collection apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI556643B (en) * 2015-01-26 2016-11-01 Senao Networks Inc Image adjustment method
CN118298779A (en) * 2024-06-05 2024-07-05 杭州群核信息技术有限公司 Gamma correction approximation method and device for color conversion

Also Published As

Publication number Publication date
CN101047869B (en) 2011-04-27
CN101047869A (en) 2007-10-03

Similar Documents

Publication Publication Date Title
WO2018068532A1 (en) Image encoding and decoding devices, image processing system, image encoding and decoding methods, and training method
CN101365125B (en) Multipath video communication method and system
US9615101B2 (en) Method and apparatus for signal encoding producing encoded signals of high fidelity at minimal sizes
US8014617B2 (en) Decoding apparatus, dequantizing method, distribution determining method, and program thereof
CN101815995B (en) System and method for producing importance rate-based rich media, and server applied to the same
US9712820B2 (en) Predictive light field compression
Li et al. Robust batch steganography in social networks with non-uniform payload and data decomposition
WO2007147363A1 (en) A method and an apparatus for correcting the gamma characteristic of the video communication
CN108900532B (en) Electronic device, method, storage medium, and apparatus for message processing
US20110069142A1 (en) Mapping psycho-visual characteristics in measuring sharpness feature and blurring artifacts in video streams
EP3985983A1 (en) Interpolation filtering method and apparatus for intra-frame prediction, medium, and electronic device
Dai et al. Statistical analysis and distortion modeling of MPEG-4 FGS
WO2007140727A1 (en) Method and apparatus for correcting gamma characteristic in video communication
WO2008025293A1 (en) A method and apparatus for correcting the gamma characteristic of the video communication
CN115834890A (en) Image compression method, device, equipment and storage medium
CN113271474B (en) Method, device, equipment and storage medium for testing streaming media server
JP2013030852A (en) Scalable video encoding device and method and program
US20140269907A1 (en) Method and apparatus for signal encoding realizing optimal fidelity
JP7057721B2 (en) Video frame transmission equipment and programs
Theodoridis et al. Academic press library in signal processing: Image and Video Compression and Multimedia
CN115134583B (en) Video conference quality evaluation method and system
Masala et al. Content-based group-of-picture size control in distributed video coding
CN110290381A (en) Video quality evaluation method, device, electronic equipment and computer storage medium
US20240236320A1 (en) Fast search and selection of a transform kernel for av1 encoding
US11973812B2 (en) Video control method, video conference terminal and multi-point control unit (MCU)

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 07721742

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 07721742

Country of ref document: EP

Kind code of ref document: A1