CN107026976A - A kind of image processing method and terminal - Google Patents

A kind of image processing method and terminal Download PDF

Info

Publication number
CN107026976A
CN107026976A CN201710167270.5A CN201710167270A CN107026976A CN 107026976 A CN107026976 A CN 107026976A CN 201710167270 A CN201710167270 A CN 201710167270A CN 107026976 A CN107026976 A CN 107026976A
Authority
CN
China
Prior art keywords
image
region
focus image
focus
overexposure
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.)
Withdrawn
Application number
CN201710167270.5A
Other languages
Chinese (zh)
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.)
Shenzhen Jinli Communication Equipment Co Ltd
Original Assignee
Shenzhen Jinli Communication Equipment 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 Shenzhen Jinli Communication Equipment Co Ltd filed Critical Shenzhen Jinli Communication Equipment Co Ltd
Priority to CN201710167270.5A priority Critical patent/CN107026976A/en
Publication of CN107026976A publication Critical patent/CN107026976A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time

Abstract

The embodiment of the invention discloses a kind of image processing method and terminal, wherein method includes:Terminal is treated reference object under focus state and shot, and obtains focus image, and the object to be captured is shot under out-of-focus appearance, out-of-focus image is obtained;The focus image is analyzed and processed, to recognize the overexposure region of the focus image;According to the color value in the out-of-focus image with the image-region of the overexposure Region Matching, the color value current to the overexposure region is adjusted.The overexposure region in image can be handled by the embodiment of the present invention, it is to avoid the colouring information of image is lost, to improve the quality of image.

Description

