A kind of method for improving video image permeability and dynamic range
Technical field
The present invention relates to video image technical field, be specially a kind of method for improving video image permeability and dynamic range。
Background technology
Recently as the fast development of computer technology and network technology and universal, video image technology experienced by from analog to digital, from numeral to network, a series of transformations from SD to high definition, and it has been used in the every field in the middle of people's daily life, such as safety monitoring, the Internet, medical treatment, automobile, household electrical appliances, mobile phone etc., it may be said that present people have increasingly be unable to do without video。Thus, people are also more and more higher to the requirement of video image quality, and wherein permeability and dynamic range are to pass judgment on two very important indexs of video image quality。Permeability is that video image is experienced the most intuitively to human eye, the image main manifestations that one permeability is high is image subject part clarity of detail, and bright dark clearly demarcated, stereovision is strong, nonbody part is likely to owe to expose or overexposure, lose part details, but eliminate the interference to human eye simultaneously, therefore can bring visual impact strongly to human eye, and the low image main manifestations of permeability is that image detail can be distinguished, but bright dark not clear, it does not have level, overall picture is dusky。Dynamic range refers to that piece image can represent the ability in clear zone and dark space details simultaneously, the ratio or the decibel value that are generally adopted clear zone brightness and dark space brightness are assessed, the image appearance that one dynamic range is high is image entirety clarity of detail, clear zone and dark space details are clear and legible, and the low image appearance of dynamic range is image section clarity of detail, clear zone overexposure or dark space owe to expose, and details is beyond recognition。In the practical application of video image technology, how to accomplish that image permeability high dynamic range again is high, have become as the target that each producer competitively chases。
Principle, there is certain alternative in permeability and dynamic range the two index, therefore its balance can only be taken according to the visual custom of human eye, and different people, different scenes is different often to the requirement of image permeability and dynamic range, additionally also having relation with the display device of rear end, the effect that different equipment shows is often different, even widely different。Therefore, in order to be able to allow video image product can meet different scene, the requirement of different user and different display device, it is necessary to provide a kind of convenient, fast and effective control method or instrument。Video Related product on the market at present, permeability and dynamic range the two index are typically all the professional person's adjustment within producer, and user is often helpless for the improvement of the two index。Traditional way is brightness or the contrast that user can pass through to regulate image, or reach a degree of improvement by regulating the wide dynamically rank with wide dynamic function video image product, and all these traditional control method functions are all more single, also underaction, is often extremely difficult to the ideal effect that user wants。For a general video image product, if to accomplish to regulate neatly image permeability and dynamic range, it is desirable to way be exactly the gamma curve of adjusting video images front end。The functions such as in fact traditional brightness, contrast and numeral width are dynamic are all based on what the principle of gamma realized, if it is possible to accomplish gamma curve flexible, can be achieved with arbitrarily changing the function of image permeability and dynamic range。But the discrete point that gamma curve relates to is a lot, and must ensure that it smooths, and details and the color of image itself can not be lost, the difficulty often regulated is relatively larger, the work of this part is generally completed by engineer, or the fixed curve that employing gamma formula calculates。
Gamma curve is a kind of for defining video image input and the curve of output corresponding relation, and traditional gamma curve often adopts fixing gamma formula to generate, i.e. I=Vγ, wherein, I is display lighting intensity, and V is input voltage, and γ is then for display gamma;Wherein, the value [0,1] of I and V, γ then for display gamma, general display γ is 2.2, curve as it is shown in figure 1,
This is visible, when the one normal image of width shows over the display, often ratio is dark, therefore to solve this problem, it is necessary to display or image are carried out gamma correction, the principle of correction is through changing the corresponding relation of image input voltage and output voltage, reach the purpose that adaptive display show, it is desirable to way be through display display gamma formula is carried out an inverse operation, obtain the formula of V and I, I is labeled as input voltage, and V is labeled as output voltage。Assuming that image input voltage is Vi, output voltage is VO, then gamma correction curve is:
In order to allow the display effect linearisation of display, as above formula γ value is 2.2, then the display brightness of display and the input voltage of video image just can be allowed to draw equal sign。Fig. 2 is the gamma correction curve of γ value 2.2。
But, the image effect that linearisation shows tends not to allow human eye be comfortable on, impression is exactly that permeability is poor the most intuitively, image is dusky, therefore a lot of producers then adopt γ value to be 2.0 or 1.8, even γ less calibration trace, make image entirety partially dark, such image comparison also more strongly, can feel more comfortable to human eye。But, the gamma curve of these solidifications, generally all can not be adapted to all of scene, all of user and all of rear end display device, therefore to video image product can be allowed can to show outstanding image quality under various utilization scenes, adjust gamma correction curve according to actual scene and be just particularly important。
Summary of the invention
It is an object of the invention to provide one not only operational approach easy, and the video image permeability of gamma correction curve and the method for dynamic range can be adjusted according to actual scene。
For achieving the above object, the present invention provides following technical scheme:
A kind of method for improving video image permeability and dynamic range, comprises the following steps:
(1) linearity curve of superposition one acquiescence on the basis of the inner curve in gamma correction module, is referred to as user's curve;And independent regulation between newly-increased user's curve and inner curve, it being independent of each other, user's amendment is user's curve, and inner curve then can be adjusted by engineer, it is assumed that the output voltage of user's curve is Vuo, input voltage is Vui, relation equation below between the two represents:
Vuo=fu(Vui)
The output voltage assuming inner curve is VO, input voltage is Vi, relation equation below between the two represents:
Vo=f (Vi)
(2) mode of user's curve modification user's curve is adopted to realize the compound of user's curve and inner curve, thus generating a new composite curve: namely use different region of memorys to store inner curve and user's curve respectively at video image interiors of products, then pass through computing inner curve and user's curve to be combined with each other, generate a new composite curve, be then written to gamma correction inside modules so as to come into force;
Its operation method is as follows:
Adoption rate complex method, makes inner curve identical with the span of output with the input of user's curve, and the output valve output that inputs corresponding to user's curve input inner curve correspondence and the ratio of input make product, represent by equation below:
By above composite computing, ultimately generate a new composite curve, newly-generated composite curve is applied to gamma module so as to come into force;
(3) setting of user's curve:
It is 1 and through the straight line of initial point that user's curve is defaulted as slope, user drags the position of any point on straight line, this dragging point is referred to as control point, and make straight-line bending and through control point, in order to ensure that control point place smooths, slope before and after control point and concavity and convexity must be consistent, and namely the first derivative at control point place of the curve after dragging and second dervative are continuous;
(4) shape of user's curve is mapped with the permeability of video image and dynamic range:
Owing to the maximum input of user's curve and maximum output are equal, it is all Vu(max), the coordinate at control point, dark space coordinate (V is calculated according to principle of linear algebraui(l),Vuo(l)) represent, clear zone coordinate (Vui(h),Vuo(h)) represent, owing to the movement at control point is perpendicular to default curve, draw dark space and the function of control point, clear zone motion track:
A scope, two end points respectively M are set to the amplitude of accommodation in dark space and clear zonelAnd Mh, it is assumed that MlAnd MhBe all the value of curve outfan, then the span at dark space and control point, clear zone is respectively as follows:
Due to open be all more common interval to the amplitude of accommodation of user, such as [0,100] or [0,128] etc., obtaining two spans by calculating, this span is user's amplitude of accommodation, actual coordinate figure and user's amplitude of accommodation is mapped;
(5) by the control point on adjustment user's curve thus reaching to improve the purpose of image permeability and dynamic range。
As the further scheme of the present invention, described gamma correction module is arranged on inside frequency image product。
Further scheme as the present invention, described user's curve has a control point in the centre position of initial point and maximum of points acquiescence, and user's curve has at least three control point, ensureing that user's curve has at least on the basis at three control point and arbitrarily increases new control point or delete unwanted control point。
Further scheme as the present invention, user's curve increases by two control point, one at default curve 1/4 place, one at default curve 3/4 place, and curve is labeled as dark space lower than 1/2 place, being labeled as clear zone higher than 1/2 place, dark space is controlled by the control point of 3/4, and clear zone is controlled by the control point of 1/4。The present invention, compared with conventional art, has the advantage that
The present invention can according to actual scene need adjust user's curve, thus realizing improving the purpose of image permeability and dynamic range, operational approach is easy, and also can guarantee that curve smoothing, compared with traditional regulation method, in motility and scene adaptability, have more advantage。
Accompanying drawing explanation
Fig. 1 is the graph of relation in prior art between luminous intensity and input voltage;
Fig. 2 is gamma correction curve figure in prior art;
Fig. 3 is cascade principle figure of the present invention;
Fig. 4 is user's curve of the present invention and inner curve complex flow figure;
The action principle figure at control point on Fig. 5 user's curve of the present invention;
Fig. 6 present invention improves the inner curve schematic shapes of image permeability;
Fig. 7 present invention improves the inner curve schematic shapes of dynamic range of images;
Fig. 8 is the adjustment graph of a relation of user's curve of the present invention and dark space and clear zone;
Fig. 9 operational flowchart of the present invention。
Detailed description of the invention
Below in conjunction with the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments。Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under not making creative work premise, broadly fall into the scope of protection of the invention。
Embodiment
A kind of method for improving video image permeability and dynamic range, comprises the following steps:
(1) linearity curve of superposition one acquiescence on the basis of the inner curve in gamma correction module, is referred to as user's curve;And independent regulation between newly-increased user's curve and inner curve, it being independent of each other, user's amendment is user's curve, and inner curve then can be adjusted by engineer, it is assumed that the output voltage of user's curve is Vuo, input voltage is Vui, relation equation below between the two represents:
Vuo=fu(Vui)
The output voltage assuming inner curve is VO, input voltage is Vi, relation equation below between the two represents:
Vo=f (Vi)
(2) by the compound of user's curve Yu inner curve, thus generating a new composite curve:
In order to be able to allow user's curve and user's curve combining be combined with each other, simplest mode is exactly cascade, namely uses user's curve after gamma correction module again, and the input of such user's curve is exactly the output of internal gamma correction module, i.e. Vui=Vo, as shown in Figure 3:
Then, obtain the relation between the output of user's curve and inner curve input, represent by equation below:
Vuo=fu(Vo)=fu(f(Vui))
But, this mode needs the support of two gamma correction modules, and general product is all without there being two gamma correction modules, therefore adopt and can only apply in specific product in this way, in order to be able to use a gamma correction module to be separated with inner curve by user's curve, then need to adopt other mode;Present invention employs and realized by the mode of user's curve modification inner curve, namely different region of memorys is used to store gamma inner curve and user's curve respectively at interiors of products, then pass through computing inner curve and user's curve to be combined with each other, generate a new composite curve, be then written to gamma correction inside modules so as to come into force;As shown in Figure 4:
Wherein, the mode of curve compound has a lot, in order to simplify calculating, adoption rate complex method of the present invention, owing to inner curve is identical with the span of output with the input of user's curve, therefore the ratio of the output valve output that inputs corresponding to user's curve of inner curve correspondence input and input can be made product, represent by equation below:
By above composite computing, ultimately generate a new composite curve, then composite curve is applied to gamma module so as to come into force;
(3) setting of user's curve:
It is 1 and through the straight line of initial point that user's curve is defaulted as slope, user can drag the position of any point on straight line on this basis, this dragging point is referred to as control point, and make straight-line bending and through control point, in order to ensure that control point place smooths, the slope before and after control point and concavity and convexity must be consistent, and namely the first derivative at control point place of the curve after dragging and second dervative are continuous, as it is shown in figure 5, control point coordinate is (V in figureuo(k),Vui(k));
In order to meet this characteristic, various different interpolation method can be adopted to realize, wherein cubic spline interpolation calculates simplicity, also compare and meet mankind's custom, curve simulation can be become a soft rope by it, drag control point and can make curve natural torsion, wherein the more important thing is the inner curve that the mode of this bending generates, it is less susceptible to cause that serious distortion occurs in image, it is easy to manipulation, during practical application, user can increase arbitrarily many control point on user's curve, by program, control point is interpolated when dragging control point every time, generate new curve, till good results, if control point is too many during operation, existing control point can also be deleted, it should be noted that, in order to ensure the integrity of curve, must assure that curve has 3 control point, wherein initial point and maximum of points are fixed, this is that the characteristic of inner curve determines, therefore one control point of extra increase in inner curve is had only to, user's curve of present invention acquiescence is a slope is the straight line of 1, in the centre position of initial point and maximum of points, acquiescence has a control point;
(4) shape of user's curve is mapped with the permeability of video image and dynamic range:
In order to improve the permeability of image, it is necessary to by dimmed for dark space in image, clear zone brightens, eliminating image to the dusky sensation of human eye, the inner curve therefore improving image permeability would is that shape as shown in Figure 6:
In order to improve the dynamic range of image, based on the principle of inner curve, it is necessary to being brightened dark space in image, clear zone is dimmed, the inner curve improving dynamic range of images would is that shape as shown in Figure 7:
Two width curve synoptic diagrams shown in Fig. 6-7, permeability and the dynamic range of image is changed by user's curve, have only to 4 control point, make user operation easier, the present invention is when the operation of open user's curve is to user, too increase a kind of more easy mode of operation, under default situations, user's curve increases by two control point, one at default curve 1/4 place, one at default curve 3/4 place, and low for curve 1/2 place is labeled as dark space, high 1/2 place is labeled as clear zone, dark space is controlled by the control point of 3/4, clear zone is controlled by the control point of 1/4, the present invention deviates one maximum of amplitude set of default curve to control point, so it is opened to the amplitude adjusted in dark space and clear zone, further simplify the difficulty of adjustment curve, as shown in Figure 8:
Owing to the maximum input of user's curve and maximum output are equal, it is all Vu(max), the coordinate at control point, dark space coordinate (V is calculated according to principle of linear algebraui(l),Vuo(l)) represent, clear zone coordinate (Vui(h),Vuo(h)) represent, owing to the movement at control point is perpendicular to default curve, draw dark space and the function of control point, clear zone motion track:
A scope, two end points respectively M are set to the amplitude of accommodation in dark space and clear zonelAnd Mh, in order to uniform magnitude general orientation is for brightening, little direction is dimmed, it is assumed that MlAnd MhBe all the value of curve outfan, then the span at dark space and control point, clear zone is respectively as follows:
Due to open be all more common interval to the amplitude of accommodation of user, such as [0,100] or [0,128] etc., utilize above calculated two spans, actual coordinate figure and user's amplitude of accommodation mapped;
(5) by the control point on adjustment user's curve thus reaching to improve the purpose of image permeability and dynamic range。
As shown in Figure 9, and client is when practical operation, have only to open image adjustment software, and it is connected to equipment, regulate user's curve and make permeability and dynamic range arrival require, wherein, regulate user's curve and have mode two kinds different, one is to use a reusable curve manipulation control, and by the direct operating curve in control point, another kind is to use the control such as text box or slider bar to realize operation interface to be adjusted by the amplitude in dark space and clear zone:
By the direct operating curve in control point: mouse to be moved the control point place to curve, drag mouse, change curve shape, thus reaching to improve the purpose of image permeability and dynamic range, additionally can pass through mouse on curve, carrying out increasing or deleting the operation at control point。
It is adjusted by the amplitude in dark space and clear zone: during operation, drag slider bar slide block and scalable, amplitude of turning right slide block strengthens, brightness is dimmed, slide block turn left amplitude reduce, brightness is dimmed, and user can change dark space and clear zone value according to actual scene, reach to improve the purpose of image permeability and dynamic range, increasing clear zone value and reduce dark space value, image permeability increases, and dynamic range reduces;Reducing clear zone value and increase dark space value permeability reduction, dynamic range increases。
It is obvious to a person skilled in the art that the invention is not restricted to the details of above-mentioned one exemplary embodiment, and when without departing substantially from the spirit of the present invention or basic feature, it is possible to realize the present invention in other specific forms。Therefore, no matter from which point, embodiment all should be regarded as exemplary, and be nonrestrictive, the scope of the invention rather than described above limits, it is intended that all changes in the implication of the equivalency dropping on claim and scope included in the present invention。
In addition, it is to be understood that, although this specification is been described by according to embodiment, but not each embodiment only comprises an independent technical scheme, this narrating mode of description is only for clarity sake, description should be made as a whole by those skilled in the art, and the technical scheme in each embodiment through appropriately combined, can also form other embodiments that it will be appreciated by those skilled in the art that。