CN104539846A - Picture shooting method, device and terminal - Google Patents

Picture shooting method, device and terminal Download PDF

Info

Publication number
CN104539846A
CN104539846A CN201410829928.0A CN201410829928A CN104539846A CN 104539846 A CN104539846 A CN 104539846A CN 201410829928 A CN201410829928 A CN 201410829928A CN 104539846 A CN104539846 A CN 104539846A
Authority
CN
China
Prior art keywords
preview graph
pixel point
edge pixel
described preview
predetermined threshold
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
CN201410829928.0A
Other languages
Chinese (zh)
Other versions
CN104539846B (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.)
Beijing Xiaomi Technology Co Ltd
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201410829928.0A priority Critical patent/CN104539846B/en
Publication of CN104539846A publication Critical patent/CN104539846A/en
Application granted granted Critical
Publication of CN104539846B publication Critical patent/CN104539846B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to a picture shooting method, device and terminal and belongs to the technical field of computers. The method comprises the steps that according to a current focal length value, whether a current scene is a close-range shooting scene is judged; if yes, according to pixel points of a last-frame preview picture before shooting, whether the last-frame preview picture before shooting is a complex picture is judged; when the last-frame preview picture before shooting is not the complex picture, according to the pixel points of the last-frame preview picture before shooting, picture size is adjusted; and according to the adjusted picture size, shooting is carried out. According to the pixel points in the last-frame preview picture before shooting, whether the preview picture is the complex picture is judged. When the preview picture is not the complex picture, according to the pixel points in the preview picture, picture size is adjusted, and shooting is carried out according to adjusted size. Picture size can be adjusted under the scene which meets conditions so that occupied space can be small during picture storing, and accordingly storing space is saved.

Description