A kind of image processing method and terminal
Technical field
The present invention relates to electronic technology field, more particularly to a kind of image processing method and terminal.
Background technology
With the development of electronic technology and shooting technology, increasing user likes recording household, friend by taking pictures At the time of friendly and happy colleague.But the problems such as being limited to the quality of photographed scene or photographing device, some regions meeting of image There is overexposure phenomenon, cause the colouring information of image to be lost.For example, photographed scene is the night for including red light, due to lamp The brightness of light is usually far above the brightness in non-light region, simultaneously because the size of the aperture camera lens of photographing device is limited, may Red light can be made partially white in the image of shooting, or even be rendered as the lighter colors such as yellow or white, cause the color of image Information is lost.
The content of the invention
The embodiment of the present invention provides a kind of image processing method, and the overexposure region in image can be handled, it is to avoid figure The colouring information of picture is lost, to improve the quality of image.
In a first aspect, the embodiments of the invention provide a kind of image processing method, this method includes:
Reference object is treated under focus state to be shot, and obtains focus image;
The object to be captured is shot under out-of-focus appearance, out-of-focus image is obtained;
The focus image is analyzed and processed, to recognize the overexposure region of the focus image;
According to the color value in the out-of-focus image with the image-region of the overexposure Region Matching, to the overexposure region Current color value is adjusted.
On the other hand, the embodiments of the invention provide a kind of terminal, the terminal includes:
Shooting unit, is shot for treating reference object under focus state, obtains focus image;
The shooting unit, is additionally operable under out-of-focus appearance shoot the object to be captured, obtains out-of-focus image;
Recognition unit, for being analyzed and processed to the focus image, to recognize the overexposure region of the focus image;
Adjustment unit, for according to the color value in the out-of-focus image with the image-region of the overexposure Region Matching, The color value current to the overexposure region is adjusted.
As can be seen that in the embodiment of the present invention, terminal is treated reference object under focus state and shot, and obtains focus Image, is shot to the object to be captured under out-of-focus appearance, obtains out-of-focus image, and the focus image is carried out at analysis Reason, to recognize the overexposure region of the focus image, according to the face in the out-of-focus image with the image-region of the overexposure Region Matching Colour, the color value current to the overexposure region is adjusted, and the overexposure region in image can be handled, it is to avoid image Colouring information is lost, to improve the quality of image.
Brief description of the drawings
Technical scheme, is used required in being described below to embodiment in order to illustrate the embodiments of the present invention more clearly Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, general for this area For logical technical staff, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow diagram of image processing method provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic flow diagram for image processing method that another embodiment of the present invention is provided;
Fig. 3 is a kind of schematic block diagram of terminal provided in an embodiment of the present invention;
Fig. 4 is a kind of terminal schematic block diagram that another embodiment of the present invention is provided;
Fig. 5 is a kind of terminal schematic block diagram that yet another embodiment of the invention is provided.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is a part of embodiment of the invention, rather than whole embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made Example, belongs to the scope of protection of the invention.
It should be appreciated that ought be in this specification and in the appended claims in use, term " comprising " and "comprising" be indicated Described feature, entirety, step, operation, the presence of element and/or component, but be not precluded from one or more of the other feature, it is whole Body, step, operation, element, component and/or its presence or addition for gathering.
It is also understood that the term used in this description of the invention is merely for the sake of the mesh for describing specific embodiment And be not intended to limit the present invention.As used in description of the invention and appended claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singulative, " one " and "the" are intended to include plural form.
It will be further appreciated that, the term "and/or" used in description of the invention and appended claims is Refer to any combinations of one or more of the associated item listed and be possible to combination, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt Be construed to " when ... " or " once " or " in response to determining " or " in response to detecting ".Similarly, phrase " if it is determined that " or If " detected【Described condition or event】" can be interpreted to mean according to context " once it is determined that " or " in response to true It is fixed " or " once detect【Described condition or event】" or " in response to detecting【Described condition or event】”.
In the specific implementation, the terminal described in the embodiment of the present invention is including but not limited to such as with touch sensitive surface The mobile phone, laptop computer or tablet PC of (for example, touch-screen display and/or touch pad) etc it is other just Portable device.It is to be further understood that in certain embodiments, the equipment not portable communication device, but with touching Touch the desktop computer of sensing surface (for example, touch-screen display and/or touch pad).
In discussion below, the terminal including display and touch sensitive surface is described.It is, however, to be understood that It is that terminal can include one or more of the other physical user-interface device of such as physical keyboard, mouse and/or control-rod.
Terminal supports various application programs, such as one or more of following:Drawing application program, demonstration application journey Sequence, word-processing application, website create application program, disk imprinting application program, spreadsheet applications, game application Program, telephony application, videoconference application, email application, instant messaging applications, exercise Support application program, photo management application program, digital camera application program, digital camera application program, web-browsing application Program, digital music player application and/or video frequency player application program.
The various application programs that can be performed in terminal can use such as touch sensitive surface at least one is public Physical user-interface device.It can adjust and/or change among applications and/or in corresponding application programs and touch sensitive table The corresponding information shown in the one or more functions and terminal in face.So, the public physical structure of terminal is (for example, touch Sensing surface) the various application programs with user interface directly perceived and transparent for a user can be supported.
In the embodiment of the present invention, the terminal can be smart mobile phone, camera, tablet personal computer, intelligent wearable device Deng the equipment with camera function and image processing function.
Fig. 1 is referred to, Fig. 1 is that the embodiment of the present invention provides institute in a kind of flow chart of image processing method, the present embodiment The image processing method of description comprises the following steps:
S101, terminal are treated reference object under focus state and shot, and obtain focus image.
S102, terminal are shot under out-of-focus appearance to the object to be captured, obtain out-of-focus image.
In the embodiment of the present invention, terminal can be closed by opening or closing the focus function shot so that terminal is in Coke-like state or make terminal be in out-of-focus appearance, terminal can also by instrumentality away from apart so that terminal be in focus shape State makes terminal be in out-of-focus appearance.Terminal can treat reference object under focus state, and (object to be captured can include Personage, building or natural landscape etc.) shot, focus image is obtained, the object to be captured is clapped under out-of-focus appearance Take the photograph, obtain out-of-focus image.
It should be noted that object to be captured can include main body and background, for example, when being shot to personage A, it is to be captured Personage A in object can be as main body, the object (e.g., light, building or ground etc.) in object to be captured in addition to main body Background can be used as.Reference object is treated under focus state and shoot and refers to that the main body treated as far as possible in reference object is entered Row focusing is shot, and the main body that the focus image so shot can be highlighted in main body, i.e. focus image becomes apparent from.But When there is the sunlight of light or stronger in background, some regions (e.g., the central area of light) for the focus image shot It is possible that overexposure phenomenon so that the colouring information of image is lost.Further, since out-of-focus image is shot under out-of-focus appearance , therefore the out-of-focus image can more truly show the color of object to be captured, but the out-of-focus image can not highlight master Body.Wherein, the overexposure phenomenon refers to the brightness that the image for making to shoot is limited by factors such as photographed scene or capture apparatus Height, or even the phenomenon for making image white hot spot occur.
S103, terminal-pair the focus image are analyzed and processed, to recognize the overexposure region of the focus image.
In the embodiment of the present invention, terminal can be analyzed the monochrome information of the pixel of the focus image, be somebody's turn to do with recognizing The overexposure region of focus image;The focus image can also be carried out gray proces by the terminal, gray level image be obtained, according to this The half-tone information of each pixel of gray level image is analyzed, to recognize the overexposure region of the focus image;The terminal can also be by The focus image carries out binary conversion treatment, obtains bianry image, is analyzed according to the Pixel Information to the bianry image, to know The not other overexposure region of the focus image.
As an alternative embodiment, terminal can recognize the overexposure area of the focus image by following mode Domain:Image binaryzation processing is carried out to the focus image, the bianry image of the focus image is obtained;Determined in the bianry image First pixel, R, G, B value of first pixel are default value;The second pixel is determined in the focus image, second picture The coordinate information of element is identical with the coordinate information of first pixel;It is the focus figure by the region recognition being made up of second pixel The overexposure region of picture.
It should be noted that refer to will be each in image by default binary conversion treatment algorithm for the binary conversion treatment of image The gray value of pixel is set to 0 or 255, so that obtained bianry image shows obvious black and white effect, that is, the two-value obtained Image only has pure white and two kinds of colors of black, wherein, the default binary conversion treatment algorithm can include Two-peak method, P parametric methods Or iterative method etc..In addition, color is 255 for R, G, B value of pure white pixel in image, color is the pixel of black in image R, G, B value be 0.
In the embodiment of the present invention, because the overexposure region of image and the color distinction of each pixel in non-overexposure region are larger, Therefore image is carried out after binary conversion treatment, the overexposure region of the image can typically be processed into pure white, and the non-mistake of image Ater can be typically processed into by exposing region, thus terminal can by analyzing the corresponding bianry image of image, with Recognize the overexposure region of image.
Specifically, terminal can carry out image binaryzation processing to the focus image, the binary map of the focus image is obtained Picture, because the relation of R, G, B value of each pixel in the bianry image is R=G=B, simultaneously because the overexposure of the bianry image R, G, B value of the pixel in region are 255, therefore terminal can determine the first pixel in the bianry image, first pixel R, G, B value be default value, wherein, the default value can be 255.
Further, because first pixel is that object pixel is binarized the pixel that processing is obtained in the focus image, because This terminal can determine the object pixel in the focus image according to the coordinate information of first pixel, specifically, terminal can To determine coordinate information and the pixel of coordinate information identical second of first pixel in the focus image, the coordinate information can To refer to certain point as reference point, to position the particular location of certain point in the focus image.If for example, the coordinate of the first pixel Information is F (4,5), then coordinate information is defined as into the second pixel for the pixel of (4,5) in the focus image.In the focus figure Determined as in after second pixel, terminal can be by overexposure of the region recognition being made up of second pixel for the focus image Region.
S104, terminal are according to the color value in the out-of-focus image with the image-region of the overexposure Region Matching, to the overexposure The current color value in region is adjusted.
In the embodiment of the present invention, terminal can be according to the face in the out-of-focus image with the image-region of the overexposure Region Matching Colour, the color value current to the overexposure region is adjusted, specifically, terminal can adjust the color value in the overexposure region For the color value of the image-region, adjustment weight can also be set according to size of the brightness value in overexposure region etc., according to the tune The color value of whole weight and the image-region is adjusted to the color value in the overexposure region.Wherein, the image-region refers to this Same position in the photographed scene showed in out-of-focus image with the overexposure region, if for example, the overexposure area of the focus image Domain refers to light D central area, then light D central area is just image-region in the out-of-focus image.
It should be noted that, color value can refer to the value of each component of the focus image under preset format, i.e., should The form of focus image is different, and its color value is different, if for example, the focus image is rgb format, color value can be Refer to components R, G and B value;If the focus image is HSV forms, color value can refer to component H, S and V value;If the conjunction Burnt image is HSL forms, then color value can refer to component H, S and L value.In addition, the focus image and the out-of-focus image Form can be with identical, can also be different, when the focus image is identical with the form of the out-of-focus image, can directly use image The color value in region adjusts the color value in the overexposure region, can when the form of the focus image and the out-of-focus image is differed So that after by the uniform format of the focus image and the out-of-focus image, the overexposure region is adjusted using the color value of the image-region Color value.
In the embodiment of the present invention, terminal is treated reference object under focus state and shot, and obtains focus image, from The object to be captured is shot under coke-like state, out-of-focus image is obtained, the focus image is analyzed and processed, is somebody's turn to do with recognizing The overexposure region of focus image, according to the color value in the out-of-focus image with the image-region of the overexposure Region Matching, to the mistake Expose the current color value in region to be adjusted, the overexposure region in image can be handled, it is to avoid the colouring information of image is lost Lose, to improve the quality of image.
Fig. 2 is referred to, Fig. 2 is a kind of schematic flow sheet for image method that another embodiment of the present invention is provided.This implementation Image processing method described in example, may comprise steps of:
S201, terminal are treated reference object under focus state and shot, and obtain focus image.
S202, terminal are shot under out-of-focus appearance to the object to be captured, obtain out-of-focus image.
S203, terminal obtain the brightness value for each pixel that the focus image is included.
In the embodiment of the present invention, terminal can obtain the brightness value for each pixel that the focus image is included, specifically, Terminal can be by the luma component values of the focus image for obtaining preset format, with each for obtaining that the focus image is included The brightness value of pixel.
For example, if the form of the focus image is yuv format, terminal the focus image can be included each The Y of pixel value as respective pixel brightness value;If the form of the focus image is HSI forms, terminal can close this The I for each pixel that burnt image is included value as respective pixel brightness value;If the form of the focus image is YIQ lattice Formula, the brightness value of the Y for each pixel that terminal can be included focus image value as respective pixel.Particularly, If not including luminance component in the form of the focus image, the focus image can be subjected to format conversion processing, if for example, The focus image is HSV forms, then can be one kind in the forms such as YUV, HSI or YIQ by the format conversion of the focus image.
The brightness value is more than the region belonging to the pixel of predetermined luminance threshold value by S204, terminal, is identified as the focus image Overexposure region.
In the embodiment of the present invention, because the brightness value of each pixel in overexposure region is typically greater than other regions, therefore can The overexposure region of the focus image is recognized with the brightness value by each pixel.Specifically, terminal can be big by the brightness value The region belonging to pixel in predetermined luminance threshold value, is identified as the overexposure region of the focus image.
It should be noted that the scope of predetermined luminance threshold value is 0~255, the predetermined luminance threshold value can be user according to Personal like is set or terminal business men is set, for example, user can set predetermined luminance threshold value to be 220.
S205, terminal obtain the overexposure region first adjustment weight, and the image-region second adjustment weight.
In the embodiment of the present invention, terminal can obtain the first adjustment weight in the overexposure region, and the image-region Second adjustment weight, is adjusted so as to the color value using adjustment weight and image-region to the color value in the overexposure region It is whole so that the color value adjustment in the overexposure region is more accurate.
It should be noted that because the order of severity of the overexposure phenomenon in the overexposure region of the focus image is different, therefore can Set with the order of severity according to overexposure phenomenon the first adjustment weight, second adjustment weight, wherein, the overexposure phenomenon it is serious Degree can be in image brightness value, the gray value of pixel etc. determine.Specifically, overexposure phenomenon is more serious, illustrate the mistake Expose region colouring information lose it is more, it is possible to the first adjustment weight is set into a smaller value, such as 0.3, and by the Two adjustment weights one higher value of setting, such as 0.7, so that the color value in the overexposure region after adjustment is more biased towards in the image district The color value in domain;On the contrary, overexposure phenomenon is less serious, illustrate that the colouring information loss in the overexposure region is less, i.e. the overexposure area The color value in domain, which need not carry out larger adjustment, can just recover the colouring information in the overexposure region, it is possible to be adjusted first One higher value of whole weight setting, such as 0.85, and the second adjustment weight is set into a smaller value, such as 0.15.
S206, terminal are according to the current color value in the first adjustment weight, the second adjustment weight, the overexposure region and are somebody's turn to do The color value of image-region, the color value current to the overexposure region is adjusted.
In the embodiment of the present invention, terminal can be worked as according to the first adjustment weight, the second adjustment weight, the overexposure region The color value of preceding color value and the image-region, the color value current to the overexposure region is adjusted, to avoid the overexposure The colouring information in region is lost, and then, improve the quality of image.
As a kind of optional embodiment, step S205 can specifically be accomplished by the following way:The first color value is obtained, First color value is the first adjustment weight and the product of the current color value in the overexposure region;The second color value is obtained, should Second color value is the second adjustment weight and the product of the color value of the image-region;Obtain the 3rd color value, the 3rd face Colour be first color value and second color value and;The current color value in the overexposure region is adjusted to the 3rd color Value.
For example, if the first adjustment weight is w1, the second adjustment weight is w2, the current face in the overexposure region Colour is Cin, the color value of the image-region is Coof, then the first color value C1It is represented by C1=w1*Cin, the second color value C2 It is represented by C2=w2*Coof, the 3rd color value C3It is represented by C3=C1+C2, the color value C after the adjustment of the overexposure regionfusion It is represented by Cfusion=C3, the color value C after the adjustment of the overexposure regionfusionIt is also denoted as Cfusion=w2*Coof+w1* Cin, wherein w1+w2=1.
Focus image after S207, terminal-pair adjustment carries out Gaussian Blur processing, obtains output image.
In the embodiment of the present invention, after the color value in the overexposure region of the focus image is adjusted, the focus figure may be caused The color distinction in the overexposure region of picture and non-overexposure region is larger, particularly the face in the overexposure region and the edge in non-overexposure region Aberration is not more obvious, in order that the color of the focus image can be seamlessly transitted, terminal can be to the focus image after adjustment Carry out Gaussian Blur processing, obtain output image, specifically, terminal can by using preset Gaussian Blur algorithm to adjustment after Focus image carry out Gaussian Blur processing, obtain output image.
Wherein, the out-of-focus image is mainly used for being adjusted the color value in the overexposure region of the focus image, so Terminal can store the out-of-focus image in the form of caching, can be by the defocus after the color value adjustment in the overexposure region Image is removed.The output image is that the image that Gaussian Blur processing is obtained is carried out to the focus image after adjustment, the output image Can be the image that user wants, terminal can store the output image.
It should be noted that Gaussian Blur algorithm typically uses Gaussian function generation Fuzzy Template, using fuzzy masterplate Convolution algorithm is done to image so that the color of image can realize the effect seamlessly transitted.Wherein, preset Gaussian Blur algorithm can be with Including one-dimensional Gaussian Blur algorithm, dimensional Gaussian fuzzy algorithmic approach or high-order Gaussian Blur algorithm etc., the rank of Gaussian Blur algorithm Number is higher, and the color transition of its image is more smooth, but the exponent number of its algorithm is higher so that the effect that highlights of the main body in image becomes Difference, while the complexity of algorithm can also be improved, it is possible to effect, the main body of image are seamlessly transitted according to the color of image and highlighted The factor compromise selection Gaussian Blur algorithm such as effect and the complexity of algorithm.
In the embodiment of the present invention, terminal by using focus image adjustment weight, the adjustment weight of image-region, the conjunction The color value of the current color value in the overexposure region of burnt image and the image-region, the color value current to the overexposure region is carried out Adjustment, can improve color value adjustment accuracy, while by carrying out Gaussian Blur processing to the focus image after adjustment so that The color of the focus image can be seamlessly transitted, and the overexposure region in image can be handled, it is to avoid the colouring information of image Lose, to improve the quality of image.
Refer to Fig. 3, Fig. 3 is retouched in a kind of structural representation of terminal provided in an embodiment of the present invention, the present embodiment The terminal stated, including:
Shooting unit 301, is shot for treating reference object under focus state, obtains focus image.
The shooting unit 301, is additionally operable under out-of-focus appearance shoot the object to be captured, obtains defocus figure Picture.
Recognition unit 302, for being analyzed and processed to the focus image, to recognize the overexposure area of the focus image Domain.
Adjustment unit 303, for according to the color in the out-of-focus image with the image-region of the overexposure Region Matching Value, the color value current to the overexposure region is adjusted.
In the embodiment of the present invention, terminal is treated reference object under focus state and shot, and obtains focus image, from The object to be captured is shot under coke-like state, out-of-focus image is obtained, the focus image is analyzed and processed, is somebody's turn to do with recognizing The overexposure region of focus image, according to the color value in the out-of-focus image with the image-region of the overexposure Region Matching, to the mistake Expose the current color value in region to be adjusted, the overexposure region in image can be handled, it is to avoid the colouring information of image is lost Lose, to improve the quality of image.
Fig. 4 is referred to, Fig. 4 is that another embodiment of the present invention provides a kind of structural representation of terminal, as shown in figure 4, should Terminal can include:
Shooting unit 401, is shot for treating reference object under focus state, obtains focus image.
The shooting unit 401, is additionally operable under out-of-focus appearance shoot the object to be captured, obtains defocus figure Picture.
Recognition unit 402, for being analyzed and processed to the focus image, to recognize the overexposure area of the focus image Domain.
Adjustment unit 403, for according to the color in the out-of-focus image with the image-region of the overexposure Region Matching Value, the color value current to the overexposure region is adjusted.
Optionally, 402 pairs of the recognition unit focus image is analyzed and processed, to recognize the focus image Overexposure region, specifically for:
Obtain the brightness value for each pixel that the focus image is included;
The brightness value is more than the region belonging to the pixel of predetermined luminance threshold value, the overexposure of the focus image is identified as Region.
Optionally, 402 pairs of the recognition unit focus image is analyzed and processed, to recognize the focus image Overexposure region, specifically for:
Image binaryzation processing is carried out to the focus image, the bianry image of the focus image is obtained;
The first pixel is determined in the bianry image, R, G, B value of first pixel are default value;
The second pixel, the coordinate information of second pixel and the seat of first pixel are determined in the focus image Mark information identical;
By the overexposure region that the region recognition being made up of second pixel is the focus image.
Optionally, the adjustment unit 403 is according to the image-region in the out-of-focus image with the overexposure Region Matching Color value, the color value current to the overexposure region be adjusted, specifically for:
Obtain the overexposure region first adjustment weight, and described image region second adjustment weight;
According to the current color value in the described first adjustment weight, the second adjustment weight, the overexposure region and described The color value of image-region, the color value current to the overexposure region is adjusted.
Optionally, the adjustment unit 403 is according to the described first adjustment weight, the second adjustment weight, the overexposure The current color value in region and the color value in described image region, are adjusted to the color value in the overexposure region, specific to use In:
The first color value is obtained, first color value is the first adjustment weight and the current color value in the overexposure region Product;
The second color value is obtained, second color value multiplies for second adjustment weight and the color value of the image-region Product;
Obtain the 3rd color value, the 3rd color value be first color value with second color value and;
The current color value in the overexposure region is adjusted to the 3rd color value.
Processing unit 404, for carrying out Gaussian Blur processing to the focus image after adjustment, obtains output image.
In the embodiment of the present invention, terminal by using focus image adjustment weight, the adjustment weight of image-region, the conjunction The color value of the current color value in the overexposure region of burnt image and the image-region, to the color in the overexposure region of the focus image Value is adjusted, and can improve color value adjustment accuracy, while by being carried out to the focus image after adjustment at Gaussian Blur Reason so that the color of the focus image can be seamlessly transitted, and can be handled the overexposure region in image, it is to avoid the face of image Color information is lost, to improve the quality of image.
Fig. 5 is referred to, Fig. 5 is a kind of schematic block diagram for terminal that yet another embodiment of the invention is provided.As depicted A kind of terminal in the present embodiment can include:At least one input equipment 501;At least one output equipment 502;At least one Processor 503, such as CPU;With memory 504, above-mentioned input equipment 501, output equipment 502, processor 503 and memory 504 are connected by bus 505.
Wherein, output equipment 502 for example can be the screens/interfaces for output, such as display screen (Display), touch-control Screen, input equipment 501 for example can be the keyboard (Keyboard) for input, the camera for capture images, for broadcasting Receiver and loudspeaker of voice signal etc. are put, it is necessary to which explanation, display screen and touch screen herein can be with integrated Design, keyboard both can be physical keyboard, or touch screen dummy keyboard, can also be combined for entity with touch screen virtualphase Keyboard.Memory 504 is used for store instruction, and processor 503 is used for the program for performing the storage of memory 504.Wherein:
Output equipment 501, is shot for treating reference object under focus state, obtains focus image.
Output equipment 501, is additionally operable under out-of-focus appearance shoot the object to be captured, obtains out-of-focus image.
Processor 503, for being analyzed and processed to the focus image, to recognize the overexposure area of the focus image Domain.
Processor 503, is additionally operable to according to the color in the out-of-focus image with the image-region of the overexposure Region Matching Value, the color value current to the overexposure region is adjusted.
In some feasible embodiments, 503 pairs of the processor focus image is analyzed and processed, described to recognize The overexposure region of focus image, specifically for:
Obtain the brightness value for each pixel that the focus image is included;The brightness value is more than predetermined luminance threshold value Pixel belonging to region, be identified as the overexposure region of the focus image.
In some feasible embodiments, 503 pairs of the processor focus image is analyzed and processed, described to recognize The overexposure region of focus image, specifically for:
Image binaryzation processing is carried out to the focus image, the bianry image of the focus image is obtained;
The first pixel is determined in the bianry image, R, G, B value of first pixel are default value;
The second pixel, the coordinate information of second pixel and the seat of first pixel are determined in the focus image Mark information identical;
By the overexposure region that the region recognition being made up of second pixel is the focus image.
In some feasible embodiments, processor 503 according in the out-of-focus image with the overexposure Region Matching Image-region color value, the color value current to the overexposure region be adjusted, specifically for:
Obtain the overexposure region first adjustment weight, and described image region second adjustment weight;
According to the current color value in the described first adjustment weight, the second adjustment weight, the overexposure region and described The color value of image-region, the color value current to the overexposure region is adjusted.
In some feasible embodiments, processor 503 is weighed according to the described first adjustment weight, second adjustment The current color value in weight, the overexposure region and the color value in described image region, are carried out to the color value in the overexposure region Adjustment, specifically for:
The first color value is obtained, first color value is the first adjustment weight and the current color value in the overexposure region Product;
The second color value is obtained, second color value multiplies for second adjustment weight and the color value of the image-region Product;
Obtain the 3rd color value, the 3rd color value be first color value with second color value and;
The current color value in the overexposure region is adjusted to the 3rd color value.
In some feasible embodiments, processor 503 can be also used for carrying out Gauss to the focus image after adjustment Fuzzy Processing, obtains output image.
In the specific implementation, processor 503, input equipment 501, the and of output equipment 502 described in the embodiment of the present invention Memory 504 can perform the first embodiment of above method embodiment, the reality of image processing method described by second embodiment Existing mode, will not be repeated here.
In the embodiment of the present invention, terminal is treated reference object under focus state and shot, and obtains focus image, from The object to be captured is shot under coke-like state, out-of-focus image is obtained, the focus image is analyzed and processed, is somebody's turn to do with recognizing The overexposure region of focus image, according to the color value in the out-of-focus image with the image-region of the overexposure Region Matching, to the mistake Expose the current color value in region to be adjusted, the overexposure region in image can be handled, it is to avoid the colouring information of image is lost Lose, to improve the quality of image.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein Member and algorithm steps, can be realized with electronic hardware, computer software or the combination of the two, in order to clearly demonstrate hardware With the interchangeability of software, the composition and step of each example are generally described according to function in the above description.This A little functions are performed with hardware or software mode actually, depending on the application-specific and design constraint of technical scheme.Specially Industry technical staff can realize described function to each specific application using distinct methods, but this realization is not It is considered as beyond the scope of this invention.It is apparent to those skilled in the art that, it is for convenience of description and simple Clean, the terminal of foregoing description and the specific work process of unit may be referred to the corresponding process in preceding method embodiment, herein Repeat no more.
, can be by it in several embodiments provided herein, it should be understood that disclosed terminal and method Its mode is realized.For example, device embodiment described above is only schematical, for example, the division of the unit, only Only a kind of division of logic function, can there is other dividing mode when actually realizing, such as multiple units or component can be tied Another system is closed or is desirably integrated into, or some features can be ignored, or do not perform.In addition, shown or discussed phase Coupling or direct-coupling or communication connection between mutually can be INDIRECT COUPLING or the communication by some interfaces, device or unit Connection or electricity, mechanical or other forms are connected.
The unit illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize scheme of the embodiment of the present invention according to the actual needs Purpose.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit, can also It is that unit is individually physically present or two or more units are integrated in a unit.It is above-mentioned integrated Unit can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If the integrated unit is realized using in the form of SFU software functional unit and as independent production marketing or used When, it can be stored in a computer read/write memory medium.Understood based on such, technical scheme is substantially The part contributed in other words to prior art, or all or part of the technical scheme can be in the form of software product Embody, the computer software product is stored in a storage medium, including some instructions are to cause a computer Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the invention Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. are various can be with storage program The medium of code.
Step in present invention method can be sequentially adjusted, merged and deleted according to actual needs.This hair Unit in bright embodiment terminal can be combined, divided and deleted according to actual needs.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any Those familiar with the art the invention discloses technical scope in, various equivalent modifications can be readily occurred in or replaced Change, these modifications or substitutions should be all included within the scope of the present invention.Therefore, protection scope of the present invention should be with right It is required that protection domain be defined.

