WO2017143654A1 - 选择待输出照片的方法、拍照方法、装置及存储介质 - Google Patents

选择待输出照片的方法、拍照方法、装置及存储介质 Download PDF

Info

Publication number
WO2017143654A1
WO2017143654A1 PCT/CN2016/080256 CN2016080256W WO2017143654A1 WO 2017143654 A1 WO2017143654 A1 WO 2017143654A1 CN 2016080256 W CN2016080256 W CN 2016080256W WO 2017143654 A1 WO2017143654 A1 WO 2017143654A1
Authority
WO
WIPO (PCT)
Prior art keywords
roi
value
metric
frame image
metric value
Prior art date
Application number
PCT/CN2016/080256
Other languages
English (en)
French (fr)
Inventor
张敬
朱育飞
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017143654A1 publication Critical patent/WO2017143654A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals

Definitions

  • the present application relates to the field of communications, for example, to a method for selecting a photo to be output, a photographing method, an apparatus, and a storage medium.
  • the resolution of the entire image is usually used as a measure.
  • the current method of selecting image output there is a method of simultaneously buffering a plurality of frames of images, and calculating a high-frequency response value of each frame image as a sharpness value, and then selecting the clearest frame image as an output, thereby realizing prevention Shake the purpose.
  • the above method based on multi-frame preferred high-frequency response values is to calculate the sharpness of the entire image, which makes the objects that are not interested or unimportant participate in the calculation. Therefore, how to select the image to be output is more critical.
  • the above method of selecting an output image can only select the best image output for the whole image. This way, the user is not interested or unimportant objects to participate in the calculation, and the output image may not be what the user wants, the user. The experience is lower.
  • the embodiment of the invention provides a method for selecting a photo to be output, a photographing method, a device and a storage medium, and the method for selecting an output image can only select the best image for the output, so that the user is not interested or Unimportant objects participate in the calculation, and may output images that the user does not want, resulting in a lower user experience.
  • an embodiment of the present invention provides a method for selecting a photo to be output, including: calculating a metric value of a Region of Interest (ROI) of each cached frame image, where the metric is used for Measure an average sharpness of the image within the ROI; select a largest metric value among all metric values; and obtain a cached frame image corresponding to the largest metric value, and output the cached frame image.
  • ROI Region of Interest
  • calculating a metric of the ROI of each cached frame image including: according to each of the ROIs The pixel values of the pixels determine the sharpness corresponding to each pixel; and the sum of the sharpness of all the pixels in the ROI divided by the number of all the pixels in the ROI, the average clarity of the ROI is obtained Degree as the metric of the ROI.
  • the calculating the metric value of the ROI of each cached frame image includes: calculating a high frequency response value of the ROI according to the preset template, where the preset template includes one of the following: a Sobel template, a gradient template, A bilateral total variation template; or, a Fourier transform or a wavelet transform is used to obtain a high frequency response value of the ROI.
  • the preset template includes one of the following: a Sobel template, a gradient template, A bilateral total variation template; or, a Fourier transform or a wavelet transform is used to obtain a high frequency response value of the ROI.
  • calculating a high frequency response value of the ROI according to the Sobel template including: calculating a convolution response value of each pixel in the ROI according to a Sobel template; and selecting a convolution response value greater than a preset convolution threshold a pixel, and counts the sum of the total number of selected pixels and the convolved response value of the selected pixel; and dividing the sum of the convolved response values by the total number to obtain the The average convolution response value of the pixels within the ROI to set the average convolution response value to a measure of the ROI.
  • the determining method of the ROI includes one of: using a focus area of the image as the ROI; and using an area manually selected by a user as the ROI.
  • an embodiment of the present invention provides a photographing method, including: acquiring an ROI of a cached frame image and an image before receiving a photographing instruction; calculating a metric value of an ROI of each cached frame image, wherein the metric value Means for measuring an average sharpness of the image within the ROI; selecting a largest metric value among all the metric values; and outputting an image corresponding to the largest metric value as a photographing result when receiving the photographing instruction.
  • calculating a metric of the ROI of each cached frame image including: determining, according to a pixel value of each pixel in the ROI, a resolution corresponding to each pixel; and using all the pixels in the ROI The sum of the sharpness is divided by the number of all pixels in the ROI to obtain the average sharpness of the ROI as a measure of the ROI.
  • the calculating the metric value of the ROI of each cached frame image includes: calculating a high frequency response value of the ROI according to the preset template, where the preset template includes one of the following: a Sobel template, a gradient template, A bilateral total variation template; or, a Fourier transform or a wavelet transform is used to obtain a high frequency response value of the ROI.
  • the preset template includes one of the following: a Sobel template, a gradient template, A bilateral total variation template; or, a Fourier transform or a wavelet transform is used to obtain a high frequency response value of the ROI.
  • calculating a high frequency response value of the ROI according to the Sobel template including: calculating a convolution response value of each pixel in the ROI according to a Sobel template; and selecting a convolution response value greater than a preset convolution threshold Pixels, and count the total number of selected pixels and the convolved response of the selected pixel a sum of values; and dividing the sum of the convolutional response values by the total number to obtain an average convolutional response value of pixels within the ROI to set the average convolutional response value to a measure of the ROI value.
  • selecting the largest metric in all the metrics includes: determining whether the metric of the ROI of the current cached frame image is greater than a pre-stored historical maximum metric; and the metric of the ROI is greater than the historical maximum metric.
  • the historical maximum metric value is modified to a value corresponding to the metric value of the ROI to update the historical maximum metric value; where the metric value of the ROI is not greater than the historical maximum metric value And retaining the historical maximum metric value; and continuing to determine the metric value of the ROI of the next current cached frame image and the size of the historical maximum metric value, until the photographing occurrence time stops determining, and the current historical maximum metric is The value is taken as the largest metric.
  • the photographing method before the acquiring the ROI of the cached frame image and the image, the photographing method further includes: determining whether the ROI is determined by using an autofocus method; if yes, determining an area corresponding to the current focus as the ROI, if not, Then, the area manually selected by the user is taken as the ROI.
  • an embodiment of the present invention provides an apparatus for selecting a photo to be output, including: a first calculating module, configured to calculate a metric value of an ROI, where the metric value is used to measure an average clearness of an image in the ROI. a first selection module configured to select a largest metric value among all metric values; and an output module configured to acquire a cache frame image corresponding to the largest metric value and output the cache frame image.
  • the first calculating module includes: a first calculating unit, configured to determine a resolution corresponding to each pixel point according to a pixel value of each pixel in the ROI; and a second calculating unit, configured to use The sum of the sharpness of all the pixels in the ROI is divided by the number of all the pixels in the ROI, and the average sharpness of the ROI is obtained as a measure of the ROI.
  • the first calculating module is configured to calculate a high frequency response value of the ROI according to a preset template, where the preset template includes one of the following: a Sobel template, a gradient template, and a bilateral total variation template.
  • the high frequency response value of the ROI is obtained by using a Fourier transform or a wavelet transform.
  • the first calculating module includes: the first calculating unit, configured to calculate a convolution response value of each pixel in the ROI according to a Sobel template; and the second calculating unit is set to select A pixel whose convolution response value is greater than a preset convolution threshold, and counts the sum of the total number of selected pixels and the convolved response value of the selected pixel, and divides the sum of the convolution responses by The total number is obtained to obtain an average convolution response value of pixels in the ROI to use the average convolution response value as a metric value of the ROI.
  • an embodiment of the present invention provides a photographing apparatus, including: an obtaining module, configured to acquire an ROI of a cached frame image and a cached frame image before receiving a photographing instruction; and a second calculating module configured to calculate each cache a metric of an ROI of the frame image, wherein the metric value is used to measure an average sharpness of an image within the ROI; a second selection module is configured to select a largest metric value among all metric values; and a camera module, setting In order to receive the photographing instruction, the image corresponding to the largest metric value is output as a photographing result.
  • the second calculating module includes: a third calculating unit, configured to determine a resolution corresponding to each pixel point according to a pixel value of each pixel in the ROI; and a fourth calculating unit, configured to use The sum of the sharpness of all the pixels in the ROI is divided by the number of all the pixels in the ROI, and the average sharpness of the ROI is obtained as a measure of the ROI.
  • the second calculating module is further configured to calculate a high frequency response value of the ROI according to a preset template, where the preset template includes one of the following: a Sobel template, a gradient template, and a bilateral total variation. Template; or, using a Fourier transform or wavelet transform to obtain a high frequency response value of the ROI.
  • a preset template includes one of the following: a Sobel template, a gradient template, and a bilateral total variation. Template; or, using a Fourier transform or wavelet transform to obtain a high frequency response value of the ROI.
  • the third calculating unit is configured to calculate a convolution response value of each pixel in the ROI according to the Sobel template; and the fourth calculating unit is configured to select a convolution response value greater than a preset convolution a pixel of the threshold, and counting the sum of the total number of selected pixels and the convolved response value of the selected pixel; dividing the sum of the convolved response values by the total number to obtain the The average convolution response value of the pixels within the ROI to set the average convolution response value to a measure of the ROI.
  • the second selecting module includes: a determining unit, configured to determine whether a metric value of an ROI of the current cached frame image is greater than a pre-stored historical maximum metric value; and a selecting unit configured to be a metric value in the ROI If the historical maximum metric is greater than the historical maximum metric, the historical maximum metric is modified to a value corresponding to the metric of the ROI to update the historical maximum metric; the metric of the ROI is not greater than the In the case of the historical maximum metric value, the historical maximum metric value is retained; the determining unit is further configured to continue to determine the metric value of the ROI of the next current cached frame image and the size of the historical maximum metric value until the photo taking occurs The determining unit is further configured to set the current historical maximum metric value as the maximum metric value.
  • the photographing apparatus further includes: a determining module, configured to determine whether to determine an ROI by using an autofocus method before acquiring an ROI of the cached frame image and the cached frame image; and the ROI determining module is configured to adopt an autofocus mode In the case of determining the ROI, determining the area corresponding to the current focus as the ROI; manually determining the ROI without using the auto focus mode The area acts as the ROI.
  • a determining module configured to determine whether to determine an ROI by using an autofocus method before acquiring an ROI of the cached frame image and the cached frame image
  • the ROI determining module is configured to adopt an autofocus mode In the case of determining the ROI, determining the area corresponding to the current focus as the ROI; manually determining the ROI without using the auto focus mode The area acts as the ROI.
  • an embodiment of the present invention provides an intelligent terminal, including: the device for selecting a photo to be output, or the camera device described above.
  • the embodiment of the present invention further provides a computer storage medium storing computer executable instructions, the computer executable instructions being configured to perform the method for selecting a photo to be output, or the method for photographing any of the above.
  • the embodiment of the invention further provides a device, the device comprising:
  • One or more processors are One or more processors;
  • One or more programs the one or more programs being stored in the memory, and when executed by the one or more processors, do the following:
  • the maximum metric value is selected among all the metric values; and when the photographing instruction is received, the image corresponding to the largest metric value is output as a photographing result.
  • the cached frame image with the largest metric value is outputted according to the calculated metric value.
  • This method takes the user's region of interest as the calculation focus, and does not calculate the entire The clarity of the image meets the user's needs, improves the user experience, and solves the problem of selecting the output image. Only the whole image can be selected for the clearest output, so that the user is not interested or unimportant objects participate in the calculation, and may output Images that the user does not want, resulting in a lower user experience.
  • FIG. 1 is a flowchart of a method for selecting a photo to be output in an embodiment of the present invention
  • FIG. 2 is a flowchart of a photographing method in an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of an apparatus for selecting a photo to be output in an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a first calculation module of a device for selecting a photo to be output in an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a photographing apparatus according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a second calculation module of a photographing apparatus according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a second selection module of a photographing apparatus according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a preferred structure of a photographing apparatus according to an embodiment of the present invention.
  • FIG. 9 is a flowchart of a method for determining an ROI in an optional embodiment 1 of the present invention.
  • FIG. 10 is a flowchart of a method for calculating a metric value in an optional embodiment 1 of the present invention
  • FIG. 11 is a schematic flowchart of a working process of a smart terminal in an optional embodiment 2 of the present invention.
  • FIG. 12 is a schematic diagram of a hardware structure of an apparatus for performing a method for selecting a photo to be output or a method for photographing according to an embodiment of the present invention.
  • the embodiment of the present invention provides a method for selecting a photo to be output, a photographing method, and a corresponding device thereof.
  • the embodiment of the invention provides a method for selecting a photo to be outputted.
  • the process of the method is as shown in FIG. 1 and includes steps S102 to S106:
  • the cached frame image with the largest metric value is outputted according to the calculated metric value.
  • This method takes the user's region of interest as the calculation focus, and avoids the whole
  • the image is calculated for clarity, which meets the user's needs and is improved.
  • the user experience solves the problem of selecting the output image. Only the best image clarity can be selected for output, so that users who are not interested or unimportant objects participate in the calculation, and may output images that the user does not want, resulting in a lower user experience. The problem.
  • the determining method of the ROI may include: using a focus area of the image as the ROI. For example, if the face autofocus mode is currently adopted, the face area collected by the focus is directly used as the ROI, or the area manually selected by the user may be used as the area. ROI.
  • the resolution corresponding to each pixel point may be determined according to the pixel value of each pixel point in the ROI; and then the sum of the sharpness of all the pixels in the ROI is used.
  • the average sharpness of the ROI is obtained as the metric of the ROI by the number of all the pixels in the ROI.
  • the metric value of the ROI may be calculated in various manners, for example, calculating a high frequency response value of the ROI according to the preset template, where the preset template includes one of the following: a Sobel template, a gradient template, a bilateral total variation template, or The Fourier transform or wavelet transform yields the high frequency response of the ROI.
  • the preset template is a Sobel template
  • the convolution response value of each pixel in the ROI is calculated according to the Sobel template; the pixel whose convolution response value is greater than the preset convolution threshold is selected, and the statistics are selected.
  • the sum of the total number of pixels and the convolved response of the selected pixel dividing the sum of the convolved response values by the total number to obtain an average convolution response value of the pixels within the ROI, and
  • the average convolution response value is taken as a measure of the ROI.
  • the embodiment of the present invention further provides a photographing method.
  • the flow of the method is as shown in FIG. 2, and includes steps S202 to S208:
  • S204 Calculate a metric value of an ROI of each cached frame image, where the metric value is used to measure an average sharpness of an image within the ROI;
  • the method senses the user.
  • the interest area is the focus of calculation, avoiding the definition of the entire image. Meet the user's needs and have a high user experience.
  • the resolution corresponding to each pixel point may be determined according to the pixel value of each pixel point in the ROI; and then the sum of the sharpness of all the pixels in the ROI is used.
  • the average sharpness of the ROI is obtained as the metric of the ROI by the number of all pixels in the ROI.
  • the process of calculating the metric value of the ROI of each cached frame image includes: calculating a high frequency response value of the ROI according to the preset template, wherein the preset template includes one of the following: a Sobel template, a gradient template, and a bilateral total variation Template; or, use a Fourier transform or wavelet transform to obtain the high frequency response of the ROI.
  • the following process may be included: determining whether the metric of the ROI of the current cached frame image is greater than a pre-stored historical maximum metric; if the metric of the ROI is greater than the historical maximum metric Modify the historical maximum metric to the value corresponding to the metric of the ROI to update the historical maximum metric; if the metric of the ROI is not greater than the historical maximum metric, retain the historical maximum metric; continue to determine the next current cache
  • the metric value of the ROI of the frame image and the size of the historical maximum metric value are stopped until the moment when the photographing occurs, and the current historical maximum metric value is taken as the largest metric value.
  • the ROI is determined by the autofocus method; if yes, the area corresponding to the current focus is determined as the ROI, and if not, the area manually selected by the user is taken as the ROI.
  • the embodiment of the present invention further provides an apparatus for selecting a photo to be outputted.
  • the structure of the apparatus is as shown in FIG. 3, and includes: a first calculating module 10 configured to calculate a metric value of the ROI, where the metric value is used to measure the ROI. The average resolution of the inner image; the first selection module 20, coupled to the first computing module 10, configured to select the largest metric among all metric values; and the output module 30 coupled to the first selection module 20 for setting The largest metric corresponds to the cached frame image and the cached frame image is output.
  • the structure of the first computing module 10 is shown in FIG. 4, and the first computing module 10 is also The first calculating unit 101 and the second calculating unit 102 are included, wherein the first calculating unit 101 is configured to determine the sharpness corresponding to each pixel point according to the pixel value of each pixel point in the ROI; the second calculating unit 102 is configured to use The sum of the sharpness of all the pixels in the ROI divided by the number of all pixels in the ROI, the average sharpness of the ROI is obtained as a measure of the ROI.
  • the first calculating module 10 may be configured to calculate a high frequency response value of the ROI according to the preset template, where the preset template includes one of the following: a Sobel template, a gradient template, a bilateral total variation template, or The high-resolution response of the ROI is obtained by a transform of the inner leaf or a wavelet transform.
  • the preset template includes one of the following: a Sobel template, a gradient template, a bilateral total variation template, or The high-resolution response of the ROI is obtained by a transform of the inner leaf or a wavelet transform.
  • the first calculating unit 101 may be configured to calculate a convolution response value of each pixel in the ROI according to the Sobel template; the first calculating unit 102 may be configured to select the convolution response value to be greater than a preset convolution threshold. a pixel, and counting the sum of the total number of selected pixels and the convolved response value of the selected pixel, dividing the sum of the convolved response values by the total number to obtain the pixels in the ROI The average convolution response value is used to take the average convolution response value as a measure of the ROI.
  • the embodiment of the present invention further provides a photographing device.
  • the structure of the device is as shown in FIG. 5, and includes: an obtaining module 40, configured to acquire an ROI of a cached frame image and an image before receiving a photographing instruction; and a second computing module 50, coupled with the acquisition module 40, configured to calculate a metric value of the ROI of each cached frame image, wherein the metric value is used to measure the average sharpness of the image within the ROI; and the second selection module 60 is coupled to the second computing module 50.
  • the camera module 70 is coupled to the second selection module 60, and is configured to output the image corresponding to the largest metric value as a photographing result when the photographing instruction is received.
  • the structure of the second calculation module 50 is as shown in FIG. 6 , and includes: a third calculation unit 501 configured to determine a resolution corresponding to each pixel point according to a pixel value of each pixel in the ROI; and a fourth calculation unit 502 And coupled to the third calculating unit 501, configured to divide the sum of the sharpness of all the pixels in the ROI by the number of all the pixels in the ROI to obtain the average sharpness of the ROI as the metric of the ROI.
  • the second calculating module 50 is further configured to calculate a high frequency response value of the ROI according to the preset template, where the preset template includes one of the following: a Sobel template, a gradient template, a bilateral total variation template, or a Fourier transform Or wavelet transform to obtain the high frequency response value of the ROI.
  • the preset template includes one of the following: a Sobel template, a gradient template, a bilateral total variation template, or a Fourier transform Or wavelet transform to obtain the high frequency response value of the ROI.
  • the third calculating unit 501 is configured to calculate a convolution response value of each pixel in the ROI according to the Sobel template; and the fourth calculating unit 502 is configured to select a pixel point whose convolution response value is greater than a preset convolution threshold. And counting the sum of the total number of selected pixels and the convolved response value of the selected pixel; The sum of the convolution response values is divided by the total number to obtain an average convolution response value for the pixels within the ROI to have an average convolution response value as a measure of the ROI.
  • the structure of the foregoing second selection module 60 is as shown in FIG. 7, and includes: a determining unit 601, configured to determine whether a metric value of an ROI of the current cached frame image is greater than a pre-stored historical maximum metric value; and a selecting unit 602,
  • the determining unit 601 is coupled to set the historical maximum metric value to a value corresponding to the metric value of the ROI to update the historical maximum metric value if the metric value of the ROI is greater than the historical maximum metric value; the metric value in the ROI is not greater than In the case of the historical maximum metric value, the historical maximum metric value is retained; the determining unit 601 is further configured to continue to determine the metric value of the ROI of the next current cached frame image and the size of the historical maximum metric value until the photographing occurrence time stops determining; Unit 602 is further configured to use the current historical maximum metric as the largest metric.
  • the photographing apparatus further includes: a determining module 80 configured to determine whether to determine an ROI by using an autofocus mode before acquiring a cached frame image and an ROI of the image; and the ROI determining module 90 And being coupled to the determining module 80 and the obtaining module 40, configured to determine an area corresponding to the current focus as the ROI when the ROI is determined by using the auto focus mode; and manually selecting the ROI if the ROI is not determined by the auto focus mode; The area acts as the ROI.
  • a determining module 80 configured to determine whether to determine an ROI by using an autofocus mode before acquiring a cached frame image and an ROI of the image
  • the ROI determining module 90 And being coupled to the determining module 80 and the obtaining module 40, configured to determine an area corresponding to the current focus as the ROI when the ROI is determined by using the auto focus mode; and manually selecting the ROI if the ROI is not determined by the auto focus mode; The area acts as the ROI.
  • the embodiment of the invention further provides an intelligent terminal, which comprises the above-mentioned device for selecting a photo to be output or a photographing device.
  • an intelligent terminal which comprises the above-mentioned device for selecting a photo to be output or a photographing device.
  • the scene provided by the embodiment of the present invention outputs a photo in a photographing scene.
  • the method can also be applied to the field of image processing.
  • the method provided in this embodiment can select the definition of the multi-frame image, thereby improving the quality of the output image.
  • the intelligent terminal implementing the method includes a photographing module, a cache frame storage module, an ROI determination module (corresponding to an acquisition module and a determination module), a metric value calculation module (corresponding to a calculation module), a comparison module (equivalent to a selection module), and an output module. (equivalent to the output module).
  • the camera module takes a picture of the scene and generates a cached frame image.
  • the cache frame storage module stores the focus area information corresponding to the cache frame image and the cache frame image.
  • the ROI determination module determines the ROI of the buffered frame image through the AF area information or the touch focus area information.
  • the metric calculation module calculates a metric corresponding to the ROI, and the metric includes the flatness of the pixels in the ROI Both sharpness.
  • the comparison module compares the metric values of the ROI of each frame of the cache frame storage module.
  • the output module outputs the image with the highest metric value as a photographing result.
  • the face detection mode that is, the face detection is turned on.
  • the ROI can be determined by using the method in the general mode.
  • the general mode selects a certain focus area in the image as the ROI according to the auto focus or the touch focus mode.
  • the metric calculation module calculates the metric of the ROI, and the metric includes the average sharpness, thereby completing the selection of the clarity.
  • the method provided by the embodiment of the present invention includes the following process:
  • Step 1 Take a picture of the scene and generate a cached frame image
  • Step 2 storing the focus area information corresponding to the cache frame image and the cache frame image;
  • Step 3 determining the ROI of the buffered frame image by using the auto focus area information or the touch focus area information;
  • Step 4 Calculate a metric corresponding to the ROI, where the metric includes an average sharpness of pixels within the ROI;
  • Step 5 Compare the metric value of the ROI of each frame image in the cache frame storage module
  • Step 6 Output the image with the highest metric as the result of the photo.
  • the above embodiments of the present invention can utilize the multi-frame preference technology to help the user improve the quality of the captured image when taking photos using the smartphone.
  • this embodiment shows a method for determining an ROI in two different photographing modes, including S901 to S906:
  • Step S901 Determine whether the current photographing mode is a face detecting mode. If yes, execute S902, if no, execute S904.
  • Step S902 Calling a face detection algorithm, and detecting whether a face exists in the cached frame image. If yes, execute S903, if no, execute S904.
  • Step S903 Determine the detected face area as the ROI.
  • Step S904 determining whether it is the auto focus mode. If yes, execute S905, if no, execute S906.
  • Step S905 Select an area near the center of the image as the ROI.
  • Step S906 Select an area near the touch center as the ROI.
  • an area in the image can be selected as the ROI, and the position, shape, and size of the area can be set according to actual conditions.
  • the central area of the image is selected as the ROI, and its shape is a rectangle whose length and width values are respectively the image length and width values multiplied by a ratio, such as 1/8, that is, "determine 1/8 width*1/8height around the center of the image"
  • the area acts as the ROI.
  • the touch focus mode can select an area in the image as the ROI, and the position, shape and size of the area can be set according to actual conditions.
  • the touch center area is selected as the ROI, and its shape is a rectangle.
  • the length and width values are respectively the image length and width values multiplied by a ratio, such as 1/16, that is, "determine 1/16width*1/16height around the center of the image".
  • the area acts as the ROI.
  • the process of the method for calculating the metric value provided by the embodiment is as follows.
  • a method for calculating the average sharpness of pixels in the ROI is used as a metric value, including steps S1001 to S1004:
  • Step S1001 Acquire an ROI, where the ROI may be an area obtained by autofocus or touch focus.
  • Step S1002 Calculate a convolution response value S of a Sobel (edge detection) template of the pixel X in the ROI.
  • each pixel is calculated by the Sobel template.
  • Step S1003 screening the convolution response value obtained above, wherein pixels larger than the threshold TH are selected, and the number of such pixels is counted up by N, and the convolution response value is summed and summed SumS.
  • Step S1004 Calculate the average sharpness AverS of the ROI.
  • the calculation of the sharpness measure can be performed under different color spaces, such as RGB, YUV, HSV, and the like. Because the human eye is more sensitive to changes in brightness than color changes. Therefore, as an alternative embodiment, the technique shown in this embodiment is only calculated in the luminance domain of the YUV color space, thereby reducing computational complexity.
  • the Sobel templates in the horizontal direction x and the vertical direction y provided by the embodiments of the present invention are respectively:
  • the convolution response is:
  • N ⁇ i # ⁇ S i >TH ⁇
  • TH is the threshold
  • the purpose of the screening is to reduce the noise interference
  • i is a non-negative integer
  • N is the total number of pixels in the ROI that satisfy the convolution value S greater than TH
  • the TH value can be based on the overall brightness of the image and the image.
  • the noise level is adaptively determined; # ⁇ is an indicative function, the condition satisfies a value of 1, and does not satisfy the value of 0.
  • the sum of the response values of the pixels that satisfy the threshold filter condition is:
  • the calculation method of the average sharpness AverS in step S1004 is as follows:
  • AverS SumS/N.
  • the Sobel template convolution in the above step S1002 can be replaced with other sharpness metrics, such as the magnitude of the gradient or the Bilateral Total Variaion (BTV), etc., which will not be described in detail herein.
  • BTV Bilateral Total Variaion
  • An embodiment of the present invention further provides an optional implementation manner, where the method includes: continuously capturing a cached frame image for the same scene, continuously calculating a metric value of the current cached frame image by using an algorithm, and continuously updating according to the comparison result.
  • the preferred frame is recorded, and the preferred frame is finally selected as the multi-frame preferred technique for photographing output. This process can significantly reduce the storage space of the cached frame image.
  • the smart terminal corresponding to the method includes a photographing module, a cache frame storage module, an ROI determination module, a metric value calculation module, a comparison module, an update module, a preferred frame storage module, and an output module.
  • the camera module takes a picture of the scene and generates a cached frame image.
  • the cache frame storage module stores the focus area information corresponding to the current cache frame image and the cache frame image.
  • the ROI determination module determines the ROI by the AF area information or the touch focus area information for clarity.
  • the metric calculation module calculates a metric corresponding to the current cached frame image ROI, and the metric includes an average sharpness of pixels within the ROI.
  • the comparison module compares the metric value of the current cached frame image ROI in the cache frame storage module with the metric value of the image ROI in the preferred frame storage module.
  • the update module updates the preferred frame with the current cached frame image and updates the corresponding metric if the metric of the current cached frame image is better.
  • the frame storage module stores the preferred frame image data and the metric value corresponding to the preferred frame image.
  • the output module outputs a preferred frame image as a photographing result.
  • FIG. 11 is a schematic flowchart of the working process of the smart terminal, including steps S1101 to S1107:
  • Step S1101 Acquire a current cached frame image, and add a cached frame count
  • Step S1102 determining whether the current cache count reaches the maximum number of frames; if yes, executing S1107, and if not, executing S1103.
  • Step S1103 determining an ROI according to different photographing modes
  • Step S1104 Calculate a metric value of the ROI
  • Step S1105 comparing with the metric value of the preferred frame, determining whether the current preferred frame is better; if yes, executing S1106, and if not, executing S1101.
  • Step S1106 update the preferred frame with the current cached frame image, and update the metric value of the preferred frame with the metric value of the current cached frame image;
  • Step S1107 The preferred frame is output as a captured image, and the cache frame count is set to zero.
  • the method of determining the ROI differs depending on the photographing mode (face detection mode, general mode). See the determination process of the ROI provided in the above optional embodiment 1.
  • the method for calculating the metric value is referred to the metric value calculation process provided in the above optional embodiment 1.
  • the calculation of the metric value in the metric calculation embodiment can also be performed in a complete color space, such as in three channels of YUV:
  • the above embodiment of the present invention provides a method for significantly improving the quality of a captured image by using a stored multi-frame image, by calculating a sharpness measure of the region of interest, and selecting the clearest picture as an output; ROI calculation can avoid the interference of non-important regions on the metrics; the ROI determination method can be flexibly switched according to the shooting model; a new average sharpness concept is proposed as the sharpness metric value, which can effectively reduce different images.
  • the image content is offset between the frames due to hand shake, resulting in an inconsistent number of high-frequency components; in addition, an optional solution is provided, which only needs to store two frames of images at most.
  • the previous method can effectively reduce storage consumption. With the method provided in this embodiment, the problem of poor quality of the captured image due to the jitter situation in the prior art can be effectively improved.
  • the embodiment of the present invention further provides a computer storage medium storing computer executable instructions, the computer executable instructions being configured to perform the method for selecting a photo to be output, or the method for photographing any of the above.
  • the present application can be implemented by software and necessary general hardware, and can also be implemented by hardware.
  • the technical solution of the embodiment of the present invention may be embodied in the form of a software product, which may be stored in a computer readable storage medium, such as a computer floppy disk or a read-only memory (Read-Only Memory, ROM). ), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the practice of the present invention The method described in the example.
  • the included units and modules are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be implemented;
  • the names of the functional units are also for convenience of distinguishing from each other and do not limit the scope of protection of the present application.
  • An embodiment of the present invention further provides a hardware structure diagram of an apparatus for performing a method of selecting a photo to be output.
  • the device includes:
  • One or more processors 120, one processor 120 is taken as an example in FIG. 3;
  • the device may also include an input device 122 and an output device 123.
  • the processor 120, the memory 121, the input device 122, and the output device 123 in the device may be connected by a bus or other means, and the bus connection is taken as an example in FIG.
  • the memory 121 is used as a computer readable storage medium, and can be used to store a software program, a computer executable program, such as a program instruction/module corresponding to a method for selecting a photo to be outputted in the embodiment of the present invention.
  • the processor 120 executes the function application and the data processing of the server by running the software program, the instruction and the module stored in the memory 121, that is, the method for selecting the photo to be output in the above method embodiment.
  • the memory 121 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the terminal device, and the like. Further, the memory 121 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other nonvolatile solid state storage device. In some examples, memory 121 can include memory remotely located relative to processor 120, which can be connected to the terminal device over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • Input device 122 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the terminal.
  • the output device 123 may include a display device such as a display screen.
  • the one or more modules are stored in the memory 121, and when executed by the one or more processors 120, perform the following operations:
  • the embodiment of the invention solves the problem that the mode of selecting an output image can only select the best image for the output, so that the user is not interested or the object that is not important participates in the calculation, and may output an image that the user does not want, resulting in a user experience. Low problem.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

