Summary of the invention
The objective of the invention is to have overcome above-mentioned shortcoming of the prior art, provide a kind of can effectively solve damage that region of normal exposure, border occur that halation (Halo) and picture contrast loss excessive problem, processing procedure quickness and high efficiency, algorithm complex are lower, system and method thereof that stable and reliable working performance, the scope of application realize the image high dynamic range compression comparatively widely.
In order to realize above-mentioned purpose, the system and the method thereof of realization image high dynamic range compression of the present invention are following:
This realizes the system of image high dynamic range compression, and its main feature is that described system comprises:
The original image input unit is used to obtain pending image;
The exposure area computing unit is connected with described original image input unit, is used to calculate and divide the exposure area of pending image;
Comparing unit is connected with the exposure area computing unit with described original image input unit respectively, and the exposure area that is used for each pixel and this exposure area computing unit of pending image are divided relatively and select corresponding calibration curve;
Correcting unit is connected with described comparing unit, is used for proofreading and correct the new pixel value of generation according to corresponding calibration curve; And
The compressed images output unit is connected with described correcting unit, exports after being used for pixel value is mapped to suitable color space.
Exposure area in the system of this realization image high dynamic range compression is through the pixel value of analyzing pending image and the zone of pending image being cut apart according to the difference of depth of exposure.
Exposure area in the system of this realization image high dynamic range compression comprises overexposure zone, under-exposure zone, region of normal exposure and zone line.
Also comprise in the system of this realization image high dynamic range compression:
Illumination/details separator is connected with described original image input unit, is used for isolating illumination layer image and texture layer image from original image, and described illumination layer image is delivered in the computing unit of described exposure area;
Fusion device; Receive the texture layer image that illumination layer image and illumination/details separator after the correction of described correcting unit output are exported; And the illumination layer image after will proofreading and correct and texture layer image merge the back and produce compressed images, and export described compressed images output unit to.
This realizes the method for image high dynamic range compression, and its main feature is that described method may further comprise the steps:
(1) original image of input is analyzed, calculated and divide the exposure area of pending image;
(2) each pixel and the described exposure area with pending image compares, and selects corresponding calibration curve;
(3), proofread and correct the new pixel value of generation according to corresponding calibration curve to each pixel;
(4) described new pixel value is mapped to suitable color space and output.
The exposure area of dividing pending image is analyzed and calculated to the original image to input in the method for this realization image high dynamic range compression, may further comprise the steps:
(11) monochrome information of original image is analyzed, and marked off existing region of normal exposure, under-exposure zone, overexposure zone and zone line;
(12) calculate and obtain the luminance threshold in under-exposure zone, the luminance threshold in overexposure zone and the luminance threshold of region of normal exposure.
Existing region of normal exposure, under-exposure zone, overexposure zone and zone line are analyzed and marked off to the monochrome information to original image in the method for this realization image high dynamic range compression, may further comprise the steps:
(111) original image is γ according to the calibration curve of following formula representative in brightness1>1 mapping, the map image y after obtaining proofreading and correct1:
And original image is γ according to the calibration curve of following formula representative in brightness2<1 mapping, the map image y after obtaining proofreading and correct2:
Wherein, x is the original image of input;
(112) calculate original image x and the map image y that imports respectively1And y2In the gradient information of each pixel;
(113) successively with map image y1Do difference with the corresponding gradient of each pixel of the original image x that imports and obtain amplitude of variation Δ y1If x is this amplitude of variation Δ y1X is greater than the first threshold th of systemic presupposition1, then include this pixel in under-exposure zone; If this amplitude of variation Δ y1X is less than the 3rd threshold value th of systemic presupposition3, then include this pixel in region of normal exposure; Otherwise include this pixel in zone line;
(114) successively with map image y2Do difference with the corresponding gradient of each pixel of the original image x that imports and obtain amplitude of variation Δ y2If x is this amplitude of variation Δ y2X is greater than the second threshold value th of systemic presupposition2, then include this pixel in the overexposure zone; If this amplitude of variation Δ y2X is less than the 3rd threshold value th of systemic presupposition3, then include this pixel in region of normal exposure; Otherwise include this pixel in zone line.
γ in the method for this realization image high dynamic range compression1Value is 2.2.
γ in the method for this realization image high dynamic range compression2Value is 0.4545.
Calculating in the method for this realization image high dynamic range compression is also obtained the luminance threshold in under-exposure zone, the luminance threshold in overexposure zone and the luminance threshold of region of normal exposure, may further comprise the steps:
(121) count the brightness average m of each pixel in under-exposure zone1With variance v1, and with m1+ λ v1As the luminance threshold in under-exposure zone, wherein λ is the adjustment factor;
(122) count the brightness average m of each pixel in overexposure zone2With variance v2, and with m2-λ v2Luminance threshold as the overexposure zone;
(123) count the brightness average m of each pixel of region of normal exposure3With variance v3, and with m3+ λ v3As the higher limit of the luminance threshold of region of normal exposure, with m3-λ v3Lower limit as the luminance threshold of region of normal exposure.
Each pixel and described exposure area with pending image in the method for this realization image high dynamic range compression compare and select corresponding calibration curve, may further comprise the steps:
(21), then select the calibration curve of the brightness value of this pixel of lifting if described pixel is positioned at under-exposure zone;
(22), then select the calibration curve of the brightness value of this pixel of inhibition if described pixel is positioned at the overexposure zone;
(23), then select to keep the brightness value of this pixel constant or finely tune the calibration curve of this pixel brightness value if described pixel is positioned at region of normal exposure;
(24), then select preset zone line gamma correction curve if described pixel is positioned at zone line.
The calibration curve of the brightness value of the lifting pixel in the method for this realization image high dynamic range compression is the curve of following formula representative:
y=x1/γ;
Wherein, γ=2.2, x is the pixel brightness value before proofreading and correct, y is the pixel brightness value after proofreading and correct.
The calibration curve of the brightness value of the inhibition pixel in the method for this realization image high dynamic range compression is the curve of following formula representative:
y=x1/γ;
Wherein, γ=0.4545, x is the pixel brightness value before proofreading and correct, y is the pixel brightness value after proofreading and correct.
The brightness value of this pixel of maintenance in the method for this realization image high dynamic range compression calibration curve constant or that finely tune this pixel brightness value is the curve of following formula representative:
y=x;
Wherein, x is the pixel brightness value before proofreading and correct, and y is the pixel brightness value after proofreading and correct.
Zone line gamma correction curve in the method for this realization image high dynamic range compression is the curve of following formula representative:
y=kx+b;
Wherein, x is the pixel brightness value before proofreading and correct, and y is the pixel brightness value after proofreading and correct,x2Be the minimum pixel brightness value in the zone of the overexposure of zone line zone one side, y2Be the corresponding map intensity values of this pixel value, x1Be the maximum pixel brightness value in the zone of the under-exposure regional side of zone line, y1Be the corresponding map intensity values of this pixel value.
The pixel value with new in the method for this realization image high dynamic range compression is mapped to suitable color space and output, is specially:
According to the mapping relations of new pixel brightness value and original pixels brightness value, the brightness value of new pixel is mapped on R, G, the B component.
The new pixel brightness value in the method for this realization image high dynamic range compression and the mapping relations of original pixels brightness value are:
Wherein, ROUT, GOUTAnd BOUTBe respectively R, G, the B component of new pixel brightness value, RIN, GIN, BINBe respectively R, G, the B component of original pixels brightness value.
Step (1) in the method for this realization image high dynamic range compression is further comprising the steps of before:
(0) from the image of required compression, isolate illumination layer image and texture layer image, and with the original image of described illumination layer image as input;
Described step (4) is further comprising the steps of afterwards:
(5) illumination layer image and the texture layer image exported the back be will handle and back generation compressed images and output merged.
The system and the method thereof of the realization image high dynamic range compression of this invention have been adopted, owing to, divide normal exposure and under-exposure zone wherein through input picture is analyzed; Promote under-exposure regional luminance, keep region of normal exposure brightness, thus efficiently solve damage region of normal exposure in the high dynamic range compression method, halation (Halo) and the excessive problem of picture contrast loss appear in the border; And when keeping the region of normal exposure contrast; Promote the observability in under-exposure zone and overexposure zone, not only can directly apply to overall high Dynamic Compression, and can apply to brightness (illumination layer) compression in the local high Dynamic Compression; Simultaneously; Computational complexity of the present invention is extremely low, is convenient to real-time processing, the processing procedure quickness and high efficiency; Stable and reliable working performance, the scope of application are comparatively extensive.
Embodiment
In order more to be expressly understood technology contents of the present invention, the special following examples of lifting specify.
See also illustrated in figures 1 and 2ly, this realizes the system of image high dynamic range compression, comprising:
(1) the originalimage input unit 300, are used to obtain pending image;
(2) the exposurearea computing unit 301, are connected with described originalimage input unit 300, are used to calculate and divide the exposure area of pending image; Described exposure area is through the pixel value of analyzing pending image and the zone of pending image being cut apart according to the difference of depth of exposure; This exposure area can comprise overexposure zone, under-exposure zone, region of normal exposure and zone line;
(3) comparingunit 302; Be connected with exposurearea computing unit 301 with described originalimage input unit 300 respectively, the exposure area that is used for each pixel and this exposure area computing unit of pending image are divided relatively and select corresponding calibration curve;
(4) correctingunit 303, are connected with described comparingunit 302, are used for proofreading and correct the new pixel value of generation according to corresponding calibration curve; And
(5) the compressedimages output unit 304, are connected with described correctingunit 303, export after being used for pixel value is mapped to suitable color space.
As the system that realizes the image local high dynamic range compression, comprising:
(1) the originalimage input unit 10, are used to obtain pending image;
(2) the exposurearea computing unit 18, are connected with described originalimage input unit 10, are used to calculate and divide the exposure area of pending image; Described exposure area is through the pixel value of analyzing pending image and the zone of pending image being cut apart according to the difference of depth of exposure; This exposure area can comprise overexposure zone, under-exposure zone, region of normal exposure and zone line;
(3) comparingunit 20, are connected with exposurearea computing unit 18 with described originalimage input unit 10 respectively, and the exposure area that is used for each pixel and this exposure area computing unit of pending image are divided relatively and select corresponding calibration curve;
(4) correctingunit 22, are connected with described comparingunit 302, are used for proofreading and correct the new pixel value of generation according to corresponding calibration curve; And
(5) the compressedimages output unit 26, are connected with described correctingunit 303, export after being used for pixel value is mapped to suitable color space.
(6) illumination/details separator 12 is connected with described originalimage input unit 10, is used for isolating illumination layer image and texture layer image from original image, and describedillumination layer image 14 is delivered in the described exposurearea computing unit 18;
(7)fusion device 24; Receiveillumination layer image 14 andtexture layer image 16 that illumination/details separator 12 is exported after the correction of described correctingunit 22 outputs; And the illumination layer image after will proofreading and correct 14 merges the back withtexture layer image 16 and produces compressed images, and exports described compressedimages output unit 26 to.
In the middle of reality is used; Fig. 1 is the independently structural representation of an execution mode of overall high dynamic compression of a kind of high dynamic compression device conduct provided by the invention, and wherein, this device comprises: originalimage input unit 300; Exposurearea computing unit 301; Comparingunit 302, correctingunit 303, compressedimages output unit 304.
Originalimage input unit 300 is used to obtain pending image.
Exposurearea computing unit 301 is used to calculate and divide the exposure area of pending image.Said exposure area is meant through analyzing the pixel value of pending image, according to the difference of depth of exposure pending image is divided into overexposure zone, under-exposure zone, region of normal exposure and zone line.Above zone maybe be with a kind of existence the in five kinds of forms of Fig. 4 to Fig. 8 in pending image.
The exposure area that comparingunit 302 is used for each pixel of pending image and 301 is divided relatively and select corresponding calibration curve.
Correctingunit 303 is used for proofreading and correct the new pixel value of generation according to corresponding calibration curve.
Compressedimages output unit 304 is exported after being used for pixel value is mapped to suitable color space.
See also shown in Figure 2ly again, it is a kind of high dynamic compression device provided by the invention as the structural representation of an execution mode of illumination layer compression in the high dynamic compression in part, wherein; This device comprises: originalimage input unit 10, illumination/details separator 12,illumination layer image 14;Texture layer image 16, exposurearea computing unit 18, comparingunit 20; Correctingunit 22,fusion device 24, compressedimages output unit 26.
Originalimage input unit 10 is used to obtain pending image.
Illumination/details separator 12 is used for isolatingillumination layer image 14 andtexture layer image 16 from original image.In specific embodiment, illumination/details separator can be that Gauss's smoothing filter also can be the filter like the boundary reservation of other form.
Exposurearea computing unit 18 is used to calculate and divide the exposure area of pending image.Said exposure area is meant through analyzing the pixel value of illumination layer image, according to the difference of depth of exposure the illumination layer image is divided into overexposure zone, under-exposure zone, region of normal exposure and zone line.Above zone maybe be with a kind of existence the in five kinds of forms of Fig. 4 to Fig. 8 in pending image.
The exposure area that comparingunit 20 is used for each pixel of illumination layer image and 18 is divided relatively and select corresponding calibration curve.
Correctingunit 22 is used for proofreading and correct the new illumination layer pixel value of generation according to corresponding calibration curve.Illumination layer image after the correction and texture layer image produce compressed images throughfusion device 24.
Compressedimages output unit 26 is exported after being used for pixel value is mapped to suitable color space.
See also shown in Figure 3ly again, this realizes the method for image high dynamic range compression, comprising following steps:
(1) original image of input is analyzed, is calculated and divide the exposure area of pending image, may further comprise the steps:
(a) monochrome information of original image is analyzed, and is marked off existing region of normal exposure, under-exposure zone, overexposure zone and zone line, may further comprise the steps:
(i) original image is γ according to the calibration curve of following formula representative in brightness1>1 mapping, the map image y after obtaining proofreading and correct1:
And original image is γ according to the calibration curve of following formula representative in brightness2<1 mapping, the map image y after obtaining proofreading and correct2:
Wherein, x is the original image of input; This γ1Value is 22, γ2Value is 0.4545;
(ii) calculate the original image x and the map image y of input respectively1And y2In the gradient information of each pixel;
(iii) successively with map image y1Do difference with the corresponding gradient of each pixel of the original image x that imports and obtain amplitude of variation Δ y1If x is this amplitude of variation Δ y1X is greater than the first threshold th of systemic presupposition1, then include this pixel in under-exposure zone; If this amplitude of variation Δ y1X is less than the 3rd threshold value th of systemic presupposition3, then include this pixel in region of normal exposure; Otherwise include this pixel in zone line;
(iv) successively with map image y2Do difference with the corresponding gradient of each pixel of the original image x that imports and obtain amplitude of variation Δ y2If x is this amplitude of variation Δ y2X is greater than the second threshold value th of systemic presupposition2, then include this pixel in the overexposure zone; If this amplitude of variation Δ y2X is less than the 3rd threshold value th of systemic presupposition3, then include this pixel in region of normal exposure; Otherwise include this pixel in zone line;
(b) calculate and obtain the luminance threshold in under-exposure zone, the luminance threshold in overexposure zone and the luminance threshold of region of normal exposure, may further comprise the steps:
(i) count the brightness average m of each pixel in under-exposure zone1With variance v1, and with m1+ λ v1As the luminance threshold in under-exposure zone, wherein λ is the adjustment factor;
(ii) count the brightness average m of each pixel in overexposure zone2With variance v2, and with m2-λ v2Luminance threshold as the overexposure zone;
(iii) count the brightness average m of each pixel of region of normal exposure3With variance v3, and with m3+ λ v3As the higher limit of the luminance threshold of region of normal exposure, with m3-λ v3Lower limit as the luminance threshold of region of normal exposure;
(2) each pixel and the described exposure area with pending image compares, and selects corresponding calibration curve, may further comprise the steps:
(a), then select the calibration curve of the brightness value of this pixel of lifting if described pixel is positioned at under-exposure zone; The calibration curve of the brightness value of this lifting pixel is the curve of following formula representative:
y=x1/γ;
Wherein, γ=2.2, x is the pixel brightness value before proofreading and correct, y is the pixel brightness value after proofreading and correct;
(b), then select the calibration curve of the brightness value of this pixel of inhibition if described pixel is positioned at the overexposure zone; The calibration curve of the brightness value of this inhibition pixel is the curve of following formula representative:
y=x1/γ;
Wherein, γ=0.4545, x is the pixel brightness value before proofreading and correct, y is the pixel brightness value after proofreading and correct;
(c), then select to keep the brightness value of this pixel constant or finely tune the calibration curve of this pixel brightness value if described pixel is positioned at region of normal exposure; The brightness value of this this pixel of maintenance calibration curve constant or that finely tune this pixel brightness value is the curve of following formula representative:
y=x;
Wherein, x is the pixel brightness value before proofreading and correct, and y is the pixel brightness value after proofreading and correct;
(d), then select preset zone line gamma correction curve if described pixel is positioned at zone line; This zone line gamma correction curve is the curve of following formula representative:
y=kx+b;
Wherein, x is the pixel brightness value before proofreading and correct, and y is the pixel brightness value after proofreading and correct,x2Be the minimum pixel brightness value in the zone of the overexposure of zone line zone one side, y2Be the corresponding map intensity values of this pixel value, x1Be the maximum pixel brightness value in the zone of the under-exposure regional side of zone line, y1Be the corresponding map intensity values of this pixel value;
(3), proofread and correct the new pixel value of generation according to corresponding calibration curve to each pixel;
(4) described new pixel value is mapped to suitable color space and output, is specially:
According to the mapping relations of new pixel brightness value and original pixels brightness value, the brightness value of new pixel is mapped on R, G, the B component, the mapping relations of pixel brightness value that this is new and original pixels brightness value are:
Wherein, ROUT, GOUTAnd BOUTBe respectively R, G, the B component of new pixel brightness value, RIN, GIN, BINBe respectively R, G, the B component of original pixels brightness value.
For the method that realizes the image local high dynamic range compression, step wherein (1) is further comprising the steps of before:
(0) from the image of required compression, isolate illumination layer image and texture layer image, and with the original image of described illumination layer image as input;
Described step (4) is further comprising the steps of afterwards:
(5) illumination layer image and the texture layer image exported the back be will handle and back generation compressed images and output merged.
In the middle of reality was used, the present invention realized through following technical scheme:
This quick high dynamic range compression method; Through input picture is analyzed; Divide normal exposure, under-exposure or overexposure and zone line; The brightness and the contrast of maintenance region of normal exposure in under-exposure or brightness that overexposure is regional and the contrast in adjustment are compressed the brightness and the contrast of zone line simultaneously.
Since piece image generally by region of normal exposure, under-exposure or overexposure is regional and zone line in a kind of or whole the composition.So-called region of normal exposure is meant can on LDR equipment, normally show or posting field, dark or bright excessively situation can not occur.And what is called is under-exposure or overexposure is regional, is meant to cross dark or bright excessively zone when demonstration is perhaps write down on LDR equipment.Zone line then is between the zone between the above two.In order to adjust under-exposure simultaneously in the contrast that guarantees region of normal exposure or overexposure is regional, improve compression effectiveness, we adopt the thinking of dividing based on the exposure area to carry out high dynamic range compression.
The thought of method of the present invention is summed up as follows:
At first the monochrome information of original image or illumination layer is analyzed, marked off the region of normal exposure that possibly exist, under-exposure or overexposure is regional and zone line.Region of normal exposure and under-exposure or overexposure be regional all distinguishes the one or more threshold values in corresponding the input picture valid pixel scope, and the zone between region of normal exposure threshold value and under-exposure or the regional threshold value of overexposure is called zone line.Possible threshold distribution such as Fig. 4 are to shown in Figure 8; When region of normal exposure is positioned at input picture valid pixel scope intermediate pixel; As shown in Figure 4, be followed successively by from left to right: under-exposure zone (0~L1), zone line (L1~L2), region of normal exposure (L2~L3), zone line (L3~L4), overexposure zone (L4~1).When region of normal exposure is positioned at the low pixel region of input picture valid pixel scope, as shown in Figure 5, be followed successively by from left to right: region of normal exposure (0~L3), zone line (L3~L4), overexposure zone (L4~1).When region of normal exposure is positioned at the high pixel region of input picture valid pixel scope, as shown in Figure 6, be followed successively by from left to right: under-exposure zone (0~L1), zone line (L1~L2), region of normal exposure (L2~1).When region of normal exposure did not exist, like Fig. 7, shown in 8, entire image all was under-exposure zone or overexposure zone.
The method of analyzing and dividing various exposure areas has a lot, as passing through histogram analysis, through gradient analysis etc.Except above cited method, no matter finally adopt which kind of method, all do not deviate from basic thought of the present invention and do not exceed protection scope of the present invention.
Completion begins each zone is shone upon after the exposure area of original image or illumination layer is divided.At first shine upon for region of normal exposure; For the mapping principle in this zone is to be prerequisite not lose overall contrast, maximum after therefore should the normalization of zone input pixel and minimum value remain unchanged or finely tune after be mapped to maximum and the minimum value after the normalization of output pixel.The computational methods of the mapping curve that this is regional have a lot, can also can be S curve etc. for slope is fixed as a curve of 1.Except above cited method, no matter finally adopt which kind of method, all do not deviate from basic thought of the present invention and do not exceed protection scope of the present invention.
Secondly under-exposure zone is shone upon; For the mapping principle in this zone is to be prerequisite with the brightness that promotes dark portion zone, so this zone is mapped to value after the normalization of the output pixel value after with respect to the normalization of input pixel and has lifting by a relatively large margin.The computational methods of the mapping curve that this is regional have a lot, can through predefined correction curve also can through current pixel and on every side the adjacent pixel values dynamic calculation obtain etc.Except above cited method, no matter finally adopt which kind of method, all do not deviate from basic thought of the present invention and do not exceed protection scope of the present invention.
Then the overexposure zone is shone upon; For the mapping principle in this zone is to be prerequisite with the brightness that reduced bright area, so this zone is mapped to value after the normalization of the output pixel value after with respect to the normalization of input pixel and has inhibition by a relatively large margin.The computational methods of the mapping curve that this is regional have a lot, can through predefined correction curve also can through current pixel and on every side the adjacent pixel values dynamic calculation obtain etc.Except above cited method, no matter finally adopt which kind of method, all do not deviate from basic thought of the present invention and do not exceed protection scope of the present invention.
At last middle zone is shone upon; For the mapping principle in this zone is to be prerequisite to reduce this regional overall contrast, so there is inhibition by a relatively large margin in maximum and the missionary society of minimum value of difference after with respect to the normalization of input pixel that this zone is mapped to maximum and minimum value after the normalization of output pixel.The computational methods of the mapping curve that this is regional have a lot, the under-exposure zone after can also can passing through to shine upon through predefined correction curve or the input of overexposure zone and region of normal exposure and output pixel dynamic calculation etc.Except above cited method, no matter finally adopt which kind of method, all do not deviate from basic thought of the present invention and do not exceed protection scope of the present invention.
So far, high dynamic range compression method of the present invention finishes, if be applied to the illumination layer compression in the partial compression method, then combines the final compression result of back output with texture layer through the illumination layer after this method compression; If be applied to overall compression method, then compaction algorithms finishes.
Flow chart as an execution mode of high dynamic range compression method of the present invention specifically comprises the steps:
(1) calculates and obtains the under-exposure regional luminance threshold value that possibly exist, overexposure zone luminance threshold and the region of normal exposure luminance threshold that is applied to present image.
(2) from original image, obtain a pending pixel, as current pixel.
(3) brightness of calculating current pixel.It should be noted that; Dividing and shine upon based on the exposure area of brightness is a specific embodiment of this patent; No matter how to divide in concrete the realization and shine upon for exposure area and corresponding threshold; No matter finally adopt which kind of method, all do not deviate from basic thought of the present invention and do not exceed protection scope of the present invention; Likewise, no matter finally adopt which kind of method to calculate brightness, all do not deviate from basic thought of the present invention and do not exceed protection scope of the present invention.
(4) current pixel brightness and the under-exposure regional luminance threshold value that counts are compared,, then promote this pixel brightness value if current pixel is positioned at under-exposure zone.This pixel intensity output valve can through predefined correction curve also can through current pixel and on every side the adjacent pixel values dynamic calculation obtain etc.Adopt y=x in the present embodiment1/ γCorrection curve calculate brightness after the rectification in under-exposure zone, γ=2.2, x is for correcting the preceding pixel brightness value, y is for correcting the back pixel brightness value.No matter finally adopt which kind of method to calculate brightness, all do not deviate from basic thought of the present invention and do not exceed protection scope of the present invention;
If current pixel is positioned at the overexposure zone, then suppress this pixel brightness value.This pixel intensity output valve can through predefined correction curve also can through current pixel and on every side the adjacent pixel values dynamic calculation obtain etc.Adopt y=x in the present embodiment1/ γCorrection curve calculate brightness after the rectification in overexposure zone, γ=0.4545, x is for correcting the preceding pixel brightness value, y is for correcting the back pixel brightness value.No matter finally adopt which kind of method to calculate brightness, all do not deviate from basic thought of the present invention and do not exceed protection scope of the present invention;
If current pixel is positioned at region of normal exposure, then remains unchanged or finely tune this pixel brightness value.The computational methods of this pixel intensity output valve have a lot, can also can be S curve etc. for slope is fixed as a curve of 1.Brightness after the rectification of the correction curve calculating region of normal exposure of employing y=x in the present embodiment, x is for correcting the preceding pixel brightness value, and y is a pixel brightness value after the rectification.No matter finally adopt which kind of method, all do not deviate from basic thought of the present invention and do not exceed protection scope of the present invention;
If current pixel is positioned at zone line; Brightness after the rectification of the correction curve calculating zone line of employing y=kx+b in the present embodiment; X is for correcting the preceding pixel brightness value; Y is for correcting back pixel brightness value,
X wherein2Be the minimum pixel brightness value of zone line right side area, y2Be the corresponding map intensity values of this pixel value, x1Be the maximum pixel brightness value of zone line left field, y1Be the corresponding map intensity values of this pixel value.No matter finally adopt which kind of method, all do not deviate from basic thought of the present invention and do not exceed protection scope of the present invention.
(5) according to the relation of output pixel brightness value, the brightness value of output pixel is mapped to R, G, B component with the input pixel brightness value.Mapping relations in the present embodiment doR whereinOUT, GOUTAnd BOUTBe respectively R, G, the B component of output pixel, RIN, GIN, BINBe respectively R, G, the B component of input pixel.The brightness value of pixel is mapped to R, G, B component has a lot of methods, except above cited method, no matter finally adopts which kind of method in concrete the realization, does not all deviate from basic thought of the present invention and does not exceed protection scope of the present invention.
Said step (1) comprises following steps:
(11) entire image is the y=x of γ=2.2 and γ=0.4545 respectively in brightness1/ γMapping, output is respectively y1And y2
(12) difference calculating input image x and mapping y1And y2The gradient information of each pixel.The method of compute gradient has a lot, no matter finally adopts which kind of method, does not all deviate from basic thought of the present invention and does not exceed protection scope of the present invention.
(13) successively with y1The gradient corresponding with each pixel of input picture x is poor Δ y1X, when its amplitude of variation greater than threshold value th1The time, this pixel included in owe the zone of exposing to the sun.Count and owe to expose to the sun mean value of areas m1With variance v1, calculate m1+ λ v1As under-exposure regional luminance threshold value, wherein λ is the adjustment factor.
Similarly, successively with y2The gradient corresponding with each pixel of input picture x is poor Δ y2X, when its amplitude of variation greater than threshold value th2The time, include this pixel in the overexposure zone.Count overexposure mean value of areas m2With variance v2, calculate m2-λ v2As overexposure zone luminance threshold.As Δ y1X and Δ y2The amplitude of variation of x is less than threshold value th3The time, include this pixel in region of normal exposure.Count the average m of region of normal exposure3With variance v3, calculate m3+ λ v3, m3-λ v3Bound as the region of normal exposure luminance threshold.The transition in region of normal exposure and under-exposure zone and region of normal exposure and overexposure zone is called zone line.
The system and the method thereof of above-mentioned realization image high dynamic range compression have been adopted, owing to, divide normal exposure and under-exposure zone wherein through input picture is analyzed; Promote under-exposure regional luminance, keep region of normal exposure brightness, thus efficiently solve damage region of normal exposure in the high dynamic range compression method, halation (Halo) and the excessive problem of picture contrast loss appear in the border; And when keeping the region of normal exposure contrast; Promote the observability in under-exposure zone and overexposure zone, not only can directly apply to overall high Dynamic Compression, and can apply to brightness (illumination layer) compression in the local high Dynamic Compression; Simultaneously; Computational complexity of the present invention is extremely low, is convenient to real-time processing, the processing procedure quickness and high efficiency; Stable and reliable working performance, the scope of application are comparatively extensive.
In this specification, the present invention is described with reference to its certain embodiments.But, still can make various modifications and conversion obviously and not deviate from the spirit and scope of the present invention.Therefore, specification and accompanying drawing are regarded in an illustrative, rather than a restrictive.