The method of pictures taken, device and terminal
Technical field
The disclosure relates to field of computer technology, particularly a kind of method of pictures taken, device and terminal.
Background technology
Along with popularizing of present electronic product, the user using electronic product to take a picture gets more and more.Such as, user takes by mobile phone, camera.Wherein, photo size during shooting is determined by the pixel of camera, and the pixel of camera is higher, and photo size is also larger, and the memory space that storage picture expends is also larger.In addition, the fixing photo size that can determine according to camera pixel during shooting is taken.
Due to can not photo size be arranged during pictures taken, can only take according to fixing photo size, thus cause user can not select less photo size.Correspondingly, during storage picture, more memory space can be taken, cause the waste of memory space.
Summary of the invention
For overcoming Problems existing in correlation technique, present disclose provides a kind of method of pictures taken, device and terminal.
According to the first aspect of disclosure embodiment, provide a kind of method of pictures taken, the method comprises:
According to current focal length value, judge currently whether be in shooting at close range scene;
When being in shooting at close range scene, according to the pixel in last frame preview graph before shooting, judge whether described preview graph is complicated picture, and described complicated picture is the picture that complexity detected value is less than predetermined threshold value;
When described preview graph is not complicated picture, according to the pixel in described preview graph, adjustment photo size;
According to the photo size after adjustment, take.
In conjunction with first aspect, in the first possible implementation of first aspect, described according to current focal length value, judge current whether be in shooting at close range scene after, also comprise:
Be not in shooting at close range scene if current, according to the overall brightness value of described preview graph, judge currently whether be in half-light scene;
Be in half-light scene if current, then perform according to the pixel in described preview graph, judge that whether described preview graph is the step of complicated picture.
In conjunction with the first possible implementation of first aspect or first aspect, in the implementation that the second of first aspect is possible, described according to the pixel in described preview graph, after judging whether described preview graph is complicated picture, also comprise:
If described preview graph is complicated picture, then judge whether described preview graph is fringe, wherein, fringe is determined by the edge pixel point on each preset direction in described preview graph;
If described preview graph is fringe, then perform according to the pixel in described preview graph, the step of adjustment photo size.
In conjunction with the implementation that the second of first aspect is possible, in the third possible implementation of first aspect, the described overall brightness value according to described preview graph, judge current whether be in half-light scene after, also comprise:
Be not in half-light scene if current, then perform and judge that whether described preview graph is the step of fringe.
In conjunction with the third possible implementation of first aspect, in the 4th kind of possible implementation of first aspect, described judge whether described preview graph is fringe after, also comprise:
If described preview graph is fringe, then perform according to the pixel in described preview graph, the step of adjustment photo size.
In conjunction with the first possible implementation of first aspect or first aspect, in the 5th kind of possible implementation of first aspect, described according to the pixel in described preview graph, judge whether described preview graph is complicated picture, comprising:
Add up the quantity of edge pixel point in described preview graph and total pixel;
By described preview graph division unit lattice, the quantity of the cell that statistics edge pixel point occupies and total cell;
Using the ratio between the quantity of described edge pixel point and the quantity of described total pixel as the first complexity detected value, the ratio between the quantity of cell occupied by edge pixel point and the quantity of total cell of division is as the second complexity detected value;
When the first complexity detected value is less than the first predetermined threshold value, and when the second complexity detected value is less than the second predetermined threshold value, determine that described preview graph is complicated picture.
In conjunction with the third possible implementation of first aspect, in the 6th kind of possible implementation of first aspect, describedly judge whether described preview graph is fringe, comprising:
Calculate the gradient direction of each edge pixel point in described preview graph;
Determine the first pixel that each edge pixel point gray value that position is nearest on the gradient direction of correspondence is minimum and the second pixel that each edge pixel point gray value that position is nearest on the rightabout of corresponding gradient direction is maximum;
The coordinate of first pixel corresponding according to each edge pixel point and the coordinate of the second pixel, calculate the border width of each edge pixel point;
According to the gradient direction of each edge pixel point, add up the quantity of fuzzy edge pixel point at least four preset directions, described fuzzy edge pixel is the edge pixel point that border width is greater than the 3rd predetermined threshold value;
If the total quantity that on arbitrary preset direction, the quantity of fuzzy edge pixel point is greater than fuzzy edge pixel point on the 4th predetermined threshold value or all preset directions is greater than the 5th predetermined threshold value, then determine that described preview graph is fringe.
In conjunction with the 5th kind of possible implementation of first aspect, in the 7th kind of possible implementation of first aspect, described according to the pixel in described preview graph, adjustment photo size, comprising:
Reduce the size of described preview graph, until in described preview graph after reducing, ratio between the quantity of the quantity of edge pixel point and total pixel is not less than the first predetermined threshold value, or till the ratio between the quantity of cell that occupies of edge pixel point and the quantity of total cell of division is not less than the second predetermined threshold value;
Using the photo size that satisfies condition as the photo size after adjustment.
In conjunction with the 6th kind of possible implementation of first aspect, in the 8th kind of possible implementation of first aspect, described according to the pixel in described preview graph, adjustment photo size, comprises
Reduce the size of described preview graph, until in described preview graph after reducing, on arbitrary preset direction, the quantity of fuzzy edge pixel point is not more than the 4th predetermined threshold value, and till on all preset directions, the total quantity of fuzzy edge pixel point is not more than the 5th predetermined threshold value, described 4th predetermined threshold value is less than the 5th predetermined threshold value;
Using the photo size that satisfies condition as the photo size after adjustment.
According to the second aspect of disclosure embodiment, provide a kind of device of pictures taken, this device comprises:
First judge module, for according to current focal length value, judges currently whether be in shooting at close range scene;
Second judge module, for when being in shooting at close range scene, according to the pixel in last frame preview graph before shooting, judges whether described preview graph is complicated picture, and described complicated picture is the picture that complexity detected value is less than predetermined threshold value;
Adjusting module, for when described preview graph is not complicated picture, according to the pixel in described preview graph, adjustment photo size;
Taking module, for according to the photo size after adjustment, takes.
In conjunction with second aspect, in the first possible implementation of second aspect, the 3rd judge module, for current be not in shooting at close range scene time, according to the overall brightness value of described preview graph, judge currently whether be in half-light scene;
First Executive Module, for current be in half-light scene time, then perform according to the pixel in described preview graph, judge that whether described preview graph is the step of complicated picture.
In conjunction with the first possible implementation of second aspect or second aspect, described device also comprises:
4th judge module, for when described preview graph is complicated picture, then judge whether described preview graph is fringe, wherein, fringe is determined by the edge pixel point on each preset direction in described preview graph;
Second Executive Module, for when described preview graph is fringe, then performs according to the pixel in described preview graph, the step of adjustment photo size.
In conjunction with the implementation that the second of second aspect is possible, in the third possible implementation of second aspect, described device also comprises:
3rd Executive Module, for current be not in half-light scene time, then perform and judge that whether described preview graph is the step of fringe.
In conjunction with the third possible implementation of second aspect, in the 4th kind of possible implementation of second aspect, described device also comprises:
4th Executive Module, for when described preview graph is fringe, then performs according to the pixel in described preview graph, the step of adjustment photo size.
In conjunction with the first possible implementation of second aspect or second aspect, in the 5th kind of possible implementation of second aspect, described second judge module, for adding up the quantity of edge pixel point in described preview graph and total pixel; By described preview graph division unit lattice, the quantity of the cell that statistics edge pixel point occupies and total cell; Using the ratio between the quantity of described edge pixel point and the quantity of described total pixel as the first complexity detected value, the ratio between the quantity of cell occupied by edge pixel point and the quantity of total cell of division is as the second complexity detected value; When the first complexity detected value is less than the first predetermined threshold value, and when the second complexity detected value is less than the second predetermined threshold value, determine that described preview graph is complicated picture.
In conjunction with the third possible implementation of second aspect, in the 6th kind of possible implementation of second aspect, described 4th judge module, for calculating the gradient direction of each edge pixel point in described preview graph; Determine the first pixel that each edge pixel point gray value that position is nearest on the gradient direction of correspondence is minimum and the second pixel that each edge pixel point gray value that position is nearest on the rightabout of corresponding gradient direction is maximum; The coordinate of first pixel corresponding according to each edge pixel point and the coordinate of the second pixel, calculate the border width of each edge pixel point; According to the gradient direction of each edge pixel point, add up the quantity of fuzzy edge pixel point at least four preset directions, described fuzzy edge pixel is the edge pixel point that border width is greater than the 3rd predetermined threshold value; If the total quantity that on arbitrary preset direction, the quantity of fuzzy edge pixel point is greater than fuzzy edge pixel point on the 4th predetermined threshold value or all preset directions is greater than the 5th predetermined threshold value, then determine that described preview graph is fringe.
In conjunction with the 5th kind of possible implementation of second aspect, in the 7th kind of possible implementation of second aspect, described adjusting module, for reducing the size of described preview graph, until in described preview graph after reducing, ratio between the quantity of the quantity of edge pixel point and total pixel is not less than the first predetermined threshold value, or till the ratio between the quantity of cell that occupies of edge pixel point and the quantity of total cell of division is not less than the second predetermined threshold value; Using the photo size that satisfies condition as the photo size after adjustment.
In conjunction with the 6th kind of possible implementation of second aspect, in the 8th kind of possible implementation of second aspect, described adjusting module, for reducing the size of described preview graph, until in described preview graph after reducing, on arbitrary preset direction, the quantity of fuzzy edge pixel point is not more than the 4th predetermined threshold value, and till on all preset directions, the total quantity of fuzzy edge pixel point is not more than the 5th predetermined threshold value, described 4th predetermined threshold value is less than the 5th predetermined threshold value; Using the photo size that satisfies condition as the photo size after adjustment.
According to the third aspect of disclosure embodiment, provide a kind of terminal, this terminal comprises:
Processor;
For the memory of storage of processor executable instruction;
Wherein, described processor is configured to:
According to current focal length value, judge currently whether be in shooting at close range scene;
When being in shooting at close range scene, according to the pixel in last frame preview graph before shooting, judge whether described preview graph is complicated picture, and described complicated picture is the picture that complexity detected value is less than predetermined threshold value;
When described preview graph is not complicated picture, according to the pixel in described preview graph, adjustment photo size;
According to the photo size after adjustment, take.
The beneficial effect that the technical scheme that disclosure embodiment provides is brought is:
By current be in shooting at close range scene time, according to the pixel before shooting in last frame preview graph, judge whether preview graph is complicated picture.When preview graph is not complicated picture, according to the pixel in preview graph, adjustment photo size, according to the photo size after adjustment, takes.Due to photo size can be adjusted under the scene satisfied condition, make take less memory space during storage picture, thus save memory space.
Should be understood that, it is only exemplary and explanatory that above general description and details hereinafter describe, and can not limit the disclosure.
Accompanying drawing explanation
Accompanying drawing to be herein merged in specification and to form the part of this specification, shows embodiment according to the invention, and is used from specification one and explains principle of the present invention.
Fig. 1 is the method flow diagram of a kind of pictures taken according to an exemplary embodiment.
Fig. 2 is the method flow diagram of a kind of pictures taken according to an exemplary embodiment.
Fig. 3 is the schematic diagram of a kind of preview graph according to an exemplary embodiment.
Fig. 4 is the schematic diagram of preview graph after a kind of division unit lattice according to an exemplary embodiment.
Fig. 5 is the coordinate schematic diagram of a kind of pixel according to an exemplary embodiment.
Fig. 6 is the structural representation of the device of a kind of pictures taken according to an exemplary embodiment.
Fig. 7 is the structural representation of the device of a kind of pictures taken according to an exemplary embodiment.
Fig. 8 is the structural representation of the device of a kind of pictures taken according to an exemplary embodiment.
Fig. 9 is the structural representation of the device of a kind of pictures taken according to an exemplary embodiment.
Figure 10 is the structural representation of the device of a kind of pictures taken according to an exemplary embodiment.
Figure 11 is the block diagram of a kind of terminal according to an exemplary embodiment.
Embodiment
Here will be described exemplary embodiment in detail, its sample table shows in the accompanying drawings.When description below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawing represents same or analogous key element.Execution mode described in following exemplary embodiment does not represent all execution modes consistent with the present invention.On the contrary, they only with as in appended claims describe in detail, the example of apparatus and method that aspects more of the present invention are consistent.
Fig. 1 is the method flow diagram of a kind of pictures taken according to an exemplary embodiment, and the method for this pictures taken is applied to terminal.As shown in Figure 1, the method for this pictures taken comprises the following steps.
In a step 101, according to current focal length value, judge currently whether be in shooting at close range scene.
In a step 102, when being in shooting at close range scene, according to the pixel in last frame preview graph before shooting, judge whether preview graph is complicated picture, and complicated picture is the picture that complexity detected value is less than predetermined threshold value.
Wherein, the camera in terminal, before detecting that user triggers photographing operation, usually can be clapped the scenery in current view-finder according to certain frequency in advance, using the photo taken in advance as preview graph.Such as, be a frame per second for the frequency of clapping in advance.After camera is opened, camera can be per secondly clapped the scenery in view-finder in advance, as 2: 3: 40 to 2: 3: 49 during this period of time in, camera can pre-bat 10 frame preview graph.If detected that user triggered photographing operation at 2: 3: 50, then the preview graph of clapping in advance for 2: 3: 49 is the front last frame preview graph of shooting.
In step 103, when preview graph is not complicated picture, according to the pixel in preview graph, adjustment photo size.
At step 104, according to the photo size after adjustment, take.
The method that disclosure embodiment provides, by current be in shooting at close range scene time, according to the pixel before shooting in last frame preview graph, judge whether preview graph is complicated picture.When preview graph is not complicated picture, according to the pixel in preview graph, adjustment photo size, according to the photo size after adjustment, takes.Due to photo size can be adjusted under the scene satisfied condition, make take less memory space during storage picture, thus save memory space.
As a kind of embodiment, according to current focal length value, judge current whether be in shooting at close range scene after, also comprise:
Be not in shooting at close range scene if current, according to the overall brightness value of preview graph, judge currently whether be in half-light scene;
Be in half-light scene if current, then perform according to the pixel in preview graph, judge that whether preview graph is the step of complicated picture.
As a kind of embodiment, according to the pixel in preview graph, after judging whether preview graph is complicated picture, also comprise:
If preview graph is complicated picture, then judge whether preview graph is fringe, wherein, fringe is determined by the edge pixel point on each preset direction in described preview graph;
If preview graph is fringe, then perform according to the pixel in preview graph, the step of adjustment photo size.
As a kind of embodiment, according to the overall brightness value of preview graph, judge current whether be in half-light scene after, also comprise:
Be not in half-light scene if current, then perform and judge that whether preview graph is the step of fringe.
As a kind of embodiment, after judging whether preview graph is fringe, also comprise:
If preview graph is fringe, then perform according to the pixel in preview graph, the step of adjustment photo size.
As a kind of embodiment, according to the pixel in preview graph, judge whether preview graph is complicated picture, comprising:
The quantity of the edge pixel point in statistics preview graph and total pixel;
By preview graph division unit lattice, the quantity of the cell that statistics edge pixel point occupies and total cell;
Using the ratio between the quantity of edge pixel point and the quantity of total pixel as the first complexity detected value, the ratio between the quantity of cell occupied by edge pixel point and the quantity of total cell of division is as the second complexity detected value;
When the first complexity detected value is less than the first predetermined threshold value, and when the second complexity detected value is less than the second predetermined threshold value, determine that preview graph is complicated picture.
Wherein, usually can comprise different images in preview graph, the pixel on image outline is edge pixel point.Such as, take preview graph as portrait photographs be example.Can comprise the image of personage in preview graph, character image has corresponding profile, and the pixel on profile is the edge pixel point of character image.
As a kind of embodiment, judge whether preview graph is fringe, comprising:
Calculate the gradient direction of each edge pixel point in preview graph;
Determine the first pixel that each edge pixel point gray value that position is nearest on the gradient direction of correspondence is minimum and the second pixel that each edge pixel point gray value that position is nearest on the rightabout of corresponding gradient direction is maximum;
The coordinate of first pixel corresponding according to each edge pixel point and the coordinate of the second pixel, calculate the border width of each edge pixel point;
According to the gradient direction of each edge pixel point, add up the quantity of fuzzy edge pixel point at least four preset directions, fuzzy edge pixel is the edge pixel point that border width is greater than the 3rd predetermined threshold value;
If the total quantity that on arbitrary preset direction, the quantity of fuzzy edge pixel point is greater than fuzzy edge pixel point on the 4th predetermined threshold value or all preset directions is greater than the 5th predetermined threshold value, then determine that preview graph is fringe.
As a kind of embodiment, according to the pixel in preview graph, adjustment photo size, comprising:
Reduce the size of preview graph, until in preview graph after reducing, ratio between the quantity of the quantity of edge pixel point and total pixel is not less than the first predetermined threshold value, or till the ratio between the quantity of cell that occupies of edge pixel point and the quantity of total cell of division is not less than the second predetermined threshold value;
Using the photo size that satisfies condition as the photo size after adjustment.
As a kind of embodiment, according to the pixel in preview graph, adjustment photo size, comprises
Reduce the size of preview graph, until in preview graph after reducing, on arbitrary preset direction, the quantity of fuzzy edge pixel point is not more than the 4th predetermined threshold value, and till on all preset directions, the total quantity of fuzzy edge pixel point is not more than the 5th predetermined threshold value, the 4th predetermined threshold value is less than the 5th predetermined threshold value;
Using the photo size that satisfies condition as the photo size after adjustment.
Above-mentioned all alternatives, can adopt and combine arbitrarily formation optional embodiment of the present invention, this is no longer going to repeat them.
Fig. 2 is the method flow diagram of a kind of pictures taken according to an exemplary embodiment, and as shown in Figure 2, the method for this pictures taken is applied in terminal, comprises the following steps.
In step 201, according to current focal length value, judge currently whether be in shooting at close range scene, be in shooting at close range scene if current, then perform step 202, be not in shooting at close range scene if current, then perform step 203.
The size that the method provided due to the present embodiment is mainly used in comparison film before taking pictures carries out dynamic adjustments, thus according to the photo size after adjustment, takes.Therefore, before execution the present embodiment method, first can detect currently whether be in an action shot size pattern, be in an action shot size pattern if current, then can continue to perform the method that the present embodiment provides.Be not in an action shot size pattern if current, can step 207 be performed.Wherein, user can manual unlocking or close an action shot size pattern, and the present embodiment does not do concrete restriction to this.
The present embodiment to according to current focal length value, does not judge that the current mode whether being in shooting at close range scene does concrete restriction, includes but not limited to: current focal length value and default focal length threshold value are compared; If current focal length value is less than default focal length threshold value, then determine currently to be in shooting at close range scene.
Because focal length value is less, then take closely scene time can be clearer.Therefore, by pre-setting a focal length threshold value, when detecting that current focal length value is less than focal length threshold value, illustrate that user clearly may turn focal length value down in order to what allow closely scene capture, thus can determine currently to be in shooting at close range scene.
Because the follow-up comparison film size that needs reduces, when being in shooting at close range scene, viewing distance is closer, and coverage is less, thus makes the content comprised in the photo taking out can be more single.Due to when the content comprised in photo is more single, reduce photo size not too large for image definition impact.Therefore, the judged result in this step can be used as the foundation reducing photo size.
In step 202., according to the pixel in last frame preview graph before shooting, judge whether preview graph is complicated picture, complicated picture is the picture that complexity detected value is less than predetermined threshold value, if preview graph is complicated picture, then perform step 204, if preview graph is not complicated picture, then perform step 205.
The present embodiment, not to according to the pixel before shooting in last frame preview graph, judges that whether preview graph is that the mode of complicated picture does concrete restriction, includes but not limited to: the quantity of the edge pixel point in statistics preview graph and always pixel; By preview graph division unit lattice, the quantity of the cell that statistics edge pixel point occupies and total cell; Using the ratio between the quantity of edge pixel point and the quantity of total pixel as the first complexity detected value, the ratio between the quantity of cell occupied by edge pixel point and the quantity of total cell of division is as the second complexity detected value; When the first complexity detected value is less than the first predetermined threshold value, and when the second complexity detected value is less than the second predetermined threshold value, determine that preview graph is complicated picture.
The present embodiment does not do concrete restriction to the mode of the quantity of the edge pixel point in statistics preview graph and total pixel, includes but not limited to: by edge detection operator to the marginal information in preview graph, thus counts the quantity of edge pixel point in preview graph; In statistics preview graph edge surround pixel quantity in region, as the quantity of total pixel.Wherein, edge detection operator can detect the edge of image, determines which pixel is the edge pixel point of image, and can add up the quantity of edge pixel point.Edge detection operator can be selected according to demand, includes but not limited to Canny edge detection operator, Roberts edge detection operator, Prewitt edge detection operator and Sobel edge detection operator.
Such as, as shown in Figure 3.By edge detection operator, the broken edge of image in Fig. 3 can be detected, and add up the quantity of edge pixel point, the quantity as edge pixel point is 100.
In figure 3, the edge of image defines one piece of region, by detect surround the pixel in region, can count the quantity of the total pixel surrounding region, the quantity as total pixel is 500.
The present embodiment does not do concrete restriction to by the mode of preview graph division unit lattice, includes but not limited to: divide preview graph according to certain length and width spacing, obtain the preview graph after division unit lattice.Wherein, length and width spacing during division, the distance of a desirable pixel, also can get the distance of multiple pixel, and the present embodiment does not do concrete restriction to this.Such as, the preview graph of division unit lattice can be as shown in Figure 4.
By to preview graph division unit lattice, the quantity of the cell that edge pixel point occupies in preview graph and total cell quantity can be added up.Such as, in the diagram.Total cell quantity is (13 × 9)=117, and edge pixel point to surround the cell quantity that region occupies be (3+6+7+7+7+6+5)=41.
In the quantity of the quantity and total pixel that obtain edge pixel point, and after the quantity of the quantity of cell that occupies of edge pixel point and total cell of division, the first complexity detected value and the second complexity detected value can be calculated respectively.Such as, based on the data in previous example.First complexity detected value is (100/500)=0.2, and the second complexity detected value is (41/117)=0.35.
It should be noted that, when the first complexity detected value numerical value is less, the ratio that the edge pixel point of key diagram picture occupies in total pixel of image is less, and namely the pixel at image border place is less, the pixel comprised in image is more, i.e. the content more complicated of image.When the second complexity detected value is less, illustrate that the ratio that the area that this image occupies region occupies in overall area area is less, namely also have other images many in addition to this image in preview graph, thus can determine that the content comprised in preview graph is more.Such as, if preview graph is the preview graph of personage, then mainly may only include the image of personage in preview graph, the content comprised in preview graph is more single.If preview graph is the preview graph of scenery, then may comprise many contents in preview graph, as flower, bird and trees etc., the content namely comprised in preview graph greatly.
Therefore, two threshold values can being set statistics according to many data, by being compared with corresponding threshold value by complexity detected value, when each complexity detected value is less than corresponding threshold value, determining whether preview graph is complicated picture.Such as, can arrange first threshold is 0.4, and Second Threshold is 0.5.Due in the above example, the first complexity detected value 0.2 is less than first threshold 0.5, and the second complexity detected value 0.35 is less than Second Threshold 0.6.Therefore, can determine that preview graph is complicated picture.It should be noted that, when any one complexity detected value is not less than corresponding threshold value, then can determine that preview graph is not complicated picture.
Because the follow-up comparison film size that needs reduces, when preview graph is not complicated picture, in view of the time interval between preview graph and the photo next taken is very short, can determine that the photo taking out is not also complicated picture, the content comprised in photo is more single.Due to when the content comprised in photo is more single, reduce photo size not too large for image definition impact.Therefore, the judged result in this step can be used as the foundation reducing photo size.
In step 203, according to the overall brightness value of preview graph, judge currently whether be in half-light scene, be in half-light scene if current, then perform step 202, be not in half-light scene if current, then perform step 204.
Judge current whether be in half-light scene before, can obtain the overall brightness value of preview graph, the present embodiment does not do concrete restriction to the mode of overall brightness value obtaining preview graph, includes but not limited to: the brightness value obtaining each pixel in preview graph; According to the brightness value of each pixel, calculate the average brightness value of all pixels, using the average brightness value that the calculates overall brightness value as preview graph.
The present embodiment, not to the overall brightness value according to preview graph, judges that the current mode whether being in half-light scene does concrete restriction, includes but not limited to: overall brightness value and brightness value threshold value are compared; When overall brightness value is greater than brightness value threshold value, then can determine currently not to be in half-light scene; When overall brightness value is not more than luminance threshold, then can determine currently to be in half-light scene.
Because follow-up needs reduces photo size, when photo is in half-light scene, because image in photo is not too bright, photo content itself is not clear, thus it is not too large for image definition impact to reduce photo size.Therefore, in this step, judged result can be used as the foundation reducing photo size.
In step 204, judge whether preview graph is fringe, if preview graph is fringe, then perform step 205, if preview graph is not fringe, then perform step 207.
The present embodiment to judging that whether preview graph is that the mode of fringe does concrete restriction, does not include but not limited to: the gradient direction calculating each edge pixel point in preview graph; Determine the first pixel that each edge pixel point gray value that position is nearest on the gradient direction of correspondence is minimum and the second pixel that each edge pixel point gray value that position is nearest on the rightabout of corresponding gradient direction is maximum; The coordinate of first pixel corresponding according to each edge pixel point and the coordinate of the second pixel, calculate the border width of each edge pixel point; According to the gradient direction of each edge pixel point, add up the quantity of fuzzy edge pixel point at least four preset directions, fuzzy edge pixel is the edge pixel point that border width is greater than the 3rd predetermined threshold value; If the total quantity that on arbitrary preset direction, the quantity of fuzzy edge pixel point is greater than fuzzy edge pixel point on the 4th predetermined threshold value or all preset directions is greater than the 5th predetermined threshold value, then determine that preview graph is fringe.
About the mode of the gradient direction of each edge pixel point calculated in preview graph, the present embodiment does not do concrete restriction to this, includes but not limited to: calculate each edge pixel point in two-dimensional coordinate system, the derivative in the inverse of X-direction and Y-direction; By the ratio between the derivative in Y-direction and the derivative in X-direction, negate tan; Using the gradient direction of the result of calculation of each arctan function as each edge pixel point.
Wherein, said process can be identified by following formula (1):
θ = tan - 1 ( Gy Gx ) - - - ( 1 )
Gy is the derivative in edge pixel point Y-direction, and Gx is the derivative in edge pixel point X-direction, and θ is the gradient direction of edge pixel point.Conveniently subsequent calculations process, can carry out to calculating θ the angle that naturalization becomes convenient calculating.Such as, the angle after the span of θ and naturalization is given in table 1.
Table 1
Naturalization rear to The span of θ
0 -23<θ<23
45 23≤θ≤67
90 67<θ<113
135 113≤θ≤157
180 157 < θ < 180 or-180 < θ <-157
-45 -67≤θ≤-23
-90 -113<θ<-67
-135 -157≤θ≤-113
Such as, when being 22 degree by above-mentioned formulae discovery angle out, according to upper table 1, can determine that the angle after naturalization is 0 degree.
In addition, calculate each edge pixel point in two-dimensional coordinate system, the derivative in the inverse of X-direction and Y-direction calculates by edge detection operator, and the present embodiment does not do concrete restriction to this.Wherein, the edge detection operator of use can any one edge detection operator in step 202 in embodiment corresponding to above-mentioned Fig. 2, and the present embodiment does not do concrete restriction to this yet.
Determining the gradient direction of each edge pixel point, the pixel on the gradient direction of each edge pixel point can retrieved, thus can determine with the position of each edge pixel point recently and minimum the first pixel of gray value.Retrieve the pixel on the rightabout of the gradient direction of each edge pixel point, thus can determine with the position of each edge pixel point recently and maximum the second pixel of gray value.Need due to follow-up the border width calculating each edge pixel point, therefore, after the first pixel determining each edge pixel point and the second pixel, the coordinate of the first pixel and the second pixel can be stored simultaneously.Wherein, the gray value of pixel is color depth a little, and span is generally 0 to 255.
Such as, in Figure 5, ordinate is the gray value of pixel, and abscissa is the distance on gradient direction.On the gradient direction of edge pixel point P, position recently and minimum the first pixel of gray value is P1, and on the rightabout of the gradient direction of edge pixel point P, position recently and maximum the second pixel of gray value is P2.
The present embodiment is not to according to the coordinate of the first pixel corresponding to each edge pixel point and the coordinate of the second pixel, the mode calculating the border width of each edge pixel point does concrete restriction, include but not limited to: by the distance between the coordinate of the first corresponding for each edge pixel point pixel and the coordinate of the second pixel, as the border width of each edge pixel point.
Such as, with the coordinate of the first pixel for (x1, y1), the coordinate of the second pixel is (x2, y2) is example, and the formula (2) calculating distance can be as follows:
LocW = ( x 1 - x 2 ) 2 + ( y 1 + y 2 ) 2 - - - ( 2 )
Wherein, LocW is the border width of edge pixel point.When the LocW value that some edge pixel points calculate is greater than the 3rd predetermined threshold value, then can determine that this edge pixel point is fuzzy edge pixel.
According to foregoing, after the gradient direction naturalization of edge pixel point, have 8 directions, for the ease of the edge pixel point on statistics different directions, above-mentioned 8 directions can be merged into 4 preset directions.Such as, above-mentioned 8 directions can be merged into 4 directions up and down.Wherein, spend and can merge into right direction for 0 degree, 45 degree and-135,90 degree is upper direction, and spend and can merge into left direction for 135 degree, 180 and-45 ,-90 degree are lower direction.Certainly, except merging into above-mentioned 4 preset directions, also can adopt other merging mode, merge and obtain more direction, the present embodiment does not do concrete restriction to this.It should be noted that, the quantity of preset direction is at least four.
After determining preset direction, according to the gradient direction of each fuzzy edge pixel, the preset direction belonging to each fuzzy edge pixel can be determined.Such as, be 45 degree with the gradient direction after the naturalization of certain fuzzy edge pixel, then can determine that this preset direction belonging to fuzzy edge pixel is right direction.After determining the preset direction belonging to each fuzzy edge pixel, the quantity of fuzzy edge pixel point on each preset direction can be added up.Such as, be up and down for preset direction, the quantity of fuzzy edge pixel point on four direction up and down can be added up respectively.Wherein, the quantity of upper direction fuzzy edge pixel is 50, and the quantity of right direction fuzzy edge pixel is 40, and the quantity of lower direction fuzzy edge pixel is 60, and the quantity of left direction fuzzy edge pixel is 30.
With the 4th predetermined threshold value for 50, the 5th predetermined threshold value is 150 is example.Due in above-mentioned example, the quantity of lower direction fuzzy edge pixel is that 60 to be greater than the 4th predetermined threshold value be 50.Therefore, can determine that preview graph is fringe.Now, the fringe of preview graph is mainly fuzzy in one direction.
Or due in above-mentioned example, on four direction, the total quantity of fuzzy edge pixel point is 180, is greater than the 5th predetermined threshold value 150.Therefore, can determine that preview graph is fringe.Now, the fringe of preview graph is overall fuzzy.
Because the follow-up comparison film size that needs reduces, when preview graph is fringe, in view of the time interval between preview graph and the photo next taken is very short, can determine that the photo taking out is also fringe, the content comprised in photo is more unclear.During owing to relatively not knowing when the content comprised in photo, reduce photo size not too large for image definition impact.Therefore, the judged result in this step can be used as the foundation reducing photo size.
In step 205, according to the pixel in preview graph, adjustment photo size.
Due in above-mentioned steps, can after judging that preview graph is fringe, perform this step again, or after judging that preview graph is not as complicated picture, then this step can be performed, and in varied situations, according to the pixel in preview graph, the mode of adjustment photo size is different, existing for above-mentioned two kinds of different situations, to according to the pixel in preview graph, the mode of adjustment photo size explains.
The first situation: judge preview graph not as after complicated picture, then perform this step 205.
The present embodiment is not to according to the pixel in preview graph, the mode of adjustment photo size does concrete restriction, include but not limited to: the size reducing preview graph, until in preview graph after reducing, ratio between the quantity of the quantity of edge pixel point and total pixel is not less than the first predetermined threshold value, or till the ratio between the quantity of cell that occupies of edge pixel point and the quantity of total cell of division is not less than the second predetermined threshold value; Using the photo size that satisfies condition as the photo size after adjustment.
Wherein, the size reducing preview graph can reduce according to the size that total number of pixels rank is corresponding, and the present embodiment does not do concrete restriction to this.Such as, the pixel of camera has 300,000 pixels, 1,300,000 pixels, 2,000,000 pixels, 5,000,000 pixels etc., and the photo that the camera of often kind of total number of pixels rank is taken out has corresponding size.Photo size as corresponding in 300,000 pixels is 5 cm x 3.5 centimetres, and photo size corresponding to 1,300,000 pixels is 9 cm x 6 centimetres, and photo size corresponding to 2,000,000 pixels is 11 cm x 8 centimetres, and photo size corresponding to 5,000,000 pixels is 17 cm x 13 centimetres.Wherein, if the maximum pixel total quantity of camera is 5,000,000, because preview graph is the basic photographs in maximum pixel total quantity, therefore, preview graph is of a size of 17 cm x 13 centimetres, according to total number of pixels rank from high to low, can reduce the size of preview graph gradually.
Be not complicated picture with preview graph, preview graph original dimension is 17 cm x 13 centimetres is example.According to listed above go out photo size, the size of preview graph can be reduced into 11 cm x 8 centimetres.After reducing the size of preview graph, can according to the procedure in above-mentioned steps 202, recalculate the ratio between the quantity of cell and the quantity of total cell of division that ratio between the quantity of edge pixel point in the preview graph after minification and the quantity of total pixel and edge pixel point occupy.
If the ratio between the quantity of the quantity of edge pixel point and total pixel is not less than the first predetermined threshold value, or the ratio between the quantity of cell that occupies of edge pixel point and the quantity of total cell of division is not less than the second predetermined threshold value, then can determine that 11 cm x 8 centimetres is the photo size after adjustment.If above-mentioned condition does not meet, then continue the size reducing preview graph, until condition meets, using the photo size that satisfies condition as the photo size after adjustment.
It should be noted that, due to when reducing photo size according to total number of pixels rank, camera has a minimum total number of pixels usually, and namely photo size has a minimum value.Therefore, when total number of pixels can not reduce again, photo size that can be corresponding using minimum total number of pixels is as the photo size after adjustment.Such as, if minimum pixel total quantity is 300,000 pixels, when reducing photo size in the manner described above, when photo size does not all satisfy condition, then can using photo size 5 cm x 3.5 centimetres corresponding for 300,000 pixels as the photo size after adjustment.
Certainly, except reducing gradually except photo size according to total number of pixels rank, can also obtain the photo size of user's input, using the photo size got as the photo size reduced, the present embodiment does not do concrete restriction to this.
The second situation: judge that preview graph is after fringe, then perform this step 205.
The present embodiment is not to according to the pixel in preview graph, the mode of adjustment photo size does concrete restriction, include but not limited to: the size reducing preview graph, until in preview graph after reducing, on arbitrary preset direction, the quantity of fuzzy edge pixel point is not more than the 4th predetermined threshold value, and till on all preset directions, the total quantity of fuzzy edge pixel point is not more than the 5th predetermined threshold value, the 4th predetermined threshold value is less than the 5th predetermined threshold value; Using the photo size that satisfies condition as the photo size after adjustment.
The present embodiment does not do concrete restriction to the mode of the size reducing preview graph, and detailed process with reference to the content of step 203 in embodiment corresponding to above-mentioned Fig. 2, can repeat no more herein.After reducing preview graph size, again according to the procedure in above-mentioned steps 603, the quantity of edge pixel point fuzzy on each preset direction can be calculated.If according to the quantity of edge pixel point fuzzy on each preset direction calculated, determine that the quantity of fuzzy edge pixel point on arbitrary preset direction is not more than the 4th predetermined threshold value, and the total quantity of fuzzy edge pixel point is not more than the 5th predetermined threshold value on all preset directions, then can determine this reduce after photo size be adjustment after photo size.If above-mentioned condition does not meet, then continue the size reducing preview graph, until condition meets, using the photo size that satisfies condition as the photo size after adjustment.
In step 206, according to the photo size after adjustment, take, perform step 208.
Wherein, the photo size after adjustment has corresponding total number of pixels.Therefore, after adjustment photo size, take by a corresponding total quantity pixel.Such as, the photo size after adjustment is 11 cm x 8 centimetres, then can be taken by 2,000,000 pixels.
It should be noted that, after taking pictures, user may also need to check in the later stage photo self taken, and therefore, the present embodiment additionally provides a kind of mode of preserving photo, and detailed process refers to subsequent step 208, and the present embodiment does not do concrete restriction to this.
In step 207, the preference size that the maximum photo size supported according to current camera or user are arranged, takes.
Wherein, the maximum photo size that current camera is supported can be photo size corresponding to current camera maximum pixel, and the present embodiment does not do concrete restriction to this.Such as, be 2,000,000 pixels for camera maximum pixel, then photo size is 11 cm x 8 centimetres.
In addition, user can arrange the size of preference voluntarily, and the present embodiment does not do concrete restriction to this.Such as, user can in photo size interface inputting preferences size, thus terminal can the preference size of recording user.
In a step 208, carry out compression to the photo of shooting to preserve.
The mode of preserving is compressed about carrying out the photo of shooting, the present embodiment does not do concrete restriction to this, include but not limited to by JPEG (Joint Picture Expert Group, associating picture experts group) compress mode that form is corresponding compresses, the data after compression preserved.
The method that disclosure embodiment provides, by according to current focal length value, judge currently whether be in shooting at close range scene, be in shooting at close range scene if current, according to the pixel in last frame preview graph before shooting, judge whether preview graph is complicated picture, if preview graph is not complicated picture, according to the pixel in preview graph, adjustment photo size, according to the photo size after adjustment, take.Due to photo size can be adjusted under the scene satisfied condition, make take less memory space during storage picture, thus save memory space.
Fig. 6 is the structural representation of the device of a kind of pictures taken according to an exemplary embodiment, this device is for performing the method for the pictures taken that any embodiment provides in the embodiment corresponding to above-mentioned Fig. 1 or Fig. 2, and the application of installation of this pictures taken is in terminal.With reference to Fig. 6, this device comprises the first judge module 601, second judge module 602, adjusting module 603 and taking module 604.
This first judge module 601 is configured to according to current focal length value, judges currently whether to be in shooting at close range scene;
This second judge module 602 is configured to when being in shooting at close range scene, according to the pixel in last frame preview graph before shooting, judges whether preview graph is complicated picture, and complicated picture is the picture that complexity detected value is less than predetermined threshold value;
This adjusting module 603 is configured to when preview graph is not for complicated picture, according to the pixel in preview graph, and adjustment photo size;
This taking module 604 is configured to the photo size after according to adjustment, takes.
In one embodiment, see Fig. 7, this device also comprises the 3rd judge module 605 and the first Executive Module 606.
3rd judge module 605 be configured to current be not in shooting at close range scene time, according to the overall brightness value of preview graph, judge currently whether be in half-light scene;
This first Executive Module 606 be configured to current be in half-light scene time, then perform according to the pixel in preview graph, judge that whether preview graph is the step of complicated picture.
In one embodiment, see Fig. 8, this device also comprises the 4th judge module 607 and the second Executive Module 608.
4th judge module 607 is configured to when preview graph is complicated picture, then judge whether preview graph is fringe, and wherein, fringe is determined by the edge pixel point on each preset direction in described preview graph;
This second Executive Module 608 is configured to when preview graph is fringe, then perform according to the pixel in preview graph, the step of adjustment photo size.
In one embodiment, see Fig. 9, this device also comprises the 3rd Executive Module 609.
3rd Executive Module 609 be configured to current be not in half-light scene time, then perform and judge that whether preview graph is the step of fringe.
In one embodiment, see Figure 10, this device also comprises the 4th Executive Module 66.
4th Executive Module 66 is configured to when preview graph is fringe, then perform according to the pixel in preview graph, the step of adjustment photo size.
In one embodiment, the second judge module 602, is configured to add up the quantity of edge pixel point in preview graph and total pixel; By preview graph division unit lattice, the quantity of the cell that statistics edge pixel point occupies and total cell; Using the ratio between the quantity of edge pixel point and the quantity of total pixel as the first complexity detected value, the ratio between the quantity of cell occupied by edge pixel point and the quantity of total cell of division is as the second complexity detected value; When the first complexity detected value is less than the first predetermined threshold value, and when the second complexity detected value is less than the second predetermined threshold value, determine that preview graph is complicated picture.
In one embodiment, the 4th judge module 607, is configured to the gradient direction of each edge pixel point calculated in preview graph; Determine the first pixel that each edge pixel point gray value that position is nearest on the gradient direction of correspondence is minimum and the second pixel that each edge pixel point gray value that position is nearest on the rightabout of corresponding gradient direction is maximum; The coordinate of first pixel corresponding according to each edge pixel point and the coordinate of the second pixel, calculate the border width of each edge pixel point; According to the gradient direction of each edge pixel point, add up the quantity of fuzzy edge pixel point at least four preset directions, fuzzy edge pixel is the edge pixel point that border width is greater than the 3rd predetermined threshold value; If the total quantity that on arbitrary preset direction, the quantity of fuzzy edge pixel point is greater than fuzzy edge pixel point on the 4th predetermined threshold value or all preset directions is greater than the 5th predetermined threshold value, then determine that preview graph is fringe.
In one embodiment, adjusting module 603, be configured to the size reducing preview graph, until in preview graph after reducing, ratio between the quantity of the quantity of edge pixel point and total pixel is not less than the first predetermined threshold value, or till the ratio between the quantity of cell that occupies of edge pixel point and the quantity of total cell of division is not less than the second predetermined threshold value; Using the photo size that satisfies condition as the photo size after adjustment.
In one embodiment, adjusting module 603, be configured to the size reducing preview graph, until in preview graph after reducing, on arbitrary preset direction, the quantity of fuzzy edge pixel point is not more than the 4th predetermined threshold value, and till on all preset directions, the total quantity of fuzzy edge pixel point is not more than the 5th predetermined threshold value, the 4th predetermined threshold value is less than the 5th predetermined threshold value; Using the photo size that satisfies condition as the photo size after adjustment.
The device that disclosure embodiment provides, by current be in shooting at close range scene time, according to the pixel before shooting in last frame preview graph, judge whether preview graph is complicated picture.When preview graph is not complicated picture, according to the pixel in preview graph, adjustment photo size, according to the photo size after adjustment, takes.Due to photo size can be adjusted under the scene satisfied condition, make take less memory space during storage picture, thus save memory space.
Figure 11 is the block diagram of a kind of terminal 1100 according to an exemplary embodiment.Such as, terminal 1100 can be mobile phone, computer, digital broadcast terminal, messaging devices, game console, flat-panel devices, Medical Devices, body-building equipment, personal digital assistant etc.
With reference to Figure 11, terminal 1100 can comprise following one or more assembly: processing components 1102, memory 1104, power supply module 1106, multimedia groupware 1108, audio-frequency assembly 1110, the interface 1112 of I/O (I/O), sensor cluster 1114, and communications component 1116.
The integrated operation of the usual control terminal 1100 of processing components 1102, such as with display, call, data communication, camera operation and record operate the operation be associated.Treatment element 1102 can comprise one or more processor 1120 to perform instruction, to complete all or part of step of above-mentioned method.In addition, processing components 1102 can comprise one or more module, and what be convenient between processing components 1102 and other assemblies is mutual.Such as, processing unit 1102 can comprise multi-media module, mutual with what facilitate between multimedia groupware 1108 and processing components 1102.
Memory 1104 is configured to store various types of data to be supported in the operation of equipment 1100.The example of these data comprises for any application program of operation in terminal 1100 or the instruction of method, contact data, telephone book data, message, picture, video etc.Memory 1104 can be realized by the volatibility of any type or non-volatile memory device or their combination, as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or CD.
The various assemblies that electric power assembly 1106 is terminal 1100 provide electric power.Electric power assembly 1106 can comprise power-supply management system, one or more power supply, and other and the assembly generating, manage and distribute electric power for terminal 1100 and be associated.
Multimedia groupware 1108 is included in the screen providing an output interface between described terminal 1100 and user.In certain embodiments, screen can comprise liquid crystal display (LCD) and touch panel (TP).If screen comprises touch panel, screen may be implemented as touch-screen, to receive the input signal from user.Touch panel comprises one or more touch sensor with the gesture on sensing touch, slip and touch panel.Described touch sensor can the border of not only sensing touch or sliding action, but also detects the duration relevant to described touch or slide and pressure.In certain embodiments, multimedia groupware 1108 comprises a front-facing camera and/or post-positioned pick-up head.When equipment 1100 is in operator scheme, during as screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive outside multi-medium data.Each front-facing camera and post-positioned pick-up head can be fixing optical lens systems or have focal length and optical zoom ability.
Audio-frequency assembly 1110 is configured to export and/or input audio signal.Such as, audio-frequency assembly 1110 comprises a microphone (MIC), and when terminal 1100 is in operator scheme, during as call model, logging mode and speech recognition mode, microphone is configured to receive external audio signal.The audio signal received can be stored in memory 1104 further or be sent via communications component 1116.In certain embodiments, audio-frequency assembly 1110 also comprises a loud speaker, for output audio signal.
I/O interface 1112 is for providing interface between processing components 1102 and peripheral interface module, and above-mentioned peripheral interface module can be keyboard, some striking wheel, button etc.These buttons can include but not limited to: home button, volume button, start button and locking press button.
Sensor cluster 1114 comprises one or more transducer, for providing the state estimation of various aspects for terminal 1100.Such as, sensor cluster 1114 can detect the opening/closing state of equipment 1100, the relative positioning of assembly, such as described assembly is display and the keypad of terminal 1100, the position of all right sense terminals 1100 of sensor cluster 1114 or terminal 1100 assemblies changes, the presence or absence that user contacts with terminal 1100, the variations in temperature of terminal 1100 orientation or acceleration/deceleration and terminal 1100.Sensor cluster 1114 can comprise proximity transducer, be configured to without any physical contact time detect near the existence of object.Sensor cluster 1114 can also comprise optical sensor, as CMOS or ccd image sensor, for using in imaging applications.In certain embodiments, this sensor cluster 1114 can also comprise acceleration transducer, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communications component 1116 is configured to the communication being convenient to wired or wireless mode between terminal 1100 and other equipment.Terminal 1100 can access the wireless network based on communication standard, as WiFi, 2G or 3G, or their combination.In one exemplary embodiment, communication component 1116 receives from the broadcast singal of external broadcasting management system or broadcast related information via broadcast channel.In one exemplary embodiment, described communication component 1116 also comprises near-field communication (NFC) module, to promote junction service.Such as, can based on radio-frequency (RF) identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, terminal 1100 can be realized, for performing the method for the pictures taken that any embodiment provides in the embodiment corresponding to above-mentioned Fig. 1 or Fig. 2 by one or more application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components.
The terminal that disclosure embodiment provides, by current be in shooting at close range scene time, according to the pixel before shooting in last frame preview graph, judge whether preview graph is complicated picture.When preview graph is not complicated picture, according to the pixel in preview graph, adjustment photo size, according to the photo size after adjustment, takes.Due to photo size can be adjusted under the scene satisfied condition, make take less memory space during storage picture, thus save memory space.
In the exemplary embodiment, additionally provide a kind of non-transitory computer-readable recording medium comprising instruction, such as, comprise the memory 1104 of instruction, above-mentioned instruction can perform said method by the processor 1120 of terminal 1100.Such as, described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc.
A kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is performed by the processor of terminal, make terminal can perform a kind of call method, the method comprises:
According to current focal length value, judge currently whether be in shooting at close range scene;
When being in shooting at close range scene, according to the pixel in last frame preview graph before shooting, judge whether preview graph is complicated picture, and complicated picture is the picture that complexity detected value is less than predetermined threshold value;
When preview graph is not complicated picture, according to the pixel in preview graph, adjustment photo size;
According to the photo size after adjustment, take.
The computer-readable recording medium that disclosure embodiment provides, by current be in shooting at close range scene time, according to the pixel before shooting in last frame preview graph, judge whether preview graph is complicated picture.When preview graph is not complicated picture, according to the pixel in preview graph, adjustment photo size, according to the photo size after adjustment, takes.Due to photo size can be adjusted under the scene satisfied condition, make take less memory space during storage picture, thus save memory space.
Those skilled in the art, at consideration specification and after putting into practice invention disclosed herein, will easily expect other embodiment of the present invention.The application is intended to contain any modification of the present invention, purposes or adaptations, and these modification, purposes or adaptations are followed general principle of the present invention and comprised the undocumented common practise in the art of the disclosure or conventional techniques means.Specification and embodiment are only regarded as exemplary, and true scope of the present invention and spirit are pointed out by claim below.
Should be understood that, the present invention is not limited to precision architecture described above and illustrated in the accompanying drawings, and can carry out various amendment and change not departing from its scope.Scope of the present invention is only limited by appended claim.