一种选择待输出照片的方法、拍照方法、装置及存储介质,其中,选择待输出照片的方法包括:计算每个缓存帧图像的ROI的度量值,其中,度量值用于度量ROI内图像的平均清晰度;在所有度量值中选择最大的度量值;获取最大的度量值对应的缓存帧图像,并将缓存帧图像进行输出。

Description

选择待输出照片的方法、拍照方法、装置及存储介质 技术领域
本申请涉及通讯领域,例如涉及一种选择待输出照片的方法、拍照方法、装置及存储介质。
背景技术
在图像(照片)处理过程中,通常是以整个图像的清晰度作为衡量标准。例如,目前选择图像输出的方法中,有一种方法就是同时缓存多帧图像,并计算每一帧图像的高频响应值作为清晰性值,进而选取最清晰的一帧图像作为输出,从而实现防抖目的。上述的基于多帧优选高频响应值的方法,是针对整幅图像的清晰度进行计算,会使得不感兴趣或者不重要的物体参与计算,因此,如何选择要输出的图像就显得更为关键。
然而,上述选择输出图像的方式,只能选择整幅图像清晰性最好的进行输出,此种方式会使用户不感兴趣或者不重要的物体参与计算,输出的图像可能并非用户想要的,用户体验较低。
发明内容
本发明实施例提供一种选择待输出照片的方法、拍照方法、装置及存储介质,用以解决选择输出图像的方式中只能选择整幅图像清晰性最好的进行输出,使用户不感兴趣或者不重要的物体参与计算,可能输出用户不想要的图像,导致用户体验较低的问题。
一方面,本发明实施例提供一种选择待输出照片的方法,包括:计算每个缓存帧图像的感兴趣区域(Region of Interest,简称为ROI)的度量值,其中,所述度量值用于度量所述ROI内图像的平均清晰度;在所有度量值中选择最大的度量值;以及获取所述最大的度量值对应的缓存帧图像,并将所述缓存帧图像进行输出。
可选的,计算每个缓存帧图像的ROI的度量值,包括:根据所述ROI中每 个像素点的像素值确定每个像素点对应的清晰度;以及用所述ROI中所有像素点的清晰度之和除以所述ROI中所有像素点的个数,得到所述ROI的平均清晰度,以作为所述ROI的度量值。
可选的,计算每个缓存帧图像的ROI的度量值,包括:根据预设模板计算所述ROI的高频响应值,其中,所述预设模板包括以下之一:Sobel模板、梯度模板、双边全变差模板;或者,采用傅里叶变换或小波变换得到所述ROI的高频响应值。
可选的,根据所述Sobel模板计算所述ROI的高频响应值,包括:根据Sobel模板计算所述ROI内每个像素点的卷积响应值;选择卷积响应值大于预设卷积阈值的像素点,并统计已选择的像素点的总个数与已选择的像素点的卷积响应值之和;以及将所述卷积响应值之和除以所述总个数以得到所述ROI内像素的平均卷积响应值,以将所述平均卷积响应值为所述ROI的度量值。
可选的,所述ROI的确定方法包括以下之一:将所述图像的焦点区域作为所述ROI;将用户手动选择的区域作为所述ROI。
另一方面,本发明实施例提供一种拍照方法,包括:在接收到拍照指令之前,获取缓存帧图像及图像的ROI;计算每个缓存帧图像的ROI的度量值,其中,所述度量值用于度量所述ROI内图像的平均清晰度;在所有度量值中选择最大的度量值;以及在接收到拍照指令时,将所述最大的度量值对应的图像作为拍照结果进行输出。
可选的,计算每个缓存帧图像的ROI的度量值,包括:根据所述ROI中每个像素点的像素值确定每个像素点对应的清晰度;以及用所述ROI中所有像素点的清晰度之和除以所述ROI中所有像素点的个数,得到所述ROI的平均清晰度,以作为所述ROI的度量值。
可选的,计算每个缓存帧图像的ROI的度量值,包括:根据预设模板计算所述ROI的高频响应值,其中,所述预设模板包括以下之一:Sobel模板、梯度模板、双边全变差模板;或者,采用傅里叶变换或小波变换得到所述ROI的高频响应值。
可选的,根据所述Sobel模板计算所述ROI的高频响应值,包括:根据Sobel模板计算所述ROI内每个像素点的卷积响应值;选择卷积响应值大于预设卷积阈值的像素点,并统计已选择的像素点的总个数与已选择的像素点的卷积响应 值之和;以及将所述卷积响应值之和除以所述总个数以得到所述ROI内像素的平均卷积响应值,以将所述平均卷积响应值为所述ROI的度量值。
可选的,在所有度量值中选择最大的度量值,包括:判断当前缓存帧图像的ROI的度量值是否大于预存储的历史最大度量值;在所述ROI的度量值大于所述历史最大度量值的情况下,将所述历史最大度量值修改为所述ROI的度量值对应的值,以更新所述历史最大度量值;在所述ROI的度量值不大于所述历史最大度量值的情况下,保留所述历史最大度量值;以及继续判断下一个当前缓存帧图像的ROI的度量值与所述历史最大度量值的大小,直至拍照发生时刻停止判断,并将当前的所述历史最大度量值作为所述最大的度量值。
可选的,在获取缓存帧图像及图像的ROI之前,所述的拍照方法还包括:判断是否采用自动对焦方式确定ROI;如果是,则确定当前焦点所对应区域作为所述ROI,如果不是,则将用户手动选择的区域作为所述ROI。
另一方面,本发明实施例提供一种选择待输出照片的装置,包括:第一计算模块,设置为计算ROI的度量值,其中,所述度量值用于度量所述ROI内图像的平均清晰度;第一选择模块,设置为在所有度量值中选择最大的度量值;以及输出模块,设置为获取所述最大的度量值对应的缓存帧图像,并将所述缓存帧图像进行输出。
可选的,所述第一计算模块包括:第一计算单元,设置为根据所述ROI中每个像素点的像素值确定每个像素点对应的清晰度;以及第二计算单元,设置为用所述ROI中所有像素点的清晰度之和除以所述ROI中所有像素点的个数,得到所述ROI的平均清晰度,以作为所述ROI的度量值。
可选的,所述第一计算模块,设置为根据预设模板计算所述ROI的高频响应值,其中,所述预设模板包括以下之一:Sobel模板、梯度模板、双边全变差模板;或者,采用傅里叶变换或小波变换得到所述ROI的高频响应值。
可选的,所述第一计算模块包括:所述第一计算单元,设置为根据Sobel模板计算所述ROI内每个像素点的卷积响应值;以及所述第二计算单元,设置为选择卷积响应值大于预设卷积阈值的像素点,并统计已选择的像素点的总个数与已选择的像素点的卷积响应值之和,将所述卷积响应值之和除以所述总个数以得到所述ROI内像素的平均卷积响应值,以将所述平均卷积响应值作为所述ROI的度量值。
另一方面,本发明实施例提供一种拍照装置,包括:获取模块,设置为在接收到拍照指令之前,获取缓存帧图像及缓存帧图像的ROI;第二计算模块,设置为计算每个缓存帧图像的ROI的度量值,其中,所述度量值用于度量所述ROI内图像的平均清晰度;第二选择模块,设置为在所有度量值中选择最大的度量值;以及拍照模块,设置为在接收到拍照指令时,将所述最大的度量值对应的图像作为拍照结果进行输出。
可选的,所述第二计算模块包括:第三计算单元,设置为根据所述ROI中每个像素点的像素值确定每个像素点对应的清晰度;以及第四计算单元,设置为用所述ROI中所有像素点的清晰度之和除以所述ROI中所有像素点的个数,得到所述ROI的平均清晰度,以作为所述ROI的度量值。
可选的,所述第二计算模块,还设置为根据预设模板计算所述ROI的高频响应值,其中,所述预设模板包括以下之一:Sobel模板、梯度模板、双边全变差模板;或者,采用傅里叶变换或小波变换得到所述ROI的高频响应值。
可选的,所述第三计算单元,设置为根据Sobel模板计算所述ROI内每个像素点的卷积响应值;所述第四计算单元,设置为选择卷积响应值大于预设卷积阈值的像素点,并统计已选择的像素点的总个数与已选择的像素点的卷积响应值之和;将所述卷积响应值之和除以所述总个数以得到所述ROI内像素的平均卷积响应值,以将所述平均卷积响应值为所述ROI的度量值。
可选的,所述第二选择模块包括:判断单元,设置为判断当前缓存帧图像的ROI的度量值是否大于预存储的历史最大度量值;以及选择单元,设置为在所述ROI的度量值大于所述历史最大度量值的情况下,将所述历史最大度量值修改为所述ROI的度量值对应的值,以更新所述历史最大度量值;在所述ROI的度量值不大于所述历史最大度量值的情况下,保留所述历史最大度量值;所述判断单元,还设置为继续判断下一个当前缓存帧图像的ROI的度量值与所述历史最大度量值的大小,直至拍照发生时刻停止判断;所述选择单元,还设置为将当前的所述历史最大度量值作为所述最大的度量值。
可选的,所述拍照装置还包括:判断模块,设置为在获取缓存帧图像及缓存帧图像的ROI之前,判断是否采用自动对焦方式确定ROI;以及ROI确定模块,设置为在采用自动对焦方式确定ROI的情况下,确定当前焦点所对应区域作为所述ROI;在不采用自动对焦方式确定ROI的情况下,将用户手动选择的 区域作为所述ROI。
又一方面,本发明实施例提供一种智能终端,包括:以上所述的选择待输出照片的装置,或者,以上所述的拍照装置。
本发明实施例还提供一种计算机存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述任一项选择待输出照片的方法,或者,上述任一项拍照的方法。
本发明实施例还提供一种设备,该设备包括:
一个或多个处理器;
存储器;
一个或多个程序,所述一个或多个程序存储在所述存储器中,当被所述一个或多个处理器执行时,进行如下操作:
计算每个缓存帧图像的感兴趣区域ROI的度量值,其中,所述度量值用于度量所述ROI内图像的平均清晰度;在所有度量值中选择最大的度量值;以及获取所述最大的度量值对应的缓存帧图像,并将所述缓存帧图像进行输出;
或者
在接收到拍照指令之前,获取缓存帧图像及缓存帧图像的感兴趣区域ROI;计算每个缓存帧图像的ROI的度量值,其中,所述度量值用于度量所述ROI内图像的平均清晰度;在所有度量值中选择最大的度量值;以及在接收到拍照指令时,将所述最大的度量值对应的图像作为拍照结果进行输出。
本发明实施例仅对ROI的度量值进行计算,并针对计算出的度量值作为衡量标准,将度量值最大的缓存帧图像进行输出,该方法将用户感兴趣区域作为计算重点,不会计算整个图像的清晰度,符合用户使用需求,提高用户体验,解决了选择输出图像的方式只能选择整幅图像清晰性最好的进行输出,使用户不感兴趣或者不重要的物体参与计算,并可能输出用户不想要的图像,导致用户体验较低的问题。
附图说明
图1是本发明实施例中选择待输出照片的方法的流程图;
图2是本发明实施例中拍照方法的流程图;
图3是本发明实施例中选择待输出照片的装置的结构示意图;
图4是本发明实施例中选择待输出照片的装置第一计算模块的结构示意图;
图5是本发明实施例中拍照装置的结构示意图;
图6是本发明实施例中拍照装置第二计算模块的结构示意图;
图7是本发明实施例中拍照装置第二选择模块的结构示意图;
图8是本发明实施例中拍照装置的优选结构示意图;
图9是本发明可选实施例一中确定ROI的方法的流程图;
图10是本发明可选实施例一中度量值的计算方法的流程图;
图11是本发明可选实施例二中智能终端工作过程的流程示意图。
图12是本发明实施例提供的一种执行选择待输出照片的方法或者拍照的方法的设备的硬件结构示意图。
实施方式
为了解决选择输出图像的方式只能选择整幅图像清晰性最好的进行输出,使用户不感兴趣或者不重要的物体参与计算,并可能输出用户不想要的图像,导致用户体验较低的问题,本发明实施例提供了一种选择待输出照片的方法、拍照方法及其对应装置,以下结合附图以及实施例,对本发明实施例进行说明。
本发明实施例提供一种选择待输出照片的方法,该方法的流程如图1所示,包括步骤S102至S106:
S102,计算每个缓存帧图像的ROI的度量值,其中,度量值用于度量ROI内图像的平均清晰度;
S104,在所有度量值中选择最大的度量值;
S106,获取最大的度量值对应的缓存帧图像,并将缓存帧图像进行输出。
本发明实施例仅对ROI的度量值进行计算,并针对计算出的度量值作为衡量标准,将度量值最大的缓存帧图像进行输出,该方法将用户感兴趣区域作为计算重点,避免了对整个图像都进行清晰度计算,符合用户使用需求,提高用 户体验,解决了选择输出图像的方式只能选择整幅图像清晰性最好的进行输出,使用户不感兴趣或者不重要的物体参与计算,并可能输出用户不想要的图像,导致用户体验较低的问题。
ROI的确定方法可以包括:将图像的焦点区域作为ROI,例如,如果当前采用人脸自动对焦方式,则将焦点采集到的人脸区域直接作为ROI,或者,还可以将用户手动选择的区域作为ROI。
在计算每个缓存帧图像的ROI的度量值的过程中,可以根据ROI中每个像素点的像素值确定每个像素点对应的清晰度;再用ROI中所有像素点的清晰度之和除以所述ROI中所有像素点的个数,得到ROI的平均清晰度,以作为ROI的度量值。
可以使用多种方式计算ROI的度量值,例如,根据预设模板计算ROI的高频响应值,其中,预设模板包括以下之一:Sobel模板、梯度模板、双边全变差模板;或者,采用傅里叶变换或小波变换得到ROI的高频响应值。实现时,如果在预设模板为Sobel模板的情况下,根据Sobel模板计算ROI内每个像素点的卷积响应值;选择卷积响应值大于预设卷积阈值的像素点,并统计已选择的像素点的总个数与已选择的像素点的卷积响应值之和;将所述卷积响应值之和除以所述总个数以得到ROI内像素的平均卷积响应值,并将平均卷积响应值作为ROI的度量值。
本发明实施例还提供一种拍照方法,该方法的流程如图2所示,包括步骤S202至S208:
S202,在接收到拍照指令之前,获取缓存帧图像及缓存帧图像的ROI;
S204,计算每个缓存帧图像的ROI的度量值,其中,度量值用于度量ROI内图像的平均清晰度;
S206,在所有度量值中选择最大的度量值;
S208,在接收到拍照指令时,将最大的度量值对应的缓存帧图像作为拍照结果进行输出。
本实施例在拍照的过程中,仅对ROI的度量值进行计算,并针对计算出的度量值作为衡量标准,将度量值最大的缓存帧图像进行输出,作为拍照的结果,该方法将用户感兴趣区域作为计算重点,避免了对整个图像都进行清晰度计算, 符合用户使用需求,用户体验较高。
在计算每个缓存帧图像的ROI的度量值的过程中,可以根据ROI中每个像素点的像素值确定每个像素点对应的清晰度;再用ROI中所有像素点的清晰度之和除以ROI中所有像素点的个数,得到ROI的平均清晰度,以作为ROI的度量值。
实现时,计算每个缓存帧图像的ROI的度量值的过程包括:根据预设模板计算ROI的高频响应值,其中,预设模板包括以下之一:Sobel模板、梯度模板、双边全变差模板;或者,采用傅里叶变换或小波变换得到ROI的高频响应值。在采用根据Sobel模板计算ROI的高频响应值的情况下,先根据Sobel模板计算ROI内每个像素点的卷积响应值;再选择卷积响应值大于预设卷积阈值的像素点,并统计已选择的像素点的总个数与已选择的像素点的卷积响应值之和;最后将所述卷积响应值之和除以所述总个数以得到ROI内像素的平均卷积响应值,并将平均卷积响应值为ROI的度量值。
在所有度量值中选择最大的度量值时,可以包括以下过程:判断当前缓存帧图像的ROI的度量值是否大于预存储的历史最大度量值;在ROI的度量值大于历史最大度量值的情况下,将历史最大度量值修改为ROI的度量值对应的值,以更新历史最大度量值;在ROI的度量值不大于历史最大度量值的情况下,保留历史最大度量值;继续判断下一个当前缓存帧图像的ROI的度量值与历史最大度量值的大小,直至拍照发生时刻停止判断,并将当前的历史最大度量值作为最大的度量值。
在获取缓存帧图像及图像的ROI之前,还可以判断是否采用自动对焦方式确定ROI;如果是,则确定当前焦点所对应区域作为ROI,如果不是,则将用户手动选择的区域作为ROI。
本发明实施例还提供一种选择待输出照片的装置,该装置的结构示意如图3所示,包括:第一计算模块10,设置为计算ROI的度量值,其中,度量值用于度量ROI内图像的平均清晰度;第一选择模块20,与第一计算模块10耦合,设置为在所有度量值中选择最大的度量值;以及输出模块30,与第一选择模块20耦合,设置为获取最大的度量值对应的缓存帧图像,并将缓存帧图像进行输出。
其中,第一计算模块10的结构示意如图4所示,第一计算模块10还可以 包括第一计算单元101和第二计算单元102,其中,第一计算单元101设置为根据ROI中每个像素点的像素值确定每个像素点对应的清晰度;第二计算单元102设置为用ROI中所有像素点的清晰度之和除以ROI中所有像素点的个数,得到ROI的平均清晰度,以作为ROI的度量值。
可选的,第一计算模块10可以设置为根据预设模板计算ROI的高频响应值,其中,预设模板包括以下之一:Sobel模板、梯度模板、双边全变差模板;或者,采用傅里叶变换或小波变换得到ROI的高频响应值。
可选的,第一计算单元101,可以设置为根据Sobel模板计算ROI内每个像素点的卷积响应值;第一计算单元102,可以设置为选择卷积响应值大于预设卷积阈值的像素点,并统计已选择的像素点的总个数与已选择的像素点的卷积响应值之和,将所述卷积响应值之和除以所述总个数以得到ROI内像素的平均卷积响应值,以将平均卷积响应值作为ROI的度量值。
本发明实施例还提供一种拍照装置,该装置的结构示意如图5所示,包括:获取模块40,设置为在接收到拍照指令之前,获取缓存帧图像及图像的ROI;第二计算模块50,与获取模块40耦合,设置为计算每个缓存帧图像的ROI的度量值,其中,度量值用于度量ROI内图像的平均清晰度;第二选择模块60,与第二计算模块50耦合,设置为在所有度量值中选择最大的度量值;以及拍照模块70,与第二选择模块60耦合,设置为在接收到拍照指令时,将最大的度量值对应的图像作为拍照结果进行输出。
第二计算模块50的结构示意如图6所示,包括:第三计算单元501,设置为根据ROI中每个像素点的像素值确定每个像素点对应的清晰度;以及第四计算单元502,与第三计算单元501耦合,设置为用ROI中所有像素点的清晰度之和除以ROI中所有像素点的个数,得到ROI的平均清晰度,以作为ROI的度量值。
第二计算模块50,还设置为根据预设模板计算ROI的高频响应值,其中,预设模板包括以下之一:Sobel模板、梯度模板、双边全变差模板;或者,采用傅里叶变换或小波变换得到ROI的高频响应值。
可选的,第三计算单元501,设置为根据Sobel模板计算ROI内每个像素点的卷积响应值;第四计算单元502,设置为选择卷积响应值大于预设卷积阈值的像素点,并统计已选择的像素点的总个数与已选择的像素点的卷积响应值之和; 将所述卷积响应值之和除以所述总个数以得到ROI内像素的平均卷积响应值,以将平均卷积响应值为ROI的度量值。
上述第二选择模块60的结构示意可以如图7所示,包括:判断单元601,设置为判断当前缓存帧图像的ROI的度量值是否大于预存储的历史最大度量值;以及选择单元602,与判断单元601耦合,设置为在ROI的度量值大于历史最大度量值的情况下,将历史最大度量值修改为ROI的度量值对应的值,以更新历史最大度量值;在ROI的度量值不大于历史最大度量值的情况下,保留历史最大度量值;判断单元601,还设置为继续判断下一个当前缓存帧图像的ROI的度量值与历史最大度量值的大小,直至拍照发生时刻停止判断;选择单元602,还设置为将当前的历史最大度量值作为最大的度量值。
如图8所示,在图5的基础上,上述拍照装置还包括:判断模块80,设置为在获取缓存帧图像及图像的ROI之前,判断是否采用自动对焦方式确定ROI;以及ROI确定模块90,与判断模块80和获取模块40耦合,设置为在采用自动对焦方式确定ROI的情况下,确定当前焦点所对应区域作为ROI;在不采用自动对焦方式确定ROI的情况下,将用户手动选择的区域作为ROI。
本发明实施例还提供一种智能终端,智能终端包括上述的选择待输出照片的装置或者拍照装置。本领域技术人员根据上述记载能够知晓如何将上述任一装置设置在智能终端中,此处不再赘述。
可选实施例一
本发明实施例提供的场景为拍照场景下输出照片,当然,也可以将该方法应用在图像处理领域;本实施例提供的方法可以对多帧图像的清晰度进行选择,从而改善输出图像的质量。实现该方法的智能终端包括拍照模块、缓存帧存储模块、ROI确定模块(相当于获取模块和确定模块)、度量值计算模块(相当于计算模块)、比较模块(相当于选择模块)、输出模块(相当于输出模块)。
拍照模块,对场景进行拍照,并生成缓存帧图像。
缓存帧存储模块,存储上述缓存帧图像和缓存帧图像对应的对焦区域信息。
ROI确定模块,通过自动对焦区域信息或者触控对焦区域信息,来确定缓存的帧图像的ROI。
度量值计算模块,计算出ROI对应的度量值,度量值包括ROI内像素的平 均锐度。
比较模块,比较缓存帧存储模块中每帧图像ROI的度量值。
输出模块,将度量值最高的图像作为拍照结果输出。
本发明实施例提供的智能终端在拍照时,可以设置两种拍照模式:1、人脸检测模式,即开启人脸检测。当智能终端检测到场景中出现人脸时,将人脸作为ROI。智能终端在当前缓存帧图像没检测到人脸时,可以采用一般模式里的方法确定ROI。2、一般模式,根据自动对焦或者触控对焦模式不同,选择图像中某一对焦区域作为ROI。在确定ROI后,度量值计算模块计算ROI的度量值,度量值包含平均锐度,进而完成清晰性的选择。
基于上述说明,本发明实施例提供的方法包括如下过程:
步骤一:对场景进行拍照,并生成缓存帧图像;
步骤二:存储上述缓存帧图像和缓存帧图像对应的对焦区域信息;
步骤三:通过自动对焦区域信息或者触控对焦区域信息,来确定缓存的帧图像的ROI;
步骤四:计算出ROI对应的度量值,度量值包括ROI内像素的平均锐度;
步骤五:比较缓存帧存储模块中每帧图像ROI的度量值;
步骤六:输出度量值最高的图像作为拍照结果。
本发明上述实施例可以利用多帧优选技术,帮助用户在使用智能手机拍照时,改善拍摄图像的质量。
下面结合附图对各个过程进行描述。
ROI确定方法实施例
如图9所示,本实施例展示了在两种不同的拍照模式下,确定ROI的方法,包括S901至S906:
步骤S901:判断当前拍照模式是否为人脸检测模式。如果是,则执行S902,如果否,则执行S904。
步骤S902:调用人脸检测算法,并检测缓存帧图像中是否存在人脸。如果是,则执行S903,如果否,则执行S904。
步骤S903:确定检测到的人脸区域作为ROI。
步骤S904:判断是否为自动对焦模式。如果是,则执行S905,如果否,则执行S906。
步骤S905:选择图像中心附近区域作为ROI。
步骤S906:选择触控中心附近区域作为ROI。
在上述步骤S905自动对焦模式下,可以将图像中的一区域选择为ROI,该区域的位置、形状和大小,可根据实际情况进行设定。例如:选择图像的中心区域作为ROI,其形状为长方形,其长宽值分别为图像长宽值乘以一比值,如1/8,即“确定图像中心周围1/8width*1/8height”的区域作为ROI。
在上述步骤S906触控对焦模式下,可以将图像中的一区域选择为ROI,该区域的位置、形状和大小,可根据实际情况进行设定。例如:选择触控中心区域作为ROI,其形状为长方形,其长宽值分别为图像长宽值乘以一比值,如1/16,即“确定图像中心周围1/16width*1/16height”的区域作为ROI。
如图10所示,为本实施例提供的说明度量值的计算方法的过程,本实施例采用计算ROI内像素的平均锐度作为度量值的方法流程图,包括步骤S1001至S1004:
步骤S1001:获取ROI,其中,ROI可以为自动对焦或触控对焦得到的区域。
步骤S1002:计算ROI内像素X的Sobel(边缘检测)模板的卷积响应值S。实现过程中,通过Sobel模板对每一个像素点都进行计算。
步骤S1003:对上述得到的卷积响应值进行筛选,其中,选择大于阈值TH的像素,并对这类像素个数进行累加计数N,并对其卷积响应值进行累加求和SumS。
步骤S1004:计算ROI的平均锐度AverS。
在上述步骤S1002中,清晰性度量的计算可以在不同的颜色空间下进行,如RGB、YUV、HSV等。因为相比于色彩的变化,人眼对于亮度的变化更加敏感。所以作为可选实施例,本实施例所示技术仅在YUV颜色空间的亮度域进行计算,从而降低计算复杂度。本发明实施例提供的水平方向x和垂直方向y的Sobel模板分别是:
Figure PCTCN2016080256-appb-000001
Figure PCTCN2016080256-appb-000002
卷积的响应为:
S=X*Sobelx+X*Sobely
其中,*表示二维卷积操作。步骤S1003中满足阈值筛选条件的像素个数为:
N=∑i#{Si>TH};
其中,TH是阈值,筛选的目的是降低噪声的干扰,i为非负整数,N为ROI内满足卷积值S大于TH的像素的总个数,TH值可以根据图像整体亮度以及图像中的噪声水平进行自适应确定;#{·}是示性函数,条件满足取值为1,不满足取值为0。满足阈值筛选条件的像素的响应值累加和为:
SumS=∑i#{Si>TH}×Si
步骤S1004中平均锐度AverS的计算方法如下:
AverS=SumS/N。
上述步骤S1002中的Sobel模板卷积可以替换成其他清晰性度量,比如梯度的幅值或者双边全变差的幅值(Bilateral Total Variaion,BTV)等,此处不进行详细说明。
可选实施例二
本发明实施例针对上述实施例一还提供了一种可选实现方式,该方式包括:对同一场景不断拍摄缓存帧图像,通过算法连续计算当前缓存帧图像的度量值,并根据比较结果不断更新记录的优选帧,最终选取优选帧作为拍照输出的多帧优选技术。该过程可以明显减少缓存帧图像的存储空间。
该方法对应的智能终端包括拍照模块、缓存帧存储模块、ROI确定模块、度量值计算模块、比较模块、更新模块、优选帧存储模块,以及输出模块。
拍照模块,对场景进行拍照,并生成缓存帧图像。
缓存帧存储模块,存储当前缓存帧图像和缓存帧图像对应的对焦区域信息。
ROI确定模块,针对清晰性优选,通过自动对焦区域信息或者触控对焦区域信息,来确定ROI。
度量值计算模块,计算当前缓存帧图像ROI对应的度量值,度量值包括ROI内像素的平均锐度。
比较模块,比较缓存帧存储模块中当前缓存帧图像ROI的度量值及优选帧存储模块中图像ROI的度量值。
更新模块,如果当前缓存帧图像的度量值更优,则用当前缓存帧图像更新优选帧,并更新对应的度量值。
优选帧存储模块,存储优选帧图像数据以及优选帧图像对应的度量值。
输出模块,输出优选帧图像作为拍照结果。
图11为上述智能终端工作过程的流程示意图,包括步骤S 1101至S1107:
步骤S1101:获取当前缓存帧图像,缓存帧计数加一;
步骤S1102:判断当前缓存计数是否达到最大帧数;如果是,则执行S1107,如果否,则执行S1103。
步骤S1103:根据不同的拍照模式,确定ROI;
步骤S1104:计算ROI的度量值;
步骤S1105:与优选帧的度量值进行比较,判断当前优选帧是否更优;如果是,则执行S1106,如果否,则执行S1101。
步骤S1106:用当前缓存帧图像更新优选帧,用当前缓存帧图像的度量值更新优选帧的度量值;
步骤S1107:输出优选帧作为拍摄图像,并将缓存帧计数置零。
在上述步骤S1103中,根据拍照模式(人脸检测模式、一般模式)不同,确定ROI的方法也有所不同。可以参见上述可选实施例一中提供的ROI的确定过程。在上述步骤S1104中,度量值的计算方法参见上述可选实施例一中提供的度量值计算过程。
此外,度量值计算实施例中的清晰性度量值的计算,也可以在完整的颜色空间内进行,如在YUV三个通道内计算:
Figure PCTCN2016080256-appb-000003
本发明上述实施例提供了一种可以利用存储的多帧图像,通过计算感兴趣区域的清晰性度量,选出最清晰的照片作为输出,从而明显改进拍摄图像质量的一种方法;该方法针对ROI进行计算,可以避免非重要区域对度量值的干扰;ROI的确定方法可以根据拍摄模型灵活切换;该方法中提出了一种新的平均锐度概念作为清晰度度量值,可以有效降低不同图像帧之间由于手抖造成的图像内容偏移,导致的高频分量绝对数量不一致现象的影响;此外,还提供了一种可选方案,该可选方案最多只需要存储两帧图像,相比之前的方法能够有效降低存储消耗。采用本实施例提供的方法,可以有效的改善现有技术由于抖动情形导致的拍摄图像质量差的问题。
本发明实施例还提供一种计算机存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述任一项选择待输出照片的方法,或者,上述任一项拍照的方法。
通过以上关于实施方式的描述,所属领域的技术人员可以清楚地了解到,本申请可借助软件及必需的通用硬件来实现,当然也可以通过硬件实现。基于这样的理解,本发明实施例的技术方案可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、闪存(FLASH)、硬盘或光盘等,包括指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明实施例所述的方法。
值得注意的是,上述选择待输出照片的装置的实施例中,所包括的单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,功能单元的名称也只是为了便于相互区分,并不限制本申请的保护范围。
本发明实施例还提供了一种执行选择待输出照片的方法的设备的硬件结构示意图。参见图12,该设备包括:
一个或者多个处理器120,图3中以一个处理器120为例;
存储器121。
所述设备还可以包括:输入装置122和输出装置123。所述设备中的处理器120、存储器121、输入装置122和输出装置123可以通过总线或其他方式连接,图12中以通过总线连接为例。
存储器121作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序,如本发明实施例中的选择待输出照片的方法对应的程序指令/模块。处理器120通过运行存储在存储器121中的软件程序、指令以及模块,从而执行服务器的功能应用以及数据处理,即实现上述方法实施例中的选择待输出照片的方法。
存储器121可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端设备的使用所创建的数据等。此外,存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实例中,存储器121可包括相对于处理器120远程设置的存储器,这些远程存储器可以通过网络连接至终端设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
输入装置122可设置为接收输入的数字或字符信息,以及产生与终端的用户设置以及功能控制有关的键信号输入。输出装置123可包括显示屏等显示设备。
所述一个或者多个模块存储在所述存储器121中,当被所述一个或者多个处理器120执行时,执行如下操作:
计算每个缓存帧图像的感兴趣区域ROI的度量值,其中,所述度量值用于度量所述ROI内图像的平均清晰度;在所有度量值中选择最大的度量值;以及获取所述最大的度量值对应的缓存帧图像,并将所述缓存帧图像进行输出;或者
在接收到拍照指令之前,获取缓存帧图像及图像的感兴趣区域ROI;计算每个缓存帧图像的ROI的度量值,其中,所述度量值用于度量所述ROI内图像的平均清晰度;在所有度量值中选择最大的度量值;以及在接收到拍照指令时,将所述最大的度量值对应的图像作为拍照结果进行输出。
工业实用性
本发明实施例解决了选择输出图像的方式中只能选择整幅图像清晰性最好的进行输出,使用户不感兴趣或者不重要的物体参与计算,可能输出用户不想要的图像,导致用户体验较低的问题。

