Summary of the invention
The problem that the present invention solves is to provide a kind of image processing method and a kind of image processing system, and the dark portion in image and highlights can be made all to have suitable exposure, and ensures the definition of image, and raises the efficiency.
For solving the problem, the invention provides a kind of image processing method, comprising:
Obtain single image, described single image comprises and multiplely has first exposed portion of the first time for exposure and multiple second exposed portion with the second time for exposure, described first exposed portion and the spaced distribution of described second exposed portion, described first time for exposure is not equal to described second time for exposure; And
Carry out the first process to described first exposed portion, described first process comprises:
Determine that first exposed portion is first area, and adjacent with described first area two the second exposed portions are second area and the 3rd region, according to the pixel value of pixel in described second area and described 3rd region, the pixel value of respective pixel in described first area is revised.
Alternatively, described image processing method comprises further: carry out the second process to described second exposed portion, and described second process comprises:
Determine that second exposed portion is the 4th region, and two first exposed portions adjacent with described 4th region are the 5th region and the 6th region, according to the pixel value of pixel in described 5th region and described 6th region, the pixel value of respective pixel in described 4th region is revised.
Alternatively, described first process comprises:
According to the pixel value of pixel in described second area and described 3rd region, interpolation arithmetic is carried out to the pixel value of respective pixel in described first area.
Alternatively, described first process comprises:
Determine that a pixel in described first area is object pixel;
The multiple pixels pair corresponding with described object pixel are determined respectively in described second area and described 3rd region, each described pixel is to comprising two pixels, to lay respectively in described second area and described 3rd region and with described object pixel, to there is the Color Channel of identical type, each described pixel is to having a direction, and the direction that described multiple pixel is right is not all parallel to each other;
Calculate the pixel value amplitude of variation that pixel is in the same direction right respectively;
The direction selecting pixel value amplitude of variation minimum is edge direction; And
Along described edge direction, interpolation arithmetic is carried out to described object pixel.
Alternatively, described multiple pixel, to having three directions, is respectively column direction and two diagonal at angle at 45 ° with column direction respectively.
Alternatively, described first process comprises further:
Determine target block, described target block is arranged in described first area and comprises described object pixel; And
To all pixels in described target block, all carry out interpolation arithmetic along described edge direction.
Alternatively, described first process comprises further:
Select all pixels in described target block through described interpolation arithmetic and without described interpolation arithmetic in relatively large pixel value, according to described relatively large pixel value, calculate the brightness of described target block; And
According to the brightness calculating gained, the pixel value of pixel in described target block is revised further.
Alternatively, according to the brightness calculating gained, the further correction that the pixel value of pixel in described target block carries out is comprised:
If the brightness calculating gained is less than or equal to first threshold, then the pixel value of pixel in described target block is set to the first result, namely, carried out the pixel value of pixel in the described target block of interpolation arithmetic;
If the brightness calculating gained is more than or equal to Second Threshold, then the pixel value of pixel in described target block is set to the second result, i.e. the pixel value of pixel without interpolation arithmetic and the product of predefined parameter in described target block; And
If calculate the brightness of gained between first threshold and Second Threshold, then the pixel value of pixel in described target block is set to the 3rd result, described 3rd result is between described first result and described second result, calculate the brightness of gained more close to described first threshold, described 3rd result is more close to described first result, calculate the brightness of gained more close to described Second Threshold, described 3rd result is more close to described second result.
Alternatively, described single image is Bayer area image, and each described first exposed portion and each described second exposed portion all comprise two row pixels.
Alternatively, described target block is the pixel that Bayer area image comprises a red color passage, the unit of the pixel of a blue Color Channel and two green Color Channel pixels.
Correspondingly, the present invention also provides a kind of image processing system, comprising:
First module, be applicable to obtain single image, described single image comprises and multiplely has first exposed portion of the first time for exposure and multiple second exposed portion with the second time for exposure, described first exposed portion and the spaced distribution of described second exposed portion, described first time for exposure is not equal to described second time for exposure; And
Second unit, is applicable to carry out the first process to described first exposed portion, and described first process comprises:
Determine that first exposed portion is first area, and adjacent with described first area two the second exposed portions are second area and the 3rd region, according to the pixel value of pixel in described second area and described 3rd region, the pixel value of respective pixel in described first area is revised.
Alternatively, described second unit is also applicable to: carry out the second process to described second exposed portion, and described second process comprises:
Determine that second exposed portion is the 4th region, and two first exposed portions adjacent with described 4th region are the 5th region and the 6th region, according to the pixel value of pixel in described 5th region and described 6th region, the pixel value of respective pixel in described 4th region is revised.
Alternatively, described second unit comprises interpolation operation unit, is applicable to, according to the pixel value of pixel in described second area and described 3rd region, carry out interpolation arithmetic to the pixel value of respective pixel in described first area.
Alternatively, described second unit also comprises edge direction selected cell, and described edge direction selected cell is applicable to:
Determine that a pixel in described first area is object pixel; The multiple pixels pair corresponding with described object pixel are determined respectively in described second area and described 3rd region, each described pixel is to comprising two pixels, to lay respectively in described second area and described 3rd region and with described object pixel, to there is the Color Channel of identical type, each described pixel is to having a direction, and the direction that described multiple pixel is right is not all parallel to each other; Calculate the pixel value amplitude of variation that pixel is in the same direction right respectively; And the direction selecting pixel value amplitude of variation minimum is edge direction.Described interpolation operation unit is carry out along the edge direction selected by described edge direction selected cell to the interpolation arithmetic that described object pixel carries out.
Alternatively, described multiple pixel, to having three directions, is respectively column direction and two diagonal at angle at 45 ° with column direction respectively.
Alternatively, described interpolation operation unit is also applicable to:
Determine target block, described target block is arranged in described first area and comprises described object pixel; And
To all pixels in described target block, all carry out interpolation arithmetic along described edge direction.
Alternatively, described single image is Bayer area image, and each described first exposed portion and each described second exposed portion all comprise two row pixels, and described interpolation operation unit is applicable to:
Bayer area image unit first area being comprised described object pixel is defined as described target block, and described Bayer area image unit comprises the pixel of a red color passage, the pixel of a blue Color Channel and two green Color Channel pixels.
Alternatively, described second unit also comprises:
Luminance calculation unit, described luminance calculation unit be applicable to select all pixels in described target block through described interpolation arithmetic and without described interpolation arithmetic in relatively large pixel value, according to described relatively large pixel value, calculate the brightness of described target block; And
Amending unit, described amending unit is applicable to the brightness calculating gained according to described luminance calculation unit, revises further the pixel value of pixel in described target block.
Alternatively, described amending unit is applicable to:
If the brightness that described luminance calculation unit calculates gained is less than or equal to first threshold, then the pixel value of pixel in described target block is set to the first result, namely, carried out the pixel value of pixel in the described target block of interpolation arithmetic;
If the brightness that described luminance calculation unit calculates gained is more than or equal to Second Threshold, then the pixel value of pixel in described target block is set to the second result, i.e. the pixel value of pixel without interpolation arithmetic and the product of predefined parameter in described target block; And
If described luminance calculation unit calculates the brightness of gained between first threshold and Second Threshold, then the pixel value of pixel in described target block is set to the 3rd result, described 3rd result is between described first result and described second result, calculate the brightness of gained more close to described first threshold, described 3rd result is more close to described first result, calculate the brightness of gained more close to described Second Threshold, described 3rd result is more close to described second result.
Alternatively, described image processing system comprises further:
Image acquisition units, is applicable to gather described single image and is transferred to described first module.
Compared with prior art, the present invention has the following advantages:
By processing the region in single image with different exposure time, avoiding the problem of misalignment between the image that may run into when multiple image is processed, improve the definition of image, avoid fuzzy, ghost image.And the amount of calculation processed single image is less, be conducive to improving treatment effeciency.
Embodiment
Although the image that several can be had different exposure by traditional HDR program synthesizes, so obtain highlights and dark portion can the image of normal exposure, to obtain abundant image detail, fuzzy, ghost image can be produced, and treatment effeciency is lower.This is because in the process gathered at multiple image, composition, find a view and may change, cause the pixel occurred in the same position of different images not reflect same object, the aligning that namely image can not be good.In theory, the aligning of pixel scale be realized, just can avoid fuzzy, ghost image.Even if achieve the completely static of transducer and optics when IMAQ, the movement of the object occurred in scene being shot, can produce problem that is fuzzy, ghost image equally.And along with the development of camera, single image often just has very large data volume, and synthesis is carried out to multiple image can bring larger computational load, and then cause efficiency to reduce.
In order to provide the quality and efficiency of improving HDR imaging, the invention provides a kind of image processing method and image processing system, by processing single image, the problem of the image misalignment that may run into when avoiding multiple image synthesis, and operand is relatively little, treatment effeciency is high.
With specific embodiment, the present invention is further elaborated below.It should be noted that, first, second term such as grade related in the present invention, just in order to distinguish different concepts, not limiting it has each other and has tandem or neighbouring relations.
Fig. 1 shows the schematic flow sheet of a kind of image processing method of the embodiment of the present invention.With reference to figure 1, this image processing method comprises step S101, S103 and S105.
In step S101, obtain single image, described single image comprises and multiplely has the low exposed portion of the first time for exposure t and multiple high exposed portion with the second time for exposure T, described low exposed portion and the spaced distribution of described high exposed portion, described first time for exposure t is less than the second time for exposure T.
Described single image has low exposed portion and high exposed portion.Therefore, in follow-up process, exposure compensating can be carried out according to high exposed portion to low exposed portion, also can carry out exposure correction according to low exposed portion to high exposed portion, thus make entire image various piece can both obtain relatively suitable exposure.
Described low exposed portion and described high exposed portion are set to form spaced apart.Therefore, in follow-up process, low exposed portion can be revised by two high exposed portions adjacent according to it; Similarly, high exposed portion also can be revised by two low exposed portions adjacent according to it.Usually, in environment being shot, the part leaning on closer should have similar brightness.Therefore, according to adjacent, revise with the exposed portion oneself itself with different exposure time, better treatment effect can be obtained.
Below, for Bayer area image, be described in detail.It should be noted that, the embodiment of the present invention is not limited to treatments B ayer area image, and those skilled in the art, according to the content of the specific embodiment of following discloses, can obtain the embodiment of process extended formatting image.
Existing conventional camera, usual employing complementary metal oxide semiconductors (CMOS) (ComplementaryMetalOxideSemiconductor, CMOS) transducer, the data format of its input picture processor is Bayer type, also be Bayer area image, there is the file name suffix of raw usually.In Bayer area image, the distribution of pixel meets specific form, and Fig. 2 shows the schematic diagram of a width Bayer area image.As shown in Figure 2, Bayer area image is composed of multiple units, and each unit includes four pixels, is arranged in the square shape that two row two arrange.Show a unit with thick line square frame in Fig. 2, comprise the pixel g of two green Color Channels, the pixel r of a pixel b and red color passage of a blue Color Channel.The Color Channel type and the arrangement mode that comprise pixel in each unit are consistent.Bayer area image gives single, specific color channel values to each pixel.In follow-up imaging, the mode of such as cfa interpolation algorithm can be adopted, calculate the RGB color channel values of each pixel, thus presenting images.
In some embodiments, described low exposed portion and described high exposed portion meet the regularity of distribution of two behavior one group, that is, each described low exposed portion and each described high exposed portion include two adjacent row pixels.Like this be provided with the data being beneficial to and utilizing transducer to export more expeditiously.It should be noted that, the division of the present invention to low exposed portion and high exposed portion is not limited to above-described embodiment, such as, divides in units of row or column, or divides in units of multirow or multiple row, all applicable.
In fig. 2, represent the high exposed portion with the second time for exposure T with the RGB capitalized, represent the low exposed portion with the first time for exposure t with the rgb of small letter.Arranging of described first time for exposure t and described second time for exposure T can be carried out according to the strong and weak beam intensity ratio of environment being shot, thus the light intensity that conforms.Such as, the beam intensity ratio of environment being shot is higher, and the ratio of T and t is also higher; The beam intensity ratio of environment being shot is lower, and the ratio of T and t is also lower.In some embodiments, the value of T/t can be set to 16,8 or 4.
In step s 103, first process is carried out to described low exposed portion, described first process comprises: determine that a low exposed portion is first area, and adjacent with described first area two high exposed portions are second area and the 3rd region, according to the pixel value of pixel in described second area and described 3rd region, the pixel value of respective pixel in described first area is revised.
Correspondingly, in step S105, second process is carried out to described high exposed portion, described second process comprises: determine that a high exposed portion is the 4th region, and two the low exposed portions adjacent with described 4th region are the 5th region and the 6th region, according to the pixel value of pixel in described 5th region and described 6th region, the pixel value of respective pixel in described 4th region is revised.
In image processing method provided by the invention, at least comprise and in low exposed portion or high exposed portion is revised accordingly.In some embodiments, described image processing method comprises and revising each low exposed portion and each high exposed portion.
With reference to figure 2, from top to down, the first row and the second row form a high exposed portion A, and the third line and fourth line form a low exposed portion B, and fifth line and the 6th row form a high exposed portion C, and the 7th row and the 8th row constitute a low exposed portion D.In the flow process of described image processing method, to the first process that low exposed portion B carries out, be based on high exposed portion A adjacent with it and high exposed portion C; Similarly, to the second process that described high exposed portion C carries out, be the low exposed portion D based on low exposed portion B adjacent with it.In some embodiments, described first process and described second process include the pixel value treating pixel in processing section and carry out interpolation arithmetic, such as, the pixel value of specific pixel are given the pixel average of respective pixel in adjacent part.
In Bayer area image, namely pixel value refers to the color channel values of R, G or B.In some embodiments, pixel value also can have other types, such as, and hsv color spatial value etc.In Bayer area image, " correspondence " between so-called pixel refers to the same position be in Bayer area image unit.Those skilled in the art can know by inference in the image of extended formatting, the implication of " correspondence " between so-called pixel.
Below, by concrete illustrative step S103, in low exposed portion, namely the process of the first process is carried out in first area.To other low exposed portions, and to the respective handling that high exposed portion carries out, can know by inference from following discloses, will repeat no more.
Fig. 3 shows the schematic flow sheet processed first area of the embodiment of the present invention, comprises step S201, S203, S205, S207 and S209.
Fig. 4 shows first area and the second area be adjacent and the 3rd region.In Fig. 4, with light background, the rgb of small letter represents first area, with dark-background, the RBG of capitalization represents second area and the 3rd region.
In step s 201, determine that a pixel in described first area is object pixel.
Described first area is processed, namely the pixel in described first area is processed.First, need to determine that pending pixel is object pixel.With reference to figure 4, in the Bayer area image unit gone out with black surround frame, determine that the g1 pixel in the upper left corner is as object pixel.It should be noted that, to the process of other pixels, can with reference to below to the process of process g1 pixel.
In step S203, the multiple pixels pair corresponding with described object pixel are determined respectively in described second area and described 3rd region, each described pixel is to comprising two pixels, to lay respectively in described second area and described 3rd region and with described object pixel, to there is the Color Channel of identical type, each described pixel is to having a direction, and the direction that described multiple pixel is right is not all parallel to each other.In the present invention, the direction that so-called pixel is right refers to the direction at the straight line place connecting this pixel centering two pixels.
As shown in Figure 4, in some embodiments, the direction that pixel is right comprises column direction, and positive diagonal and back-diagonal direction (all illustrating with double-head arrow in Fig. 4), described positive diagonal becomes clockwise 45 ° of angles with described column direction, described back-diagonal direction becomes anticlockwise 45 ° of angles with described column direction.Such setting, can fully take into account the pixel value change around object pixel on different directions.In some embodiments, certain direction can also arrange multiple pixel pair, further to offset the impact suddenling change and bring.Above-mentioned direction all illustrates with double-head arrow line in the diagram.
Each described pixel is to comprising a pixel corresponding with described object pixel g1 at second area and the 3rd region respectively.Particularly, corresponding with object pixel g1 in a column direction pixel is to being Ga and Gh; Positive diagonal has the pixel pair that three corresponding with object pixel g1, is Gc and Gf, Gd and Gg and Ge and Gh respectively; Back-diagonal direction also determines three pixels pair corresponding with object pixel g1, is Gb and Gh, a Gc and Gi and Gd Gj respectively.
In step S205, calculate the pixel amplitude of variation that pixel is in the same direction right respectively.
In some embodiments, the pixel amplitude of variation that pixel is in a certain direction right can get the absolute value of the difference of respective pixel value.In some embodiments, if certain direction has multiple pixel pair, then get the mean value of its difference separately.
Particularly, with reference to lower formula:
d[0]=|Ga-Gh|
Wherein, d [0] represents the pixel amplitude of variation on column direction, and d [1] represents the pixel amplitude of variation in positive diagonal, and d [2] represents the pixel amplitude of variation on back-diagonal direction.
In step S207, the direction selecting pixel value amplitude of variation minimum is edge direction.
By contrast d [0], d [1] and d [2], determine wherein minimum value, namely determine that the direction of its correspondence is edge direction.
It is minimum that edge direction represents pixel value variable gradient, and picture transition is direction the most naturally.
In step S209, along described edge direction, interpolation arithmetic is carried out to described object pixel.
Interpolation arithmetic is well known to those skilled in the art, and does not repeat them here.In some embodiment, namely described interpolation arithmetic tries to achieve the right pixel average of in described edge direction, corresponding with described object pixel g1 pixel.
To the process of other pixels in first area, also can with reference to the flow process adopting above-mentioned steps S201 to S209.
In order to improve the efficiency of process further, consider that adjacent pixels is in approximate light environment, can in units of block to the process of described first area.
Fig. 5 shows the another schematic flow sheet processed first area of the embodiment of the present invention, comprises step S301, S303, S305 and S307.
In step S301, determine target block.
The selection of target block can be adapted to the form that imageing sensor exports data.In some embodiment, cmos sensor is adopted to export Bayer area image, because Bayer area image meets the rule that four lattice are a unit circle arrangement, therefore, Bayer area image can be selected to comprise the pixel of a red color passage, and the unit of the pixel of a blue Color Channel and two green Color Channel pixels is as a target block.With reference to figure 4, namely the four lattice pixel cells that black surround frame goes out can be used as a target block.In other embodiments, target block that there are other shapes, that comprise different number pixel can also be selected.
In step S303, in described target block, determine object pixel.
Any one pixel can be selected in described target block as object pixel.Consider that the environmental light intensity that pixel in target block is corresponding and light situation of change should be more or less the same, concrete which pixel of selecting does not do further restriction.In some embodiments, can the pixel in the upper left corner in select target block, if the g1 pixel in Fig. 4 black surround is as object pixel.
In step S305, determine the edge direction corresponding to described object pixel.
Determine that the method for edge direction with reference to above to the elaboration of step S203 to S207, can not repeat them here.
In step S307, to all pixels in described target block, all carry out interpolation arithmetic along described edge direction.
As mentioned above, the pixel distribution in image all can meet specific rule usually, for all pixels in target block, after determining edge direction, can determine pixel pair corresponding with it, to carry out interpolation arithmetic along described edge direction.
Below, respectively for column direction, positive diagonal and back-diagonal direction, be described in detail.
Fig. 6 shows schematic diagram when edge direction is column direction, pixel in target block being carried out to interpolation arithmetic.
As shown in Figure 6, when edge direction is column direction, described target block (block that in Fig. 6, in low exposed portion, black surround frame goes out) lays respectively at two corresponding blocks (in Fig. 6 in two high exposed portions respectively with the block that black surround frame goes out) of adjacent high exposed portion with column direction has.Described target block and described two corresponding blocks are all the unit of Bayer area image, have identical pixel distribution rule.Therefore, the interpolation arithmetic of all pixels in described target block, the pixel value separately based on the respective pixel in two corresponding blocks carries out.
Particularly, for pixel g1, the pixel of its correspondence is Gb and Gh; For pixel r, the pixel of its correspondence is Rb and Re; For pixel b, the pixel of its correspondence is Bb and Be; For pixel g2, the pixel of its correspondence is Ge and Gk.By the pixel average of giving its respective pixel separately to the pixel in target block, realize interpolation arithmetic.
Fig. 7 shows schematic diagram when edge direction is positive diagonal, pixel in target block being carried out to interpolation arithmetic.
As shown in Figure 7, when described edge direction is positive diagonal, target block block corresponding to two is also positioned in positive diagonal.
Particularly, for pixel g1, the pixel of its correspondence is Gc and Gg, in some embodiments, can select Ge and Gg, because Ge distance g1 is nearer; For pixel r, the pixel of its correspondence is Rc and Rd; For pixel b, the pixel of its correspondence is Bc and Bd; For pixel g2, the pixel of its correspondence is Gf and Gj, in some embodiments, can select Gf and Gh, because Gh distance g2 is nearer.By the pixel average of giving its respective pixel separately to the pixel in target block, realize interpolation arithmetic.
Fig. 8 shows schematic diagram when edge direction is back-diagonal direction, pixel in target block being carried out to interpolation arithmetic.
As shown in Figure 8, when described edge direction is positive diagonal, target block block corresponding to two is also positioned on back-diagonal direction.
Particularly, for pixel g1, the pixel of its correspondence is Ga and Gi; For pixel r, the pixel of its correspondence is Ra and Rf; For pixel b, the pixel of its correspondence is Ba and Bf; For pixel g2, the pixel of its correspondence is Gd and Gl.In some embodiments, for pixel g1 and g2, the pixel of its correspondence is all chosen as Gd and Gi nearest apart from them.By the pixel average of giving its respective pixel separately to the pixel in target block, realize interpolation arithmetic.
Circulate thus, the interpolation arithmetic in units of block can be realized.
It should be noted that, the step in above-described embodiment is not what be completely fixed.Such as, in some embodiment, can according to step S201 to S207, first determine the edge direction of certain object pixel, perform step S301 again, determine the target block comprising described object pixel, then along described edge direction, interpolation arithmetic is carried out to pixels all in described target block.
In some embodiments, also comprise further the pixel value through interpolation arithmetic is revised further.In some embodiments, described further correction is carried out based on brightness.
Fig. 9 shows the schematic flow sheet pixel value through interpolation arithmetic being carried out to correction further of the embodiment of the present invention, comprises step S401, S403, S405 and S407.
In step S401, select all pixels in described target block through described interpolation arithmetic and without described interpolation arithmetic in relatively large pixel value, according to described relatively large pixel value, calculate the brightness of described target block.
For the process in short exposure region, the pixel value being just through described interpolation arithmetic of selection; For the process of long exposure area, selection be exactly pixel value without described interpolation arithmetic.
The account form of brightness has a variety of, such as, can calculate the brightness of described target block according to following formula:
Wherein, lum represents the brightness of target block, F1 [0] and F1 [3] represents two green Color Channel pixel values through selecting in described target block respectively, F1 [1] represents the red color passage pixel value through selecting in described target block, and F1 [3] represents the blue Color Channel pixel value through selecting in described target block.
Then, based on the brightness calculating gained, the pixel value through interpolation arithmetic is revised further.Step S403, S405 and S407 have pointed to the different processing mode of three kinds of carrying out based on brightness respectively
In step S403, if the brightness calculating gained is less than or equal to first threshold, then the pixel value of pixel in described target block is set to the first result.
In step S405, if the brightness calculating gained is more than or equal to Second Threshold, then the pixel value of pixel in described target block is set to the second result.
In step S 407, if the brightness of calculating gained is between first threshold and Second Threshold, then the pixel value of pixel in described target block is set to the 3rd result.
Below the first result, the second result and the 3rd result are described in detail.
For the process to short exposure region, in some embodiment, if described brightness is lower, then the compensation needed by long exposed portion is described, then retains the pixel value carrying out pixel in the described target block of interpolation arithmetic, i.e. the first result; If brightness is excessive, then illustrates that the brightness after the supplementing of long exposed portion is too high, then give up the pixel value carrying out interpolation arithmetic, again give the pixel value that pixel in target block is new, i.e. the second result; If brightness within limits, then the weight factor with brightness change can be set, pixel value is adjusted.
In some embodiment, described second result can be the pixel value of pixel without interpolation arithmetic and the product of predefined parameter in described target block, and such as, this predefined parameter can be set to the ratio of long time for exposure and short exposure time.
Figure 10 shows the set-up mode of the weight factor of the embodiment of the present invention.In Figure 10, transverse axis lum represents the change of brightness, and vertical pivot θ represents the change of weight factor, and E1 represents first threshold, and E2 represents Second Threshold.When brightness is less than or equal to first threshold, the value of θ is 0; When brightness is more than or equal to Second Threshold, the value of θ is 1; When brightness is between first threshold and Second Threshold, the value of θ also between zero and one and be proportionate with the size of the brightness calculated.
In some embodiments, for the process of short exposure part, can carry out according to following formula the further correction of the pixel value through interpolation arithmetic:
F_hdr[i]=(1-θ)*F1[i]+θ*(exp_ratio*F2[i]),i=0,1,2,3
Wherein, F_hdr [i] represents the pixel value that in target block, the process of specific pixel is revised further, θ and above-mentioned weight factor, F1 [i] represents the pixel value of this specific pixel through interpolation arithmetic, exp_ratio represents the ratio of long time for exposure and short exposure time, and F2 [i] represents the pixel value of this specific pixel without interpolation arithmetic.
By above-mentioned further correction, the effect of image is further improved.
Above embodiments describe the first process that short exposure part is carried out.Based on above-mentioned open, those skilled in the art can know the second process carried out long exposed portion by inference, do not repeat them here.
Correspondingly, the embodiment of the present invention also provides a kind of image processing system, can perform the step described in above-mentioned all or part of embodiment.
Figure 11 shows the schematic block diagram of the image processing system of the embodiment of the present invention.Described image processing system 500 comprises first module 510 and second unit 530.
Described first module 510 is applicable to obtain single image, described single image comprises and multiplely has first exposed portion of the first time for exposure and multiple second exposed portion with the second time for exposure, described first exposed portion and the spaced distribution of described second exposed portion, described first time for exposure is not equal to described second time for exposure.
Described second unit 530 is applicable to carry out the first process to described first exposed portion.In some embodiment, described second unit 530 is also applicable to carry out the second process to described second exposed portion.The detailed process of described first process and described second process can with reference to above-described embodiment.
Figure 12 shows the structure chart of the second unit 530 of the embodiment of the present invention.Described second unit 530 comprises edge direction selected cell 531, interpolation operation unit 533, luminance calculation unit 535 and amending unit 537.
The data of described single image are inputted described second unit 530 by described first module 510.First, described edge direction selected cell 531 determines the edge direction of object pixel, and then described interpolation operation unit 533 carries out interpolation arithmetic according to described edge direction.In some embodiments, described interpolation operation unit 533 also performs the target block determining to comprise described object pixel, and all carries out interpolation arithmetic according to described edge direction to wherein all pixels.Then, in some embodiment, through the pixel value of interpolation arithmetic through described luminance calculation unit 535, to obtain the brightness of target block, through the correction of described amending unit 537 based on brightness, obtain the pixel value after processing.
The steps such as the edge direction selection performed by above-mentioned each unit, interpolation arithmetic, brightness calculation and correction with reference to embodiment above, can not repeat them here.
In some embodiment, described image processing system 500 comprises further: image acquisition units, is applicable to gather described single image and is transferred to described first module 510.
Although the present invention with preferred embodiment openly as above; but it is not for limiting the present invention; any those skilled in the art without departing from the spirit and scope of the present invention; can make possible variation and amendment, the scope that therefore protection scope of the present invention should define with the claims in the present invention is as the criterion.