Claims (19)

1. a method for pictures taken, is characterized in that, described method comprises:
According to current focal length value, judge currently whether be in shooting at close range scene;
When being in shooting at close range scene, according to the pixel in last frame preview graph before shooting, judge whether described preview graph is complicated picture, and described complicated picture is the picture that complexity detected value is less than predetermined threshold value;
When described preview graph is not complicated picture, according to the pixel in described preview graph, adjustment photo size;
According to the photo size after adjustment, take.
2. method according to claim 1, is characterized in that, described according to current focal length value, judge current whether be in shooting at close range scene after, also comprise:
Be not in shooting at close range scene if current, according to the overall brightness value of described preview graph, judge currently whether be in half-light scene;
Be in half-light scene if current, then perform according to the pixel in described preview graph, judge that whether described preview graph is the step of complicated picture.
3. method according to claim 1 and 2, is characterized in that, described according to the pixel in described preview graph, after judging whether described preview graph is complicated picture, also comprises:
If described preview graph is complicated picture, then judge whether described preview graph is fringe, wherein, fringe is determined by the edge pixel point on each preset direction in described preview graph;
If described preview graph is fringe, then perform according to the pixel in described preview graph, the step of adjustment photo size.
4. method according to claim 3, is characterized in that, the described overall brightness value according to described preview graph, judge current whether be in half-light scene after, also comprise:
Be not in half-light scene if current, then perform and judge that whether described preview graph is the step of fringe.
5. method according to claim 4, is characterized in that, described judge whether described preview graph is fringe after, also comprise:
If described preview graph is fringe, then perform according to the pixel in described preview graph, the step of adjustment photo size.
6. method according to claim 1 and 2, is characterized in that, described according to the pixel in described preview graph, judges whether described preview graph is complicated picture, comprising:
Add up the quantity of edge pixel point in described preview graph and total pixel;
By described preview graph division unit lattice, the quantity of the cell that statistics edge pixel point occupies and total cell;
Using the ratio between the quantity of described edge pixel point and the quantity of described total pixel as the first complexity detected value, the ratio between the quantity of cell occupied by edge pixel point and the quantity of total cell of division is as the second complexity detected value;
When the first complexity detected value is less than the first predetermined threshold value, and when the second complexity detected value is less than the second predetermined threshold value, determine that described preview graph is complicated picture.
7. method according to claim 4, is characterized in that, describedly judges whether described preview graph is fringe, comprising:
Calculate the gradient direction of each edge pixel point in described preview graph;
Determine the first pixel that each edge pixel point gray value that position is nearest on the gradient direction of correspondence is minimum and the second pixel that each edge pixel point gray value that position is nearest on the rightabout of corresponding gradient direction is maximum;
The coordinate of first pixel corresponding according to each edge pixel point and the coordinate of the second pixel, calculate the border width of each edge pixel point;
According to the gradient direction of each edge pixel point, add up the quantity of fuzzy edge pixel point at least four preset directions, described fuzzy edge pixel is the edge pixel point that border width is greater than the 3rd predetermined threshold value;
If the total quantity that on arbitrary preset direction, the quantity of fuzzy edge pixel point is greater than fuzzy edge pixel point on the 4th predetermined threshold value or all preset directions is greater than the 5th predetermined threshold value, then determine that described preview graph is fringe.
8. method according to claim 6, is characterized in that, described according to the pixel in described preview graph, and adjustment photo size, comprising:
Reduce the size of described preview graph, until in described preview graph after reducing, ratio between the quantity of the quantity of edge pixel point and total pixel is not less than the first predetermined threshold value, or till the ratio between the quantity of cell that occupies of edge pixel point and the quantity of total cell of division is not less than the second predetermined threshold value;
Using the photo size that satisfies condition as the photo size after adjustment.
9. method according to claim 7, is characterized in that, described according to the pixel in described preview graph, and adjustment photo size, comprising:
Reduce the size of described preview graph, until in described preview graph after reducing, on arbitrary preset direction, the quantity of fuzzy edge pixel point is not more than the 4th predetermined threshold value, and till on all preset directions, the total quantity of fuzzy edge pixel point is not more than the 5th predetermined threshold value, described 4th predetermined threshold value is less than the 5th predetermined threshold value;
Using the photo size that satisfies condition as the photo size after adjustment.
10. a device for pictures taken, is characterized in that, described device comprises:
First judge module, for according to current focal length value, judges currently whether be in shooting at close range scene;
Second judge module, for when being in shooting at close range scene, according to the pixel in last frame preview graph before shooting, judges whether described preview graph is complicated picture, and described complicated picture is the picture that complexity detected value is less than predetermined threshold value;
Adjusting module, for when described preview graph is not complicated picture, according to the pixel in described preview graph, adjustment photo size;
Taking module, for according to the photo size after adjustment, takes.
11. devices according to claim 10, is characterized in that, described device also comprises:
3rd judge module, for current be not in shooting at close range scene time, according to the overall brightness value of described preview graph, judge currently whether be in half-light scene;
First Executive Module, for current be in half-light scene time, then perform according to the pixel in described preview graph, judge that whether described preview graph is the step of complicated picture.
12. devices according to claim 10 or 11, it is characterized in that, described device also comprises:
4th judge module, for when described preview graph is complicated picture, then judge whether described preview graph is fringe, wherein, fringe is determined by the edge pixel point on each preset direction in described preview graph;
Second Executive Module, for when described preview graph is fringe, then performs according to the pixel in described preview graph, the step of adjustment photo size.
13. devices according to claim 12, is characterized in that, described device also comprises:
3rd Executive Module, for current be not in half-light scene time, then perform and judge that whether described preview graph is the step of fringe.
14. devices according to claim 13, is characterized in that, described device also comprises:
4th Executive Module, for when described preview graph is fringe, then performs according to the pixel in described preview graph, the step of adjustment photo size.
15. devices according to claim 10 or 11, is characterized in that, described second judge module, for adding up the quantity of edge pixel point in described preview graph and total pixel; By described preview graph division unit lattice, the quantity of the cell that statistics edge pixel point occupies and total cell; Using the ratio between the quantity of described edge pixel point and the quantity of described total pixel as the first complexity detected value, the ratio between the quantity of cell occupied by edge pixel point and the quantity of total cell of division is as the second complexity detected value; When the first complexity detected value is less than the first predetermined threshold value, and when the second complexity detected value is less than the second predetermined threshold value, determine that described preview graph is complicated picture.
16. devices according to claim 13, is characterized in that, described 4th judge module, for calculating the gradient direction of each edge pixel point in described preview graph; Determine the first pixel that each edge pixel point gray value that position is nearest on the gradient direction of correspondence is minimum and the second pixel that each edge pixel point gray value that position is nearest on the rightabout of corresponding gradient direction is maximum; The coordinate of first pixel corresponding according to each edge pixel point and the coordinate of the second pixel, calculate the border width of each edge pixel point; According to the gradient direction of each edge pixel point, add up the quantity of fuzzy edge pixel point at least four preset directions, described fuzzy edge pixel is the edge pixel point that border width is greater than the 3rd predetermined threshold value; If the total quantity that on arbitrary preset direction, the quantity of fuzzy edge pixel point is greater than fuzzy edge pixel point on the 4th predetermined threshold value or all preset directions is greater than the 5th predetermined threshold value, then determine that described preview graph is fringe.
17. devices according to claim 15, it is characterized in that, described adjusting module, for reducing the size of described preview graph, until in described preview graph after reducing, ratio between the quantity of the quantity of edge pixel point and total pixel is not less than the first predetermined threshold value, or till the ratio between the quantity of cell that occupies of edge pixel point and the quantity of total cell of division is not less than the second predetermined threshold value; Using the photo size that satisfies condition as the photo size after adjustment.
18. devices according to claim 16, it is characterized in that, described adjusting module, for reducing the size of described preview graph, until in described preview graph after reducing, on arbitrary preset direction, the quantity of fuzzy edge pixel point is not more than the 4th predetermined threshold value, and till on all preset directions, the total quantity of fuzzy edge pixel point is not more than the 5th predetermined threshold value, described 4th predetermined threshold value is less than the 5th predetermined threshold value; Using the photo size that satisfies condition as the photo size after adjustment.
19. 1 kinds of terminals, is characterized in that, comprising:
Processor;
For the memory of storage of processor executable instruction;
Wherein, described processor is configured to:
According to current focal length value, judge currently whether be in shooting at close range scene;
When being in shooting at close range scene, according to the pixel in last frame preview graph before shooting, judge whether described preview graph is complicated picture, and described complicated picture is the picture that complexity detected value is less than predetermined threshold value;
When described preview graph is not complicated picture, according to the pixel in described preview graph, adjustment photo size;
According to the photo size after adjustment, take.
CN201410829928.0A 2014-12-26 2014-12-26 Shoot the method, apparatus and terminal of picture Active CN104539846B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410829928.0A CN104539846B (en) 2014-12-26 2014-12-26 Shoot the method, apparatus and terminal of picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410829928.0A CN104539846B (en) 2014-12-26 2014-12-26 Shoot the method, apparatus and terminal of picture