Claims (23)

  1. 一种选择待输出照片的方法,包括:
    计算每个缓存帧图像的感兴趣区域ROI的度量值,其中,所述度量值用于度量所述ROI内图像的平均清晰度;
    在所有度量值中选择最大的度量值;以及
    获取所述最大的度量值对应的缓存帧图像,并将所述缓存帧图像进行输出。
  2. 如权利要求1所述的方法,其中,计算每个缓存帧图像的ROI的度量值,包括:
    根据所述ROI中每个像素点的像素值确定每个像素点对应的清晰度;以及
    用所述ROI中所有像素点的清晰度之和除以所述ROI中所有像素点的个数,得到所述ROI的平均清晰度,以作为所述ROI的度量值。
  3. 如权利要求2所述的方法,其中,计算每个缓存帧图像的ROI的度量值,包括:
    根据预设模板计算所述ROI的高频响应值,其中,所述预设模板包括以下之一:Sobel模板、梯度模板、双边全变差模板;或者,
    采用傅里叶变换或小波变换得到所述ROI的高频响应值。
  4. 如权利要求3所述的方法,其中,根据所述Sobel模板计算所述ROI的高频响应值,包括:
    根据Sobel模板计算所述ROI内每个像素点的卷积响应值;
    选择卷积响应值大于预设卷积阈值的像素点,并统计已选择的像素点的总个数与已选择的像素点的卷积响应值之和;以及
    将所述卷积响应值之和除以所述总个数以得到所述ROI内像素的平均卷积响应值,以将所述平均卷积响应值为所述ROI的度量值。
  5. 如权利要求1至4中任一项所述的方法,其中,所述ROI的确定方法包括以下之一:
    将所述图像的焦点区域作为所述ROI;
    将用户手动选择的区域作为所述ROI。
  6. 一种拍照方法,包括:
    在接收到拍照指令之前,获取缓存帧图像及缓存帧图像的感兴趣区域ROI;
    计算每个缓存帧图像的ROI的度量值,其中,所述度量值用于度量所述ROI内图像的平均清晰度;
    在所有度量值中选择最大的度量值;以及
    在接收到拍照指令时,将所述最大的度量值对应的图像作为拍照结果进行输出。
  7. 如权利要求6所述的拍照方法,其中,计算每个缓存帧图像的ROI的度量值,包括:
    根据所述ROI中每个像素点的像素值确定每个像素点对应的清晰度;以及
    用所述ROI中所有像素点的清晰度之和除以所述ROI中所有像素点的个数,得到所述ROI的平均清晰度,以作为所述ROI的度量值。
  8. 如权利要求7所述的拍照方法,其中,计算每个缓存帧图像的ROI的度量值,包括:
    根据预设模板计算所述ROI的高频响应值,其中,所述预设模板包括以下之一:Sobel模板、梯度模板、双边全变差模板;或者,
    采用傅里叶变换或小波变换得到所述ROI的高频响应值。
  9. 如权利要求8所述的拍照方法,其中,根据所述Sobel模板计算所述ROI的高频响应值,包括:
    根据Sobel模板计算所述ROI内每个像素点的卷积响应值;
    选择卷积响应值大于预设卷积阈值的像素点,并统计已选择的像素点的总个数与已选择的像素点的卷积响应值之和;以及
    将所述卷积响应值之和除以所述总个数以得到所述ROI内像素的平均卷积响应值,以将所述平均卷积响应值为所述ROI的度量值。
  10. 如权利要求6所述的拍照方法,其中,在所有度量值中选择最大的度量值,包括:
    判断当前缓存帧图像的ROI的度量值是否大于预存储的历史最大度量值;
    在所述ROI的度量值大于所述历史最大度量值的情况下,将所述历史最大度量值修改为所述ROI的度量值对应的值,以更新所述历史最大度量值;在所述ROI的度量值不大于所述历史最大度量值的情况下,保留所述历史最大度量值;以及
    继续判断下一个当前缓存帧图像的ROI的度量值与所述历史最大度量值的大小,直至拍照发生时刻停止判断,并将当前的所述历史最大度量值作为所述最大的度量值。
  11. 如权利要求6所述的拍照方法,在获取缓存帧图像及缓存帧图像的ROI之前,还包括:
    判断是否采用自动对焦方式确定ROI;
    如果是,则确定当前焦点所对应区域作为所述ROI,如果不是,则将用户手动选择的区域作为所述ROI。
  12. 一种选择待输出照片的装置,包括:
    第一计算模块,设置为计算感兴趣区域ROI的度量值,其中,所述度量值用于度量所述ROI内图像的平均清晰度;
    第一选择模块,设置为在所有度量值中选择最大的度量值;以及
    输出模块,设置为获取所述最大的度量值对应的缓存帧图像,并将所述缓存帧图像进行输出。
  13. 如权利要求12所述的装置,其中,所述第一计算模块包括:
    第一计算单元,设置为根据所述ROI中每个像素点的像素值确定每个像素点对应的清晰度;以及
    第二计算单元,设置为用所述ROI中所有像素点的清晰度之和除以所述ROI中所有像素点的个数,得到所述ROI的平均清晰度,以作为所述ROI的度量值。
  14. 如权利要求13所述的装置,其中,
    所述第一计算模块,设置为根据预设模板计算所述ROI的高频响应值,其中,所述预设模板包括以下之一:Sobel模板、梯度模板、双边全变差模板;或者,采用傅里叶变换或小波变换得到所述ROI的高频响应值。
  15. 如权利要求14所述的装置,其中,所述第一计算模块包括:
    所述第一计算单元,设置为根据Sobel模板计算所述ROI内每个像素点的卷积响应值;以及
    所述第二计算单元,设置为选择卷积响应值大于预设卷积阈值的像素点,并统计已选择的像素点的总个数与已选择的像素点的卷积响应值之和,将所述卷积响应值之和除以所述总个数以得到所述ROI内像素的平均卷积响应值,以将所述平均卷积响应值作为所述ROI的度量值。
  16. 一种拍照装置,包括:
    获取模块,设置为在接收到拍照指令之前,获取缓存帧图像及缓存帧图像的感兴趣区域ROI;
    第二计算模块,设置为计算每个缓存帧图像的ROI的度量值,其中,所述度量值用于度量所述ROI内图像的平均清晰度;
    第二选择模块,设置为在所有度量值中选择最大的度量值;以及
    拍照模块,设置为在接收到拍照指令时,将所述最大的度量值对应的图像作为拍照结果进行输出。
  17. 如权利要求16所述的拍照装置,其中,所述第二计算模块包括:
    第三计算单元,设置为根据所述ROI中每个像素点的像素值确定每个像素点对应的清晰度;以及
    第四计算单元,设置为用所述ROI中所有像素点的清晰度之和除以所述ROI中所有像素点的个数,得到所述ROI的平均清晰度,以作为所述ROI的度量值。
  18. 如权利要求17所述的拍照装置,其中,
    所述第二计算模块,还设置为根据预设模板计算所述ROI的高频响应值,其中,所述预设模板包括以下之一:Sobel模板、梯度模板、双边全变差模板;或者,采用傅里叶变换或小波变换得到所述ROI的高频响应值。
  19. 如权利要求18所述的拍照装置,其中,
    所述第三计算单元,设置为根据Sobel模板计算所述ROI内每个像素点的卷积响应值;
    所述第四计算单元,设置为选择卷积响应值大于预设卷积阈值的像素点,并统计已选择的像素点的总个数与已选择的像素点的卷积响应值之和;将所述卷积响应值之和除以所述总个数以得到所述ROI内像素的平均卷积响应值,以将所述平均卷积响应值为所述ROI的度量值。
  20. 如权利要求16所述的拍照装置,其中,所述第二选择模块包括:
    判断单元,设置为判断当前缓存帧图像的ROI的度量值是否大于预存储的历史最大度量值;以及
    选择单元,设置为在所述ROI的度量值大于所述历史最大度量值的情况下,将所述历史最大度量值修改为所述ROI的度量值对应的值,以更新所述历史最大度量值;在所述ROI的度量值不大于所述历史最大度量值的情况下,保留所述历史最大度量值;
    所述判断单元,还设置为继续判断下一个当前缓存帧图像的ROI的度量值与所述历史最大度量值的大小,直至拍照发生时刻停止判断;
    所述选择单元,还设置为将当前的所述历史最大度量值作为所述最大的度量值。
  21. 如权利要求16所述的拍照装置,其中,所述拍照装置还包括:
    判断模块,设置为在获取缓存帧图像及缓存帧图像的ROI之前,判断是否采用自动对焦方式确定ROI;以及
    ROI确定模块,设置为在采用自动对焦方式确定ROI的情况下,确定当前焦点所对应区域作为所述ROI;在不采用自动对焦方式确定ROI的情况下,将用户手动选择的区域作为所述ROI。
  22. 一种智能终端,包括:权利要求12至15中任一项所述的选择待输出照片的装置,或者,权利要求16至21中任一项所述的拍照装置。
  23. 一种计算机存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行权利要求1-5中任一项选择待输出照片的方法,或者,权利要求6-11中任一项拍照的方法。
