CN103067671B - A kind of method and device showing image - Google Patents

A kind of method and device showing image Download PDF

Info

Publication number
CN103067671B
CN103067671B CN201210591881.XA CN201210591881A CN103067671B CN 103067671 B CN103067671 B CN 103067671B CN 201210591881 A CN201210591881 A CN 201210591881A CN 103067671 B CN103067671 B CN 103067671B
Authority
CN
China
Prior art keywords
dynamic range
low dynamic
pixel
echograms
range echograms
Prior art date
Application number
CN201210591881.XA
Other languages
Chinese (zh)
Other versions
CN103067671A (en
Inventor
谢贤海
肖进胜
易本顺
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201210591881.XA priority Critical patent/CN103067671B/en
Publication of CN103067671A publication Critical patent/CN103067671A/en
Application granted granted Critical
Publication of CN103067671B publication Critical patent/CN103067671B/en

Links

Abstract

The invention discloses a kind of method and the device that show image, belong to computer realm.Described method comprises: obtain and take to Same Scene multiple low dynamic range echogramses obtained, from the picture content often opening low dynamic range echograms, obtain multiple sampled point, described sampled point is the pixel of the smooth region being positioned at low dynamic range echograms; Construct the first least cost function according to camera response model, by gaussian weighing function, Gauss's weighting is carried out to described first least cost function and obtain the second least cost function; According to multiple sampled points of described acquisition, by described second least cost function, the picture content of multiple low dynamic range echogramses described is synthesized the picture content of a high dynamic range images; The picture content of a described high dynamic range images is converted to a low dynamic range echograms to be shown, shows described low dynamic range echograms to be shown.This degree alleviating the cross-color of low dynamic range echograms.

Description

A kind of method and device showing image
Technical field
The present invention relates to computer realm, particularly a kind of method and device showing image.
Background technology
In data image, dynamic range is the ratio of max pixel value in image and minimum pixel value, the image that current imageing sensor collects is all low dynamic range echograms, and dynamic range in actual natural scene will far away higher than low-dynamic range, make the low dynamic range echograms of current imageing sensor collection can not show detailed information in real scene.
Wherein, can obtain multiple low dynamic range echogramses by taking pictures to Same Scene now, multiple low dynamic range echogramses obtained taking pictures synthesize a high dynamic range images, the detailed information in real scene is contained in the high dynamic range images of synthesis, a high dynamic range images of synthesis is converted to a low dynamic range echograms, and the detailed information that also contains in this low dynamic range echograms in real scene, then show this low dynamic range echograms.
Realizing in process of the present invention, inventor finds that prior art at least exists following problem:
Noise profile is there is in the low dynamic range echograms gathered by imageing sensor, make in the high dynamic range images of synthesis, to there is more serious cross-color problem, thus cause also there is more serious cross-color in the low dynamic range echograms changed by high dynamic range images.
Summary of the invention
In order to alleviate the degree of the cross-color of low dynamic range echograms, the invention provides a kind of method and the device that show image.Described technical scheme is as follows:
First aspect, a kind of method showing image, described method comprises:
Obtain and take to Same Scene multiple low dynamic range echogramses obtained, from the picture content often opening low dynamic range echograms, obtain multiple sampled point, described sampled point is the pixel of the smooth region being positioned at low dynamic range echograms;
Construct the first least cost function according to camera response model, by gaussian weighing function, Gauss's weighting is carried out to described first least cost function and obtain the second least cost function;
According to multiple sampled points of described acquisition, by described second least cost function, the picture content of multiple low dynamic range echogramses described is synthesized the picture content of a high dynamic range images;
The picture content of a described high dynamic range images is converted to a low dynamic range echograms to be shown, shows described low dynamic range echograms to be shown.
In the first possible implementation of first aspect, multiple low dynamic range echogramses obtained are taken in described acquisition to Same Scene, obtain multiple sampled point, comprising from the picture content often opening low dynamic range echograms:
According to the first number preset, the height of the low dynamic range echograms of described shooting and width, calculate the second number, described first number is the sampled point number obtained at the horizontal direction of described low dynamic range echograms, and described second number is the sampled point number obtained in the vertical direction of described low-dynamic range;
Preset the first number and described second number according to described, sample from the same position of the picture content often opening low dynamic range echograms, get multiple sampled points that the described picture content often opening low dynamic range echograms is corresponding;
From multiple sampled points that the described picture content often opening low dynamic range echograms is corresponding, remove the sampled point being positioned at non-smooth areas, retain multiple sampled points being positioned at smooth region that the described picture content often opening low dynamic range echograms is corresponding.
In conjunction with in the first possible implementation of first aspect, in the implementation that the second is possible, the sampled point being positioned at non-smooth areas is removed described multiple sampled points corresponding from the described picture content often opening low dynamic range echograms, retain multiple sampled points being positioned at smooth region that the described picture content often opening low dynamic range echograms is corresponding, comprising:
For any one sampled point, obtain the pixel adjacent with described sampled point, calculate the pixel value difference between described sampled point and each pixel of described acquisition, and calculate the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition further;
The mean value of the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition is calculated according to the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition;
If described mean value is greater than predetermined threshold value, then determine that described sample is in non-smooth areas, removes described sampled point, if described mean value is less than or equal to predetermined threshold value, then determine that described sample is in smooth region, retains described sampled point.
In the third possible implementation of first aspect, describedly construct the first least cost function according to camera response model, by gaussian weighing function, Gauss's weighting carried out to described first least cost function and obtain the second least cost function, comprising:
The camera response equation corresponding respectively according to adjacent two low dynamic range echogramses of camera response model structure, the camera response equation corresponding respectively according to described adjacent two low dynamic range echogramses, is constructed as follows the first least square cost function shown in formula (1);
O = Σ i = 1 N Σ j = 1 P Σ j ′ = 1 , j ′ ≠ j P [ g ( Z ij ) - g ( Z i j ′ ) - ln t i t j ′ ] 2 + λ Σ Z = 1 M g ′ ′ ( Z ) 2 . . . . . . ( 1 ) ;
Wherein, P is the number of the low dynamic range echograms of shooting, and N is the number of sampled point, and λ is smoothing factor, and Z is the pixel value that low dynamic range echograms comprises, and M is the number of the pixel value that low dynamic range echograms comprises and the difference of 2, Z ijfor jth opens i-th sampled point of low dynamic range echograms, Z ij 'for jth ' i-th sampled point of a low dynamic range echograms, jth opens a low dynamic range echograms and jth ' low dynamic range echograms is adjacent two low dynamic range echogramses, j '=j+1, g (Z ij) and g (Z ij ') be the camera response function value of pixel value, t jfor shooting jth opens the time for exposure that low dynamic range echograms uses, t j 'for the shooting jth ' time for exposure that a low dynamic range echograms uses;
By gaussian weighing function, Gauss's weighting is carried out to described first least square cost function, obtain the second least square cost function shown in following formula (2);
O = Σ i = 1 N Σ j = 1 P Σ j ′ = 1 , j ′ ≠ 1 P { w ( Z ij ) w ( Z i j ′ ) [ g ( Z ij ) - g ( Z ij ′ ) - ln t i t j ′ ] } 2 + λ Σ Z = 1 254 [ w ( Z ) g ′ ′ ( Z ) ] 2 . . . . . . ( 2 ) ;
Wherein, gaussian weighing function is following formula (3):
w ( z ) = exp ( - p × ( z - 127.5 ) 2 127.5 2 ) . . . . . . ( 3 ) ;
Wherein, in equation (3), z is the pixel value of pixel, and exp is for getting exponent arithmetic.
In conjunction with first aspect, or first of first aspect to any one the possibility implementation in the third, in the 4th possible implementation, described multiple sampled points according to described acquisition, by described second least cost function, multiple low dynamic range echogramses described are synthesized the picture content of a high dynamic range images, comprising:
According to multiple sampled points of described acquisition, obtained the camera response function value of the pixel value that low dynamic range echograms comprises by described second least cost function;
The camera response function value that the pixel value comprised according to described low dynamic range echograms is corresponding, synthesizes the picture content of a high dynamic range images by the picture content of described multiple low-dynamic ranges figure image.
In conjunction with in the 4th kind of possible implementation of first aspect, in the 5th kind of possible implementation, described multiple sampled points according to described acquisition, are obtained the camera response function value of the pixel value that low dynamic range echograms comprises, comprising by described second least cost function:
Ask derivative operation to obtain partial derivative to the camera response function value in described second least square cost function, each sampled point obtained is substituted into described partial derivative, constructs the linear equation that each sampled point of described acquisition is corresponding;
Linear equation corresponding for each sampled point of described acquisition is formed a system of linear equations, described linear equation is solved and obtains camera response function value corresponding to each pixel value that described low dynamic range echograms comprises.
In conjunction with in the 4th kind of possible implementation of first aspect, in the 6th kind of possible implementation, described multiple sampled points according to described acquisition, by described second least cost function, the picture content of multiple low dynamic range echogramses described is synthesized the picture content of a high dynamic range images, comprising:
The camera response function value of the pixel value that the pixel value often opening each pixel that low dynamic range echograms comprises according to described and described low dynamic range echograms comprise, calculates the illumination of each pixel that a high dynamic range images comprises;
The luminance component of the described high dynamic range images of illumination composition of each pixel that described high dynamic range images is comprised.
In conjunction with in the 6th kind of possible implementation of first aspect, in the 7th kind of possible implementation, the described picture content by a described high dynamic range images is converted to a low dynamic range echograms to be shown, shows described low dynamic range echograms to be shown, comprising:
The luminance component of described high dynamic range images is mapped to the luminance component of a low dynamic range echograms to be shown;
Often open according to described the first color difference components and the second color difference components that low dynamic range echograms comprises, obtain the first color difference components and the second color difference components that described low dynamic range echograms to be shown comprises;
The luminance component of described low dynamic range echograms to be shown, the first color difference components and the second color difference components are formed a low dynamic range echograms to be shown;
The display device of low-dynamic range shows described low dynamic range echograms to be shown.
Second aspect, a kind of device showing image, described device comprises:
Acquisition module, taking to Same Scene multiple low dynamic range echogramses obtained for obtaining, from the picture content often opening low dynamic range echograms, obtaining multiple sampled point, described sampled point is the pixel of the smooth region being positioned at low dynamic range echograms;
Weighting block, for constructing the first least cost function according to camera response model, carrying out Gauss's weighting by gaussian weighing function to described first least cost function and obtaining the second least cost function;
Synthesis module, for the multiple sampled points obtained according to described acquisition module, the picture content of multiple low dynamic range echogramses described is synthesized the picture content of a high dynamic range images by described second least cost function obtained by described weighting block;
Display module, the picture content for the described high dynamic range images synthesized by described synthesis module is converted to a low dynamic range echograms to be shown, shows described low dynamic range echograms to be shown.
In the first possible implementation of second aspect, described acquisition module comprises:
First computing unit, for the first number that basis is preset, the height of the low dynamic range echograms of described shooting and width, calculate the second number, described first number is the sampled point number obtained at the horizontal direction of described low dynamic range echograms, and described second number is the sampled point number obtained in the vertical direction of described low-dynamic range;
First acquiring unit, for described second number calculated according to described default first number and described first computing unit, sample from the same position of the picture content often opening low dynamic range echograms, get multiple sampled points that the described picture content often opening low dynamic range echograms is corresponding;
Removal unit, remove in multiple sampled points that the described picture content often opening low dynamic range echograms obtained from described first acquiring unit is corresponding the sampled point being positioned at non-smooth areas, retain multiple sampled points being positioned at smooth region that the described picture content often opening low dynamic range echograms is corresponding.
In conjunction with in the first possible implementation of second aspect, in the implementation that the second is possible, described removal unit comprises:
Obtain subelement, for for any one sampled point, obtain the pixel adjacent with described sampled point, calculate the pixel value difference between described sampled point and each pixel of described acquisition, and calculate the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition further;
First computation subunit, for calculating the mean value of the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition according to the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition;
Remove subelement, if be greater than predetermined threshold value for described mean value, then determine that described sample is in non-smooth areas, remove described sampled point, if described mean value is less than or equal to predetermined threshold value, then determine that described sample is in smooth region, retains described sampled point.
In the third possible implementation of second aspect, described weighting block comprises:
Structural unit, for the camera response equation corresponding respectively according to adjacent two low dynamic range echogramses of camera response model structure, the camera response equation corresponding respectively according to described adjacent two low dynamic range echogramses, is constructed as follows the first least square cost function shown in formula (1);
O = Σ i = 1 N Σ j = 1 P Σ j ′ = 1 , j ′ ≠ j P [ g ( Z ij ) - g ( Z i j ′ ) - ln t i t j ′ ] 2 + λ Σ Z = 1 M g ′ ′ ( Z ) 2 . . . . . . ( 1 ) ;
Wherein, P is the number of the low dynamic range echograms of shooting, and N is the number of sampled point, and λ is smoothing factor, and Z is the pixel value that low dynamic range echograms comprises, and M is the number of the pixel value that low dynamic range echograms comprises and the difference of 2, Z ijfor jth opens i-th sampled point of low dynamic range echograms, Z ij 'for jth ' i-th sampled point of a low dynamic range echograms, jth opens a low dynamic range echograms and jth ' low dynamic range echograms is adjacent two low dynamic range echogramses, j '=j+1, g (Z ij) and g (Z ij ') be the camera response function value of pixel value, t jfor shooting jth opens the time for exposure that low dynamic range echograms uses, t j 'for the shooting jth ' time for exposure that a low dynamic range echograms uses;
Weighted units, for carrying out Gauss's weighting by gaussian weighing function to the described first least square cost function that described structural unit constructs, obtains the second least square cost function shown in following formula (2);
O = Σ i = 1 N Σ j = 1 P Σ j ′ = 1 , j ′ ≠ 1 P { w ( Z ij ) w ( Z i j ′ ) [ g ( Z ij ) - g ( Z ij ′ ) - ln t i t j ′ ] } 2 + λ Σ Z = 1 254 [ w ( Z ) g ′ ′ ( Z ) ] 2 . . . . . . ( 2 ) ;
Wherein, gaussian weighing function is following formula (3):
w ( z ) = exp ( - p × ( z - 127.5 ) 2 127.5 2 ) . . . . . . ( 3 ) ;
Wherein, in equation (3), z is the pixel value of pixel, and exp is for getting exponent arithmetic.
In conjunction with second aspect, or first of second aspect may implementation to any one in the third, and in the 4th possible implementation, described synthesis module comprises:
Second acquisition unit, for the multiple sampled points according to described acquisition, obtains the camera response function value of the pixel value that low dynamic range echograms comprises by described second least cost function;
Synthesis unit, the camera response function value that the pixel value comprised for the described low dynamic range echograms obtained according to described second acquisition unit is corresponding, synthesizes the picture content of a high dynamic range images by the picture content of described multiple low-dynamic ranges figure image.
In conjunction with in the 4th kind of possible implementation of second aspect, in the 5th kind of possible implementation, described second acquisition unit comprises:
Substitute into subelement, for asking derivative operation to obtain partial derivative to the camera response function value in described second least square cost function, the each sampled point obtained is substituted into described partial derivative, constructs the linear equation that each sampled point of described acquisition is corresponding;
Solve subelement, form a system of linear equations for the linear equation that each sampled point by described acquisition is corresponding, described linear equation is solved and obtains camera response function value corresponding to each pixel value that described low dynamic range echograms comprises.
In conjunction with in the 4th kind of possible implementation of second aspect, in the 6th kind of possible implementation, described synthesis unit comprises:
Second computation subunit, for the camera response function value of the pixel value that the pixel value of often opening each pixel that low dynamic range echograms comprises according to described and described low dynamic range echograms comprise, calculate the illumination of each pixel that a high dynamic range images comprises;
Composition subelement, the illumination for each pixel comprised by described high dynamic range images forms the luminance component of a described high dynamic range images.
In conjunction with in the 6th kind of possible implementation of second aspect, in the 7th kind of possible implementation, described display module comprises:
Map unit, for being mapped to the luminance component of a low dynamic range echograms to be shown by the luminance component of described high dynamic range images;
3rd acquiring unit, often opens according to described the first color difference components and the second color difference components that low dynamic range echograms comprises for obtaining, and obtains the first color difference components and the second color difference components that described low dynamic range echograms to be shown comprises;
Component units, for forming a low dynamic range echograms to be shown by the luminance component of described low dynamic range echograms to be shown, the first color difference components and the second color difference components;
Display unit, for showing described low dynamic range echograms to be shown on the display device of low-dynamic range.
In embodiments of the present invention, multiple sampled point being positioned at smooth region is obtained from the picture content often opening low dynamic range echograms, the first least cost function is constructed according to camera response model, by gaussian weighing function, Gauss's weighting is carried out to the first least cost function and obtain the second least cost function, according to the multiple sampled points obtained, by the second least cost function, the picture content of multiple low dynamic range echogramses is synthesized the picture content of a high dynamic range images, the picture content of this high dynamic range images is converted to a low dynamic range echograms to be shown, show low dynamic range echograms to be shown.Wherein, the sample obtained is in smooth region, the noise of sampled point is less, the noise of low dynamic range echograms is Gaussian Profile, by gaussian weighing function, Gauss's weighting is carried out to the first least cost function and obtain the second least cost function, according to the sampled point obtained and when the picture content of multiple low dynamic range echogramses being synthesized a high dynamic range images by the second least cost function, the noise in low dynamic range echograms can be eliminated, so can alleviate the cross-color degree existed in the high dynamic range images of synthesis, and alleviate the cross-color degree existed in low dynamic range echograms to be shown.
Accompanying drawing explanation
Fig. 1 is a kind of method flow diagram showing image that the embodiment of the present invention provides;
Fig. 2 is a kind of method flow diagram showing image that another embodiment of the present invention provides;
Fig. 3 is the kind pixel distribution schematic diagram that the embodiment of the present invention provides;
Fig. 4 is a kind of method flow diagram showing image that another embodiment of the present invention provides;
Fig. 5 is a kind of the first structural representation showing the device of image that the embodiment of the present invention provides;
Fig. 6 is a kind of the second structural representation showing the device of image that the embodiment of the present invention provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
See Fig. 1, embodiments provide a kind of method showing image, comprising:
Step 101: obtain and take to Same Scene multiple low dynamic range echogramses obtained, obtains multiple sampled point from the picture content often opening low dynamic range echograms, and this sampled point is the pixel of the smooth region being positioned at low dynamic range echograms;
Step 102: construct the first least cost function according to camera response model, carries out Gauss's weighting by gaussian weighing function to the first least cost function and obtains the second least cost function;
Step 103: according to the multiple sampled points obtained, by the second least cost function, the picture content of multiple low dynamic range echogramses is synthesized the picture content of a high dynamic range images;
Step 104: the picture content of this high dynamic range images is converted to a low dynamic range echograms to be shown, shows low dynamic range echograms to be shown.
In embodiments of the present invention, multiple sampled point being positioned at smooth region is obtained from the picture content often opening low dynamic range echograms, the first least cost function is constructed according to camera response model, by gaussian weighing function, Gauss's weighting is carried out to the first least cost function and obtain the second least cost function, according to the multiple sampled points obtained, by the second least cost function, the picture content of multiple low dynamic range echogramses is synthesized the picture content of a high dynamic range images, the picture content of this high dynamic range images is converted to a low dynamic range echograms to be shown, show low dynamic range echograms to be shown.Wherein, the sample obtained is in smooth region, the noise of sampled point is less, the noise of low dynamic range echograms is Gaussian Profile, by gaussian weighing function, Gauss's weighting is carried out to the first least cost function and obtain the second least cost function, according to the sampled point obtained and when the picture content of multiple low dynamic range echogramses being synthesized a high dynamic range images by the second least cost function, the noise in low dynamic range echograms can be eliminated, so can alleviate the cross-color degree existed in the high dynamic range images of synthesis, and alleviate the cross-color degree existed in low dynamic range echograms to be shown.
Embodiments provide a kind of method showing image.Wherein, in the present embodiment, carrying out shooting to Same Scene with different exposure time by camera obtains multiple low dynamic range echogramses in advance, and multiple low dynamic range echogramses that shooting obtains are synthesized a low dynamic range echograms to be shown by the method provided by the embodiment of the present invention.See Fig. 2, the method comprises:
Step 201: carry out shooting by camera to Same Scene and obtain multiple low dynamic range echogramses, obtains and often opens time for exposure of low dynamic range echograms, luminance component, the first color difference components and the second color difference components;
Particularly, by camera, shooting is carried out to Same Scene and obtain multiple low dynamic range echogramses, the time for exposure of often opening low dynamic range echograms is obtained from camera, from often opening low dynamic range echograms the R component, G component and the B component that obtain and often open low dynamic range echograms, being changed often opening the R component of low dynamic range echograms, G component and B component by the mode of matrixing, often being opened the luminance component of low dynamic range echograms, the first color difference components and the second color difference components.
Wherein, camera to be taken Same Scene with different exposure time and is obtained the different low dynamic range echograms of multiple bright-dark degrees, and the width often opening low dynamic range echograms is with highly all identical, often opening in low dynamic range echograms, the brightness that Same Scene point is often opening pixel corresponding in low dynamic range echograms is all identical, but the time for exposure is all different.
Step 202: sample from the same position of the luminance component often opening low dynamic range echograms, gets multiple sampled point, and the sampled point obtained is the pixel being positioned at the smooth region often opening low dynamic range echograms;
Particularly, this step can comprise (1) as follows and, to the step of (3), comprising:
(1): according to the first number preset, the height of low dynamic range echograms and width, calculate the second number, the first number is the sampled point number obtained at the horizontal direction of low dynamic range echograms, and the second number is the sampled point number obtained in the vertical direction of low-dynamic range;
Particularly, according to height and the width of low dynamic range echograms, ratio between the height and the width of calculating low dynamic range echograms, the ratio of calculating is done product calculation with default first number and obtains the second number, presetting the first number is the sampled point number obtained at the horizontal direction of low dynamic range echograms, and the second number is the sampled point number obtained in the vertical direction of low-dynamic range.
Wherein, by camera, the width of multiple low dynamic range echogramses obtained is taken with highly all identical to Same Scene, so identical according to presetting second number of often opening low dynamic range echograms that calculates of the first number.
(2) multiple sampled points that the luminance component of often opening low dynamic range echograms is corresponding: according to the second number presetting the first number and calculating, sample from the same position of the luminance component often opening low dynamic range echograms, are got;
Particularly, for wherein any low dynamic range echograms, the vertical direction of the luminance component of this low dynamic range echograms is selected the second number row pixel at equal intervals, select to preset first several pixel at the every a line pixel equal intervals selected, the pixel of selection is defined as the sampled point that the luminance component of this low dynamic range echograms is corresponding, the number of the sampled point obtained of so sampling from the luminance component often opening low dynamic range echograms is the product of the first number and the second number; Multiple sampled points corresponding to other luminance components often opening low dynamic range echograms are obtained by above-mentioned identical method.
Wherein, owing to taking the width of multiple low dynamic range echogramses obtained with highly all identical by camera to Same Scene, so identical according to presetting second number of often opening low dynamic range echograms that calculates of the first number, and according to presetting the second number of the first number and calculating, can sample from the same position of the luminance component often opening low dynamic range echograms by the process of this step, often be opened multiple sampled points that low dynamic range echograms is corresponding.
(3), remove from multiple sampled points that the luminance component often opening low dynamic range echograms is corresponding and be positioned at the sampled point of non-smooth areas, retain multiple sampled points being positioned at smooth region that the luminance component of often opening low dynamic range echograms is corresponding.
Particularly, for arbitrary low dynamic range echograms, any one sampled point that luminance component for this low dynamic range echograms is corresponding, obtain the pixel adjacent with this sampled point, calculate the pixel value difference between this sampled point and each pixel of acquisition, and calculate the absolute value of the pixel value difference between this sampled point and each pixel of acquisition further, the mean value of the absolute value of the pixel value difference between this sampled point and each pixel of acquisition is calculated according to the absolute value of the pixel value difference between this sampled point and each pixel of acquisition, if the mean value calculated is greater than predetermined threshold value, then determine that this sample is in non-smooth areas, remove this sampled point, if the mean value calculated is less than or equal to predetermined threshold value, then determine that this sample is in smooth region, and retain this sampled point, other sampled points corresponding to this low dynamic range echograms, judge whether to be positioned at smooth region by above-mentioned identical method, if so, then retain, if not, then remove, and, from other, sampled point removed multiple sampled points corresponding to low dynamic range echograms and be positioned at non-smooth areas is often opened by above-mentioned identical method to other low dynamic range echogramses.
Wherein, the sampled point being positioned at smooth region is the pixel being positioned at smooth region, the sampled point being positioned at non-smooth areas is the pixel being positioned at non-smooth areas, the pixel be usually located in non-smooth areas is the point on object edge, or be noise spot, therefore, from often opening the sampled point removed multiple sampled points corresponding to low dynamic range echograms and be positioned at non-smooth areas, can ensure to be left often to open multiple sampled points corresponding to low dynamic range echograms be all the sampled point being positioned at smooth region, and due to be positioned at smooth region sampled point near scene illumination values be consistent, so be effectively can reduce correction error at synthesis high dynamic range images.
Such as, see Fig. 3, for sampled point k, the pixel obtaining sampled point k direct neighbor is respectively pixel a, b, c, d, e, f, g, h, according to the pixel value Z of sampled point k kwith the pixel value Z of pixel a apixel value difference between calculating sampling point k and pixel a is Z k-Z a, according to the pixel value Z of sampled point k kwith the pixel value Z of pixel b bpixel difference between calculating sampling point k and pixel b is Z k-Z b, according to the pixel value Z of sampled point k kwith the pixel value Z of pixel c cpixel difference between calculating sampling point k and pixel c is Z k-Z c, according to the pixel value Z of sampled point k kwith the pixel value Z of pixel d dpixel difference between calculating sampling point k and pixel d is Z k-Z d, according to the pixel value Z of sampled point k kwith the pixel value Z of pixel e epixel difference between calculating sampling point k and pixel e is Z k-Z e, according to the pixel value Z of sampled point k kwith the pixel value Z of pixel f fpixel difference between calculating sampling point k and pixel f is Z k-Z f, according to the pixel value Z of pixel k kwith the pixel value Z of pixel g gpixel difference between calculating sampling point k and pixel g is Z k-Z g, according to the pixel value Z of pixel k kwith the pixel value Z of pixel h hpixel difference between calculating sampling point k and pixel h is Z k-Z hthe absolute value of the pixel value difference of calculating sampling point k respectively and between pixel a, b, c, d, e, f and g again, according to the absolute value of the pixel value difference of sampled point k respectively and between pixel a, b, c, d, e, f, g and h, the mean value L of the absolute value of the pixel value difference of calculating sampling point k respectively and between pixel a, b, c, d, e, f, g and h, mean value L are for shown in following formula (1).
L = | Z k - Z a | + | Z k - Z b | + | Z k - Z c | + | Z k - Z d | + | Z k - Z e | + | Z k - Z f | + | Z k - Z g | + | Z k - Z h | 8 - - - ( 1 )
Step 203: construct the first least square cost function according to camera response model, the first least square cost function only includes camera response function value independent variable;
Wherein, camera response model is g (Z)=ln E+ln t; Z is the pixel value of certain pixel, the camera response function value that g (Z) is this pixel, and E is the illumination that this pixel is corresponding, and t takes the time for exposure that image corresponding to this pixel use for camera; For multiple images that any one camera shooting Same Scene obtains, the illumination that the pixel of each image same position is corresponding is identical.
This step is specially: the camera response equation corresponding according to adjacent two low dynamic range echogramses of camera response model structure, following formula (2) and (3) respectively;
g ( Z ij ) = ln E i + ln t j . . . . . . ( 2 ) ; g ( Z ij ′ ) = ln E i + ln t j ′ . . . . . . ( 3 ) ;
Wherein, in above-mentioned formula (2) and (3), j and j ' is respectively two two adjacent low dynamic range echogramses, j '=j+1, formula (2) opens camera response equation corresponding to low dynamic range echograms for jth, formula (3) is the camera response equation that jth ' low dynamic range echograms is corresponding, Z ijthe pixel value of i-th sampled point of low dynamic range image is opened, t for jth jfor camera shooting jth opens the time for exposure that low dynamic range echograms uses, Z ij 'for the pixel value of i-th sampled point of a jth ' low dynamic range image, t j 'for camera shooting jth ' time for exposure that a low dynamic range echograms uses, E ibe the brightness of i-th sampled point, the illumination that i-th sampled point is opened in low dynamic range image in jth is equal with the illumination in a jth ' low dynamic range image.
Then, then according to the camera response equation of adjacent two low dynamic range echogramses be constructed as follows the first least square cost function shown in formula (4).
O = Σ i = 1 N Σ j = 1 P Σ j ′ = 1 , j ′ ≠ j P [ g ( Z ij ) - g ( Z i j ′ ) - ln t i t j ′ ] 2 + λ Σ Z = 1 M g ′ ′ ( Z ) 2 . . . . . . ( 4 ) ;
Wherein, P is the number of low dynamic range echograms, and N is the number of sampled point, and λ is smoothing factor, and Z is the pixel value that low dynamic range echograms comprises, and M is the number of the pixel value that low dynamic range echograms comprises and the difference of 2.
Wherein, if low dynamic range echograms adopts 8 bits to represent the pixel value of a pixel, then this low dynamic range echograms comprises 256 pixel values, then M value is 254.
Wherein, in embodiments of the present invention, according to the camera response equation relation of adjacent two low dynamic range echogramses, by least square method, the first least square cost function is constructed.
Step 204: carry out Gauss's weighting to the first least square cost function by gaussian weighing function, obtains the second least square cost function shown in following formula (5);
O = Σ i = 1 N Σ j = 1 P Σ j ′ = 1 , j ′ ≠ 1 P { w ( Z ij ) w ( Z i j ′ ) [ g ( Z ij ) - g ( Z ij ′ ) - ln t i t j ′ ] } 2 + λ Σ Z = 1 254 [ w ( Z ) g ′ ′ ( Z ) ] 2 . . . . . . ( 5 ) ;
Wherein, gaussian weighing function is following formula (6):
w ( z ) = exp ( - p × ( z - 127.5 ) 2 127.5 2 ) . . . . . . ( 6 ) ;
Wherein, in formula (6), z is the pixel value of pixel, and exp is for getting exponent arithmetic.
Wherein, the noise comprised in the low dynamic range echograms of camera shooting is Gaussian Profile, therefore gaussian weighing function can be used to be weighted process to the first least square cost function and to obtain the second least square cost function, when multiple low dynamic range echogramses being synthesized a high dynamic range images by the second least square cost function again, effectively can affect by stress release treatment, so reduce the cross-color of the high dynamic range images of synthesis.
Step 205: ask derivative operation to obtain partial derivative to the camera response function value in the second least square cost function, substitutes into each sampled point obtained the partial derivative asked for, constructs the linear equation that each sampled point of acquisition is corresponding;
Particularly, derivative operation is asked to obtain partial derivative to the camera response function value in the second least square cost function as shown in Equation (5), and this partial derivative only includes an independent variable, this independent variable is the camera response function value of pixel, the pixel point value of each pixel obtained is substituted in the partial derivative asked for, obtains the linear equation that the pixel of each acquisition is corresponding respectively.
Step 206: linear equation corresponding for the sampled point of each acquisition is formed a system of linear equations, the number of the linear equation that this system of linear equations comprises is equal with the sum of the sampled point obtained from multiple low dynamic range echogramses, solves obtain camera response function value corresponding to each pixel value that low dynamic range echograms comprises to this linear equation;
Wherein, suppose that the number of sampled point obtained is the 3rd number, 3rd number is greater than the number of the pixel value that low dynamic range echograms comprises, linear equation corresponding for each sampled point is formed a system of linear equations, this system of linear equations comprises the 3rd several linear equation, this system of linear equations is transformed into the equation of the matrix form shown in (7) as follows;
Ax=b……(7);
Wherein, in formula (7), A is that Y × Z ties up matrix, and Y is the first number, and Z is the number of the pixel value that low dynamic range echograms comprises, so Y>Z;
An orthonomal matrix Q and one upper triangular matrix R, A=Q × R are resolved into matrix A, so above-mentioned formula (7) is transformed to following formula (8);
QRx=b……(8);
Camera response function value x=Q corresponding to pixel value that low dynamic range echograms comprises is calculated according to above-mentioned formula (8) -1r -1b.
Step 207: according to the camera response function value of the pixel value that the pixel value and low dynamic range echograms of often opening each pixel that low dynamic range echograms comprises comprise, calculate the illumination of each pixel that high dynamic range images comprises;
Particularly, according to the camera response function value of each pixel value that the pixel value and low dynamic range echograms of often opening each pixel that low dynamic range echograms comprises comprise, calculate the illumination of each pixel that high dynamic range images comprises by following formula (9).
E i = Σ j = 1 P [ w 2 ( Z ij ) exp ( g ( Z ij ) ) t j ] Σ j = 1 P w 2 ( Z ij ) t j 2 . . . . . . ( 9 ) ;
Wherein, in formula (9), Ei is the illumination of i-th pixel that high dynamic range images comprises, and j is the sequence number of low dynamic range echograms, and P is the number of low dynamic range echograms, w (Z ij) the gaussian weighing function value of i-th pixel of low dynamic range echograms, g (Z is opened for jth ij) open the camera response function value of pixel value corresponding to i-th pixel of low dynamic range echograms, t for jth jfor jth opens the time for exposure of low dynamic range echograms, exp is exponent arithmetic.
Wherein, according to camera response model g (z)=lnE+lnt, obtain exp (g (z))=E × t.
For multiple different exposure images of Same Scene, the illumination E of its same position pixel is identical, and its exp (g (z)) and t is linear.
But in real process, the pixel obtained under different exposure time due to the same space location point in scene comprises error, the measurement Distribution Statistics of exp (g (z)) and t is caused to present non-linear, therefore can carry out linear fit to the relation of exp (g (z)) and t, revise camera response function further.Adopt least square method to complete linear fit, thus obtain the every bit illumination (E) in scene.
The least square estimation method structure scene P opens shown in the following formula of error cost function (10) of in many exposure images i-th:
O i = Σ j = 1 P { w ( Zij ) [ exp ( g ( Zij ) ) - E i × t j ] } 2 . . . . . . ( 10 ) ;
Wherein, because the saturation point at two ends brings uncertainty, therefore, in cost function as shown in Equation (10), introduce weighting function, then to illumination E idifferentiate, to obtain making the more perfect numerical value E of linear fit i, shown in following formula (11):
∂ O ∂ E i = - 2 Σ j = 1 P w 2 ( Zij ) [ exp ( g ( Zij ) ) - E i × t j ] t j . . . . . . ( 11 ) ;
In order, formula (11) is 0, can obtain following formula (12):
∂ O ∂ E i = - 2 Σ j = 1 P w 2 ( Zij ) [ exp ( g ( Zij ) ) - E i × t j ] t j = 0 . . . . . . ( 12 ) ;
Then, then according to formula (12) derive following formula (13);
E i = Σ j = 1 P [ w 2 ( Z ij ) exp ( g ( Z ij ) ) t j ] Σ j = 1 P w 2 ( Z ij ) t j 2 . . . . . . ( 13 ) .
Step 208: the luminance component of the illumination composition high dynamic range images of each pixel comprised by high dynamic range images, is mapped to the luminance component of a low dynamic range echograms to be shown by the luminance component of high dynamic range images;
Step 209: according to often opening the first color difference components and the second color difference components that low dynamic range echograms comprises, obtains the first color difference components and the second color difference components that low dynamic range echograms to be shown comprises;
Particularly, jth is opened to i-th pixel in low dynamic range echograms, open the first aberration U of i-th pixel in low dynamic range echograms according to jth ijwith the second aberration V ij, calculate by following formula (14) the synthesis aberration O that jth opens i-th pixel in low dynamic range echograms ij:
O ij=|U ij-128|+|V ij-128|……(14);
The synthesis aberration that other often open i-th pixel in low dynamic range echograms is calculated by the method, the pixel that synthesis aberration is maximum is selected, using the first aberration of pixel maximum for synthesis aberration and the second aberration as the first aberration of i-th pixel of low dynamic range echograms to be shown and the second aberration from i-th pixel often opened low dynamic range echograms; Obtain the first aberration and second aberration of each pixel that low dynamic range echograms to be shown comprises as stated above, first aberration of each pixel low dynamic range image to be shown comprised forms the first color difference components of low dynamic range echograms to be shown, and the second aberration of each pixel comprised by low dynamic range echograms to be shown forms the second color difference components of low dynamic range echograms to be shown.
Step 210: the R component luminance component of low dynamic range echograms to be shown, the first color difference components and the second color difference components being converted to respectively low dynamic range echograms to be shown, G component and B component;
Step 211: by the R component of low dynamic range echograms to be shown, G component and B component form a low dynamic range echograms to be shown, and on the display device of low-dynamic range, show this low dynamic range echograms to be shown.
In embodiments of the present invention, multiple sampled point being positioned at smooth region is obtained from the picture content often opening low dynamic range echograms, the first least cost function is constructed according to camera response model, by gaussian weighing function, Gauss's weighting is carried out to the first least cost function and obtain the second least cost function, according to the multiple sampled points obtained, by the second least cost function, the picture content of multiple low dynamic range echogramses is synthesized the picture content of a high dynamic range images, the picture content of this high dynamic range images is converted to a low dynamic range echograms to be shown, show low dynamic range echograms to be shown.Wherein, the sample obtained is in smooth region, the noise of sampled point is less, the noise of low dynamic range echograms is Gaussian Profile, by gaussian weighing function, Gauss's weighting is carried out to the first least cost function and obtain the second least cost function, according to the sampled point obtained and when the picture content of multiple low dynamic range echogramses being synthesized a high dynamic range images by the second least cost function, the noise in low dynamic range echograms can be eliminated, so can alleviate the cross-color degree existed in the high dynamic range images of synthesis, and alleviate the cross-color degree existed in low dynamic range echograms to be shown.
Embodiments provide a kind of method showing image.Wherein, in the present embodiment, in advance carry out shooting to Same Scene with different exposure time by camera and obtain multiple low dynamic range echogramses, the method then provided by the embodiment of the present invention synthesizes a dynamic image to be shown by taking multiple low dynamic range echogramses obtained.See Fig. 4, the method comprises:
Step 301: photograph multiple low dynamic range echogramses to Same Scene by camera, obtains and often opens time for exposure of low dynamic range echograms, R component, G component and B component;
Particularly, by camera, shooting is carried out to Same Scene and obtain multiple low dynamic range echogramses, the time for exposure of often opening low dynamic range echograms is obtained, from often opening low dynamic range echograms the R component, G component and the B component that obtain and often open low dynamic range echograms from camera.
Wherein, camera to be taken Same Scene with different exposure time and is obtained the different low dynamic range echograms of multiple bright-dark degrees, and the width often opening low dynamic range echograms is with highly all identical, often opening in low dynamic range echograms, the illumination that Same Scene point is often opening pixel corresponding in low dynamic range echograms is all identical, but the time for exposure is all different.
Step 302: sample from the R component same position of often opening low dynamic range echograms, get multiple first sampled points that the R component of often opening low dynamic range echograms is corresponding, and the first sampled point obtained is the pixel being positioned at the smooth region often opening low dynamic range echograms;
Particularly, this step can comprise (1) as follows and, to the step of (3), comprising:
(1): according to the first number preset, the height of low dynamic range echograms and width, calculate the second number, the first number is the sampled point number obtained at the horizontal direction of low dynamic range echograms, and the second number is the sampled point number obtained in the vertical direction of low dynamic range echograms;
Particularly, according to height and the width of low dynamic range echograms, ratio between the height and the width of calculating low dynamic range echograms, the ratio of calculating is done product calculation with default first number and obtains the second number, presetting the first number is the sampled point number obtained at the horizontal direction of low dynamic range echograms, and the second number is the sampled point number obtained in the vertical direction of low dynamic range echograms.
Wherein, by camera, the width of multiple low dynamic range echogramses obtained is taken with highly all identical to Same Scene, so identical according to presetting second number of often opening low dynamic range echograms that calculates of the first number.
(2) multiple first sampled points that the R component of often opening low dynamic range echograms is corresponding: according to the second number presetting the first number and calculating, sample from the same position of the R component of often opening low dynamic range echograms, are got;
Particularly, for the R component of wherein any low dynamic range echograms, the vertical direction of the R component of this low dynamic range echograms is selected the second number row pixel at equal intervals, select to preset first several pixel at the every a line pixel equal intervals selected, the pixel of selection is defined as the first sampled point that the R component of this low dynamic range echograms is corresponding, the number of the first sampled point obtained of so sampling from the R component of often opening low dynamic range echograms is the product of the first number and the second number; Multiple first sampled points corresponding to other R component of often opening low dynamic range echograms are obtained by above-mentioned identical method.
Wherein, owing to taking the width of multiple low dynamic range echogramses obtained with highly all identical by camera to Same Scene, so identical according to presetting second number of often opening low dynamic range echograms that calculates of the first number, and according to presetting the second number of the first number and calculating, can sample from the same position of the R component of often opening low dynamic range echograms by the process of this step, often be opened multiple first sampled points that the R component of low dynamic range echograms is corresponding.
(3), remove from multiple first sampled points that the R component of often opening low dynamic range echograms is corresponding and be positioned at the first sampled point of non-smooth areas, retain multiple the first sampled points being positioned at smooth region that the R component of often opening low dynamic range image is corresponding.
Particularly, for the R component of arbitrary low dynamic range echograms, any one first sampled point that R component for this low dynamic range echograms is corresponding, obtain the pixel adjacent with this first sampled point, calculate the pixel value difference between this first sampled point and each pixel of acquisition, and calculate the absolute value of the pixel value difference between this first sampled point and each pixel of acquisition further, the mean value of the absolute value of the pixel value difference between this first sampled point and each pixel of acquisition is calculated according to the absolute value of the pixel value difference between this first sampled point and each pixel of acquisition, if the mean value calculated is greater than predetermined threshold value, then determine that this first sample is in non-smooth areas, remove this first sampled point, if the mean value calculated is less than or equal to predetermined threshold value, then determine that this first sample is in smooth region, and retain this first sampled point, other first sampled points corresponding to the R component of this low dynamic range echograms, judge whether to be positioned at smooth region by above-mentioned identical method, if so, then retain, if not, then remove, and, the R component of other low dynamic range echogramses often to be opened multiple first sampled points corresponding to the R component of low dynamic range echograms from other by above-mentioned identical method and removes the first sampled point being positioned at non-smooth areas.
Step 303: sample from the G component same position of often opening low dynamic range echograms, get multiple second sampled points that the G component of often opening low dynamic range echograms is corresponding, and the second sampled point obtained is the pixel being positioned at the smooth region often opening low dynamic range echograms;
Particularly, this step can comprise the following first step and second step realizes, and comprising:
The first step, according to the second number presetting the first number and calculating, sample from the same position of the G component often opening low dynamic range echograms, get multiple second sampled points that the G component of often opening low dynamic range echograms is corresponding, first number is the second sampled point number of sampling at the horizontal direction of low dynamic range echograms, and the second number is the second sampled point number of sampling in the vertical direction of low dynamic range echograms;
Particularly, for the G component of wherein any low dynamic range echograms, the vertical direction of the G component of this low dynamic range echograms is selected the second number row pixel at equal intervals, select to preset first several pixel at the every a line pixel equal intervals selected, the pixel of selection is defined as the second sampled point that the G component of this low dynamic range echograms is corresponding, the number of the second sampled point obtained of so sampling from the G component often opening low dynamic range echograms is the product of the first number and the second number; Multiple second sampled points corresponding to other G components often opening low dynamic range echograms are obtained by above-mentioned identical method.
Wherein, owing to taking the width of multiple low dynamic range echogramses obtained with highly all identical by camera to Same Scene, so identical according to presetting second number of often opening low dynamic range echograms that calculates of the first number, and according to presetting the second number of the first number and calculating, can sample from the same position of the G component often opening low dynamic range echograms by the process of this step, often be opened multiple second sampled points that the G component of low dynamic range echograms is corresponding.
Second step, removes and is positioned at the second sampled point of non-smooth areas from multiple second sampled points that the G component often opening low dynamic range echograms is corresponding, retains multiple the second sampled points being positioned at smooth region that the G component of often opening low dynamic range image is corresponding.
Particularly, for the G component of arbitrary low dynamic range echograms, any one second sampled point that G component for this low dynamic range echograms is corresponding, obtain the pixel adjacent with this second sampled point, calculate the pixel value difference between this second sampled point and each pixel of acquisition, and calculate the absolute value of the pixel value difference between this second sampled point and each pixel of acquisition further, the mean value of the absolute value of the pixel value difference between this second sampled point and each pixel of acquisition is calculated according to the absolute value of the pixel value difference between this second sampled point and each pixel of acquisition, if the mean value calculated is greater than predetermined threshold value, then determine that this second sample is in non-smooth areas, remove this second sampled point, if the mean value calculated is less than or equal to predetermined threshold value, then determine that this second sample is in smooth region, and retain this second sampled point, other second sampled points corresponding to the G component of this low dynamic range echograms, judge whether to be positioned at smooth region by above-mentioned identical method, if so, then retain, if not, then remove, and, the G component of other low dynamic range echogramses often to be opened multiple second sampled points corresponding to the G component of low dynamic range echograms from other by above-mentioned identical method and removes the second sampled point being positioned at non-smooth areas.
Step 304: sample from the B component same position of often opening low dynamic range echograms, get multiple 3rd sampled points that the B component of often opening low dynamic range echograms is corresponding, and the 3rd sampled point obtained is the pixel being positioned at the smooth region often opening low dynamic range echograms;
Particularly, this step can comprise the following first step and second step realizes, and comprising:
The first step, according to the second number presetting the first number and calculating, sample from the same position of the B component often opening low dynamic range echograms, get multiple 3rd sampled points that the B component of often opening low dynamic range echograms is corresponding, first number is the 3rd sampled point number of sampling at the horizontal direction of low dynamic range echograms, and the second number is the 3rd sampled point number of sampling in the vertical direction of low dynamic range echograms;
Particularly, for the B component of wherein any low dynamic range echograms, the vertical direction of the B component of this low dynamic range echograms is selected the second number row pixel at equal intervals, select to preset first several pixel at the every a line pixel equal intervals selected, the pixel of selection is defined as the 3rd sampled point that the B component of this low dynamic range echograms is corresponding, the number of the 3rd sampled point obtained of so sampling from the B component often opening low dynamic range echograms is the product of the first number and the second number; Multiple 3rd sampled points corresponding to other B components often opening low dynamic range echograms are obtained by above-mentioned identical method.
Wherein, owing to taking the width of multiple low dynamic range echogramses obtained with highly all identical by camera to Same Scene, so identical according to presetting second number of often opening low dynamic range echograms that calculates of the first number, and according to presetting the second number of the first number and calculating, can sample from the same position of the B component often opening low dynamic range echograms by the process of this step, often be opened multiple 3rd sampled points that the B component of low dynamic range echograms is corresponding.
Second step, removes and is positioned at the 3rd sampled point of non-smooth areas from multiple sampled points that the B component often opening low dynamic range echograms is corresponding, retains multiple the 3rd sampled points being positioned at smooth region that the B component of often opening low dynamic range image is corresponding.
Particularly, for the B component of arbitrary low dynamic range echograms, any one the 3rd sampled point that B component for this low dynamic range echograms is corresponding, obtain the pixel adjacent with the 3rd sampled point, calculate the pixel value difference between this sampled point and each pixel of acquisition, and calculate the absolute value of the pixel value difference between the 3rd sampled point and each pixel of acquisition further, the mean value of the absolute value of the pixel value difference between this sampled point and each pixel of acquisition is calculated according to the absolute value of the pixel value difference between the 3rd sampled point and each pixel of acquisition, if the mean value calculated is greater than predetermined threshold value, then determine that this sample is in non-smooth areas, remove this sampled point, if the mean value calculated is less than or equal to predetermined threshold value, then determine that this sample is in smooth region, and retain this sampled point, other sampled points corresponding to the B component of this low dynamic range echograms, judge whether to be positioned at smooth region by above-mentioned identical method, if so, then retain, if not, then remove, and, the B component of other low dynamic range echogramses often to be opened multiple sampled points corresponding to the B component of low dynamic range echograms from other by above-mentioned identical method and removes the sampled point being positioned at non-smooth areas.
Wherein, the sampled point being positioned at smooth region is the pixel being positioned at smooth region, the sampled point being positioned at non-smooth areas is the pixel being positioned at non-smooth areas, the pixel be usually located in non-smooth areas is the point on object edge, or be noise spot, therefore, from often opening the sampled point removed multiple sampled points corresponding to low dynamic range echograms and be positioned at non-smooth areas, can ensure to be left often to open multiple sampled points corresponding to low dynamic range echograms be all the sampled point being positioned at smooth region, and due to be positioned at smooth region sampled point near scene illumination value be consistent, so be effectively can reduce correction error at synthesis high dynamic range images.
Step 305: according to camera response model for constructing the first least square cost function, the first least square cost function only includes camera response function value independent variable;
Wherein, camera response model is g (Z)=ln E+ln t; Z is the pixel value of certain pixel, the response function value that g (Z) is this pixel, and E is the illumination that this pixel is corresponding, and t takes the time for exposure that image corresponding to this pixel use for camera; For multiple images that any one camera shooting Same Scene obtains, the illumination that the pixel of each image same position is corresponding is identical.
Wherein, be the detailed operation constructing the first least square cost function according to camera response model, the step 203 of embodiment shown in Figure 2, no longer describes in detail at this.
Step 306: carry out Gauss's weighting by the first least square cost function of gaussian weighing function to structure, obtain the second least square cost function;
Wherein, the second least square cost function is following formula (15):
O = Σ i = 1 N Σ j = 1 P Σ j ′ = 1 , j ′ ≠ 1 P { w ( Z ij ) w ( Z i j ′ ) [ g ( Z ij ) - g ( Z ij ′ ) - ln t i t j ′ ] } 2 + λ Σ Z = 1 254 [ w ( Z ) g ′ ′ ( Z ) ] 2 . . . . . . ( 15 ) ;
Wherein, gaussian weighing function is following formula (16);
w ( z ) = exp ( - p × ( z - 127.5 ) 2 127.5 2 ) . . . . . . ( 16 ) ;
Wherein, in formula, z is the pixel value of pixel, and exp is for getting exponent arithmetic.
Wherein, the noise comprised in the low dynamic range echograms of camera shooting is Gaussian Profile, therefore gaussian weighing function can be used to be weighted process to the first least square cost function and to obtain the second least square cost function, when multiple low dynamic range echogramses being synthesized a high dynamic range images by the second least square cost function again, effectively can affect by stress release treatment, so reduce the cross-color of the high dynamic range images of synthesis.
Step 307: ask derivative operation to obtain partial derivative to the camera response function value in the second least square cost function, this partial derivative only includes an independent variable, and this independent variable is the camera response function value of pixel value;
Step 308: each first sampled point obtained is substituted into this partial derivative, obtains the linear equation that each first sampled point is corresponding, by corresponding for an each first sampled point linear equation composition First Line equation group;
Step 309: the camera response function value that each pixel value that the R component obtaining low dynamic range echograms to the first linear equation solution comprises is corresponding;
Step 310: the camera response function value of each pixel value that the pixel value of each pixel comprised according to the R component of often opening low dynamic range echograms and the R component of low dynamic range echograms comprise, the illumination of each pixel that the R component calculating high dynamic range images respectively comprises;
Particularly, the camera response function value of each pixel value that the pixel value of each pixel comprised according to the R component of often opening low dynamic range echograms and the R component of low dynamic range echograms comprise, the illumination of each pixel that the R component calculating high dynamic range images by following formula (17) comprises;
E i R = Σ j = 1 P [ w 2 ( Z ij R ) exp ( g ( Z ij R ) ) t j ] Σ j = 1 P w 2 ( Z ij R ) t j 2 . . . . . . ( 17 ) ;
Wherein, in formula (17), the illumination of i-th pixel that the R component for high dynamic range images comprises, the R component of opening low dynamic range echograms for jth comprises i-th pixel, the R component of opening low dynamic range echograms for jth comprises i-th pixel Gaussian function numerical value, the R component of opening low dynamic range echograms for jth comprises camera response function value corresponding to the pixel value of i-th pixel, and P is the number of low dynamic range echograms, t jfor jth opens the time for exposure of low dynamic range echograms.
Step 311: each second sampled point obtained is substituted into this partial derivative, obtains the linear equation that each second sampled point is corresponding, corresponding for an each second sampled point linear equation is formed the second system of linear equations;
Step 312: camera response function value corresponding to each pixel value that the G component that obtains low dynamic range echograms comprises is solved to the second linear equation;
Step 313: the camera response function value of each pixel value that the pixel value of each pixel comprised according to the G component often opening low dynamic range echograms and the G component of low dynamic range echograms comprise, the illumination of each pixel that the G component calculating high dynamic range images respectively comprises;
Particularly, the camera response function value of each pixel value that the pixel value of each pixel comprised according to the G component often opening low dynamic range echograms and the G component of low dynamic range echograms comprise, the illumination of each pixel that the G component calculating high dynamic range images by following formula (18) comprises;
E i G = Σ j = 1 P [ w 2 ( Z ij G ) exp ( g ( Z ij G ) ) t j ] Σ j = 1 P w 2 ( Z ij G ) t j 2 . . . . . . ( 18 ) ;
Wherein, in formula (18), for the illumination of i-th pixel that the G component of high dynamic range images comprises, the G component opening low dynamic range echograms for jth comprises i-th pixel, the G component opening low dynamic range echograms for jth comprises i-th pixel Gaussian function numerical value, the G component opening low dynamic range echograms for jth comprises camera response function value corresponding to the pixel value of i-th pixel, and P is the number of low dynamic range echograms, t jfor jth opens the time for exposure of low dynamic range echograms.
Step 314: each 3rd sampled point obtained is substituted into this partial derivative, obtains the linear equation that each 3rd sampled point is corresponding, by corresponding for an each 3rd sampled point linear equation composition third linear equation group;
Step 315: the camera response function value that each pixel value that the B component obtaining low dynamic range echograms to third linear equation solution comprises is corresponding;
Step 316: the camera response function value of each pixel value that the pixel value of each pixel comprised according to the B component often opening low dynamic range echograms and the B component of low dynamic range echograms comprise, the illumination of each pixel that the B component calculating high dynamic range images respectively comprises;
Particularly, the camera response function value of each pixel value that the pixel value of each pixel comprised according to the B component often opening low dynamic range echograms and the B component of low dynamic range echograms comprise, the illumination of each pixel that the B component calculating high dynamic range images by following formula (19) comprises;
E i B = Σ j = 1 P [ w 2 ( Z ij B ) exp ( g ( Z ij B ) ) t j ] Σ j = 1 P w 2 ( Z ij B ) t j 2 . . . . . . ( 19 ) ;
Wherein, in formula (19), for the brightness of i-th pixel that the B component of high dynamic range images comprises, the B component opening low dynamic range echograms for jth comprises i-th pixel, the B component opening low dynamic range echograms for jth comprises i-th pixel Gaussian function numerical value, the B component opening low dynamic range echograms for jth comprises camera response function value corresponding to the pixel value of i-th pixel, and P is the number of low dynamic range echograms, t jfor jth opens the time for exposure of low dynamic range echograms.
Step 317: the R component of high dynamic range images, G component and B component are converted to a low dynamic range echograms to be shown, and show low dynamic range echograms to be shown on low-dynamic range display device.
Particularly, the R component of high dynamic range images, G component and B component are converted to the R component of a low dynamic range echograms to be shown, G component and B component, the R component of low dynamic range echograms to be shown, G component and B component form a low dynamic range echograms to be shown, and show low dynamic range echograms to be shown on low-dynamic range display device.
In embodiments of the present invention, multiple sampled point being positioned at smooth region is obtained from the picture content often opening low dynamic range echograms, the first least cost function is constructed according to camera response model, by gaussian weighing function, Gauss's weighting is carried out to the first least cost function and obtain the second least cost function, according to the multiple sampled points obtained, by the second least cost function, the picture content of multiple low dynamic range echogramses is synthesized the picture content of a high dynamic range images, the picture content of this high dynamic range images is converted to a low dynamic range echograms to be shown, show low dynamic range echograms to be shown.Wherein, the sample obtained is in smooth region, the noise of sampled point is less, the noise of low dynamic range echograms is Gaussian Profile, by gaussian weighing function, Gauss's weighting is carried out to the first least cost function and obtain the second least cost function, according to the sampled point obtained and when the picture content of multiple low dynamic range echogramses being synthesized a high dynamic range images by the second least cost function, the noise in low dynamic range echograms can be eliminated, so can alleviate the cross-color degree existed in the high dynamic range images of synthesis, and alleviate the cross-color degree existed in low dynamic range echograms to be shown.
See Fig. 5, embodiments provide a kind of device showing image, comprising:
Acquisition module 401, for obtaining, multiple low dynamic range echogramses obtained are taken to Same Scene, from the picture content often opening low dynamic range echograms, obtain multiple sampled point, described sampled point is the pixel of the smooth region being positioned at low dynamic range echograms;
Weighting block 402, for constructing the first least cost function according to camera response model, carrying out Gauss's weighting by gaussian weighing function to described first least cost function and obtaining the second least cost function;
Synthesis module 403, for the multiple sampled points obtained according to described acquisition module 401, the picture content of multiple low dynamic range echogramses described is synthesized the picture content of a high dynamic range images by described second least cost function obtained by described weighting block 402;
Display module 404, the picture content for the described high dynamic range images synthesized by described synthesis module 403 is converted to a low dynamic range echograms to be shown, shows described low dynamic range echograms to be shown.
Wherein, described acquisition module 401 comprises:
First computing unit, for the first number that basis is preset, the height of the low dynamic range echograms of described shooting and width, calculate the second number, described first number is the sampled point number obtained at the horizontal direction of described low dynamic range echograms, and described second number is the sampled point number obtained in the vertical direction of described low-dynamic range;
First acquiring unit, for described second number calculated according to described default first number and described first computing unit, sample from the same position of the picture content often opening low dynamic range echograms, get multiple sampled points that the described picture content often opening low dynamic range echograms is corresponding;
Removal unit, remove in multiple sampled points that the described picture content often opening low dynamic range echograms obtained from described first acquiring unit is corresponding the sampled point being positioned at non-smooth areas, retain multiple sampled points being positioned at smooth region that the described picture content often opening low dynamic range echograms is corresponding.
Wherein, described removal unit comprises:
Obtain subelement, for for any one sampled point, obtain the pixel adjacent with described sampled point, calculate the pixel value difference between described sampled point and each pixel of described acquisition, and calculate the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition further;
First computation subunit, for calculating the mean value of the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition according to the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition;
Remove subelement, if be greater than predetermined threshold value for described mean value, then determine that described sample is in non-smooth areas, remove described sampled point, if described mean value is less than or equal to predetermined threshold value, then determine that described sample is in smooth region, retains described sampled point.
Wherein, described weighting block 402 comprises:
Structural unit, for the camera response equation corresponding respectively according to adjacent two low dynamic range echogramses of camera response model structure, the camera response equation corresponding respectively according to described adjacent two low dynamic range echogramses, is constructed as follows the first least square cost function shown in formula (1);
O = Σ i = 1 N Σ j = 1 P Σ j ′ = 1 , j ′ ≠ j P [ g ( Z ij ) - g ( Z i j ′ ) - ln t i t j ′ ] 2 + λ Σ Z = 1 M g ′ ′ ( Z ) 2 . . . . . . ( 1 ) ;
Wherein, P is the number of the low dynamic range echograms of shooting, and N is the number of sampled point, and λ is smoothing factor, and Z is the pixel value that low dynamic range echograms comprises, and M is the number of the pixel value that low dynamic range echograms comprises and the difference of 2, Z ijfor jth opens i-th sampled point of low dynamic range echograms, Z ij 'for jth ' i-th sampled point of a low dynamic range echograms, jth opens a low dynamic range echograms and jth ' low dynamic range echograms is adjacent two low dynamic range echogramses, j '=j+1, g (Z ij) and g (Z ij ') be the camera response function value of pixel value, t jfor shooting jth opens the time for exposure that low dynamic range echograms uses, t j 'for the shooting jth ' time for exposure that a low dynamic range echograms uses;
Weighted units, for carrying out Gauss's weighting by gaussian weighing function to the described first least square cost function that described structural unit constructs, obtains the second least square cost function shown in following formula (2);
O = Σ i = 1 N Σ j = 1 P Σ j ′ = 1 , j ′ ≠ 1 P { w ( Z ij ) w ( Z i j ′ ) [ g ( Z ij ) - g ( Z ij ′ ) - ln t i t j ′ ] } 2 + λ Σ Z = 1 254 [ w ( Z ) g ′ ′ ( Z ) ] 2 . . . . . . ( 2 ) ;
Wherein, gaussian weighing function is following formula (3):
w ( z ) = exp ( - p × ( z - 127.5 ) 2 127.5 2 ) . . . . . . ( 3 ) ;
Wherein, in equation (3), z is the pixel value of pixel, and exp is for getting exponent arithmetic.
Wherein, described synthesis module 403 comprises:
Second acquisition unit, for the multiple sampled points according to described acquisition, obtains the camera response function value of the pixel value that low dynamic range echograms comprises by described second least cost function;
Synthesis unit, the camera response function value that the pixel value comprised for the described low dynamic range echograms obtained according to described second acquisition unit is corresponding, synthesizes the picture content of a high dynamic range images by the picture content of described multiple low-dynamic ranges figure image.
Wherein, described second acquisition unit comprises:
Substitute into subelement, for asking derivative operation to obtain partial derivative to the camera response function value in described second least square cost function, the each sampled point obtained is substituted into described partial derivative, constructs the linear equation that each sampled point of described acquisition is corresponding;
Solve subelement, form a system of linear equations for the linear equation that each sampled point by described acquisition is corresponding, described linear equation is solved and obtains camera response function value corresponding to each pixel value that described low dynamic range echograms comprises.
Wherein, described synthesis unit comprises:
Second computation subunit, for the camera response function value of the pixel value that the pixel value of often opening each pixel that low dynamic range echograms comprises according to described and described low dynamic range echograms comprise, calculate the illumination of each pixel that a high dynamic range images comprises;
Composition subelement, the illumination for each pixel comprised by described high dynamic range images forms the luminance component of a described high dynamic range images.
Wherein, described display module 404 comprises:
Map unit, for being mapped to the luminance component of a low dynamic range echograms to be shown by the luminance component of described high dynamic range images;
3rd acquiring unit, often opens according to described the first color difference components and the second color difference components that low dynamic range echograms comprises for obtaining, and obtains the first color difference components and the second color difference components that described low dynamic range echograms to be shown comprises;
Component units, for forming a low dynamic range echograms to be shown by the luminance component of described low dynamic range echograms to be shown, the first color difference components and the second color difference components;
Display unit, for showing described low dynamic range echograms to be shown on the display device of low-dynamic range.
In embodiments of the present invention, multiple sampled point being positioned at smooth region is obtained from the picture content often opening low dynamic range echograms, the first least cost function is constructed according to camera response model, by gaussian weighing function, Gauss's weighting is carried out to the first least cost function and obtain the second least cost function, according to the multiple sampled points obtained, by the second least cost function, the picture content of multiple low dynamic range echogramses is synthesized the picture content of a high dynamic range images, the picture content of this high dynamic range images is converted to a low dynamic range echograms to be shown, show low dynamic range echograms to be shown.Wherein, the sample obtained is in smooth region, the noise of sampled point is less, the noise of low dynamic range echograms is Gaussian Profile, by gaussian weighing function, Gauss's weighting is carried out to the first least cost function and obtain the second least cost function, according to the sampled point obtained and when the picture content of multiple low dynamic range echogramses being synthesized a high dynamic range images by the second least cost function, the noise in low dynamic range echograms can be eliminated, so can alleviate the cross-color degree existed in the high dynamic range images of synthesis, and alleviate the cross-color degree existed in low dynamic range echograms to be shown.
See Fig. 6, embodiments provide a kind of device showing image, comprising:
Memory 501 and at least one processor 502, for performing a kind of following method showing image:
Obtain and take to Same Scene multiple low dynamic range echogramses obtained, from the picture content often opening low dynamic range echograms, obtain multiple sampled point, described sampled point is the pixel of the smooth region being positioned at low dynamic range echograms;
Construct the first least cost function according to camera response model, by gaussian weighing function, Gauss's weighting is carried out to described first least cost function and obtain the second least cost function;
According to multiple sampled points of described acquisition, by described second least cost function, the picture content of multiple low dynamic range echogramses described is synthesized the picture content of a high dynamic range images;
The picture content of a described high dynamic range images is converted to a low dynamic range echograms to be shown, shows described low dynamic range echograms to be shown.
Multiple low dynamic range echogramses obtained are taken in described acquisition to Same Scene, obtain multiple sampled point, comprising from the picture content often opening low dynamic range echograms:
According to the first number preset, the height of the low dynamic range echograms of described shooting and width, calculate the second number, described first number is the sampled point number obtained at the horizontal direction of described low dynamic range echograms, and described second number is the sampled point number obtained in the vertical direction of described low-dynamic range;
Preset the first number and described second number according to described, sample from the same position of the picture content often opening low dynamic range echograms, get multiple sampled points that the described picture content often opening low dynamic range echograms is corresponding;
From multiple sampled points that the described picture content often opening low dynamic range echograms is corresponding, remove the sampled point being positioned at non-smooth areas, retain multiple sampled points being positioned at smooth region that the described picture content often opening low dynamic range echograms is corresponding.
Remove the sampled point being positioned at non-smooth areas described multiple sampled points corresponding from the described picture content often opening low dynamic range echograms, retain multiple sampled points being positioned at smooth region that the described picture content often opening low dynamic range echograms is corresponding, comprising:
For any one sampled point, obtain the pixel adjacent with described sampled point, calculate the pixel value difference between described sampled point and each pixel of described acquisition, and calculate the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition further;
The mean value of the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition is calculated according to the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition;
If described mean value is greater than predetermined threshold value, then determine that described sample is in non-smooth areas, removes described sampled point, if described mean value is less than or equal to predetermined threshold value, then determine that described sample is in smooth region, retains described sampled point.
Describedly construct the first least cost function according to camera response model, by gaussian weighing function, Gauss's weighting carried out to described first least cost function and obtain the second least cost function, comprising:
The camera response equation corresponding respectively according to adjacent two low dynamic range echogramses of camera response model structure, the camera response equation corresponding respectively according to described adjacent two low dynamic range echogramses, is constructed as follows the first least square cost function shown in formula (1);
O = Σ i = 1 N Σ j = 1 P Σ j ′ = 1 , j ′ ≠ j P [ g ( Z ij ) - g ( Z i j ′ ) - ln t i t j ′ ] 2 + λ Σ Z = 1 M g ′ ′ ( Z ) 2 . . . . . . ( 1 ) ;
Wherein, P is the number of the low dynamic range echograms of shooting, and N is the number of sampled point, and λ is smoothing factor, and Z is the pixel value that low dynamic range echograms comprises, and M is the number of the pixel value that low dynamic range echograms comprises and the difference of 2, Z ijfor jth opens i-th sampled point of low dynamic range echograms, Z ij 'for jth ' i-th sampled point of a low dynamic range echograms, jth opens a low dynamic range echograms and jth ' low dynamic range echograms is adjacent two low dynamic range echogramses, j '=j+1, g (Z ij) and g (Z ij ') be the camera response function value of pixel value, t jfor shooting jth opens the time for exposure that low dynamic range echograms uses, t j 'for the shooting jth ' time for exposure that a low dynamic range echograms uses;
By gaussian weighing function, Gauss's weighting is carried out to described first least square cost function, obtain the second least square cost function shown in following formula (2);
O = Σ i = 1 N Σ j = 1 P Σ j ′ = 1 , j ′ ≠ 1 P { w ( Z ij ) w ( Z i j ′ ) [ g ( Z ij ) - g ( Z ij ′ ) - ln t i t j ′ ] } 2 + λ Σ Z = 1 254 [ w ( Z ) g ′ ′ ( Z ) ] 2 . . . . . . ( 2 ) ;
Wherein, gaussian weighing function is following formula (3):
w ( z ) = exp ( - p × ( z - 127.5 ) 2 127.5 2 ) . . . . . . ( 3 ) ;
Wherein, in equation (3), z is the pixel value of pixel, and exp is for getting exponent arithmetic.
Multiple low dynamic range echogramses described are synthesized the picture content of a high dynamic range images, comprise by described multiple sampled points according to described acquisition by described second least cost function:
According to multiple sampled points of described acquisition, obtained the camera response function value of the pixel value that low dynamic range echograms comprises by described second least cost function;
The camera response function value that the pixel value comprised according to described low dynamic range echograms is corresponding, synthesizes the picture content of a high dynamic range images by the picture content of described multiple low-dynamic ranges figure image.
Described multiple sampled points according to described acquisition, are obtained the camera response function value of the pixel value that low dynamic range echograms comprises, comprising by described second least cost function:
Ask derivative operation to obtain partial derivative to the camera response function value in described second least square cost function, each sampled point obtained is substituted into described partial derivative, constructs the linear equation that each sampled point of described acquisition is corresponding;
Linear equation corresponding for each sampled point of described acquisition is formed a system of linear equations, described linear equation is solved and obtains camera response function value corresponding to each pixel value that described low dynamic range echograms comprises.
Described multiple sampled points according to described acquisition, are synthesized the picture content of a high dynamic range images, comprising by the picture content of multiple low dynamic range echogramses described by described second least cost function:
The camera response function value of the pixel value that the pixel value often opening each pixel that low dynamic range echograms comprises according to described and described low dynamic range echograms comprise, calculates the illumination of each pixel that a high dynamic range images comprises;
The luminance component of the described high dynamic range images of illumination composition of each pixel that described high dynamic range images is comprised.
The described picture content by a described high dynamic range images is converted to a low dynamic range echograms to be shown, shows described low dynamic range echograms to be shown, comprising:
The luminance component of described high dynamic range images is mapped to the luminance component of a low dynamic range echograms to be shown;
Often open according to described the first color difference components and the second color difference components that low dynamic range echograms comprises, obtain the first color difference components and the second color difference components that described low dynamic range echograms to be shown comprises;
The luminance component of described low dynamic range echograms to be shown, the first color difference components and the second color difference components are formed a low dynamic range echograms to be shown;
The display device of low-dynamic range shows described low dynamic range echograms to be shown.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (14)

1. show a method for image, it is characterized in that, described method comprises:
Obtain and take to Same Scene multiple low dynamic range echogramses obtained, from the picture content often opening low dynamic range echograms, obtain multiple sampled point, described sampled point is the pixel of the smooth region being positioned at low dynamic range echograms;
Construct the first least cost function according to camera response model, by gaussian weighing function, Gauss's weighting is carried out to described first least cost function and obtain the second least cost function;
According to multiple sampled points of described acquisition, by described second least cost function, the picture content of multiple low dynamic range echogramses described is synthesized the picture content of a high dynamic range images;
The picture content of a described high dynamic range images is converted to a low dynamic range echograms to be shown, shows described low dynamic range echograms to be shown;
Wherein, multiple low dynamic range echogramses obtained are taken in described acquisition to Same Scene, obtain multiple sampled point, comprising from the picture content often opening low dynamic range echograms:
According to the first number preset, the height of the low dynamic range echograms of described shooting and width, calculate the second number, described first number is the sampled point number obtained at the horizontal direction of described low dynamic range echograms, and described second number is the sampled point number obtained in the vertical direction of described low-dynamic range;
Preset the first number and described second number according to described, sample from the same position of the picture content often opening low dynamic range echograms, get multiple sampled points that the described picture content often opening low dynamic range echograms is corresponding;
From multiple sampled points that the described picture content often opening low dynamic range echograms is corresponding, remove the sampled point being positioned at non-smooth areas, retain multiple sampled points being positioned at smooth region that the described picture content often opening low dynamic range echograms is corresponding.
2. the method for claim 1, it is characterized in that, the sampled point being positioned at non-smooth areas is removed described multiple sampled points corresponding from the described picture content often opening low dynamic range echograms, retain multiple sampled points being positioned at smooth region that the described picture content often opening low dynamic range echograms is corresponding, comprising:
For any one sampled point, obtain the pixel adjacent with described sampled point, calculate the pixel value difference between described sampled point and each pixel of described acquisition, and calculate the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition further;
The mean value of the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition is calculated according to the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition;
If described mean value is greater than predetermined threshold value, then determine that described sample is in non-smooth areas, removes described sampled point, if described mean value is less than or equal to predetermined threshold value, then determine that described sample is in smooth region, retains described sampled point.
3. the method for claim 1, is characterized in that, describedly constructs the first least cost function according to camera response model, carries out Gauss's weighting and obtains the second least cost function, comprising by gaussian weighing function to described first least cost function:
The camera response equation corresponding respectively according to adjacent two low dynamic range echogramses of camera response model structure, the camera response equation corresponding respectively according to described adjacent two low dynamic range echogramses, is constructed as follows the first least square cost function shown in formula (1);
O = Σ i = 1 N Σ j = 1 P Σ j ′ = 1 , j ′ ≠ j P [ g ( Z i j ) - g ( Z ij ′ ) - ln t j t j ′ ] 2 + λ Σ Z = 1 M g ′ ′ ( Z ) 2 ... ... ( 1 ) ;
Wherein, P is the number of the low dynamic range echograms of shooting, and N is the number of sampled point, and λ is smoothing factor, and Z is the pixel value that low dynamic range echograms comprises, and M is the number of the pixel value that low dynamic range echograms comprises and the difference of 2, Z ijfor jth opens i-th sampled point of low dynamic range echograms, Z ij 'for i-th sampled point of a jth ' low dynamic range echograms, jth opens low dynamic range echograms and a jth ' low dynamic range echograms is adjacent two low dynamic range echogramses, j '=j+1, g (Z ij) and g (Z ij ') be the camera response function value of pixel value, t jfor shooting jth opens the time for exposure that low dynamic range echograms uses, t j 'for the time for exposure that a shooting jth ' low dynamic range echograms uses;
By gaussian weighing function, Gauss's weighting is carried out to described first least square cost function, obtain the second least square cost function shown in following formula (2);
O = Σ i = 1 N Σ j = 1 P Σ j ′ = 1 , j ′ ≠ j P { w ( Z i j ) w ( Z ij ′ ) [ g ( Z i j ) - g ( Z ij ′ ) - ln t j t j ′ ] } 2 + λ Σ Z = 1 254 [ w ( Z ) g ′ ′ ( Z ) ] 2 ... ... ( 2 ) ;
Wherein, gaussian weighing function is following formula (3):
w ( z ) = exp ( - p × ( z - 127.5 ) 2 127.5 2 ) ... ... ( 3 ) ;
Wherein, in formula (3), z is the pixel value of pixel, and exp is for getting exponent arithmetic.
4. the method as described in any one of claims 1 to 3 claim, it is characterized in that, multiple low dynamic range echogramses described are synthesized the picture content of a high dynamic range images, comprise by described multiple sampled points according to described acquisition by described second least cost function:
According to multiple sampled points of described acquisition, obtained the camera response function value of the pixel value that low dynamic range echograms comprises by described second least cost function;
The camera response function value that the pixel value comprised according to described low dynamic range echograms is corresponding, synthesizes the picture content of a high dynamic range images by the picture content of described multiple low-dynamic ranges figure image.
5. method as claimed in claim 4, is characterized in that, described multiple sampled points according to described acquisition, is obtained the camera response function value of the pixel value that low dynamic range echograms comprises, comprising by described second least cost function:
Ask derivative operation to obtain partial derivative to the camera response function value in described second least square cost function, each sampled point obtained is substituted into described partial derivative, constructs the linear equation that each sampled point of described acquisition is corresponding;
Linear equation corresponding for each sampled point of described acquisition is formed a system of linear equations, described linear equation is solved and obtains camera response function value corresponding to each pixel value that described low dynamic range echograms comprises.
6. method as claimed in claim 4, it is characterized in that, described multiple sampled points according to described acquisition, are synthesized the picture content of a high dynamic range images, comprising by the picture content of multiple low dynamic range echogramses described by described second least cost function:
The camera response function value of the pixel value that the pixel value often opening each pixel that low dynamic range echograms comprises according to described and described low dynamic range echograms comprise, calculates the illumination of each pixel that a high dynamic range images comprises;
The luminance component of the described high dynamic range images of illumination composition of each pixel that described high dynamic range images is comprised.
7. method as claimed in claim 6, it is characterized in that, the described picture content by a described high dynamic range images is converted to a low dynamic range echograms to be shown, shows described low dynamic range echograms to be shown, comprising:
The luminance component of described high dynamic range images is mapped to the luminance component of a low dynamic range echograms to be shown;
Often open according to described the first color difference components and the second color difference components that low dynamic range echograms comprises, obtain the first color difference components and the second color difference components that described low dynamic range echograms to be shown comprises;
The luminance component of described low dynamic range echograms to be shown, the first color difference components and the second color difference components are formed a low dynamic range echograms to be shown;
The display device of low-dynamic range shows described low dynamic range echograms to be shown.
8. show a device for image, it is characterized in that, described device comprises:
Acquisition module, taking to Same Scene multiple low dynamic range echogramses obtained for obtaining, from the picture content often opening low dynamic range echograms, obtaining multiple sampled point, described sampled point is the pixel of the smooth region being positioned at low dynamic range echograms;
Weighting block, for constructing the first least cost function according to camera response model, carrying out Gauss's weighting by gaussian weighing function to described first least cost function and obtaining the second least cost function;
Synthesis module, for the multiple sampled points obtained according to described acquisition module, the picture content of multiple low dynamic range echogramses described is synthesized the picture content of a high dynamic range images by described second least cost function obtained by described weighting block;
Display module, the picture content for the described high dynamic range images synthesized by described synthesis module is converted to a low dynamic range echograms to be shown, shows described low dynamic range echograms to be shown;
Wherein, described acquisition module comprises:
First computing unit, for the first number that basis is preset, the height of the low dynamic range echograms of described shooting and width, calculate the second number, described first number is the sampled point number obtained at the horizontal direction of described low dynamic range echograms, and described second number is the sampled point number obtained in the vertical direction of described low-dynamic range;
First acquiring unit, for described second number calculated according to described default first number and described first computing unit, sample from the same position of the picture content often opening low dynamic range echograms, get multiple sampled points that the described picture content often opening low dynamic range echograms is corresponding;
Removal unit, remove in multiple sampled points that the described picture content often opening low dynamic range echograms obtained from described first acquiring unit is corresponding the sampled point being positioned at non-smooth areas, retain multiple sampled points being positioned at smooth region that the described picture content often opening low dynamic range echograms is corresponding.
9. device as claimed in claim 8, it is characterized in that, described removal unit comprises:
Obtain subelement, for for any one sampled point, obtain the pixel adjacent with described sampled point, calculate the pixel value difference between described sampled point and each pixel of described acquisition, and calculate the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition further;
First computation subunit, for calculating the mean value of the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition according to the absolute value of the pixel value difference between described sampled point and each pixel of described acquisition;
Remove subelement, if be greater than predetermined threshold value for described mean value, then determine that described sample is in non-smooth areas, remove described sampled point, if described mean value is less than or equal to predetermined threshold value, then determine that described sample is in smooth region, retains described sampled point.
10. device as claimed in claim 8, it is characterized in that, described weighting block comprises:
Structural unit, for the camera response equation corresponding respectively according to adjacent two low dynamic range echogramses of camera response model structure, the camera response equation corresponding respectively according to described adjacent two low dynamic range echogramses, is constructed as follows the first least square cost function shown in formula (1);
O = Σ i = 1 N Σ j = 1 P Σ j ′ = 1 , j ′ ≠ j P [ g ( Z i j ) - g ( Z ij ′ ) - ln t j t j ′ ] 2 + λ Σ Z = 1 M g ′ ′ ( Z ) 2 ... ... ( 1 ) ;
Wherein, P is the number of the low dynamic range echograms of shooting, and N is the number of sampled point, and λ is smoothing factor, and Z is the pixel value that low dynamic range echograms comprises, and M is the number of the pixel value that low dynamic range echograms comprises and the difference of 2, Z ijfor jth opens i-th sampled point of low dynamic range echograms, Z ij 'for i-th sampled point of a jth ' low dynamic range echograms, jth opens low dynamic range echograms and a jth ' low dynamic range echograms is adjacent two low dynamic range echogramses, j '=j+1, g (Z ij) and g (Z ij ') be the camera response function value of pixel value, t jfor shooting jth opens the time for exposure that low dynamic range echograms uses, t j 'for the time for exposure that a shooting jth ' low dynamic range echograms uses;
Weighted units, for carrying out Gauss's weighting by gaussian weighing function to the described first least square cost function that described structural unit constructs, obtains the second least square cost function shown in following formula (2);
O = Σ i = 1 N Σ j = 1 P Σ j ′ = 1 , j ′ ≠ j P { w ( Z i j ) w ( Z ij ′ ) [ g ( Z i j ) - g ( Z ij ′ ) - ln t j t j ′ ] } 2 + λ Σ Z = 1 254 [ w ( Z ) g ′ ′ ( Z ) ] 2 ... ... ( 2 ) ;
Wherein, gaussian weighing function is following formula (3):
w ( z ) = exp ( - p × ( z - 127.5 ) 2 127.5 2 ) ... ... ( 3 ) ;
Wherein, in formula (3), z is the pixel value of pixel, and exp is for getting exponent arithmetic.
11. devices as described in any one of claim 8 to 10 claim, it is characterized in that, described synthesis module comprises:
Second acquisition unit, for the multiple sampled points according to described acquisition, obtains the camera response function value of the pixel value that low dynamic range echograms comprises by described second least cost function;
Synthesis unit, the camera response function value that the pixel value comprised for the described low dynamic range echograms obtained according to described second acquisition unit is corresponding, synthesizes the picture content of a high dynamic range images by the picture content of described multiple low-dynamic ranges figure image.
12. devices as claimed in claim 11, it is characterized in that, described second acquisition unit comprises:
Substitute into subelement, for asking derivative operation to obtain partial derivative to the camera response function value in described second least square cost function, the each sampled point obtained is substituted into described partial derivative, constructs the linear equation that each sampled point of described acquisition is corresponding;
Solve subelement, form a system of linear equations for the linear equation that each sampled point by described acquisition is corresponding, described linear equation is solved and obtains camera response function value corresponding to each pixel value that described low dynamic range echograms comprises.
13. devices as claimed in claim 12, it is characterized in that, described synthesis unit comprises:
Second computation subunit, for the camera response function value of the pixel value that the pixel value of often opening each pixel that low dynamic range echograms comprises according to described and described low dynamic range echograms comprise, calculate the illumination of each pixel that a high dynamic range images comprises;
Composition subelement, the illumination for each pixel comprised by described high dynamic range images forms the luminance component of a described high dynamic range images.
14. devices as claimed in claim 13, it is characterized in that, described display module comprises:
Map unit, for being mapped to the luminance component of a low dynamic range echograms to be shown by the luminance component of described high dynamic range images;
3rd acquiring unit, often opens according to described the first color difference components and the second color difference components that low dynamic range echograms comprises for obtaining, and obtains the first color difference components and the second color difference components that described low dynamic range echograms to be shown comprises;
Component units, for forming a low dynamic range echograms to be shown by the luminance component of described low dynamic range echograms to be shown, the first color difference components and the second color difference components;
Display unit, for showing described low dynamic range echograms to be shown on the display device of low-dynamic range.
CN201210591881.XA 2012-12-31 2012-12-31 A kind of method and device showing image CN103067671B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210591881.XA CN103067671B (en) 2012-12-31 2012-12-31 A kind of method and device showing image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210591881.XA CN103067671B (en) 2012-12-31 2012-12-31 A kind of method and device showing image

Publications (2)

Publication Number Publication Date
CN103067671A CN103067671A (en) 2013-04-24
CN103067671B true CN103067671B (en) 2015-09-23

Family

ID=48110112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210591881.XA CN103067671B (en) 2012-12-31 2012-12-31 A kind of method and device showing image

Country Status (1)

Country Link
CN (1) CN103067671B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9185270B2 (en) * 2014-02-28 2015-11-10 Konia Minolta Laboratory U.S.A., Inc. Ghost artifact detection and removal in HDR image creation using graph based selection of local reference
CN104469191B (en) * 2014-12-03 2018-07-27 东莞宇龙通信科技有限公司 The method and its device of image noise reduction
JP6463179B2 (en) * 2015-03-17 2019-01-30 キヤノン株式会社 Signal processing apparatus, signal processing method, and imaging apparatus
CN106060418A (en) * 2016-06-29 2016-10-26 深圳市优象计算技术有限公司 IMU information-based wide dynamic image fusion method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719268A (en) * 2009-12-04 2010-06-02 西安电子科技大学 Generalized Gaussian model graph denoising method based on improved Directionlet region
CN102077572A (en) * 2008-06-19 2011-05-25 松下电器产业株式会社 Method and apparatus for motion blur and ghosting prevention in imaging system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4509925B2 (en) * 2005-12-27 2010-07-21 株式会社メガチップス Image processing apparatus, camera system, image processing method, and moving image display method
KR101379256B1 (en) * 2007-07-09 2014-04-02 삼성전자주식회사 Method and apparatus for compensating signal distortion by noise

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102077572A (en) * 2008-06-19 2011-05-25 松下电器产业株式会社 Method and apparatus for motion blur and ghosting prevention in imaging system
CN101719268A (en) * 2009-12-04 2010-06-02 西安电子科技大学 Generalized Gaussian model graph denoising method based on improved Directionlet region

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张丽芳.利用多曝光对图像进行动态范围增强.《中国优秀硕士学位论文全文数据库·信息科技辑》.2007,I138-630. *

Also Published As

Publication number Publication date
CN103067671A (en) 2013-04-24

Similar Documents

Publication Publication Date Title
CN106127684B (en) Image super-resolution Enhancement Method based on forward-backward recutrnce convolutional neural networks
US9984445B2 (en) Tone mapping
Verfürth A posteriori error estimates for finite element discretizations of the heat equation
Latifovic et al. Accuracy assessment using sub-pixel fractional error matrices of global land cover products derived from satellite data
CN102333233B (en) Stereo image quality objective evaluation method based on visual perception
Song et al. Probabilistic exposure fusion
US10970600B2 (en) Method and apparatus for training neural network model used for image processing, and storage medium
CN101151907B (en) Adaptive color interpolation
CN102682446B (en) Adaptive combined two-sided filter is used to generate equipment and the method for dense depth map
US8594451B2 (en) Edge mapping incorporating panchromatic pixels
CN1610412B (en) Image processing apparatus and image processing method
CN101605209B (en) Image pick up device and image reproduction device
CN104704806B (en) Image processing apparatus, camera device and image processing method
CN101861728B (en) Noise reduction system, noise reduction method, and imaging system
CN107483920B (en) A kind of panoramic video appraisal procedure and system based on multi-layer quality factor
US20140119643A1 (en) Image Matting and Alpha Value Techniques
CN103369233B (en) For by utilizing self-adaptive kernel to perform the system and method for estimation of Depth
KR20050009694A (en) A system and process for generating high dynamic range image from multiple explosures of a moving scene
TWI331733B (en) Method and apparatus of removing opaque area as rescaling an image
CN102378978B (en) The method effectively realized with storage fast of conversion
US8290259B2 (en) Device adaptively switching color emphasis processing for image
CN102917183A (en) Imaging device, image processing method and program
US20130063571A1 (en) Image processing apparatus and image processing method
CN106504276B (en) Non local solid matching method
CN101821769B (en) Image generation method, and device

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
GR01 Patent grant
C14 Grant of patent or utility model
TR01 Transfer of patent right

Effective date of registration: 20210113

Address after: Room 400, building 5, No.11 Deshengmenwai street, Xicheng District, Beijing 100032 (Desheng Park)

Patentee after: MIGU CULTURE TECHNOLOGY Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right