Publications (2)

Publication Number Publication Date
CN104539846A true CN104539846A (en) 2015-04-22
CN104539846B CN104539846B (en) 2018-02-23

Family

ID=52855308

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410829928.0A Active CN104539846B (en) 2014-12-26 2014-12-26 Shoot the method, apparatus and terminal of picture

Country Status (1)

Country Link
CN (1) CN104539846B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105812572A (en) * 2016-04-27 2016-07-27 努比亚技术有限公司 Image saving method and terminal
CN106874444A (en) * 2017-02-09 2017-06-20 北京小米移动软件有限公司 Image processing method and device
CN110855881A (en) * 2019-11-01 2020-02-28 RealMe重庆移动通信有限公司 Shooting processing method and device, storage medium and electronic equipment
CN110855882A (en) * 2019-11-01 2020-02-28 RealMe重庆移动通信有限公司 Shooting processing method and device, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1665269A (en) * 2005-04-18 2005-09-07 北京中星微电子有限公司 A method and apparatus for changing digital image size during process of shooting
CN101996389A (en) * 2009-08-24 2011-03-30 株式会社尼康 Image processing device, imaging device, and image processing program
US20110310274A1 (en) * 2010-06-22 2011-12-22 Nikon Corporation Image-capturing device, image reproduction device, and image reproduction method
CN103631599A (en) * 2013-12-11 2014-03-12 Tcl通讯(宁波)有限公司 Photographic processing method, system and mobile terminal
US20140362258A1 (en) * 2013-06-10 2014-12-11 Olympus Corporation Image processing apparatus, image processing method, and computer readable recording medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1665269A (en) * 2005-04-18 2005-09-07 北京中星微电子有限公司 A method and apparatus for changing digital image size during process of shooting
CN101996389A (en) * 2009-08-24 2011-03-30 株式会社尼康 Image processing device, imaging device, and image processing program
US20110310274A1 (en) * 2010-06-22 2011-12-22 Nikon Corporation Image-capturing device, image reproduction device, and image reproduction method
US20140362258A1 (en) * 2013-06-10 2014-12-11 Olympus Corporation Image processing apparatus, image processing method, and computer readable recording medium
CN103631599A (en) * 2013-12-11 2014-03-12 Tcl通讯(宁波)有限公司 Photographic processing method, system and mobile terminal

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105812572A (en) * 2016-04-27 2016-07-27 努比亚技术有限公司 Image saving method and terminal
CN106874444A (en) * 2017-02-09 2017-06-20 北京小米移动软件有限公司 Image processing method and device
CN110855881A (en) * 2019-11-01 2020-02-28 RealMe重庆移动通信有限公司 Shooting processing method and device, storage medium and electronic equipment
CN110855882A (en) * 2019-11-01 2020-02-28 RealMe重庆移动通信有限公司 Shooting processing method and device, storage medium and electronic equipment
CN110855882B (en) * 2019-11-01 2021-10-08 RealMe重庆移动通信有限公司 Shooting processing method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN104539846B (en) 2018-02-23