Claims (10)

1. a kind of image processing method, it is characterised in that including:
Reference object is treated under focus state to be shot, and obtains focus image;
The object to be captured is shot under out-of-focus appearance, out-of-focus image is obtained;
The focus image is analyzed and processed, to recognize the overexposure region of the focus image;
It is current to the overexposure region according to the color value in the out-of-focus image with the image-region of the overexposure Region Matching Color value be adjusted.
2. according to the method described in claim 1, it is characterised in that described that the focus image is analyzed and processed, with knowledge The overexposure region of not described focus image, including:
Obtain the brightness value for each pixel that the focus image is included;
The brightness value is more than the region belonging to the pixel of predetermined luminance threshold value, the overexposure area of the focus image is identified as Domain.
3. according to the method described in claim 1, it is characterised in that described that the focus image is analyzed and processed, with knowledge The overexposure region of not described focus image, including:
Image binaryzation processing is carried out to the focus image, the bianry image of the focus image is obtained;
The first pixel is determined in the bianry image, R, G, B value of first pixel are default value;
The second pixel is determined in the focus image, the coordinate information of second pixel and the coordinate of first pixel are believed Manner of breathing is same;
By the overexposure region that the region recognition being made up of second pixel is the focus image.
4. the method according to claim any one of 1-3, it is characterised in that it is described according in the out-of-focus image with it is described The color value of the image-region of overexposure Region Matching, the color value current to the overexposure region is adjusted, including:
Obtain the overexposure region first adjustment weight, and described image region second adjustment weight;
According to the current color value in the described first adjustment weight, the second adjustment weight, the overexposure region and described image The color value in region, the color value current to the overexposure region is adjusted.
5. the method according to claim any one of 1-3, it is characterised in that it is described according in the out-of-focus image with it is described The color value of the image-region of overexposure Region Matching, after the color value current to the overexposure region is adjusted, in addition to:
Gaussian Blur processing is carried out to the focus image after adjustment, output image is obtained.
6. a kind of terminal, it is characterised in that including:
Shooting unit, is shot for treating reference object under focus state, obtains focus image;
The shooting unit, is additionally operable under out-of-focus appearance shoot the object to be captured, obtains out-of-focus image;
Recognition unit, for being analyzed and processed to the focus image, to recognize the overexposure region of the focus image;
Adjustment unit, for according to the color value in the out-of-focus image with the image-region of the overexposure Region Matching, to institute The current color value in overexposure region is stated to be adjusted.
7. terminal according to claim 6, it is characterised in that the recognition unit is carried out at analysis to the focus image Reason, to recognize the overexposure region of the focus image, specifically for:
Obtain the brightness value for each pixel that the focus image is included;
The brightness value is more than the region belonging to the pixel of predetermined luminance threshold value, the overexposure area of the focus image is identified as Domain.
8. terminal according to claim 6, it is characterised in that the recognition unit is carried out at analysis to the focus image Reason, to recognize the overexposure region of the focus image, specifically for:
Image binaryzation processing is carried out to the focus image, the bianry image of the focus image is obtained;
The first pixel is determined in the bianry image, R, G, B value of first pixel are default value;
The second pixel is determined in the focus image, the coordinate information of second pixel and the coordinate of first pixel are believed Manner of breathing is same;
By the overexposure region that the region recognition being made up of second pixel is the focus image.
9. the terminal according to claim any one of 6-8, it is characterised in that the adjustment unit is according to the out-of-focus image In color value with the image-region of the overexposure Region Matching, the color value current to the overexposure region be adjusted, have Body is used for:
Obtain the overexposure region first adjustment weight, and described image region second adjustment weight;
According to the current color value in the described first adjustment weight, the second adjustment weight, the overexposure region and described image The color value in region, the color value current to the overexposure region is adjusted.
10. the terminal according to claim any one of 6-8, it is characterised in that also include:
Processing unit, for carrying out Gaussian Blur processing to the focus image after adjustment, obtains output image.
CN201710167270.5A 2017-03-20 2017-03-20 A kind of image processing method and terminal Withdrawn CN107026976A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710167270.5A CN107026976A (en) 2017-03-20 2017-03-20 A kind of image processing method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710167270.5A CN107026976A (en) 2017-03-20 2017-03-20 A kind of image processing method and terminal

