CN104394320A - Image processing method, device and electronic equipment - Google Patents

Image processing method, device and electronic equipment Download PDF

Info

Publication number
CN104394320A
CN104394320A CN201410699053.7A CN201410699053A CN104394320A CN 104394320 A CN104394320 A CN 104394320A CN 201410699053 A CN201410699053 A CN 201410699053A CN 104394320 A CN104394320 A CN 104394320A
Authority
CN
China
Prior art keywords
region
gray
parameter
frame data
preview frame
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
CN201410699053.7A
Other languages
Chinese (zh)
Other versions
CN104394320B (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.)
Samsung Electronics China R&D Center
Samsung Electronics Co Ltd
Original Assignee
Samsung Electronics China R&D Center
Samsung Electronics 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 Samsung Electronics China R&D Center, Samsung Electronics Co Ltd filed Critical Samsung Electronics China R&D Center
Priority to CN201410699053.7A priority Critical patent/CN104394320B/en
Publication of CN104394320A publication Critical patent/CN104394320A/en
Application granted granted Critical
Publication of CN104394320B publication Critical patent/CN104394320B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses an image processing method, device and electronic equipment. A specific execution mode of the image processing method comprises the following steps of obtaining preview frame data; performing preset local processing on the preview frame data to generate into a preview image and display the preview image; responding to a shooting command and obtaining original photograph data; obtaining a parameter used when performing the preset local processing on the preview frame data; performing the preset local processing on the original photograph data according to the parameter to generate into a shoot photograph. The execution mode of the image processing method achieves image shooting, meanwhile adjusts and modifies preset areas in the photograph and improving the photograph processing efficiency.

Description

Process the method for image, device and electronic equipment
Technical field
The application relates to technical field of image processing, is specifically related to field of terminal technology, particularly relates to the method for process image, device and electronic equipment.
Background technology
Current, along with the development of the universal of intelligence electronic equipment capable of taking pictures and tourist industry, a lot of people almost all can be had every day to take a large amount of landscape out of doors and to shine.But due to present domestic air quality not good enough, haze is serious, makes the background sky look of most of photo be all greyish white, reduces the aesthetic measure of photo.
Under normal circumstances, if the background sky look of photo presents greyish white or very light blueness, image procossing can be carried out by Photoshop or other image processing softwares.Such as, increase the contrast of photo, or increase filter etc., photo can be made like this to become more bright-coloured.Also the above-mentioned function that had the application of some cameras built-in, directly can select some filter patterns in shooting and previews, makes photo seem more bright-coloured bright.But only by increasing the contrast of filter or raising photo, the color of personage or other prospects can be made too bright-coloured and cause distortion.
Summary of the invention
This application provides a kind of method, device and the electronic equipment that process image.
First aspect, this application provides a kind of method processing image, described method comprises: obtain preview frame data; To the Local treatment that described preview frame data are preset, to generate preview image and to show described preview image; In response to the instruction of shooting, obtain original photo data; And the parameter that acquisition uses the Local treatment that described preview frame data are preset; According to described parameter, described default Local treatment is carried out to described original photo data, to generate the photo of shooting.
In some embodiments, described default Local treatment comprises and carries out color treatments to sky areas.
In some preferred implementation, described parameter comprises the location parameter in pending region and carries out the color parameter of color treatments.
In some preferred implementation, the described Local treatment preset described preview frame data, comprising: the location parameter determining the pending region of preview frame data; Obtain the color parameter carrying out color treatments; According to described color parameter to color treatments described in the pending area applications of described preview frame data.
In some preferred implementation, the described location parameter determining the pending region of preview frame data, comprising: generate the gray-scale map corresponding with described preview frame data; According to the gray value of pixel in presumptive area in described gray-scale map, determine reference gray level value; Based on the location parameter in the pending region of described reference gray level value determination preview frame data; Wherein, described presumptive area is the region in the following specified scope of described gray-scale map top edge.
In some preferred implementation, the described gray value according to pixel in presumptive area in described gray-scale map, determines reference gray level value, comprising: gray values maximum for pixel corresponding in the presumptive area of described gray-scale map is defined as reference gray level value.
In some preferred implementation, the location parameter in the described pending region based on described reference gray level value determination preview frame data, comprise: the term of reference determining the gray value of pixel in region corresponding with the pending region of described preview frame data in described gray-scale map, make described reference gray level value in described term of reference; Described location parameter is determined according to described term of reference.
In some preferred implementation, the location parameter in the described pending region based on described reference gray level value determination preview frame data, also comprises: adopt corrected parameter to revise described reference gray level value.
In some preferred implementation, describedly determine described location parameter according to described term of reference, comprise: generate corresponding binary map based on described gray-scale map, first value region of described binary map corresponds to the region at the some place of gray value within described term of reference in described gray-scale map, and the second value region of described binary map corresponds to the region at the some place of gray value beyond described term of reference in described gray-scale map; The continuum exceeding pre-sizing in described first value region is defined as the corresponding region corresponding with the pending region of described preview frame data; Described location parameter is determined according to described corresponding region.
In some preferred implementation, described color parameter be preset or through user adjustment.
In some preferred implementation, described method also comprises: carry out soften handled to the edge of appointed area, wherein, described appointed area is the described Local treatment of carrying out described original photo data for region.
In some preferred implementation, described method also comprises: after carrying out described default Local treatment to described original photo data, regulate saturation and/or the lightness of the photo after described process.
Second aspect, this application provides a kind of device processing image, described device comprises: preview frame data capture unit, for obtaining preview frame data; Preview image generation unit, for the Local treatment preset described preview frame data, to generate preview image and to show described preview image; Shooting unit, for the instruction in response to shooting, obtains original photo data; And parameter acquiring unit, for obtaining the parameter that the Local treatment preset described preview frame data uses; Photo generation unit, for carrying out described default Local treatment according to described parameter to described original photo data, to generate the photo of shooting.
In some embodiments, described default Local treatment comprises and carries out color treatments to sky areas.
In some preferred implementation, described parameter comprises the location parameter in pending region and carries out the color parameter of color treatments.
In some preferred implementation, described preview image generation unit comprises: location parameter determination subelement, for determining the location parameter in the pending region of preview frame data; Color parameter obtains subelement, for obtaining the color parameter carrying out color treatments; Process subelement, for according to described color parameter to color treatments described in the pending area applications of described preview frame data.
In some preferred implementation, described location parameter determination subelement comprises: gray-scale map generation module, for generating the gray-scale map corresponding with described preview frame data; Reference gray level value determination module, for the gray value according to pixel in presumptive area in described gray-scale map, determines reference gray level value; Pending area determination module, for the location parameter in the pending region based on described reference gray level value determination preview frame data; Wherein, described presumptive area is the region in the following specified scope of described gray-scale map top edge.
In some preferred implementation, described reference gray level value determination module specifically for: gray values maximum for pixel corresponding in the presumptive area of described gray-scale map is defined as reference gray level value.
In some preferred implementation, described pending area determination module comprises: gray-value reference scope determination submodule, for determining the term of reference of the gray value of pixel in region corresponding with the pending region of described preview frame data in described gray-scale map, make described reference gray level value in described term of reference; Location parameter determination submodule, for determining described location parameter according to described term of reference.
In some preferred implementation, described pending area determination module also comprises: revising submodule, revising for adopting corrected parameter to described reference gray level value.
In some preferred implementation, described location parameter determination submodule specifically for: generate corresponding binary map based on described gray-scale map, first value region of described binary map corresponds to the region at the some place of gray value within described term of reference in described gray-scale map, and the second value region of described binary map corresponds to the region at the some place of gray value beyond described term of reference in described gray-scale map; The continuum exceeding pre-sizing in described first value region is defined as the corresponding region corresponding with the pending region of described preview frame data; Described location parameter is determined according to described corresponding region.
In some preferred implementation, described color parameter be preset or through user adjustment.
In some preferred implementation, described device also comprises: soften handled unit, for carrying out soften handled to the edge of appointed area, wherein, described appointed area is the described Local treatment of carrying out described original photo data for region.
In some preferred implementation, described device also comprises: regulate processing unit, after carrying out described default Local treatment to described original photo data, regulate saturation and/or the lightness of the photo after described process.
The third aspect, this application provides a kind of electronic equipment, comprises the device described in any one possible implementation of display screen and second aspect or second aspect.
The method of the process image that the application provides, device and electronic equipment, by the Local treatment preset preview frame data, generate and show preview image, and when receiving shooting instruction, according to the mode and parameter of preview frame data being carried out to Local treatment, the original photo data got are processed, generate the photo of shooting.Achieve while taking pictures, the presumptive area in comparison film carries out predetermined adjustment and amendment, improves the efficiency of photo disposal.
Accompanying drawing explanation
By reading the detailed description done non-limiting example done with reference to the following drawings, the other features, objects and advantages of the application will become more obvious:
Fig. 1 is the flow chart of an embodiment of the method for the process image that the application provides;
Fig. 2 is the flow chart of an embodiment of the method to the Local treatment that preview frame data are preset that the application provides;
Fig. 3 is the flow chart of an embodiment of the method for the location parameter in the pending region of the determination preview frame data that the application provides;
Fig. 4 is the schematic diagram generating corresponding binary map based on gray-scale map that the application provides;
Fig. 5 is the schematic diagram of the binary map based on corresponding region and non-corresponding Area generation that the application provides;
Fig. 6 is the structural representation of an embodiment of the device of the process image that the application provides.
Embodiment
Below in conjunction with drawings and Examples, the application is described in further detail.Be understandable that, specific embodiment described herein is only for explaining related invention, but not the restriction to this invention.It also should be noted that, for convenience of description, in accompanying drawing, illustrate only the part relevant to Invention.
It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.Below with reference to the accompanying drawings and describe the application in detail in conjunction with the embodiments.
Please refer to Fig. 1, it illustrates the flow process 100 of an embodiment of the method for process image.In the present embodiment, for the ease of understanding, illustrate in conjunction with the electronic equipment with shoot function.It will be understood by those skilled in the art that this electronic equipment includes but not limited to smart mobile phone, digital camera, panel computer, pocket computer on knee and desktop computer etc.
As shown in Figure 1, in a step 101, preview frame data are obtained.
In general, when using the electronic equipment with shoot function to take pictures, need first to carry out real-time finding a view by the view finder of electronic equipment, i.e. acquisition multiframe viewfinder image per second, (as acquisition 12 frame per second or 24 frame viewfinder image), are presented at viewfinder image and find a view on screen, after user is satisfied to viewfinder image, perform the operation of shooting, shoot the photo corresponding with viewfinder image.In the present embodiment, electronic equipment obtains preview frame data by view finder, and preview frame data can generate the image for preview.Pixel for the image of preview can be determined according to the resolution of screen of finding a view, this pixel can lower than or equal the pixel of photo of this electronic equipment shooting.
Then, in a step 102, to the Local treatment that preview frame data are preset, to generate preview image and to show this preview image.
In the present embodiment, the original preview frame data of every frame can determine an original preview image, the Local treatment preset preview frame data can think the process preset the regional area in original preview image, by preview frame data genaration preview image after treatment, this preview image is shown in find a view on screen (can be the preview screen of camera, also can be the screen etc. of mobile phone), for the situation of finding a view of user's preview current electronic device and the treatment effect to image.
In the present embodiment, the Local treatment preset is carry out predetermined process to regional area predetermined in image.In some implementations, the Local treatment preset is preferably carries out color treatments to the sky areas in original preview image, be appreciated that, in a more another realization, the Local treatment preset also can for carry out color treatments to the lake water in original preview image or seawater region, in some other realizes, the Local treatment preset can also for carry out color treatments etc. to the meadow in original preview image.The application is to not limiting in this respect.
Then, in step 103, in response to the instruction of shooting, original photo data are obtained.
In the present embodiment, when user is to the situation of finding a view of electronic equipment with when being satisfied with the treatment effect of image, perform the operation (as clicked the shooting icon of finding a view on screen, or pressing shooting push button etc.) of shooting, in response to the instruction of shooting, obtain original photo data.Original photo data can generate the photo of shooting.The pixel of the photo of shooting is general higher, usually above the pixel of preview image.But when the resolution of screen of finding a view is higher, the pixel of preview image also can be identical with the pixel of the photo of shooting, now, can using the preview frame data of current acquisition as original photo data.The application is to not limiting in this respect.
Then, at step 104, the parameter that the Local treatment preset preview frame data uses is obtained.
In the present embodiment, the parameter that uses according to the Local treatment of carrying out preview frame data can be determined specifically to carry out process how to preview frame data.When the Local treatment preset is when carrying out color treatments to the presumptive area in original preview image, above-mentioned parameter comprises the location parameter in pending region and carries out the color parameter of color treatments.Such as, in some implementations, when the Local treatment preset be preferably color treatments is carried out to the sky areas in original preview image time, above-mentioned parameter comprises sky areas location parameter in the picture and carries out adjusting the color parameter of process (increasing blue shift amount) to the color of sky areas.Be appreciated that, in a more another realization, when the Local treatment preset is when carrying out color treatments to the lake water in original preview image or seawater region, above-mentioned parameter comprises lake water or seawater region location parameter in the picture and carries out adjusting the color parameter of process (increasing blue or green shift amount) to the color in lake water or seawater region.In some other realizes, when the Local treatment preset is when carrying out color treatments to the meadow in original preview image, above-mentioned parameter comprises region, meadow location parameter in the picture and carries out adjusting the color parameter etc. of process (increasing green shift amount) to the color in region, meadow.The application is to not limiting in this respect.
Finally, in step 105, the Local treatment preset original photo data according to above-mentioned parameter, to generate the photo of shooting.
In the present embodiment, the Local treatment preset original photo data according to mode and the parameter of the Local treatment preset preview frame data, to generate the photo of shooting.The photo of shooting is preserved.In one implementation, when receiving shooting instruction, can using the preview frame data of current acquisition as original photo data, directly the preview image generated after carrying out Local treatment to preview frame data is preserved as the photo of shooting.In another implementation, when receiving shooting instruction, the original photo data (the determined image pixel of original photo data is higher than the determined image pixel of preview frame data) corresponding to preview frame data can be obtained, original photo data are preserved temporarily, and according to the mode and parameter of preview frame data being carried out to Local treatment, Local treatment is carried out to original photo data, according to the photo of data genaration shooting after treatment, the photo of shooting is preserved.The application is to not limiting in this respect.
The method of the process image that above-described embodiment of the application provides, by the Local treatment preset preview frame data, generate and show preview image, and when receiving shooting instruction, according to the mode and parameter of preview frame data being carried out to Local treatment, the original photo data got are processed, generate the photo of shooting.Achieve while taking pictures, the presumptive area in comparison film carries out predetermined adjustment and amendment, improves the efficiency of photo disposal.
With further reference to Fig. 2, it illustrates the flow process 200 of an embodiment of the method for the step 102 pair Local treatment that preview frame data are preset in Fig. 1.
As shown in Figure 2, in step 201, the location parameter in the pending region of preview frame data is determined.
In the present embodiment, first to preview frame data analysis, the region meeting predetermined condition in the original preview image corresponding with it is defined as pending region.Such as, by the region, blue sky in the original preview image of correspondence, or lake water region, or region, meadow is defined as pending region.Then, obtain the location parameter in above-mentioned pending region, such as, obtain the coordinate etc. of pixel in pending region.The application is to not limiting in this respect.
Then, in step 202., the color parameter carrying out color treatments is obtained.
In the present embodiment, the color parameter carrying out color treatments can be system default, also can be that user presets, can also be through user adjustment.The application is to not limiting in this respect.
Such as, in one implementation, provide multiple color parameter selected for user to user, obtain the color parameter of user's selection as the parameter of carrying out color treatments.Wherein, providing the mode of multiple color parameter to user, can be directly provide color correlation data, and also can be to provide the color example etc. corresponding with color parameter, the application is to not limiting in this respect.
In another implementation, based on the color parameter that system default or user preset, to the interface that user provides adjustment color parameter, for user, the color parameter that system default or user preset is adjusted.The operation that user carries out adjusting can be horizontally slip on adjustment interface, also can be the rolling on dragging adjustment interface or progress bar, can also be click the button (as "+" or "-" symbol) that adjustment interface is preset, can also be predetermined key pressed on electronic equipment etc.
Finally, in step 203, according to the pending area applications above-mentioned color treatments of above-mentioned color parameter to preview frame data.
In the present embodiment, the Local treatment preset original photo data according to mode and the parameter of the Local treatment preset preview frame data, to generate the photo of shooting.Such as, blue masking-out overlap-add procedure etc. is carried out in corresponding to original photo data region, blue sky.
With further reference to Fig. 3, the step 201 that it illustrates in Fig. 2 determines the flow process 300 of an embodiment of the method for the location parameter in the pending region of preview frame data.
As shown in Figure 3, in step 301, the gray-scale map corresponding with preview frame data is generated.
In the present embodiment, gray-scale map that first will be corresponding with it according to preview frame data genaration.The method of concrete generation gray-scale map, the application does not limit this.
Then, in step 302, according to the gray value of pixel in presumptive area in gray-scale map, reference gray level value is determined.
In the present embodiment, first will determine the presumptive area in gray-scale map, the presumptive area in gray-scale map is that this region comprises pending region according to the determined estimation region of the feature in pending region.
For pending region for region, blue sky, presumptive area in gray-scale map is the region in the following specified scope of this gray-scale map top edge, preferably, the following specified scope of top edge is that below image top edge occupies in the regional extent of image half, and the application is to not limiting in this respect.
Determine the presumptive area in gray-scale map, multiple implementation can be had, in one implementation, can according to the direction of the gravity sensor determination gravity of electronic equipment, edge pointed by the direction contrary with gravity direction is defined as top edge, the region in following for top edge specified scope is defined as the presumptive area in gray-scale map.In another implementation, can provide regional choice interface to user, region user chosen is defined as presumptive area in gray-scale map etc.The application is to not limiting in this respect.
In the present embodiment, after determining the presumptive area in gray-scale map, according to the gray value of pixel in this region, a reference gray level value to be determined, if this value is M.Determine that the implementation of this reference gray level value M can have multiple.Such as, the gray value of the pixel of all correspondences in presumptive area can be obtained, then remove the gray value larger with most of grey value difference, remaining part is weighted on average, average as this reference gray level value M.Also the gray value of the pixel of correspondences all in presumptive area can be sorted from small to large, the gray value being in sequence precalculated position (as be positioned in the middle of sequence or be positioned at sequence 1/3rd place) is defined as reference gray level value M.In the present embodiment, preferably, first can also obtain the number of the pixel in presumptive area corresponding to often kind of gray value, gray values maximum for the pixel of correspondence is defined as reference gray level value M.Be appreciated that the determination neither one standard of reference gray level value M, M is an empirical value, rule of thumb can select the method for the acquisition M be applicable to.The application is to not limiting in this respect.
Finally, in step 303, based on the location parameter in the pending region of above-mentioned reference gray level value determination preview frame data.
In the present embodiment, first determine a term of reference of the gray value of pixel in region corresponding with the pending region of preview frame data in gray-scale map, make above-mentioned reference gray level value in this term of reference.Such as, can obtain empirical value S and T, by (M-S, M+T) as above-mentioned term of reference, wherein, S and T represents the residual quantity of gray value, rule of thumb can determine the value of suitable S and T.S and T can be identical value, also can S more bigger than T, or T is more bigger than S, and the application is to not limiting in this respect.
Then, generate corresponding binary map based on above-mentioned gray-scale map and above-mentioned term of reference, as shown in Figure 4, Fig. 4 is the schematic diagram generating corresponding binary map based on gray-scale map.Specifically, according to above-mentioned term of reference, gray-scale map is divided into the region of two parts, this part region, within above-mentioned term of reference, is called first area by the gray value of the pixel in a part of region.This part region, beyond above-mentioned term of reference, is called second area by the gray value of the pixel in another part region.Based on the division in these two regions, generate corresponding binary map, make the scope in the first value region of binary map corresponding with the first area in gray-scale map, the scope in the second value region of binary map is corresponding with the second area in gray-scale map.Wherein, the first value region can be the white portion of binary map, also can be the black region of binary map.If the first value region is the white portion of binary map, then the second value region is the black region of binary map; If the first value region is the black region of binary map, then the second value region is the white portion of binary map.The application is to not limiting in this respect.
Then, obtain the continuum exceeding pre-sizing in the first value region, this region is defined as the corresponding region corresponding with the pending region of preview frame data, and all the other regions are non-corresponding region.Fig. 5 is the schematic diagram of the binary map based on corresponding region and non-corresponding Area generation, and as shown in Figure 5, region 501 is above-mentioned corresponding region, namely corresponds to the region of sky scope.Region 502 is above-mentioned non-corresponding region, namely corresponds to except sky, the region of other scope.Recurrence filling algorithm can be adopted to search corresponding region.Obtain the coordinate of pixel in this corresponding district user domain, according to the location parameter in the pending region of the coordinate determination preview frame data of above-mentioned pixel.
In the present embodiment, corrected parameter can also be adopted to revise above-mentioned reference gray level value.Its essence is the adjustment correction carrying out slightly to the reference gray level value M of above-mentioned acquisition.Corrected parameter can be set by user and obtain.Such as, provide adjustment bound of parameter face, position to user, user can adjust pending region according to the effect of the preview image that screen of finding a view demonstrates.The operation that user carries out adjusting can be horizontally slip on adjustment interface, also can be the rolling on dragging adjustment interface or progress bar, can also be click the button (as "+" or "-" symbol) that adjustment interface is preset, can also be predetermined key pressed on electronic equipment etc.The application is to not limiting in this respect.
In some Alternate embodiments, the method for process image also comprises: carry out soften handled to the edge of appointed area, wherein, appointed area is the Local treatment of carrying out original photo data for region.
In the present embodiment, after the Local treatment that mode and the parameter according to the Local treatment preset preview frame data is preset original photo data, soften handled can also be carried out to the edge in treated region.This process after receiving shooting instruction, can be carried out before preserving photo.
When carrying out soften handled to the edge in treated region, first comparison film carries out rim detection.Specifically, traveling through each value in the binary map based on corresponding region and non-corresponding Area generation is periphery 4 pixels of the pixel of 1 (or 0), if there is value to be the pixel of 0 (or 1), then this pixel is labeled as edge pixel point, so just have found an edge line.Obtain the position coordinates of pixel on edge line, find edge pixel point corresponding on photo according to above-mentioned coordinate, the position of edge pixel point corresponding on comparison film and the smoothing process in region of its periphery 3*3.Median filter can be adopted the value of the pixel on current edge pixel position to be converted to the I d median of all pixels of periphery 3*3, thus finishing smooth process.
In some Alternate embodiments, the method for process image also comprises: after the Local treatment preset original photo data, regulates saturation and/or the lightness of photo after treatment.
In the present embodiment, after the Local treatment that mode and the parameter according to the Local treatment preset preview frame data is preset original photo data, the adjustment process of saturation and/or lightness can also be carried out to treated photo.This adjustment process after receiving shooting instruction, can be carried out before preserving photo.
Such as, first calculate average staturation S1 and/or the lightness L1 in region after treatment, then calculate average staturation S2 and/or the lightness L2 in process this region front, calculate the difference S3=S1-S2 of average staturation, the difference L3=L1-L2 of mean lightness.Pixel each in untreated region is carried out to the weighting of saturation and/or lightness, namely on the basis of former saturation and/or lightness, add difference S3 and/or the L3 of average staturation and/or mean lightness, thus the adjustment of the saturation completed treated photo and/or lightness.
Although it should be noted that the operation describing the inventive method in the accompanying drawings with particular order, this is not that requirement or hint must perform these operations according to this particular order, or must perform the result that all shown operation could realize expectation.On the contrary, the step described in flow chart can change execution sequence.Such as, in the flow process 100 of Fig. 1, first can perform step 104, obtain the parameter that the Local treatment preset preview frame data uses, and then perform step 103, obtain original photo data.Again such as, in the flow process 200 of Fig. 2, first can perform step 202, obtain the color parameter carrying out color treatments, and then perform step 201, determine the location parameter in the pending region of preview frame data.Additionally or alternatively, some step can be omitted, multiple step be merged into a step and perform, and/or a step is decomposed into multiple step and perform.
With further reference to Fig. 6, it illustrates the structural representation 600 of an embodiment of the device of process image.
As shown in Figure 6, the device 600 of the process image of the present embodiment comprises: preview frame data capture unit 601, preview image generation unit 602, shooting unit 603, parameter acquiring unit 604, photo generation unit 605.Wherein, preview frame data capture unit 601 is for obtaining preview frame data.The Local treatment of preview image generation unit 602 for presetting described preview frame data, to generate preview image and to show described preview image.Shooting unit 603, for the instruction in response to shooting, obtains original photo data.The parameter that parameter acquiring unit 604 uses for obtaining the Local treatment preset described preview frame data.Photo generation unit 605 for carrying out described default Local treatment according to described parameter to described original photo data, to generate the photo of shooting.
In some Alternate embodiments, described default Local treatment comprises carries out color treatments to sky areas.
In some Alternate embodiments, described parameter comprises the location parameter in pending region and carries out the color parameter of color treatments.
In some Alternate embodiments, described preview image generation unit 602 comprises: location parameter determination subelement, and color parameter obtains subelement and process subelement (not shown).Location parameter determination subelement is for determining the location parameter in the pending region of preview frame data.Color parameter obtains subelement for obtaining the color parameter carrying out color treatments.Process subelement is used for according to described color parameter color treatments described in the pending area applications of described preview frame data.
In some Alternate embodiments, described location parameter determination subelement comprises: gray-scale map generation module, reference gray level value determination module and pending area determination module (not shown).Gray-scale map generation module is for generating the gray-scale map corresponding with described preview frame data.Reference gray level value determination module is used for the gray value according to pixel in presumptive area in described gray-scale map, determines reference gray level value.Pending area determination module is used for the location parameter based on the pending region of described reference gray level value determination preview frame data.Wherein, described presumptive area is the region in the following specified scope of described gray-scale map top edge.
In some Alternate embodiments, described reference gray level value determination module specifically for: gray values maximum for pixel corresponding in the presumptive area of described gray-scale map is defined as reference gray level value.
In some Alternate embodiments, described pending area determination module comprises: gray-value reference scope determination submodule and location parameter determination submodule (not shown).Gray-value reference scope determination submodule, for determining the term of reference of the gray value of pixel in region corresponding with the pending region of described preview frame data in described gray-scale map, makes described reference gray level value in described term of reference.Location parameter determination submodule is used for determining described location parameter according to described term of reference.
In some Alternate embodiments, described pending area determination module comprises: described pending area determination module also comprises: revising submodule, revising for adopting corrected parameter to described reference gray level value.
In some Alternate embodiments, described location parameter determination submodule specifically for: generate corresponding binary map based on described gray-scale map, first value region of described binary map corresponds to the region at the some place of gray value within described term of reference in described gray-scale map, and the second value region of described binary map corresponds to the region at the some place of gray value beyond described term of reference in described gray-scale map.The continuum exceeding pre-sizing in described first value region is defined as the corresponding region corresponding with the pending region of described preview frame data.Described location parameter is determined according to described corresponding region.
In some Alternate embodiments, described color parameter be preset or through user adjustment.
In some Alternate embodiments, described device also comprises: soften handled unit (not shown), for carrying out soften handled to the edge of appointed area, wherein, described appointed area be described Local treatment that described original photo data are carried out for region.
In some Alternate embodiments, described device also comprises: regulate processing unit (not shown), after carrying out described default Local treatment to described original photo data, regulate saturation and/or the lightness of the photo after described process.
Should be appreciated that all unit or the module of record in device 600 are corresponding with each step in the method described with reference to figure 1-5.Thus, above for the unit that operation and the feature of method description are equally applicable to device 600 and wherein comprise, do not repeat them here.Device 600 can pre-set in the terminal, also can be loaded in terminal by modes such as downloads.Corresponding units in device 600 can cooperatively interact the scheme realizing processing image with the unit in terminal.
Present invention also provides a kind of electronic equipment, described electronic equipment comprises display screen and the above-mentioned device for the treatment of image.In the present embodiment, this electronic equipment is the electronic equipment with shoot function.Especially there is smart mobile phone or the digital camera of shoot function, include but not limited to smart mobile phone, digital camera, panel computer, pocket computer on knee and desktop computer etc.
Be described in unit module involved in the embodiment of the present application to be realized by the mode of software, also can be realized by the mode of hardware.Described unit module also can be arranged within a processor, such as, can be described as: a kind of processor comprises preview frame data capture unit, preview image generation unit, shooting unit, parameter acquiring unit and photo generation unit.Wherein, the title of these unit modules does not form the restriction to this unit module itself under certain conditions, and such as, preview frame data capture unit can also be described to " for obtaining the unit of preview frame data ".
As another aspect, present invention also provides a kind of computer-readable recording medium, this computer-readable recording medium can be the computer-readable recording medium comprised in device described in above-described embodiment; Also can be individualism, be unkitted the computer-readable recording medium allocated in terminal.Described computer-readable recording medium stores more than one or one program, and described program is used for performance description in the method for the process image of the application by one or more than one processor.
More than describe and be only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art are to be understood that, invention scope involved in the application, be not limited to the technical scheme of the particular combination of above-mentioned technical characteristic, also should be encompassed in when not departing from described inventive concept, other technical scheme of being carried out combination in any by above-mentioned technical characteristic or its equivalent feature and being formed simultaneously.The technical characteristic that such as, disclosed in above-mentioned feature and the application (but being not limited to) has similar functions is replaced mutually and the technical scheme formed.