Similar Documents

Publication Publication Date Title
US11704771B2 (en) Training super-resolution convolutional neural network model using a high-definition training image, a low-definition training image, and a mask image
US8120641B2 (en) Panoramic photography method and apparatus
CN106572389A (en) Method and apparatus for adjusting display image
CN104683691B (en) Image pickup method, device and equipment
CN106657780B (en) Image preview method and device
CN104090735B (en) The projecting method and device of a kind of picture
CN107888984B (en) Short video playing method and device
CN104243819A (en) Photo acquiring method and device
CN104519282A (en) Image shooting method and device
CN107155060A (en) Image processing method and device
CN104869308A (en) Picture taking method and device
CN105491289A (en) Method and device for preventing photographing occlusion
EP3379805B1 (en) Method, apparatus for controlling a smart device and computer storage medium
CN104869314A (en) Photographing method and device
CN104700353A (en) Image filter generating method and device
CN105631803A (en) Method and device for filter processing
CN105282441A (en) Photographing method and device
CN105516586A (en) Picture shooting method, device and system
CN104168422A (en) Image processing method and device
CN105631804A (en) Image processing method and device
CN105323491A (en) Image shooting method and device
CN105208284A (en) Photographing reminding method and device
CN104850487A (en) Information display method and device
CN104539846A (en) Picture shooting method, device and terminal
US11222235B2 (en) Method and apparatus for training image processing model, and storage medium

Legal Events

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