Publications (1)

Publication Number Publication Date
CN107026976A true CN107026976A (en) 2017-08-08

Family

ID=59526288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710167270.5A Withdrawn CN107026976A (en) 2017-03-20 2017-03-20 A kind of image processing method and terminal

Country Status (1)

Country Link
CN (1) CN107026976A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117278865A (en) * 2023-11-16 2023-12-22 荣耀终端有限公司 Image processing method and related device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394485A (en) * 2007-09-20 2009-03-25 华为技术有限公司 Image generating method, apparatus and image composition equipment
EP2367360A2 (en) * 2010-03-18 2011-09-21 Balser AG Method for correcting color errors in images from digital color cameras
CN102542545A (en) * 2010-12-24 2012-07-04 方正国际软件(北京)有限公司 Multi-focal length photo fusion method and system and photographing device
CN104301621A (en) * 2014-09-28 2015-01-21 北京凌云光技术有限责任公司 Image processing method, device and terminal
CN104881644A (en) * 2015-05-25 2015-09-02 华南理工大学 Face image acquisition method under uneven lighting condition
CN105635593A (en) * 2014-10-13 2016-06-01 广达电脑股份有限公司 Multiple exposure imaging system and white balance method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394485A (en) * 2007-09-20 2009-03-25 华为技术有限公司 Image generating method, apparatus and image composition equipment
EP2367360A2 (en) * 2010-03-18 2011-09-21 Balser AG Method for correcting color errors in images from digital color cameras
CN102542545A (en) * 2010-12-24 2012-07-04 方正国际软件(北京)有限公司 Multi-focal length photo fusion method and system and photographing device
CN104301621A (en) * 2014-09-28 2015-01-21 北京凌云光技术有限责任公司 Image processing method, device and terminal
CN105635593A (en) * 2014-10-13 2016-06-01 广达电脑股份有限公司 Multiple exposure imaging system and white balance method thereof
CN104881644A (en) * 2015-05-25 2015-09-02 华南理工大学 Face image acquisition method under uneven lighting condition

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117278865A (en) * 2023-11-16 2023-12-22 荣耀终端有限公司 Image processing method and related device

