CN104320576A - Image processing method and image processing apparatus for portable terminal - Google Patents

Image processing method and image processing apparatus for portable terminal Download PDF

Info

Publication number
CN104320576A
CN104320576A CN201410522560.3A CN201410522560A CN104320576A CN 104320576 A CN104320576 A CN 104320576A CN 201410522560 A CN201410522560 A CN 201410522560A CN 104320576 A CN104320576 A CN 104320576A
Authority
CN
China
Prior art keywords
image
pixel
luminance raising
predetermined
portable terminal
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201410522560.3A
Other languages
Chinese (zh)
Other versions
CN104320576B (en
Inventor
程懿远
赵铮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201410522560.3A priority Critical patent/CN104320576B/en
Publication of CN104320576A publication Critical patent/CN104320576A/en
Application granted granted Critical
Publication of CN104320576B publication Critical patent/CN104320576B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides an image processing method and image processing apparatus for a portable terminal. The image processing method for the portable terminal comprises: based on brightness improvement of a single image, capturing a first image, through adjusting the brightness of a pixel whose grayscale value is lower than a grayscale threshold in the first image, generating a second image, and synthesizing the first image with the second image to generate a third image. By using the image processing method and image processing apparatus for the portable terminal, the hardware configuration of the portable terminal does not have to be improved, the problem of over high requirement for shutter speed during continuous shooting processing of multiple images is also solved, the hardware cost of the portable terminal is decreased, and the imaging quality of an image shot at night can be well improved.

Description

A kind of image processing method for portable terminal and image processing apparatus
Technical field
The present invention relates to image processing techniques, particularly relate to a kind of image processing method for portable terminal and image processing apparatus.
Background technology
When not configuring professional photographic apparatus, when user uses portable terminal (as mobile phone) to carry out night or the shooting of indoor dark situation, the imaging picture of gained often exist smudgy, noise too much, lightness and the problem such as contrast is poor.
In order to solve the problem, usually adopt following two technical schemes in the prior art:
1) improving night by lifting hardware configuration and clap image quality, as configured the camera of more than 8,000,000 pixels, making aperture reach F2.0, and be equipped with independently professional ISP (picture signal process) process chip.
2) by many figure continuous shooting, alignment, and carry out Images uniting, clap image quality with the method improving image brightness and contrast to improve night.
But, technical scheme 1) manufacturer production cost can be caused to increase, and not there is universal characteristic; And technical scheme 2) need camera to have higher shutter speed, otherwise there will be that shooting plurality of pictures needs that the time is longer, Consumer's Experience is not good, camera shake is serious, cannot the series of problems such as complete matching.
Summary of the invention
The object of the invention is, a kind of image processing method for portable terminal and image processing apparatus are provided, by performing the scheme of luminance raising process based on single image, realize not improving the hardware configuration of portable terminal and when the shutter speed of portable terminal is fast not, just can improve the target of the image quality of clapping image night, not only save the hardware cost of portable terminal but also improve the image quality of clapping image night well.
According to an aspect of the present invention, the invention provides a kind of image processing method for portable terminal, comprise: catch the first image, by to gray value in described first image lower than gray threshold pixel adjustment brightness generate the second image, and described first image and described second image are synthesized, generates the 3rd image.
According to a further aspect in the invention, the invention provides a kind of image processing method for portable terminal, comprising: the 4th image gathering predetermined/frame number, by the 4th image alignment of described predetermined/frame number, and described 4th image after alignment is synthesized, generates the 5th image.
According to an aspect of the present invention, the invention provides a kind of image processing apparatus for portable terminal, comprise single image luminance raising processing unit, for performing luminance raising process based on single image, it comprises: the first image capture unit, for catching the first image; Luminance raising unit, for by gray value in described first image lower than gray threshold pixel adjustment brightness generate the second image; First image composing unit, for described first image and described second image being synthesized, generates the 3rd image.
According to an aspect of the present invention, the invention provides a kind of image processing apparatus for portable terminal, comprise multiple image brightness and promote processing unit, for performing luminance raising process based on multiple images, it comprises: the second image capture unit, for gathering the 4th image of predetermined/frame number; Image alignment unit, for the 4th image alignment by described predetermined/frame number; Second image composing unit, for being synthesized by described 4th image after alignment, generates the 5th image.
Image processing method for portable terminal provided by the invention and image processing apparatus, the second image is generated by the first Image Adjusting brightness caught the camera of portable terminal, undertaken synthesizing the scheme processed by the second image and the first image again, both without the need to improving the hardware configuration of portable terminal, to the problem that the requirement of shutter speed is too high when solving again multiple continuous image shooting process, not only save the hardware cost of portable terminal but also improve the image quality of clapping image night well.
Accompanying drawing explanation
Fig. 1 is the flow chart of the image processing method for portable terminal of exemplary embodiment of the present;
Fig. 2 is the exemplary plot performing luminance raising process based on single image of exemplary embodiment of the present;
Fig. 3 is the overview flow chart of the image processing method for portable terminal of the preferred embodiments of the present invention;
Fig. 4 is the flow chart of the image processing method for portable terminal of another exemplary embodiment of the present invention;
Fig. 5 is one of exemplary plot performing luminance raising process based on multiple images of exemplary embodiment of the present;
Fig. 6 is the exemplary plot two performing luminance raising process based on multiple images of exemplary embodiment of the present;
Fig. 7 is the logic diagram of the image processing apparatus for portable terminal of exemplary embodiment of the present;
Fig. 8 is the general logical block diagram of the image processing apparatus for portable terminal of the preferred embodiments of the present invention;
Fig. 9 is the logic diagram of the image processing apparatus for portable terminal of another exemplary embodiment of the present invention.
Embodiment
Present general inventive concept of the present invention is, a kind of image processing method for portable terminal and image processing apparatus are provided, when the hardware configuration of portable terminal is not high and shutter speed is fast not, brightness adjustment is carried out to the single image that camera catches, to improve the image quality of the image of shooting at night by the mode of software process.Particularly, the first image is first caught; Then lower than the pixel adjustment brightness of gray threshold, the second image is generated to gray value in described first image, more described first image and described second image to be synthesized, generation the 3rd image.By above-mentioned method, obtain high-quality 3rd image, achieve and do not improving the hardware configuration of portable terminal and when the shutter speed of portable terminal is fast not, just can improve the target of the image quality of clapping image night, not only save the hardware cost of portable terminal but also improve the image quality of clapping image night well.
In addition, when the video acquisition resolution of portable terminal, frame per second meet certain configuration requirement, the present invention preferentially can take the processing scheme of carrying out brightness adjustment based on multiple images: the 4th image gathering the continuous sequence frame of the captured video of predetermined frame number, and to described predetermined the 4th image of frame number perform luminance raising process based on multiple images, namely first by except first other the 4th image except frame the 4th image and first frame the 4th image alignment, again by alignment after multiple frame the 4th image synthesize, generate the 5th image.By this scheme, portable terminal only need reach certain video acquisition resolution, frame per second requirement, requirement to shutter speed during without the need to reaching multiple continuous image shooting process, just can carry out the luminance raising process based on multiple images, obtain high-quality 5th image.
Further, during requirement when portable terminal reaches multiple continuous image shooting process to shutter speed, then can more preferentially take following scheme: continuous shooting gathers the 4th image of predetermined number, and the above-mentioned luminance raising process based on multiple images is performed to the 4th image of described predetermined number.
In conjunction with above-mentioned inventive concept, the present invention configures according to the difference of portable terminal, take corresponding image procossing scheme, make that process is promoted to the image quality of clapping image night more flexible, the image procossing scheme of corresponding optimum can both be provided to improve the image quality of clapping image night to the portable terminal of arbitrary disposition.
Below in conjunction with accompanying drawing, the image processing method for portable terminal of the present invention and image processing apparatus are described in detail.
Fig. 1 is the flow chart of the image processing method for portable terminal that exemplary embodiment of the present is shown.
With reference to Fig. 1, in step S110, catch the first image.In the present embodiment, the camera by described portable terminal catches the first image.
In step S120, by gray value in described first image lower than gray threshold pixel adjustment brightness generate the second image.According to exemplary embodiment of the present invention, in the step s 120, according to predetermined mapping ruler, the gray value of each pixel of described first image is mapped as the gray value of respective pixel in described second image.Particularly, the pixel of described gray threshold is less than to gray value in described first image, the gray value of described pixel is become the gray value of respective pixel in the second image according to predetermined parabolic function, the pixel of described gray threshold is not less than to gray value in described first image, the gray value of described pixel is mapped unchangeably the gray value becoming respective pixel in the second image.Concrete mapping function can with reference to formula (1).
map [ x ] = y 0 + ( x + x 0 ) 2 a x < thre x x > = thre - - - ( 1 )
In formula (1), x is the gray value of raw first image, x ∈ [0,255], map [x] is the gray value of the second image after mapping, map [x] ∈ [0,255], x0, y0, a are fixed coefficient, are the empirical values obtained by repeatedly curve Adjustment Tests, can adjust the value of these three coefficients as the case may be.
By above-mentioned process, generate that brightness is higher, image the second image more clearly, for the treatment effect of subsequent step S130 is had laid a good foundation.
In step S130, described first image and described second image are synthesized, generate the 3rd image.According to exemplary embodiment of the present invention, in step s 130, which, the gray value of respective pixel in the gray value of each pixel in described first image and described second image is weighted summation according to respective weights, obtains the gray value of the respective pixel of described 3rd image.Concrete computational methods can such as formula (2).
image2(x,y)=src(x,y)*weight+image1(x,y)*(1-weight) (2)
Wherein, src (x, y) represents (x in the first image, y) gray value of position is put, image1 (x, y) represents that in the second image, (x, y) puts the gray value of position, image2 (x, y) represent that in the 3rd image, (x, y) puts the gray value of position, weight is the first image (x, y) weights of position pixel, (1-weight) is the weights of respective pixel in the 3rd image.Here, current point brightness is higher, then in the image that overall brightness is relatively low, the weights of respective pixel are higher.Give the gray value of pixel in the image that brightness is relatively low by high weights, to carry out the equilibrium of image brightness, and preserve the details in image.
The weights of described pixel respectively in the first image and the second image can be calculated according to the RGB component value of arbitrary pixel in the first image and the second image.Such as, the weights of arbitrary pixel in the first image can be calculated according to formula (3), also can be again self-defined as the case may be.
weight = src _ r + src _ g + src _ b + image 1 _ r + image 1 _ g + image _ b 6 * 255 - - - ( 3 )
In formula (3), src_r, src_g, src_b are respectively the red, green, blue component value of described pixel in the first image, and image1_r, image1_g, image_b are respectively the red, green, blue component value of described pixel in the second image.The weights of described pixel in the second image are (1-weight).
According to a preferred embodiment of the invention, after step s 130, also local contrast enhancing is carried out to the 3rd image.Such as, but be not limited to: the 3rd image is divided into m × n block region (m and n is natural number), restriction contrast histogram equalization is carried out to the image in each block region, and in bounding gradient mode, m × n block is carried out the result figure splicing after limiting contrast histogram equalization, form the final image of presenting to user.The present embodiment also can take other method to carry out the process of local contrast enhancing, is not limited to said method.By the process that this local contrast strengthens, improve the definition of the 3rd image further, provide the user higher image quality.
Fig. 2 is through the above-mentioned exemplary plot performing luminance raising process based on single image, wherein left figure is the first image of portable terminal taking under clapping scene night, right figure be through the present embodiment perform luminance raising process based on single image after the 3rd image that obtains.Can find out, the 3rd image is obtained for lifting relative to the first image brightness and definition, improves the image quality of clapping image night largely.
According to a preferred embodiment of the invention, can according to the acquisition parameters of portable terminal, perform the luminance raising based on single image or the luminance raising that performs based on multiple images.
Fig. 3 is the overview flow chart of the image processing method for portable terminal that the preferred embodiments of the present invention are shown.
With reference to Fig. 3, in step S310, obtain the processing time of the predetermined number picture of described portable terminal continuous shooting.Processing time described in the present embodiment comprises shooting time and the image of shooting is imported the time of internal memory, usually can not be oversize in the described processing time, otherwise the multiple images gathered can produce larger displacement difference.
In step S320, determine whether the described processing time is less than predetermined time threshold value (such as processing time <2 second).If the described processing time is less than predetermined time threshold value, then performs step S330, the situation performing step S330 is with this understanding defined as situation one herein.In step S330, perform the luminance raising based on multiple images.The technology of carrying out luminance raising based on multiple images in prior art can be used to perform step S330, also can perform the process (process of composition graphs 4 couples of step S330 being described in detail after a while) carrying out luminance raising based on multiple images as described in Figure 4.If in step S320, determine that the described processing time is more than or equal to predetermined time threshold value, then perform step S340.In step S340, determine whether the video resolution of described portable terminal and frame per second meet predetermined configuration standard (such as video resolution >720p and frame per second >15 frame/second).
If in step S340, determine that the video resolution of described portable terminal and frame per second meet described predetermined configuration standard, then perform step S330, the situation performing step S330 is with this understanding defined as situation two herein.
If in step S340, determine that the video resolution of described portable terminal and frame per second do not meet described predetermined configuration standard, then perform step S350.In step S350, as previously mentioned, the luminance raising based on single image is performed.
According to an alternative embodiment of the invention, can not determine whether to perform the luminance raising process based on multiple images based on the described processing time, that is, do not perform the process of step S310 ~ S320, but first perform step S340, determine by means of only described video resolution and described frame per second to perform the luminance raising still performing multiple images based on the luminance raising of single image.If meet predetermined configuration standard (such as video resolution >720p and frame per second >15 frame/second) in the described video resolution of step S340 and described frame per second, then perform step S330, similarly, be also situation two by the situation performing step S330 with this understanding.If described resolution and described frame per second do not meet predetermined configuration standard, then perform step S350, perform the luminance raising based on single image.
Fig. 4 is the flow chart of the image processing method for portable terminal that another exemplary embodiment of the present invention is shown, namely based on the luminance raising process that multiple the 4th images aforesaid perform.
With reference to Fig. 4, in step S331, gather the 4th image of predetermined/frame number.Particularly, if corresponding aforementioned circumstances one, then in step S331, continuous shooting gathers the 4th image of predetermined number (such as 5); If corresponding aforementioned circumstances two, then in step S331, gather the 4th image of the continuous sequence frame of the captured video of predetermined frame number.
In step S332, by the 4th image alignment of described predetermined/frame number.According to exemplary embodiment of the present invention, in step S332, calculate often Zhang frame the 4th image and rotate translation matrix relative to the first Zhang frame the 4th image, and according to described rotation translation matrix, by other the 4th image except the first Zhang frame the 4th image and the first Zhang frame the 4th image alignment.
Wherein, described rotation translation matrix is calculated according to the gyro data or theory on computer vision that obtain described portable terminal.
If described portable terminal is equipped with gyroscope, then obtain gyro data, calculate every Zhang frame the 4th image according to described gyro data and rotate translation matrix relative to the first Zhang frame the 4th image.
Particularly, pass through gyro data, we can obtain any time portable terminal and ground around the angle α β γ of x, y, z axle, described x-axis is pointed to level when portable terminal is placed on the direction of its acquiescence and is pointed to right direction, described y-axis to point to when portable terminal is placed on direction of its acquiescence direction vertically upward, described z-axis be point to portable terminal screen front outside direction, between two Zhang two field pictures, the calculating of spin matrix calculates by the difference at α β γ angle.Such as: if the displacement between two Zhang two field pictures and rotation amount very little, and main rotation amount is the angle γ rotated around z-axis, then can obtain the angle of the spaced winding z-axis rotation of two Zhang two field pictures: Δ γ=γ 12, then obtain spin matrix R = r 0 r 1 r 2 r 3 = cos &Delta;&gamma; - sin &Delta;&gamma; sin &Delta;&gamma; cos &Delta;&gamma; . Two the calculating of spin matrix between two field picture, by acceleration transducer obtain respectively any time two two field picture along the acceleration a of x, y, z axle xa ya z.Due to two the two field picture shooting interval time shorter, portable terminal does micro-displacement along x-axis, y-axis direction, and the shooting interval time, t fixed, therefore can by acceleration and time obtain two between two field picture along the displacement in x-axis, y-axis direction.That is: v = a &times; t s = v &times; t &DoubleRightArrow; s = a &times; t &times; t , Wherein, a is acceleration, and v is speed, and s is displacement.Therefore can according to formula t x = a x &times; t &times; t t y = a y &times; t &times; t Calculate translation matrix.By the calculating of spin matrix and translation matrix, we just obtain rotation translation matrix RT = r 0 r 1 t x r 2 r 3 t y .
As previously mentioned, also described rotation translation matrix is calculated by theory on computer vision.
The step being calculated described rotation translation matrix by theory on computer vision is as follows: the characteristic point position being obtained two Zhang two field pictures by methods such as SIFT (scale invariant feature conversion) algorithm, surf (Speed-Up Robust Features) algorithms, and characteristic vector; To two two field picture carry out Feature Points Matching, find two all match points in two field picture; If the characteristic point aimed at the mark in image is { x 1, y 1, x 2, y 2... x n, y n, treat that the characteristic point matched with it in alignment image is { X 1, Y 1, X 2, Y 2... X n, Y n, there is following linear relationship according to the affine theory in computer vision in the characteristic point of often pair of coupling x y = r 0 r 1 t x r 2 r 3 t y &times; X Y 1 . Can linear equation group as follows:
x 1=r 0X 1+r 1Y 1+t x
y 1=r 2X 1+r 3Y 1+t y
x 2=r 0X 2+r 1Y 2+t x
y 2=r 2X 2+r 3Y 2+t y
.
.
.
x n=r 0X n+r 1Y n+t x
y n=r 2X n+r 3Y n+t y
Then r is solved by the method for solve linear equations 0r 1r 2r 3t xt y, gained matrix RT = r 0 r 1 t x r 2 r 3 t y Be rotation translation matrix.
Afterwards, according to described rotation translation matrix, by other the 4th image except the first Zhang frame the 4th image and the first Zhang frame the 4th image alignment.In the present embodiment, by except first other the 4th image calculating through formula (4) except frame the 4th image, with first frame the 4th image alignment.
x _ new y _ new = R 0 R 1 t x R 2 R 3 t y &times; x y 1 - - - ( 4 )
X, y in formula (4) are the coordinate figure before aiming at, and x_new, y_new are the coordinate figure after aiming at, R 0 R 1 t x R 2 R 3 t y For the rotation translation matrix calculated above.
In step S333, described 4th image after alignment is synthesized, generate the 5th image.According to exemplary embodiment of the present invention, in step S333, by comprise after alignment multiple/frame the 4th image brightness superposition, generate the 5th image.Particularly, when calculating the gray value of each point of described 5th image, get the pixel set of the periphery k × j (such as 3 × 3) of described all 4th image corresponding points, carrying out quicksort to the pixel in described pixel set, to get gray value be that the gray value (as three values) of middle predetermined number superposes, wherein, k, j are odd number.It should be noted that, if the gray value after superposition is greater than 255, then get 255 as the gray value of the 5th image respective pixel.Under effectively can suppressing night scene mode by this example embodiment method, continuous shooting superposes the problem of the noise amplification caused.
According to a preferred embodiment of the invention, after step S334, also local contrast enhancing is carried out to the 5th image.Can refer to aforementioned local contrast of carrying out the 3rd image to strengthen and bear process, do not repeat them here.
Fig. 5 and Fig. 6 is through the above-mentioned exemplary plot performing luminance raising process based on multiple images, wherein Fig. 5 is multiple the 4th images of portable terminal taking under clapping scene night, Fig. 6 be through the present embodiment perform luminance raising process based on multiple images after the 5th image that obtains.Can find out, the 5th image is obtained for lifting relative to the 4th image brightness and definition, improves the image quality of clapping image night largely.
Fig. 7 is the logic diagram of the image processing apparatus for portable terminal that exemplary embodiment of the present is shown.
With reference to Fig. 7, image processing apparatus for portable terminal of the present invention comprises single image luminance raising processing unit 700, for performing luminance raising process based on single image, single image luminance raising processing unit 700 comprises: the first image capture unit 710, luminance raising unit 720 and the first image composing unit 730.
First image capture unit 710 is for catching the first image.In the present embodiment, the first image can be caught by the camera of described portable terminal.
Luminance raising unit 720 for by gray value in described first image lower than gray threshold pixel adjustment brightness generate the second image.
Embodiment according to the present invention embodiment, the gray value of each pixel of described first image, according to predetermined mapping ruler, is mapped as the gray value of respective pixel in described second image by luminance raising unit 720.Particularly, be less than the pixel of described gray threshold to gray value in described first image, the gray value of described pixel is become the gray value of respective pixel in the second image by described luminance raising unit 720 according to predetermined parabolic function; Be not less than the pixel of described gray threshold to gray value in described first image, the gray value of described pixel is mapped the gray value becoming respective pixel in the second image by described luminance raising unit 720 unchangeably.By luminance raising unit 720, generate that brightness is higher, image the second image more clearly.
First image composing unit 730, for described first image and described second image being synthesized, generates the 3rd image.The gray value of respective pixel in the gray value of each pixel in described first image and described second image is weighted summation according to respective weights by the first image composing unit 730, obtains the gray value of the respective pixel of described 3rd image.
The weights of described pixel respectively in the first image and the second image can be calculated according to the RGB component value of arbitrary pixel in the first image and the second image.
Fig. 8 is the general logical block diagram of the image processing apparatus for portable terminal that the preferred embodiments of the present invention are shown.
With reference to Fig. 8, image processing apparatus of the present invention also can comprise processing scheme determining unit 800 and multiple image brightness promote processing unit 900.Processing scheme determining unit 800, for the acquisition parameters according to described portable terminal, promotes processing unit 900 based on the process of multiple images execution luminance raising by described single image luminance raising processing unit 700 based on single image execution luminance raising process or by multiple image brightness.Describe multiple image brightness described in detail with reference to Fig. 9 after a while and promote processing unit 900.Multiple image brightness promote processing unit 900 for performing luminance raising process based on multiple images.
Particularly, processing scheme determining unit 800 is for obtaining video resolution and the frame per second of described portable terminal; If described video resolution and described frame per second meet predetermined configuration standard, then processing scheme determining unit 800 promotes processing unit 900 by multiple image brightness and performs luminance raising process based on multiple images, herein, also the situation calling multiple image brightness lifting processing unit 900 is with this understanding defined as situation two; If described video resolution and described frame per second do not meet predetermined configuration standard, then processing scheme determining unit 800 performs luminance raising process by single image luminance raising processing unit 700 based on single image.
On the other hand, processing scheme determining unit 800 also can obtain the processing time of the predetermined number picture of described portable terminal continuous shooting; If the described processing time is less than predetermined time threshold value, then processing scheme determining unit 800 promotes processing unit 900 by multiple image brightness and performs luminance raising process based on multiple images, herein, correspondingly the situation calling multiple image brightness lifting processing unit 900 is with this understanding defined as situation one; If the described processing time that photographing process time acquisition unit obtains is more than or equal to predetermined time threshold value and described resolution and described frame per second meet described predetermined configuration standard, then processing scheme determining unit 800 promotes processing unit 900 by multiple image brightness and performs luminance raising process based on multiple images, herein, correspondingly the situation calling multiple image brightness lifting processing unit 900 is with this understanding defined as situation two; If the described processing time is more than or equal to predetermined time threshold value and described resolution and described frame per second do not meet described predetermined configuration standard, then processing scheme determining unit 800 performs luminance raising process by described single image luminance raising processing unit 700 based on single image.
By above-mentioned processing scheme determining unit 800, make image processing apparatus process of the present invention more flexible, the image procossing scheme of corresponding optimum can both be provided to improve the image quality of clapping image night to the portable terminal of arbitrary disposition.
Describe multiple image brightness in detail below in conjunction with Fig. 9 and promote processing unit 900.
Fig. 9 is the logic diagram of the image processing apparatus for portable terminal that another exemplary embodiment of the present invention is shown.Fig. 9 illustrates that multiple image brightness promote the logic diagram of processing unit.
With reference to Fig. 9, multiple image brightness promote processing unit 900 and comprise: the second image capture unit 910, image alignment unit 920, second image composing unit 930.
Second image capture unit 910 is for gathering the 4th image of predetermined/frame number.Particularly, if corresponding said circumstances one, then the second image capture unit 910 continuous shooting gathers the 4th image of predetermined number; If corresponding said circumstances two, second image capture unit 910 gathers the 4th image of the continuous sequence frame of the captured video of predetermined frame number.
Image alignment unit 920 is for the 4th image alignment by described predetermined/frame number.According to exemplary embodiment of the present invention, image alignment unit 920 calculates every Zhang frame the 4th image and rotates translation matrix relative to the first Zhang frame the 4th image, and according to described rotation translation matrix, by other the 4th image except the first Zhang frame the 4th image and the first Zhang frame the 4th image alignment.
Wherein, image alignment unit 920 calculates described rotation translation matrix according to the gyro data or theory on computer vision that obtain described portable terminal.About the calculating of described rotation translation matrix, be described in detail in the explanation to the step S332 in Fig. 4, repeat no more herein.
Afterwards, image alignment unit 920 according to described rotation translation matrix, by other the 4th image except the first Zhang frame the 4th image and the first Zhang frame the 4th image alignment.In the present embodiment, by except first other the 4th image calculating through formula (4) except frame the 4th image, with first frame the 4th image alignment.X, y in formula (4) are the coordinate figure before aiming at, and x_new, y_new are the coordinate figure after aiming at, R 0 R 1 t x R 2 R 3 t y For the rotation translation matrix calculated above.
Second image composing unit 930, for being synthesized by described 4th image after alignment, generates the 5th image.According to exemplary embodiment of the present invention, the second image composing unit 630, by the described 4th image brightness superposition after alignment, generates the 5th image.Particularly, second image composing unit 930 is in the process described 4th image brightness after alignment superposed, get the pixel set of the periphery k × j of described all 4th image corresponding points, carrying out quicksort to the pixel in described pixel set, to get gray value be that the gray value of middle predetermined number (as three) superposes, wherein, k, j are odd number.It should be noted that, if the gray value after superposition is greater than 255, then get 255 as the gray value of the 5th image respective pixel.By second image composing unit 930 of this exemplary embodiment, under effectively can suppressing night scene mode, continuous shooting superposes the problem of the noise amplification caused.
According to the image processing method for portable terminal and the image processing apparatus of above-described embodiment, by performing the scheme of luminance raising process based on single image, achieve and do not improving the hardware configuration of portable terminal and when the shutter speed of portable terminal is fast not, just can improve the target of the image quality of clapping image night, not only save the hardware cost of portable terminal but also improve the image quality of clapping image night well.
In addition, by determining that according to the acquisition parameters of portable terminal performing luminance raising process based on single image still performs luminance raising process based on multiple images, achieve and can configure according to the difference of portable terminal, take corresponding image procossing scheme, thus it is more flexible to promote process to the image quality of clapping image night, the image procossing scheme of corresponding optimum can both be provided to improve the image quality of clapping image night to the portable terminal of arbitrary disposition.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of described claim.

Claims (27)

1. for an image processing method for portable terminal, it is characterized in that, described method comprises:
Luminance raising based on single image: catch the first image, by generating the second image to gray value in described first image lower than the pixel adjustment brightness of gray threshold, and to synthesize described first image and described second image, generation the 3rd image.
2. method according to claim 1, it is characterized in that, the described process by generating the second image to gray value in described first image lower than the pixel adjustment brightness of gray threshold comprises: according to predetermined mapping ruler, the gray value of each pixel of described first image is mapped as the gray value of respective pixel in described second image.
3. method according to claim 2, is characterized in that, described predetermined mapping ruler comprises:
The pixel of described gray threshold is less than to gray value in described first image, the gray value of described pixel is become the gray value of respective pixel in the second image according to predetermined parabolic function,
The pixel of described gray threshold is not less than to gray value in described first image, the gray value of described pixel is mapped unchangeably the gray value becoming respective pixel in the second image.
4. method according to claim 3, is characterized in that, describedly the process that described first image and described second image carry out synthesizing is comprised:
The gray value of respective pixel in the gray value of each pixel in described first image and described second image is weighted summation according to respective weights, obtains the gray value of the respective pixel of described 3rd image.
5. method according to claim 4, is characterized in that, calculates the weights of described pixel respectively in the first image and the second image according to the RGB component value of arbitrary pixel in the first image and the second image.
6. the method according to any one of Claims 1 to 5, is characterized in that, described method also comprises:
According to the acquisition parameters of described portable terminal, the luminance raising performing the described luminance raising based on single image or perform based on multiple images.
7. method according to claim 6, is characterized in that, the described acquisition parameters according to described portable terminal, comprises described in performing based on the luminance raising of single image or the luminance raising performed based on multiple images:
Obtain video resolution and the frame per second of described portable terminal,
If described video resolution and described frame per second meet predetermined configuration standard, then perform the described luminance raising based on multiple images,
If described resolution and described frame per second do not meet predetermined configuration standard, then perform the described luminance raising based on single image.
8. method according to claim 6, is characterized in that, the described acquisition parameters according to described portable terminal, comprises described in performing based on the luminance raising of single image or the luminance raising performed based on multiple:
Obtain the processing time of the predetermined number picture of described portable terminal continuous shooting,
If the described processing time is less than predetermined time threshold value, then perform the described luminance raising based on multiple images, if the described processing time is more than or equal to predetermined time threshold value and described resolution and described frame per second meet described predetermined configuration standard, then perform the described luminance raising based on multiple images
If the described processing time is more than or equal to predetermined time threshold value and described resolution and described frame per second do not meet described predetermined configuration standard, then perform the described luminance raising based on single image.
9. for an image processing method for portable terminal, it is characterized in that, described method comprises:
Luminance raising based on multiple images: the 4th image gathering predetermined/frame number, by the 4th image alignment of described predetermined/frame number, and synthesizes described 4th image after alignment, generates the 5th image.
10. method according to claim 9, it is characterized in that, the described process by the 4th image alignment of described predetermined/frame number comprises: calculate every Zhang frame the 4th image and rotate translation matrix relative to the first Zhang frame the 4th image, and according to described rotation translation matrix, by other the 4th image except the first Zhang frame the 4th image and the first Zhang frame the 4th image alignment.
11. methods according to claim 10, is characterized in that, described calculating often Zhang frame the 4th image comprises relative to the translation matrix that rotates of the first Zhang frame the 4th image:
Gyro data or theory on computer vision according to obtaining described portable terminal calculate described rotation translation matrix.
12. methods according to claim 11, is characterized in that, are describedly synthesized by described 4th image after alignment, generate the process of the 5th image and comprise:
When calculating the gray value of each point of described 5th image, get the pixel set of the periphery k × j of the 4th image corresponding points of described predetermined/frame number, carrying out quicksort to the pixel in described pixel set, to get gray value be that the gray value of middle predetermined number superposes, wherein, k and j is odd number.
13. methods according to claim 12, is characterized in that, described method also comprises:
Obtain video resolution and the frame per second of described portable terminal,
If described video resolution and described frame per second meet predetermined configuration standard, then perform the luminance raising process based on multiple images, wherein, described collection to make a reservation for/process of the 4th image of frame number comprises: the 4th image gathering the continuous sequence frame of the captured video of predetermined frame number.
14. methods according to claim 12, is characterized in that, described method also comprises:
Obtain the processing time of the predetermined number picture of described portable terminal continuous shooting,
If the described processing time is less than predetermined time threshold value, then perform the luminance raising process based on multiple images, wherein, described collection makes a reservation for/and the process of the 4th image of frame number comprises: and continuous shooting gathers the 4th image of predetermined number;
If the described processing time is more than or equal to predetermined time threshold value and described resolution and described frame per second meet described predetermined configuration standard, then performing the luminance raising process based on multiple images, described collection makes a reservation for/and the process of the 4th image of frame number comprises: the 4th image gathering the continuous sequence frame of the captured video of predetermined frame number.
15. 1 kinds, for the image processing apparatus of portable terminal, is characterized in that, described device comprises:
Single image luminance raising processing unit, for performing luminance raising process based on single image, it comprises:
First image capture unit, for catching the first image,
Luminance raising unit, for by gray value in described first image lower than gray threshold pixel adjustment brightness generate the second image,
First image composing unit, for described first image and described second image being synthesized, generates the 3rd image.
16. image processing apparatus according to claim 15, it is characterized in that, described luminance raising unit is used for according to predetermined mapping ruler, the gray value of each pixel of described first image is mapped as the gray value of respective pixel in described second image, wherein
Be less than the pixel of described gray threshold to gray value in described first image, the gray value of described pixel is become the gray value of respective pixel in the second image by described luminance raising unit according to predetermined parabolic function,
Be not less than the pixel of described gray threshold to gray value in described first image, the gray value of described pixel is mapped the gray value becoming respective pixel in the second image by described luminance raising unit unchangeably.
17. image processing apparatus according to claim 16, it is characterized in that, the gray value of respective pixel in the gray value of each pixel in described first image and described second image is weighted summation according to respective weights by described first image composing unit, obtain the gray value of the respective pixel of described 3rd image, wherein, the weights of described pixel respectively in the first image and the second image are calculated according to the RGB component value of arbitrary pixel in the first image and the second image.
18. image processing apparatus according to any one of claim 15 ~ 17, it is characterized in that, described device also comprises: multiple image brightness promote processing unit, for performing luminance raising process based on multiple images.
19. image processing apparatus according to claim 18, is characterized in that, described device also comprises:
Processing scheme determining unit, for the acquisition parameters according to described portable terminal, promote processing unit based on the process of multiple images execution luminance raising by described single image luminance raising processing unit based on single image execution luminance raising process or by multiple image brightness described.
20. image processing apparatus according to claim 19, it is characterized in that, described processing scheme determining unit is for obtaining video resolution and the frame per second of described portable terminal, and if described video resolution and described frame per second do not meet predetermined configuration standard, then described processing scheme determining unit is used for performing luminance raising process by described single image luminance raising processing unit based on single image
If described video resolution and described frame per second meet predetermined configuration standard, then described processing scheme determining unit is used for promoting processing unit based on the process of multiple images execution luminance raising by multiple image brightness described.
21. image processing apparatus according to claim 20, is characterized in that, described processing scheme determining unit for obtaining the processing time of the predetermined number picture of described portable terminal continuous shooting, and
If the described processing time is more than or equal to predetermined time threshold value and described resolution and described frame per second do not meet described predetermined configuration standard, then described processing scheme determining unit performs luminance raising process by described single image luminance raising processing unit based on single image.
If the described processing time is more than or equal to predetermined time threshold value and described resolution and described frame per second meet described predetermined configuration standard, then described processing scheme determining unit promotes processing unit by multiple image brightness described and performs luminance raising process based on multiple images
If the described processing time is more than or equal to predetermined time threshold value and described resolution and described frame per second do not meet described predetermined configuration standard, then described processing scheme determining unit performs luminance raising process by described single image luminance raising processing unit based on single image.
22. 1 kinds, for the image processing apparatus of portable terminal, is characterized in that, described device comprises:
Multiple image brightness promote processing unit, and for performing luminance raising process based on multiple images, it comprises:
Second image capture unit, for gathering the 4th image of predetermined/frame number,
Image alignment unit, for the 4th image alignment by described predetermined/frame number,
Second image composing unit, for being synthesized by described 4th image after alignment, generates the 5th image.
23. image processing apparatus according to claim 22, it is characterized in that, described image alignment unit rotates translation matrix for calculating every Zhang frame the 4th image relative to the first Zhang frame the 4th image, according to described rotation translation matrix, by other the 4th image except the first Zhang frame the 4th image and the first Zhang frame the 4th image alignment.
24. image processing apparatus according to claim 23, is characterized in that, gyro data or theory on computer vision that described image alignment unit is used for according to obtaining described portable terminal calculate described rotation translation matrix.
25. image processing apparatus according to claim 24, it is characterized in that, described 4th image after alignment is carrying out in the process of synthesizing by described second image composing unit, get the pixel set of the periphery k × j of described all 4th image corresponding points, carrying out quicksort to the pixel in described pixel set, to get gray value be that the gray value of middle predetermined number superposes, wherein, k and j is odd number.
26. image processing apparatus according to claim 25, is characterized in that, described device also comprises processing scheme determining unit, for obtaining video resolution and the frame per second of described portable terminal,
If described video resolution and described frame per second meet predetermined configuration standard, then described processing scheme determining unit promotes processing unit by multiple image brightness described and performs luminance raising process based on multiple images, wherein, the second image capture unit gathers the 4th image of the continuous sequence frame of the captured video of predetermined frame number.
27. image processing apparatus according to claim 26, is characterized in that, described processing scheme determining unit for obtaining the processing time of the predetermined number picture of described portable terminal continuous shooting,
If the described processing time is less than predetermined time threshold value, then described processing scheme determining unit promotes processing unit by multiple image brightness and performs luminance raising process based on multiple images, wherein, the second image capture unit continuous shooting gathers the 4th image of predetermined number
If the described processing time is more than or equal to predetermined time threshold value and described resolution and described frame per second meet described predetermined configuration standard, then described processing scheme determining unit promotes processing unit by multiple image brightness described and performs luminance raising process based on multiple images, wherein, the second image capture unit gathers the 4th image of the continuous sequence frame of the captured video of predetermined frame number.
CN201410522560.3A 2014-09-30 2014-09-30 A kind of image processing method and image processing apparatus for portable terminal Active CN104320576B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410522560.3A CN104320576B (en) 2014-09-30 2014-09-30 A kind of image processing method and image processing apparatus for portable terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410522560.3A CN104320576B (en) 2014-09-30 2014-09-30 A kind of image processing method and image processing apparatus for portable terminal

Publications (2)

Publication Number Publication Date
CN104320576A true CN104320576A (en) 2015-01-28
CN104320576B CN104320576B (en) 2018-11-13

Family

ID=52375739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410522560.3A Active CN104320576B (en) 2014-09-30 2014-09-30 A kind of image processing method and image processing apparatus for portable terminal

Country Status (1)

Country Link
CN (1) CN104320576B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872394A (en) * 2015-12-08 2016-08-17 乐视移动智能信息技术(北京)有限公司 Method and device for processing pictures
CN115314627A (en) * 2021-05-08 2022-11-08 杭州海康威视数字技术股份有限公司 Image processing method, system and camera

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833754A (en) * 2010-04-15 2010-09-15 青岛海信网络科技股份有限公司 Image enhancement method and image enhancement system
CN101841631A (en) * 2009-03-20 2010-09-22 微星科技股份有限公司 Shadow exposure compensation method and image processing device using same
CN101873435A (en) * 2009-04-23 2010-10-27 微星科技股份有限公司 Method and device thereof for generating high dynamic range image
CN103069453A (en) * 2010-07-05 2013-04-24 苹果公司 Operating a device to capture high dynamic range images
CN103973958A (en) * 2013-01-30 2014-08-06 阿里巴巴集团控股有限公司 Image processing method and image processing equipment
CN104021531A (en) * 2014-06-18 2014-09-03 厦门美图之家科技有限公司 Improved method for enhancing dark environment images on basis of single-scale Retinex

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101841631A (en) * 2009-03-20 2010-09-22 微星科技股份有限公司 Shadow exposure compensation method and image processing device using same
CN101873435A (en) * 2009-04-23 2010-10-27 微星科技股份有限公司 Method and device thereof for generating high dynamic range image
CN101833754A (en) * 2010-04-15 2010-09-15 青岛海信网络科技股份有限公司 Image enhancement method and image enhancement system
CN103069453A (en) * 2010-07-05 2013-04-24 苹果公司 Operating a device to capture high dynamic range images
CN103973958A (en) * 2013-01-30 2014-08-06 阿里巴巴集团控股有限公司 Image processing method and image processing equipment
CN104021531A (en) * 2014-06-18 2014-09-03 厦门美图之家科技有限公司 Improved method for enhancing dark environment images on basis of single-scale Retinex

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872394A (en) * 2015-12-08 2016-08-17 乐视移动智能信息技术(北京)有限公司 Method and device for processing pictures
CN115314627A (en) * 2021-05-08 2022-11-08 杭州海康威视数字技术股份有限公司 Image processing method, system and camera
CN115314627B (en) * 2021-05-08 2024-03-01 杭州海康威视数字技术股份有限公司 Image processing method, system and camera

Also Published As

Publication number Publication date
CN104320576B (en) 2018-11-13

Similar Documents

Publication Publication Date Title
CN108564617A (en) Three-dimensional rebuilding method, device, VR cameras and the panorama camera of more mesh cameras
CN103945118B (en) Image weakening method, device and electronic equipment
CN104270560B (en) A kind of multi-spot method and apparatus
US8941750B2 (en) Image processing device for generating reconstruction image, image generating method, and storage medium
CN108668093B (en) HDR image generation method and device
CN107925751A (en) For multiple views noise reduction and the system and method for high dynamic range
CN104519340B (en) Panoramic video joining method based on many depth images transformation matrix
JP6308748B2 (en) Image processing apparatus, imaging apparatus, and image processing method
CN108055452A (en) Image processing method, device and equipment
CN104320575B (en) A kind of image processing method and image processing apparatus for portable terminal
CN110536057A (en) Image processing method and device, electronic equipment, computer readable storage medium
JP5843454B2 (en) Image processing apparatus, image processing method, and program
CN108416754A (en) A kind of more exposure image fusion methods automatically removing ghost
CN113313661A (en) Image fusion method and device, electronic equipment and computer readable storage medium
JP2016151955A (en) Image processing apparatus, imaging device, distance measuring device, and image processing method
US8000561B2 (en) Apparatus, method, and medium for generating panoramic image using a series of images captured in various directions
JP2015152484A (en) Distance metering device, imaging device, distance metering method and program
CN102629976A (en) Image processing apparatus, and control method thereof
CN106997579A (en) The method and apparatus of image mosaic
CN113875219B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN111724317A (en) Method for constructing Raw domain video denoising supervision data set
WO2015057425A1 (en) Converting an image from a dual-band sensor to a visible color image
CN104506775A (en) Image collection jitter removing method and device based on stereoscopic visual matching
JP2016042629A (en) Imaging apparatus, imaging method and program
JP2013176073A (en) Imaging apparatus, image display method and program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant