A kind of for improving the method for video image permeability and dynamic range
Technical field
The present invention relates to video image technical field, be specially a kind of for improving the method for video image permeability and dynamic range.
Background technology
In recent years along with the fast development of computer technology and network technology and universal, video image technology has experienced from analog to digital, from numeral to network, a series of transformations from SD to high definition, and be used in the every field in the middle of people daily life, as safety monitoring, internet, medical treatment, automobile, household electrical appliances, mobile phone etc., present people have more and more 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, a high image main manifestations of permeability is image subject part clarity of detail, and bright dark clearly demarcated, stereovision is strong, non-main part may owe to expose to the sun or overexposure, lose part details, but eliminated the interference to human eye simultaneously, therefore can bring very strong visual impact to human eye, and a low image main manifestations of permeability is that image detail can be distinguished, but bright dark not clear, there is no level, overall picture is dusky.Dynamic range refers to that piece image can represent the ability of clear zone and dark space details simultaneously, general ratio or the decibel value that adopts clear zone brightness and dark space brightness assessed, a high image appearance of dynamic range is integral image clarity of detail, clear zone and dark space details are clear and legible, and a low image appearance of dynamic range is image section clarity of detail, owe to expose to the sun in clear zone overexposure or dark space, details is beyond recognition.In the practical application of video image technology, dynamic range is high again how to accomplish image permeability height, has become the target that each producer competitively chases.
From principle, there is certain alternative in these two indexs of permeability and dynamic range, therefore can only get its balance 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, also have relation with the display device of rear end in addition, the effect that different equipment shows tends to different, even widely different.Therefore,, in order to allow video image product can meet different scenes, the requirement of different user and different display devices, just need to provide a kind of convenient, fast and effective control method or instrument.Current video Related product on the market, these two indexs of permeability and dynamic range are all generally the professional person's adjustment by producer inside, and user is often helpless for the improvement of these two indexs.Traditional way is that user can be by regulating brightness or the contrast of image, or by regulating the improvement acquiring a certain degree with the wide dynamic rank of wide dynamic function video image product, and all these traditional control method functions are all more single, also underaction, is often difficult to reach the ideal effect that user wants.For a general video image product, if accomplish to regulate neatly image permeability and dynamic range, best bet is exactly the gamma curve of adjusting video images front end.The wide function such as dynamically of traditional brightness in fact, contrast and numeral is all that the principle based on gamma realizes, and therefore, if can accomplish gamma curve flexible, just can realize the function of any change image permeability and dynamic range.But the discrete point that gamma curve relates to is a lot, and must ensure that it is level and smooth, and can not lose details and the color of image itself, the difficulty often regulating is larger, this part work is generally completed by slip-stick artist, or the fixed curve that adopts gamma formula to calculate.
Gamma curve is a kind of for defining the curve of video image input and output corresponding relation, and traditional gamma curve often adopts fixing gamma formula to generate,
, wherein, I is display lighting intensity, V is input voltage,
for showing gamma; Wherein, the value of I and V [0,1],
for showing gamma, general display
be 2.2, curve as shown in Figure 1,
This is visible, when the normal image of one width shows on display, to tend to secretlyer, therefore in order addressing this problem, just need to carry out gamma correction to display or image, the principle of proofreading and correct is exactly the corresponding relation by changing image input voltage and output voltage, reach the object that adaptive display shows, best bet is exactly by showing that to display gamma formula carries out an inverse operation, obtains the formula of V and I, I is labeled as to input voltage, and V is labeled as output voltage.Suppose that image input voltage is Vi, output voltage is VO, and gamma correction curve is:
In order to allow the display effect linearization of display, as above formula
value is 2.2, just in time can allow the display brightness of display and the input voltage of video image draw equal sign.Fig. 2 is
the gamma correction curve of value 2.2.
But the image effect that linearization shows often can not allow human eye perceives comfortable, impression is exactly that permeability is poor the most intuitively, and image is dusky, and therefore a lot of producers adopt
value is 2.0 or 1.8, even
less calibration curve, makes integral image partially dark, and image comparison also can be more strongly like this, more comfortable to human eye perceives.But, the gamma curve that these are curing, general all scenes, all user and all rear end display devices of all can not being adapted to, therefore in order to allow video image product can show outstanding image quality under various utilization scenes, adjust gamma correction curve according to actual scene and just seem particularly important.
Summary of the invention
Object of the present invention provides one, and not only method of operating is easy, and can adjust the video image permeability of gamma correction curve and the method for dynamic range according to actual scene.
For achieving the above object, the invention provides following technical scheme:
For improving a method for video image permeability and dynamic range, comprise the following steps:
(1) superpose on the basis of the inner curve in the gamma correction module linearity curve of an acquiescence, is referred to as user's curve; And independent regulation between newly-increased user's curve and inner curve, is independent of each other, what user revised is user's curve, and inner curve can be regulated by slip-stick artist, and the output voltage of supposing user's curve is V
uo, input voltage is V
ui, relation between the two represents with following formula:
The output voltage of case of internal curve is V
o, input voltage is V
i, relation between the two represents with following formula:
(2) adopt the mode of user's curve modification user curve to realize the compound of user's curve and inner curve, thereby generate a new complex curve: use different region of memorys to store respectively inner curve and user's curve at video image interiors of products, then by computing, inner curve and user's curve are combined with each other, generate a new complex curve, then write gamma correction inside modules and make it to come into force;
Its operational method is as follows:
Adoption rate complex method, makes inner curve identical with the span of user's curve input and output, and the output valve of corresponding inner curve input and the output of the corresponding input of user's curve and the ratio of input are made to product, represents with following formula:
By above composite computing, finally generate a new complex curve, newly-generated complex curve is applied to gamma module and makes it 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 a slope, user drags the position of any point on straight line, this drags and is a little referred to as reference mark, and make straight-line bending and through reference mark, level and smooth in order to ensure reference mark place, slope before and after reference mark must be consistent with concavity and convexity, and the curve after dragging is continuous in first order derivative and the second derivative at reference mark place;
(4) permeability of the shape of user's curve and video image and dynamic range are mapped:
Because the maximum input of user's curve and maximum output equate, be all
, calculating the coordinate at reference mark according to principle of linear algebra, dark space coordinate is used
represent, clear zone coordinate is used
represent, because the movement at reference mark is perpendicular to acquiescence curve, draw the function of dark space and reference mark, clear zone motion track:
Set a scope to the amplitude of accommodation in dark space and clear zone, two end points are respectively
with
, suppose
with
be all the value of curve output terminal, the span at dark space and reference mark, clear zone is respectively:
Because opening is all more common interval to user's the amplitude of accommodation, such as [0,100] or [0,128] etc., by calculating two spans, this span is user's amplitude of accommodation, and actual coordinate figure and user's amplitude of accommodation are shone upon;
(5) thus reach by the reference mark of adjusting on user curve the object of improving image permeability and dynamic range.
As further scheme of the present invention, described gamma correction module is arranged on image product inside frequently.
As further scheme of the present invention, described user's curve has a reference mark in the centre position of initial point and maximum of points acquiescence, and on user's curve, have three reference mark at least, increase arbitrarily new reference mark or delete unwanted reference mark ensureing that user curve has at least on the basis at three reference mark.
As further scheme of the present invention, on user's curve, increase by two reference mark, one at acquiescence curve 1/4 place, one at acquiescence curve 3/4 place, and curve is labeled as to dark space lower than 1/2 place, be labeled as clear zone higher than 1/2 place, dark space is controlled by the reference mark at 3/4 place, and clear zone is controlled by the reference mark at 1/4 place.
The present invention, compared with conventional art, has the following advantages:
The present invention can be according to actual scene need to adjust user's curve, thereby realize the object of improving image permeability and dynamic range, method of operating is easy, and also can ensure curve smoothing, compared with traditional control method, aspect dirigibility and scene adaptability, having more advantage.
Brief description of the drawings
Fig. 1 is the graph of relation between luminous intensity and input voltage in prior art;
Fig. 2 is gamma correction curve figure in prior art;
Fig. 3 is cascade schematic diagram 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 reference mark on Fig. 5 user's curve of the present invention;
Fig. 6 the present invention improves the inner curve shape schematic diagram of image permeability;
Fig. 7 the present invention improves the inner curve shape schematic diagram of dynamic range of images;
Fig. 8 is the adjusting graph of a relation in user's curve of the present invention and dark space and clear zone;
Fig. 9 operational flowchart of the present invention.
Embodiment
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, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Embodiment
For improving a method for video image permeability and dynamic range, comprise the following steps:
(1) superpose on the basis of the inner curve in the gamma correction module linearity curve of an acquiescence, is referred to as user's curve; And independent regulation between newly-increased user's curve and inner curve, is independent of each other, what user revised is user's curve, and inner curve can be regulated by slip-stick artist, and the output voltage of supposing user's curve is V
uo, input voltage is V
ui, relation between the two represents with following formula:
The output voltage of case of internal curve is V
o, input voltage is V
i, relation between the two represents with following formula:
(2) compound by user's curve and inner curve, thus a new complex curve generated:
In order to allow user's curve and user's curve combining be combined with each other, the simplest mode is exactly cascade, after gamma correction module, uses user's curve again, and the input of user's curve is exactly the output of inner gamma correction module, i.e. V like this
ui=V
o, as shown in Figure 3:
So, obtain the user's curve output relation between inputting with inner curve, represent with following formula:
But, this mode needs the support of two gamma correction modules, and general product does not have two gamma correction modules, therefore adopt in this way and can only in specific product, apply, in order to use a gamma correction module that user's curve is separated with inner curve, need to adopt other mode; The present invention has adopted by the mode of user's curve modification inner curve and has realized, use different region of memorys to store respectively gamma inner curve and user's curve at interiors of products, then by computing, inner curve and user's curve are combined with each other, generate a new complex curve, then write gamma correction inside modules and make it to come into force; As shown in Figure 4:
Wherein, the compound mode of curve has a lot, in order to simplify calculating, adoption rate complex method of the present invention, because inner curve is identical with the span of user's curve input and output, therefore the output valve of corresponding inner curve input and the output of the corresponding input of user's curve and the ratio of input can be made to product, represent with following formula:
By above composite computing, finally generate a new complex curve, then complex curve is applied to gamma module and makes it 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 a slope, user can drag the position of any point on straight line on this basis, this drags and is a little referred to as reference mark, and make straight-line bending and through reference mark, level and smooth in order to ensure reference mark place, the slope before and after reference mark must be consistent with concavity and convexity, and the curve after dragging is continuous in first order derivative and the second derivative at reference mark place, as shown in Figure 5, in figure, reference mark coordinate is (V
uo (k), V
ui (k));
In order to meet this characteristic, can adopt various interpolation method to realize, wherein cubic spline interpolation is calculated easy, also relatively meet mankind's custom, it can become curve simulation a soft rope, drag reference mark and can make curve natural torsion, wherein the more important thing is the inner curve that the mode of this bending generates, not too easily cause image to occur serious distortion, be convenient to manipulation, when practical application, user can increase many arbitrarily reference mark on user's curve, while dragging reference mark, by program, interpolation is carried out in reference mark at every turn, generate new curve, until good results, if reference mark is too many when operation, also can delete existing reference mark, it should be noted that, in order to ensure the integrality of curve, must ensure has 3 reference mark on curve, wherein initial point and maximum of points are fixed, this is that the characteristic of inner curve determines, therefore only need in inner curve, additionally increase a reference mark, user's curve of the present invention's acquiescence is a straight line that slope is 1, in the centre position of initial point and maximum of points, acquiescence has a reference mark,
(4) permeability of the shape of user's curve and video image and dynamic range are mapped:
In order to improve the permeability of image, need to be by dimmed dark space in image, clear zone brightens, and removal of images is to the dusky sensation of human eye, and the inner curve of therefore improving image permeability will be shape as shown in Figure 6:
In order to improve the dynamic range of image, based on the principle of inner curve, dark space in image need to be brightened, clear zone is dimmed, and the inner curve of improving dynamic range of images will be shape as shown in Figure 7:
From two width curve synoptic diagrams shown in Fig. 6-7, change permeability and the dynamic range of image by user's curve, only need 4 reference mark, user is operated easier, the present invention is in the operation of open user's curve during to user, also increased a kind of more easy mode of operation, under default situations, on user's curve, increase by two reference mark, one at acquiescence curve 1/4 place, one at acquiescence curve 3/4 place, and low curve 1/2 place is labeled as to dark space, high 1/2 place is labeled as clear zone, dark space is controlled by the reference mark at 3/4 place, clear zone is controlled by the reference mark at 1/4 place, the present invention departs from a maximal value of amplitude setting of giving tacit consent to curve to reference mark, be opened to like this amplitude adjusted in dark space and clear zone, further simplify the difficulty of adjustment curve, as shown in Figure 8:
Because the maximum input of user's curve and maximum output equate, be all
, calculating the coordinate at reference mark according to principle of linear algebra, dark space coordinate is used
represent, clear zone coordinate is used
represent, because the movement at reference mark is perpendicular to acquiescence curve, draw the function of dark space and reference mark, clear zone motion track:
Set a scope to the amplitude of accommodation in dark space and clear zone, two end points are respectively
with
, for unified amplitude general orientation is for brightening, little direction is dimmed, supposes
with
be all the value of curve output terminal, the span at dark space and reference mark, clear zone is respectively:
Because opening is all more common interval to user's the amplitude of accommodation, such as [0,100] or [0,128] etc., utilize above two spans that calculate, actual coordinate figure and user's amplitude of accommodation are shone upon;
(5) thus reach by the reference mark of adjusting on user curve the object of improving image permeability and dynamic range.
As shown in Figure 9, and client is in the time of practical operation, only need to open image adjustment software, and be connected to equipment, regulate user's curve that permeability and dynamic range are arrived and require, wherein, regulate user's curve to have two kinds of different modes, one is to use a reusable curve manipulation control, and by reference mark direct control curve, another kind is to use the controls such as text box or slider bar to realize operation interface to regulate by the amplitude in dark space and clear zone:
By reference mark direct control curve: mouse is moved to the reference mark place on curve, drag mouse, change curve shape, thereby reach the object of improving image permeability and dynamic range, can on curve, increase or delete by mouse in addition the operation at reference mark.
Amplitude by dark space and clear zone regulates: when operation, drag slider bar slide block adjustable, the amplitude of turning right slide block strengthens, brightness is dimmed, the slide block amplitude of turning left reduces, and brightness is dimmed, and user can change dark space and clear zone value according to actual scene, reach the object of improving image permeability and dynamic range, increase clear zone value and reduce dark space value, image permeability increases, and dynamic range reduces; Reduce clear zone value and increase dark space value permeability to reduce, dynamic range increases.
To those skilled in the art, obviously the invention is not restricted to the details of above-mentioned example embodiment, and in the situation that not deviating from spirit of the present invention or essential characteristic, can realize the present invention with other concrete form.Therefore, no matter from which point, all should regard embodiment as exemplary, and be nonrestrictive, scope of the present invention is limited by claims instead of above-mentioned explanation, is therefore intended to all changes that drop in the implication and the scope that are equal to important document of claim to include in the present invention.
In addition, be to be understood that, although this instructions is described according to embodiment, but be not that each embodiment only comprises an independently technical scheme, this narrating mode of instructions is only for clarity sake, those skilled in the art should make instructions as a whole, and the technical scheme in each embodiment also can, through appropriately combined, form other embodiments that it will be appreciated by those skilled in the art that.