Similar Documents

Publication Publication Date Title
CN102576456B (en) The luminance digital image of use range information is adjusted
US9292911B2 (en) Automatic image adjustment parameter correction
CN110163810B (en) Image processing method, device and terminal
US8666148B2 (en) Image adjustment
CN104486552A (en) Method and electronic device for obtaining images
JP5779089B2 (en) Edge detection apparatus, edge detection program, and edge detection method
CN109064390A (en) A kind of image processing method, image processing apparatus and mobile terminal
CN108898082B (en) Picture processing method, picture processing device and terminal equipment
US10992845B1 (en) Highlight recovery techniques for shallow depth of field rendering
CN108200351A (en) Image pickup method, terminal and computer-readable medium
CN106462334A (en) Controlling multiple photographic adjustments with a single control
CN108961267B (en) Picture processing method, picture processing device and terminal equipment
CN101986689A (en) Method and apparatus for image processing
CN106981044B (en) Image blurring method and system
CN105989574A (en) Image processing device and image field-depth processing method
CN116569213A (en) Semantical refinement of image regions
JP2013025650A (en) Image processing apparatus, image processing method, and program
JP2013026938A (en) Image processing apparatus, image processing method, and program
JP5864936B2 (en) Image processing apparatus, image processing method, and program
CN106231200A (en) A kind of photographic method and device
WO2015196681A1 (en) Picture processing method and electronic device
CN108259771A (en) Image processing method, device, storage medium and electronic equipment
CN107026976A (en) A kind of image processing method and terminal
CN108776959B (en) Image processing method and device and terminal equipment
WO2023001110A1 (en) Neural network training method and apparatus, and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20170808