Claims (25)

1. process a method for image, it is characterized in that, described method comprises:
Obtain preview frame data;
To the Local treatment that described preview frame data are preset, to generate preview image and to show described preview image;
In response to the instruction of shooting, obtain original photo data; And
The parameter that the Local treatment that acquisition is preset described preview frame data uses;
According to described parameter, described default Local treatment is carried out to described original photo data, to generate the photo of shooting.
2. method according to claim 1, is characterized in that, described default Local treatment comprises carries out color treatments to sky areas.
3. method according to claim 2, is characterized in that, described parameter comprises the location parameter in pending region and carries out the color parameter of color treatments.
4. method according to claim 3, is characterized in that, the described Local treatment preset described preview frame data, comprising:
Determine the location parameter in the pending region of preview frame data;
Obtain the color parameter carrying out color treatments;
According to described color parameter to color treatments described in the pending area applications of described preview frame data.
5. method according to claim 4, is characterized in that, the described location parameter determining the pending region of preview frame data, comprising:
Generate the gray-scale map corresponding with described preview frame data;
According to the gray value of pixel in presumptive area in described gray-scale map, determine reference gray level value;
Based on the location parameter in the pending region of described reference gray level value determination preview frame data;
Wherein, described presumptive area is the region in the following specified scope of described gray-scale map top edge.
6. method according to claim 5, it is characterized in that, the described gray value according to pixel in presumptive area in described gray-scale map, determines reference gray level value, comprising: gray values maximum for pixel corresponding in the presumptive area of described gray-scale map is defined as reference gray level value.
7. method according to claim 5, is characterized in that, the location parameter in the described pending region based on described reference gray level value determination preview frame data, comprising:
Determine the term of reference of the gray value of pixel in region corresponding with the pending region of described preview frame data in described gray-scale map, make described reference gray level value in described term of reference;
Described location parameter is determined according to described term of reference.
8. method according to claim 7, is characterized in that, the location parameter in the described pending region based on described reference gray level value determination preview frame data, also comprises:
Corrected parameter is adopted to revise described reference gray level value.
9. method according to claim 7, is characterized in that, describedly determines described location parameter according to described term of reference, comprising:
Corresponding binary map is generated based on described gray-scale map, first value region of described binary map corresponds to the region at the some place of gray value within described term of reference in described gray-scale map, and the second value region of described binary map corresponds to the region at the some place of gray value beyond described term of reference in described gray-scale map;
The continuum exceeding pre-sizing in described first value region is defined as the corresponding region corresponding with the pending region of described preview frame data;
Described location parameter is determined according to described corresponding region.
10. method according to claim 4, is characterized in that, described color parameter be preset or through user adjustment.
11. according to the method in claim 1-10 described in any one, it is characterized in that, described method also comprises: carry out soften handled to the edge of appointed area, wherein, described appointed area is the described Local treatment of carrying out described original photo data for region.
12., according to the method in claim 1-10 described in any one, is characterized in that, described method also comprises: after carrying out described default Local treatment to described original photo data, regulate saturation and/or the lightness of the photo after described process.
13. 1 kinds of devices processing image, it is characterized in that, described device comprises:
Preview frame data capture unit, for obtaining preview frame data;
Preview image generation unit, for the Local treatment preset described preview frame data, to generate preview image and to show described preview image;
Shooting unit, for the instruction in response to shooting, obtains original photo data; And
Parameter acquiring unit, for obtaining the parameter that the Local treatment preset described preview frame data uses;
Photo generation unit, for carrying out described default Local treatment according to described parameter to described original photo data, to generate the photo of shooting.
14. devices according to claim 13, is characterized in that, described default Local treatment comprises carries out color treatments to sky areas.
15. devices according to claim 14, is characterized in that, described parameter comprises the location parameter in pending region and carries out the color parameter of color treatments.
16. devices according to claim 15, is characterized in that, described preview image generation unit comprises:
Location parameter determination subelement, for determining the location parameter in the pending region of preview frame data;
Color parameter obtains subelement, for obtaining the color parameter carrying out color treatments;
Process subelement, for according to described color parameter to color treatments described in the pending area applications of described preview frame data.
17. devices according to claim 16, is characterized in that, described location parameter determination subelement comprises:
Gray-scale map generation module, for generating the gray-scale map corresponding with described preview frame data;
Reference gray level value determination module, for the gray value according to pixel in presumptive area in described gray-scale map, determines reference gray level value;
Pending area determination module, for the location parameter in the pending region based on described reference gray level value determination preview frame data;
Wherein, described presumptive area is the region in the following specified scope of described gray-scale map top edge.
18. devices according to claim 17, is characterized in that, described reference gray level value determination module specifically for: gray values maximum for pixel corresponding in the presumptive area of described gray-scale map is defined as reference gray level value.
19. devices according to claim 17, is characterized in that, described pending area determination module comprises:
Gray-value reference scope determination submodule, for determining the term of reference of the gray value of pixel in region corresponding with the pending region of described preview frame data in described gray-scale map, makes described reference gray level value in described term of reference;
Location parameter determination submodule, for determining described location parameter according to described term of reference.
20. devices according to claim 19, is characterized in that, described pending area determination module also comprises:
Revising submodule, for adopting corrected parameter, described reference gray level value being revised.
21. devices according to claim 19, is characterized in that, described location parameter determination submodule specifically for:
Corresponding binary map is generated based on described gray-scale map, first value region of described binary map corresponds to the region at the some place of gray value within described term of reference in described gray-scale map, and the second value region of described binary map corresponds to the region at the some place of gray value beyond described term of reference in described gray-scale map;
The continuum exceeding pre-sizing in described first value region is defined as the corresponding region corresponding with the pending region of described preview frame data;
Described location parameter is determined according to described corresponding region.
22. devices according to claim 16, is characterized in that, described color parameter be preset or through user adjustment.
23. according to the device in claim 13-22 described in any one, it is characterized in that, described device also comprises: soften handled unit, for carrying out soften handled to the edge of appointed area, wherein, described appointed area be described Local treatment that described original photo data are carried out for region.
24. according to the device in claim 13-22 described in any one, it is characterized in that, described device also comprises: regulate processing unit, after carrying out described default Local treatment to described original photo data, regulate saturation and/or the lightness of the photo after described process.
25. 1 kinds of electronic equipments, is characterized in that, described electronic equipment comprises display screen and the device according to claim 13-24.
CN201410699053.7A 2014-11-26 2014-11-26 Handle the method, apparatus and electronic equipment of image Active CN104394320B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410699053.7A CN104394320B (en) 2014-11-26 2014-11-26 Handle the method, apparatus and electronic equipment of image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410699053.7A CN104394320B (en) 2014-11-26 2014-11-26 Handle the method, apparatus and electronic equipment of image