PCT/CN2016/080256 2016-02-23 2016-04-26 选择待输出照片的方法、拍照方法、装置及存储介质 WO2017143654A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610100270.9 2016-02-23
CN201610100270.9A CN107105150A (zh) 2016-02-23 2016-02-23 一种选择待输出照片的方法、拍照方法及其对应装置

Publications (1)

Publication Number Publication Date
WO2017143654A1 true WO2017143654A1 (zh) 2017-08-31

Family

ID=59659044

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/080256 WO2017143654A1 (zh) 2016-02-23 2016-04-26 选择待输出照片的方法、拍照方法、装置及存储介质

Country Status (2)

Country Link
CN (1) CN107105150A (zh)
WO (1) WO2017143654A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108734175A (zh) * 2018-04-28 2018-11-02 北京猎户星空科技有限公司 一种图像特征的提取方法、装置及电子设备
CN112425156B (zh) 2019-01-31 2022-03-11 华为技术有限公司 一种基于连拍选择图像的方法及电子设备
CN110881104A (zh) * 2019-10-17 2020-03-13 宇龙计算机通信科技(深圳)有限公司 拍照方法、装置、存储介质及终端
CN112381820A (zh) * 2020-12-07 2021-02-19 深圳市福日中诺电子科技有限公司 一种基于一组同场景照片清晰度的评价方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708361A (zh) * 2012-05-11 2012-10-03 哈尔滨工业大学 远距离人脸采集方法
CN102881010A (zh) * 2012-08-28 2013-01-16 北京理工大学 基于人眼视觉特性的融合图像感知清晰度评价方法
US20130265451A1 (en) * 2012-04-10 2013-10-10 Samsung Electronics Co., Ltd. Apparatus and method for continuously taking a picture
CN103702032A (zh) * 2013-12-31 2014-04-02 华为技术有限公司 图像处理方法、装置和终端设备
CN104618640A (zh) * 2014-12-30 2015-05-13 广东欧珀移动通信有限公司 一种拍照方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080129844A1 (en) * 2006-10-27 2008-06-05 Cusack Francis J Apparatus for image capture with automatic and manual field of interest processing with a multi-resolution camera
CN101782369B (zh) * 2009-01-16 2012-09-19 鸿富锦精密工业(深圳)有限公司 影像量测对焦系统及方法
CN104094319A (zh) * 2012-01-19 2014-10-08 株式会社东芝 图像处理设备、立体图像显示设备和图像处理方法
CN105120167B (zh) * 2015-08-31 2018-11-06 广州市幸福网络技术有限公司 一种证照相机及证照拍摄方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130265451A1 (en) * 2012-04-10 2013-10-10 Samsung Electronics Co., Ltd. Apparatus and method for continuously taking a picture
CN102708361A (zh) * 2012-05-11 2012-10-03 哈尔滨工业大学 远距离人脸采集方法
CN102881010A (zh) * 2012-08-28 2013-01-16 北京理工大学 基于人眼视觉特性的融合图像感知清晰度评价方法
CN103702032A (zh) * 2013-12-31 2014-04-02 华为技术有限公司 图像处理方法、装置和终端设备
CN104618640A (zh) * 2014-12-30 2015-05-13 广东欧珀移动通信有限公司 一种拍照方法及装置

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
FENG, Q. ET AL.: "An Auto-Focusing Method for Different Object Distance Situation", IJCSNS INTERNATIONAL JOURNAL OF COMPUTER SCIENCE AND NETWORK SECURITY, vol. 7, no. 6, 30 June 2007 (2007-06-30), pages 32 *
JIANG, TING ET AL.: "Research of a Clarity - Evaluation of Image Based on SOBEL", COMPUTER & DIGITAL ENGINEERING, vol. 36, no. 8, 31 August 2008 (2008-08-31), pages 130 - 131, ISSN: 1672-9722 *