Publications (2)

Publication Number Publication Date
CN104394320A true CN104394320A (en) 2015-03-04
CN104394320B CN104394320B (en) 2018-09-11

Family

ID=52612149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410699053.7A Active CN104394320B (en) 2014-11-26 2014-11-26 Handle the method, apparatus and electronic equipment of image

Country Status (1)

Country Link
CN (1) CN104394320B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017045647A1 (en) * 2015-09-17 2017-03-23 努比亚技术有限公司 Method and mobile terminal for processing image
CN106791402A (en) * 2016-12-23 2017-05-31 宇龙计算机通信科技(深圳)有限公司 A kind of mobile terminal photographic method and terminal
CN107438162A (en) * 2017-07-31 2017-12-05 努比亚技术有限公司 The method of adjustment and device of a kind of acquisition parameters
CN109361907A (en) * 2018-11-16 2019-02-19 深圳市趣创科技有限公司 Method, apparatus, terminal and the storage medium of camera shooting night scene sky color
CN114630045A (en) * 2022-02-11 2022-06-14 珠海格力电器股份有限公司 Photographing method and device, readable storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103295237A (en) * 2013-05-31 2013-09-11 深圳大学 Method and system for segmenting images
WO2013133905A1 (en) * 2012-03-06 2013-09-12 Apple Inc. Color adjustors for color segments
CN103533240A (en) * 2013-10-12 2014-01-22 深圳市中兴移动通信有限公司 Method and device for calibrating parameters in real time during photographing and photo post-processing
CN103618886A (en) * 2013-12-13 2014-03-05 厦门美图网科技有限公司 Shooting method for intelligently decoloring according to main color tone

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013133905A1 (en) * 2012-03-06 2013-09-12 Apple Inc. Color adjustors for color segments
CN103295237A (en) * 2013-05-31 2013-09-11 深圳大学 Method and system for segmenting images
CN103533240A (en) * 2013-10-12 2014-01-22 深圳市中兴移动通信有限公司 Method and device for calibrating parameters in real time during photographing and photo post-processing
CN103618886A (en) * 2013-12-13 2014-03-05 厦门美图网科技有限公司 Shooting method for intelligently decoloring according to main color tone

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017045647A1 (en) * 2015-09-17 2017-03-23 努比亚技术有限公司 Method and mobile terminal for processing image
CN106791402A (en) * 2016-12-23 2017-05-31 宇龙计算机通信科技(深圳)有限公司 A kind of mobile terminal photographic method and terminal
CN107438162A (en) * 2017-07-31 2017-12-05 努比亚技术有限公司 The method of adjustment and device of a kind of acquisition parameters
CN109361907A (en) * 2018-11-16 2019-02-19 深圳市趣创科技有限公司 Method, apparatus, terminal and the storage medium of camera shooting night scene sky color
CN114630045A (en) * 2022-02-11 2022-06-14 珠海格力电器股份有限公司 Photographing method and device, readable storage medium and electronic equipment

Also Published As

Publication number Publication date
CN104394320B (en) 2018-09-11

Similar Documents

Publication Publication Date Title
EP3061071B1 (en) Method, apparatus and computer program product for modifying illumination in an image
US9218653B2 (en) Method and apparatus for dynamic range enhancement of an image
RU2531261C2 (en) Scanning using camera
US20120242852A1 (en) Gesture-Based Configuration of Image Processing Techniques
WO2018176925A1 (en) Hdr image generation method and apparatus
CN111418201A (en) Shooting method and equipment
US9131201B1 (en) Color correcting virtual long exposures with true long exposures
US20150178946A1 (en) Image adjustment using texture mask
US20140347521A1 (en) Simulating High Dynamic Range Imaging with Virtual Long-Exposure Images
Tanaka et al. Gradient-based low-light image enhancement
JP2003058894A (en) Method and device for segmenting pixeled image
CN104394320A (en) Image processing method, device and electronic equipment
US20170351932A1 (en) Method, apparatus and computer program product for blur estimation
US9445073B2 (en) Image processing methods and systems in accordance with depth information
CN111787230A (en) Image display method and device and electronic equipment
CN112950499B (en) Image processing method, device, electronic equipment and storage medium
CN112508820A (en) Image processing method and device and electronic equipment
CN112419218A (en) Image processing method and device and electronic equipment
US20220398704A1 (en) Intelligent Portrait Photography Enhancement System
CN105893578A (en) Method and device for selecting photos
CN113393391B (en) Image enhancement method, image enhancement device, electronic apparatus, and storage medium
US9836827B2 (en) Method, apparatus and computer program product for reducing chromatic aberrations in deconvolved images
CN111654623B (en) Photographing method and device and electronic equipment
CN112446848A (en) Image processing method and device and electronic equipment
EP3920132A1 (en) Electronic device for generating hdr image and operating method therefor

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