Also Published As

Publication number Publication date
CN107105150A (zh) 2017-08-29

Similar Documents

Publication Publication Date Title
CN108898567B (zh) 图像降噪方法、装置及系统
TWI682664B (zh) 基於亮度分布與動作間之取捨以產生場景之高動態範圍影像之方法
US9591237B2 (en) Automated generation of panning shots
CN108335279B (zh) 图像融合和hdr成像
WO2017215501A1 (zh) 图像降噪处理方法、装置及计算机存储介质
US9779489B2 (en) Automatically suggesting regions for blur kernel estimation
WO2019183813A1 (zh) 一种拍摄方法及设备
CN108492287B (zh) 一种视频抖动检测方法、终端设备及存储介质
US9154697B2 (en) Camera selection based on occlusion of field of view
WO2020177723A1 (zh) 图像处理方法、夜间拍摄方法、图像处理芯片及航拍相机
CN112565589B (zh) 一种拍照预览方法、装置、存储介质和电子设备
US8866927B2 (en) Determining an image capture payload burst structure based on a metering image capture sweep
JP5980294B2 (ja) データ処理装置、撮像装置、およびデータ処理方法
RU2629436C2 (ru) Способ и устройство управления масштабированием и устройство цифровой фотосъемки
WO2017101626A1 (zh) 一种实现图像处理的方法及装置
WO2017107700A1 (zh) 一种实现图像配准的方法及终端
JP5784587B2 (ja) 画像選択および結合の方法およびデバイス
WO2018176925A1 (zh) Hdr图像的生成方法及装置
CN105960797B (zh) 一种处理图像的方法和装置
US9413951B2 (en) Dynamic motion estimation and compensation for temporal filtering
JP2018504790A (ja) ハイダイナミックレンジ画像の生成方法及び装置
WO2017143654A1 (zh) 选择待输出照片的方法、拍照方法、装置及存储介质
WO2022083229A1 (zh) 图像处理方法、电子装置及非易失性计算机可读存储介质
US9299132B2 (en) Automatically determining the size of a blur kernel
CN113259594A (zh) 图像处理方法及装置、计算机可读存储介质、终端

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16891108

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16891108

Country of ref document: EP

Kind code of ref document: A1