WO2019023993A1 - 一种智能终端的照片处理方法及处理装置 - Google Patents

一种智能终端的照片处理方法及处理装置 Download PDF

Info

Publication number
WO2019023993A1
WO2019023993A1 PCT/CN2017/095638 CN2017095638W WO2019023993A1 WO 2019023993 A1 WO2019023993 A1 WO 2019023993A1 CN 2017095638 W CN2017095638 W CN 2017095638W WO 2019023993 A1 WO2019023993 A1 WO 2019023993A1
Authority
WO
WIPO (PCT)
Prior art keywords
photo
photos
sharpness parameter
screened
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.)
Ceased
Application number
PCT/CN2017/095638
Other languages
English (en)
French (fr)
Inventor
唐圣杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Transsion Communication Co Ltd
Original Assignee
Shenzhen Transsion Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Transsion Communication Co Ltd filed Critical Shenzhen Transsion Communication Co Ltd
Priority to CN201780095583.2A priority Critical patent/CN111183630B/zh
Priority to PCT/CN2017/095638 priority patent/WO2019023993A1/zh
Publication of WO2019023993A1 publication Critical patent/WO2019023993A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules

Definitions

  • the present invention relates to the field of intelligent terminals, and in particular, to a photo processing method and a processing device for an intelligent terminal.
  • the intelligent terminal is involved in a wide range, and may be a smart phone, a digital camera, a notebook computer, a tablet computer, or the like.
  • the intelligent terminal is involved in a wide range, and may be a smart phone, a digital camera, a notebook computer, a tablet computer, or the like.
  • the user often takes multiple photos of the same target object.
  • not every photo has a good visual effect.
  • Blurring, skewing, ghosting, etc. require the user to identify, filter, delete, and retain photos with better results. This occupies a large amount of operation time of the user, resulting in the user not being able to concentrate on enjoying the beauty or focusing on other things, causing inconvenience to the user.
  • the Chinese invention patent publication discloses a method and device for photographing a mobile terminal, and relates to a signal processing technology to solve a user's third party image editing software. Obtain a photo image with a clear background effect of the subject's target, and operate a complicated problem.
  • the technical solution includes: the mobile terminal includes a dual camera, the method includes: acquiring a main target and a background target from the to-be-viewed area; selecting a main camera and a secondary camera in the dual camera; and controlling the main camera to obtain a main photo image that makes the main target clear Controlling the auxiliary camera to obtain a secondary photo image that blurs the background target; synthesizing the target image according to the main photo image and the auxiliary photo image, wherein the target image includes the subject target whose resolution reaches the preset definition threshold and the blur degree reaches the preset blur degree The background target of the threshold.
  • the technical solution provided by the embodiment of the present invention can be applied to a photographing process of a photo or a video.
  • an object of the present invention is to provide a photo processing method and a processing device for an intelligent terminal, which support screening processing of photographed photos and realize the technical effect of automatic clearing processing of photographs.
  • a first aspect of the present application discloses a photo processing method of a smart terminal, including the following steps:
  • the sharpness parameter of the to-be-screened photo is less than the sharpness parameter threshold, at least any two of the to-be-screened photos are extracted and synthesized to form a composite photo and saved.
  • the step of acquiring at least two to-be-screened photos and the sharpness parameters of each of the to-be-screened photos taken by the same target object includes:
  • the number of noises, the resolution, and the grayscale rate of change are weighted and summed to obtain the sharpness parameter.
  • At least any two of the to-be-screened photos are extracted and synthesized to form A step of synthesizing photos and saving them includes:
  • Determining whether there is a similarity matching degree of at least two photos to be filtered is greater than a matching degree threshold preset in the smart terminal;
  • the noise reduction processing of all the photos to be selected with the similar matching degree being greater than the matching degree threshold
  • the synthetic noise reduction processed photo gives a composite photo.
  • determining whether at least two photos have similar matching degrees greater than A step of presetting a matching threshold in the smart terminal includes:
  • the synthesized noise reduction processed photo obtains a composite photo
  • the photo with the pixel resolution greater than a pixel resolution threshold preset in the smart terminal is selected for synthesis.
  • a photo processing apparatus for a smart terminal comprising:
  • a definition calculation module which calculates a sharpness parameter of each of the photos to be filtered
  • a clarity determining module determining whether a sharpness parameter of each of the to-be-screened photos is greater than a sharpness parameter threshold preset in the smart terminal;
  • a saving module when the definition determining module determines that a sharpness parameter of at least one of the photos to be filtered is greater than or equal to the sharpness parameter threshold, saving a photo of the at least one photo having a maximum sharpness parameter ;
  • a synthesis module when the clarity determination module determines that the sharpness parameter of the to-be-screened photo is less than the sharpness parameter threshold, extract at least any two of the to-be-screened photos and synthesize to form a composite photo And save.
  • the definition calculation module includes:
  • the synthesizing module includes:
  • the similarity determining unit determines whether the similar matching degree of at least two photos to be filtered is greater than a matching degree threshold preset in the smart terminal;
  • a noise reduction processing unit when the similarity determination unit determines that the similarity matching degree of the at least two to-be-screened photos is greater than the matching degree threshold, the noise reduction processing of the to-be-screened photos for all similar matching degrees greater than the matching degree threshold;
  • the synthesis unit synthesizes the photo after the noise reduction process to obtain a composite photo.
  • the similarity determining unit includes:
  • a scaling unit that reduces pixels of the photo and converts to a grayscale image
  • a gradation calculation unit that calculates a gradation average value of the grayscale image
  • a binary conversion unit wherein a pixel point in the grayscale image that is greater than or equal to the grayscale average value is set to 1, and a pixel point that is smaller than the grayscale average value is set to 0, to obtain a binary sequence;
  • the digit determining unit determines whether the number of differences in the binary sequence of any two photos is less than a predetermined number of bit thresholds.
  • the synthesizing unit synthesizes the photo after the noise reduction process, and selects the photo with the pixel resolution greater than a pixel resolution threshold preset in the smart terminal for synthesis. .
  • FIG. 1 is a schematic flow chart of a photo processing method of a smart terminal according to a preferred embodiment of the present invention
  • step S1 in FIG. 1 is a schematic diagram of a specific process of step S1 in FIG. 1 in accordance with a preferred embodiment of the present invention
  • step S4 of FIG. 1 is a schematic diagram of a specific process of step S4 of FIG. 1 in accordance with a preferred embodiment of the present invention
  • step S4-1 in FIG. 3 is a schematic diagram showing a specific flow of step S4-1 in FIG. 3 in accordance with a preferred embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a photo processing apparatus for a smart terminal according to a preferred embodiment of the present invention.
  • FIG. 6 is a schematic structural view of a definition calculation module in accordance with a preferred embodiment of the present invention.
  • FIG. 7 is a schematic structural view of a synthesis module in accordance with a preferred embodiment of the present invention.
  • Figure 8 is a block diagram showing the structure of a similarity determining unit in accordance with a preferred embodiment of the present invention.
  • 10-processing device 11-sharpness calculation module, 111-statistical unit, 112-arithmetic unit, 12-sharpness determination module, 13-save module, 14-synthesis module, 141-similarity judgment unit, 1411-zoom unit , 1412-gradation calculation unit, 1413-binary conversion unit, 1414-digit number determination unit, 142-noise reduction processing unit, 143-synthesis unit.
  • FIG. 1 is a schematic flowchart of a photo processing method of a smart terminal according to a preferred embodiment of the present invention.
  • the processing method includes the following steps:
  • S1 Acquire at least two to-be-screened photos taken by the same target object and sharpness parameters of each of the to-be-screened photos.
  • the photo to be filtered in this embodiment refers to a photo taken by the user for the same target object, and the photo to be filtered is at least two.
  • the user often takes multiple photos in a short time, or uses the continuous camera function to take multiple photos, which are the photos to be filtered in this embodiment, and the photos to be filtered are received.
  • the effects of shooting conditions may be blurred and unclear.
  • the resolution parameter calculation is performed on each of the to-be-screened photos, and the resolution calculation manner may be based on one or more of noise, dead pixels, resolution, and gray-scale change rate of the to-be-screened photo. Combination of species.
  • the sharpness parameter is calculated by noise
  • the number of noises in the photo to be filtered may be counted, and the larger the number of noises means that the lower the resolution, a numerical parameter may be set minus the number of the noise. Describe the sharpness parameters to compare different photos.
  • a threshold parameter of the sharpness parameter is preset in the smart terminal as a reference for the sharpness parameter of the photo to be filtered.
  • the selection of the sharpness parameter threshold can be selected according to the subjective visual standard of the user. Select a photo that just meets the definition requirement, calculate a sharpness parameter of the photo as the sharpness parameter threshold; or calculate a sharpness parameter of multiple photos according to a big data statistical manner, according to a certain ratio, for example, clear The 20% standard before the degree parameter arrangement selects the corresponding sharpness parameter threshold.
  • the corresponding resolution parameter is separately calculated for the photo to be selected obtained in step S1, and the sharpness parameter of each photo is compared with the sharpness parameter threshold to determine whether there is at least one of the to-be-selected The sharpness parameter of the filtered photo is greater than or equal to the sharpness parameter threshold.
  • the sharpness parameter of at least one of the photos to be filtered is greater than or equal to the sharpness parameter threshold, the trigger condition of the step is satisfied, and the photo having the maximum sharpness parameter among the photos satisfying the definition is saved.
  • the sharpness parameter of photo A is 80
  • the sharpness parameter of photo B is 50
  • the sharpness parameter of photo C is 75.
  • the sharpness parameter of the photo D is 60. If the sharpness parameter threshold is 70, then the photo A and the photo C satisfy the condition that is greater than or equal to the sharpness parameter threshold, and the sharpness parameter of the photo A is larger than the photo C, thus saving the photo A.
  • the content of the step is performed, that is, at least any two of the photos to be filtered are extracted for synthesis to form a Combine photos and save them.
  • the step and the step S3 jointly form a judgment result of the value of the resolution parameter of the to-be-screened image, which are respectively two mutually exclusive parts of the judgment result, that is, the resolution parameter of all the photos is small in this step, In other words, all the photos to be filtered are blurred.
  • This step performs a synthesizing operation on the photo to be screened, in order to improve the clarity of the photo and achieve a better viewing effect.
  • the photo to be screened to be synthesized may be two or three or more.
  • the method for synthesizing the photo to be filtered may be based on one of the photos, and the image information in the other photos is extracted for the pixels of the blurred portion in the photo, and the content in all the photos is replaced. Finally, the synthetic photograph can be obtained. Or for the photo to be screened, each photo must have the same pixel size, and then the pixels of each photo are superimposed to form a new photo.
  • Step S1 includes:
  • S1-1 Counting the number of noise, the resolution, and the grayscale change rate of the photo to be filtered.
  • the noise Refers to foreign pixels that should not appear in the image, usually caused by electronic interference, which looks like the image is dirty and covered with some small rough spots.
  • the number of noises is the number of noises in a photo.
  • the statistical method of the noise is to traverse all the pixels on the photo to determine the pixel difference between each pixel and the surrounding pixels. If the pixel difference of each pixel is large, it is determined that the pixel is noise.
  • the resolution is the number of pixels included in the unit of inch. Think of the whole photo as a large board, and the resolution is the number of intersections of all warp and weft. The higher the resolution, the clearer the picture.
  • the pixels in the photo are digitized information stored in a specific format with the smart terminal, and it is easy to count the resolution of the photo.
  • the gray value refers to the color depth of the dots in the black and white image. The range is generally from 0 to 255, white is 255, and black is 0.
  • the gradation change rate refers to the maximum value of the number of pixels of the gradation value of each row continuously decreasing, and the higher the gradation change rate, the clearer the color limit and the higher the image definition. Since the pixel itself is in a digitized information format, the grayscale rate of change can be derived from the pixel information.
  • S1-2 Weighting the number of noises, the resolution, and the grayscale change rate to obtain the sharpness parameter.
  • a weighted summation operation is performed on the number of noises, the resolution, and the grayscale change rate.
  • the number of noise is 80
  • the resolution is 1 million
  • the grayscale change rate is 300.
  • the above three parameters are given different weight coefficients, and the weight coefficient of the number of noise is -3, and the resolution is The weight is 0.0002, and the weight of the gray rate is 1.
  • the above noise number, resolution, and gradation change rate are respectively multiplied by respective weight coefficients and summed to obtain a sharpness parameter of 340.
  • Step S4 includes:
  • S4-1 Determine whether there is a similarity matching degree of at least two photos to be filtered that is greater than a matching degree threshold preset in the smart terminal.
  • the similarity degree of the screening photos is judged, and when the similarity judgment is performed on the screening photos, at least two photos are involved in the comparison.
  • SIFT scale-invariant feature conversion algorithm
  • the step of the scale-invariant feature conversion algorithm is: scale space extremum detection: searching for image positions on all scales.
  • the Gaussian differential function is used to identify potential points of interest that are invariant to scale and rotation.
  • Key point positioning At each candidate position, the position and scale are determined by a well-fitting model. The choice of key points depends on their degree of stability; direction determination: based on image locality The gradient direction is assigned to one or more directions for each key point location; the key point description: the local gradient of the image is measured at a selected scale within the neighborhood around each key point.
  • This step executes the corresponding content according to the judgment result of step S4-2.
  • the triggering condition of the step is satisfied, and then all the similarly matched degrees are greater than the matching degree threshold.
  • the manner of performing noise reduction processing on the to-be-screened photo may be a neighborhood averaging method, a median filtering method, and a wavelet transform method.
  • the implementation method is to remove the abrupt pixel points by averaging the pixels in one point and the neighborhood, thereby filtering out certain noise, for example, the pixel of a certain noise is 50, and the adjacent pixels are respectively For 150, 160, 140, and 145, the average of the adjacent pixel points is averaged, and 149 is obtained after rounding off, and then the pixel of the noise is changed to 149.
  • step S4-2 is followed, and the photos after the noise reduction processing are combined to obtain the composite photograph.
  • the method of synthesizing photographs has been explained in step S4 and will not be described again. If the number of photos processed in step S4-2 is two or more, for example, four photos, the four photos are combined into one photo.
  • FIG. 4 it is a schematic diagram of a specific process in step S4-1 of FIG. 3 in accordance with a preferred embodiment of the present invention.
  • the step S4-1 is further refined.
  • the step S4-1 includes:
  • S4-1-1 The pixels of the photo are reduced and converted into a grayscale image.
  • This step first reduces the photo to a size of 8x8 for a total of 64 pixels.
  • To reduce the photo first divide the photo into 8x8 areas, then calculate the average of all the pixels in each area, and then use this average as the pixels of the reduced photo.
  • the effect of reducing the photo is to remove the difference between the various image sizes and the image ratio, and only retain the basic information such as structure, light and dark.
  • the reduced picture is converted into a grayscale picture. Since the gray value is also represented by a value of 0-255, the pixel value of the reduced picture can be directly converted into a gray value.
  • step S4-1-1 64 gray values in the grayscale image obtained in step S4-1-1 are averaged to obtain a grayscale average value.
  • S4-1-3 A pixel point in the grayscale image that is greater than or equal to the grayscale average value is set to 1, and a pixel point that is smaller than the grayscale average value is set to 0, and a binary sequence is obtained.
  • the gray value of each pixel in the grayscale image is compared with the grayscale average value based on the grayscale average value. If the gray value of the pixel is greater than or equal to the gray average, the pixel The point is set to 1; if the gray value of the pixel is smaller than the gray average, the pixel is set to zero.
  • all the pixels of the grayscale image are represented as 0 or 1, and the values of the pixels are arranged in a coordinate order to obtain a binary sequence.
  • S4-1-4 Determine whether the difference digit of the binary sequence of any two photos is less than a preset number of bits threshold.
  • Steps S4-1-3 can obtain a binary sequence of all the photos participating in the similar matching degree comparison, and compare the difference of the binary sequences of the photos, the comparison manner is to determine how many bits of the binary sequence of the two photos are different.
  • the binary sequence A is 01010
  • the binary sequence B is 01001. It can be seen that the binary sequence A is different from the binary sequence B and the two are different.
  • the more the number of digits of the binary sequence difference of the photo the larger the difference in the photos participating in the comparison, so the one-digit threshold must be preset as a criterion for judging the difference of the binary sequence of the photo. If the binary sequence difference digits of the two photos are smaller than the number of digit thresholds, the similar matching degree of the two photos satisfies the requirement.
  • step S4-3 when step S4-3 is performed, the photo with the pixel resolution greater than a pixel resolution threshold preset in the smart terminal is selected for synthesis.
  • the improvement conditionally limits the step of synthesizing the noise-reduced photo to obtain a composite photo, that is, selecting a photo with a pixel resolution greater than the pixel resolution threshold for synthesis.
  • the step S4-2 performs noise reduction processing on all the photos whose similar matching degree is greater than the matching degree threshold, and the photos may be multiple sheets, and the resolution thereof changes after the noise reduction processing, so it is necessary to The photos after the noise reduction process are screened, and the photos with higher definition are selected for synthesis.
  • the pixel resolution that is, the number of pixels in the photo, only when the pixel resolution of the photo is greater than the pixel resolution threshold, means that the photo is relatively clear.
  • the processing apparatus 10 includes:
  • the sharpness calculation module 11 calculates a sharpness parameter of each of the photos to be filtered.
  • the definition calculation module 11 is a software module, and acquires at least two to-be-screened photos taken by the same target object from the smart terminal, and calculates a sharpness parameter of each of the to-be-screened photos.
  • the photo to be screened is stored in the form of digitized information in the smart terminal, specifically, in the form of a matrix of pixel points, each pixel having a value of 0 to 255, representing a different color.
  • the manner of calculating the sharpness parameter of the photo to be filtered may be based on a combination of one or more of noise, dead point, resolution, and grayscale change rate of the photo to be filtered.
  • the resolution is the number of pixels of a photo.
  • the number of pixels may be different for different photos. The more pixels, the more the image will be able to display the details of the image, and the clearer the definition;
  • the module 11 counts the number of photos to be filtered, and As the sharpness parameter, the number of pixels is used as the sharpness parameter, or the number of the pixels is subjected to a line type operation to obtain a smaller range of values.
  • the definition determining module 12 determines whether the sharpness parameter of each of the to-be-screened photos is greater than a sharpness parameter threshold preset in the smart terminal.
  • the definition determining module 12 is a software module, and the sharpness parameter of the to-be-screened photo is obtained from the definition calculation module 11 and compared with a sharpness parameter threshold preset in the smart terminal.
  • the comparison operation performed by the definition judgment module 12, that is, the numerical value comparison operation, is easy to implement.
  • the definition determining module 12 determines whether the sharpness parameter of the photo to be filtered is greater than the sharpness parameter threshold, so as to be a judgment condition for subsequent processing.
  • the saving module 13 is configured to save the maximum sharpness parameter in the at least one photo when the sharpness determining module 12 determines that the sharpness parameter of the at least one photo in the to-be-screened photo is greater than or equal to the sharpness parameter threshold. Photo.
  • the operation of the saving module 13 first satisfies the precondition that the resolution determining module 12 determines that the sharpness parameter of at least one of the photos to be filtered is greater than or equal to the sharpness parameter threshold, that is, the resolution requirement is met.
  • the to-be-screened photo can be saved, and the saving module 13 acquires the determination result from the definition determination module 12.
  • the saving module 13 saves the photo that meets the definition requirement
  • the photo having the highest sharpness parameter in the photo that meets the definition requirement is selected, that is, only one photo with the highest definition is saved, so that the same target object can be saved.
  • the clearest picture saves the storage space of the smart terminal and saves the user's screening operation time.
  • the save module 13 saves the photo, it saves according to the data format supported by the smart terminal, such as jpg, png, and the like.
  • a synthesizing module 14 when the resolution determining module 12 determines that the sharpness parameter of the to-be-screened photo is less than the sharpness parameter threshold, extract at least any two of the to-be-screened photos and combine to form a Combine photos and save them.
  • the operation of the synthesizing module 14 must also satisfy the precondition that the resolution determining module 12 determines that the sharpness parameter of the photo to be filtered is smaller than the sharpness parameter threshold, that is, all the photos to be filtered are not Meet the clarity requirements.
  • the synthesizing module 14 extracts at least any two of the to-be-screened photos as a composite material, and then performs a synthesizing operation on the extracted photos to obtain a composite photo. Specific synthetic methods have been set forth in the method examples.
  • the definition calculation module 11 includes:
  • the statistics unit 111 is configured to count the number of noises, the resolution, and the grayscale change rate of the photo to be filtered.
  • the statistic unit 111 is a software module, and counts three parameters, namely, the number of noises, the resolution, and the gradation change rate. These three parameters can be reflected by the values of the pixel points, so the statistics and comparisons of the pixel values can be performed.
  • the equivalent operation obtains the first off parameter, and the specific calculation method is explained in the method embodiment.
  • the operation unit 112 weights the noise number, the resolution, and the grayscale change rate to obtain the sharpness parameter.
  • the operation unit 112 acquires the parameters of the noise number, the resolution, and the grayscale change rate from the statistical unit 111, and then performs weighted average calculation on the above three parameters to obtain the sharpness parameter.
  • the arithmetic unit 112 implements normalization of a plurality of sharpness parameters to uniformly compare the sharpness parameters of the photograph.
  • the synthesizing module 14 includes:
  • the similarity determining unit 141 determines whether the similar matching degree of at least two photos to be filtered is greater than a matching degree threshold preset in the smart terminal.
  • the similarity determining unit 141 first calculates the similarity degree of the filtered photos. Since at least two photos can be compared for the similarity, the similar matching degree must be calculated for at least two photos to be filtered, or three Zhang and above photos to be filtered are calculated. In the prior art, there are mature algorithms for calculating the similarity of photographs. The commonly used algorithms are perceptual hashing algorithm, scale invariant feature transforming algorithm (SIFT), etc., and specific algorithm implementations are not described again. After the similarity judgment unit 141 calculates the similarity matching degree, and compares with the matching degree threshold value, it can be determined whether the photo participating in the similarity matching degree calculation satisfies the similarity requirement for subsequent processing.
  • SIFT scale invariant feature transforming algorithm
  • the noise reduction processing unit 142 when the similarity determination unit 141 determines that the similarity matching degree of at least two photos to be filtered is greater than the matching degree threshold, denoising all the photos to be selected with similar matching degrees greater than the matching degree threshold deal with.
  • the operation of the noise reduction processing unit 142 must first satisfy the precondition that the similarity determination unit 141 determines that the similarity matching degree of at least two photos to be filtered is greater than the matching degree threshold, that is, at least the photos to be filtered. The similarity is higher. Then, the noise reduction processing unit 142 performs noise reduction processing on the photo that satisfies the similar matching degree requirement, and the specific processing manner has been described in the method embodiment.
  • the noise-reduced photos reduce the effect of noise on the sharpness effect.
  • the synthesizing unit 143 synthesizes the photo after the noise reduction processing to obtain a composite photograph.
  • the synthesizing unit 143 acquires the noise-reduced processed photos from the noise reduction processing unit 142, and synthesizes the photos to obtain a composite photo.
  • the manner in which the photos are synthesized has been set forth in the method embodiments.
  • FIG. 8 is a schematic structural diagram of a similarity determining unit 141 according to a preferred embodiment of the present invention.
  • the similarity determining unit 141 includes:
  • the scaling unit 1411 reduces the pixels of the photo and converts them into grayscale images.
  • the scaling unit 1411 first reduces the photo to a size of 8x8 for a total of 64 pixels.
  • the method of reducing the photo has been explained in the method embodiment.
  • the scaling unit 1411 converts the reduced picture into a grayscale picture. Since the gray value is also represented by a value of 0-255, the pixel value of the reduced picture is directly converted into a gray value.
  • the gradation calculation unit 1412 acquires the gradation map from the scaling unit 1411, and calculates a gradation average value of the gradation map.
  • the gradation calculation unit 1412 performs an average calculation on the 64 gradation values in the gradation map to obtain a gradation average value.
  • the binary conversion unit 1413 sets a pixel point of the grayscale image greater than or equal to the grayscale average value to 1, and a pixel point smaller than the grayscale average value to 0, to obtain a binary sequence.
  • the binary conversion unit 1413 acquires the grayscale image from the scaling unit 1411, and obtains the grayscale average value from the grayscale calculation unit 1412, and then compares the grayscale average value with reference. The gray value of each pixel in the grayscale image. If the gray value of the pixel in the grayscale image is greater than or equal to the grayscale average value, the pixel point is set to 1; if the grayscale value of the pixel in the grayscale image is smaller than the grayscale average value , then set the pixel to 0. The grayscale image is then converted to a 64-bit binary sequence.
  • the bit number determining unit 1414 determines whether the number of difference bits of the binary sequence of any two photos is smaller than a predetermined number of bit thresholds.
  • the bit number judging unit 1414 compares the difference of the binary sequences of the photographs by comparing how many bits of the binary sequence of the two photographs are different. The comparison and statistical manner of the number of difference bits has been set forth in the method embodiments.
  • the digit count unit 1414 presets a one-digit threshold as a criterion for judging the difference in the binary sequence of the photo. If the binary sequence difference digits of the two photos are smaller than the number of digit thresholds, the similar matching degree of the two photos satisfies the requirement.
  • the synthesizing unit 143 when the synthesizing unit 143 synthesizes the photo after the noise reduction processing, And synthesizing the photo with the pixel resolution greater than a pixel resolution threshold preset in the smart terminal.
  • the synthesizing unit 143 performs a screening on the photo-reduced photos before the photo is synthesized, and selects the photo with the pixel resolution greater than the pixel resolution threshold, that is, the selection is clearer.
  • the photos are synthesized.
  • the filtering of the synthesizing unit 143 is only for the pixel resolution parameter, so as to save the calculation process, and the specific calculation manner has been explained in the method embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

本发明提供了一种智能终端的照片处理方法及处理装置,所述处理方法包括以下步骤:获取对同一目标物体拍摄的至少两张待筛选照片及每一所述待筛选照片的清晰度参数;判断每一所述待筛选照片的清晰度参数是否大于一预设于所述智能终端内的清晰度参数阈值;当所述待筛选照片中至少一张照片的清晰度参数大于等于所述清晰度参数阈值时,保存所述至少一张照片中具有最大清晰度参数的照片;当所述待筛选照片的清晰度参数均小于所述清晰度参数阈值时,提取所述待筛选照片中的至少任意两张并合成,以形成一合成照片并保存。本发明的技术方案实现对清晰照片的自动保存,节约用户筛选操作时间;对于模糊的照片,进行清晰化处理,合成较为清晰的照片。

Description

一种智能终端的照片处理方法及处理装置 技术领域
本发明涉及智能终端领域,尤其涉及一种智能终端的照片处理方法及处理装置。
背景技术
目前,绝大部分的智能终端设备配置了拍照功能,用户通过所述智能终端上的拍照功能对美景、人物、资料信息进行拍照并保存,十分方便。所述智能终端涉及的范围较广,可以是智能手机、数码相机、笔记本电脑、平板电脑等。用户在拍照过程中,经常会对同一目标物体拍摄多张照片,然而并不是每张照片都有较好的视觉效果,由于拍摄条件的限制或者智能终端自身的拍摄性能限制,不少照片都会出现模糊、歪斜、虚影等情况,需要用户自己辨认、筛选后进行删除操作,保留效果较好的照片。这样就占用了用户的大量操作时间,导致用户无法专心享受美景或者专注于其他事物,给用户造成不便。
现有技术已经在上述技术领域作了努力,如中国发明专利公开说明书(公开号:CN105847664A)公开了一种移动终端拍照的方法和装置,涉及信号处理技术,以解决用户通过第三方图像编辑软件获取具有主体目标清晰背景目标模糊效果的照片图像,操作复杂的问题。技术方案包括:移动终端包括双摄像头,所述方法包括:从待取景区域中获取主体目标和背景目标;在双摄像头中选取主摄像头和辅摄像头;控制主摄像头获取使主体目标清晰的主照片图像;控制辅摄像头获取使背景目标模糊的辅照片图像;根据主照片图像和辅照片图像合成目标图像,其中,目标图像包括清晰度达到预设清晰度阈值的主体目标和模糊度达到预设模糊度阈值的背景目标。该发明实施例提供的技术方案可以应用在照片或者视频的拍摄过程中。
上述发明虽然已经实现了对拍摄目标的清晰度处理,但仍存在如下问题:
1.仅在拍摄阶段对主要目标和背景目标进行清晰化或模糊化处理,没有对整张照片的清晰度进行处理;
2.需要使用双摄像头的移动终端,对硬件配置有限制;
3.未实现对模糊照片的自动化处理。
因此如何为用户提供对模糊照片的自动化处理技术手段,提升用户体验,将是一个需要解决的技术问题。
发明内容
为了克服上述技术缺陷,本发明的目的在于提供一种智能终端的照片处理方法及处理装置,支持对拍摄的照片进行筛选处理,实现照片的自动清晰化处理的技术效果。
本申请的第一方面公开了一种智能终端的照片处理方法,包括以下步骤:
获取对同一目标物体拍摄的至少两张待筛选照片及每一所述待筛选照片的清晰度参数;
判断每一所述待筛选照片的清晰度参数是否大于一预设于所述智能终端内的清晰度参数阈值;
当所述待筛选照片中至少一张照片的清晰度参数大于等于所述清晰度参数阈值时,保存所述至少一张照片中具有最大清晰度参数的照片;
当所述待筛选照片的清晰度参数均小于所述清晰度参数阈值时,提取所述待筛选照片中的至少任意两张并合成,以形成一合成照片并保存。
在本申请第一方面的某些实施方式中,获取对同一目标物体拍摄的至少两张待筛选照片及每一所述待筛选照片的清晰度参数的步骤包括:
统计所述待筛选照片的噪点数目、分辨率及灰度变化率;
对所述噪点数目、分辨率及灰度变化率加权求和以得到所述清晰度参数。
在本申请第一方面的某些实施方式中,当所述待筛选照片的清晰度参数均小于所述清晰度参数阈值时,提取所述待筛选照片中的至少任意两张并合成,以形成一合成照片并保存的步骤包括:
判断是否有至少两张待筛选照片的相似匹配度大于一预设于所述智能终端内的匹配度阈值;
当至少两张待筛选照片的相似匹配度大于所述匹配度阈值时,对所有相似匹配度大于所述匹配度阈值的待筛选照片降噪处理;
合成降噪处理后的照片得到一合成照片。
在本申请第一方面的某些实施方式中,判断是否有至少两张照片的相似匹配度大于 一预设于所述智能终端内的匹配度阈值的步骤包括:
缩小所述照片的像素并转换为灰度图;
计算所述灰度图的灰度平均值;
将所述灰度图中大于或等于所述灰度平均值的像素点设为1,小于所述灰度平均值的像素点设为0,得到一二进制序列;
判断任意两张照片的二进制序列的差异位数是否小于一预设的位数阈值。
在本申请第一方面的某些实施方式中,合成降噪处理后的照片得到一合成照片时,选取所述像素分辨率大于一预设于所述智能终端内像素分辨率阈值的照片进行合成。
本申请的第二方面,公开了一种智能终端的照片处理装置,所述处理装置包括:
清晰度计算模块,计算每一所述待筛选照片的清晰度参数;
清晰度判断模块,判断每一所述待筛选照片的清晰度参数是否大于一预设于所述智能终端内的清晰度参数阈值;
保存模块,当所述清晰度判断模块判断所述待筛选照片中至少一张照片的清晰度参数大于等于所述清晰度参数阈值时,保存所述至少一张照片中具有最大清晰度参数的照片;
合成模块,当所述清晰度判断模块判断所述待筛选照片的清晰度参数均小于所述清晰度参数阈值时,提取所述待筛选照片中的至少任意两张并合成,以形成一合成照片并保存。
在本申请第二方面的某些实施方式中,所述清晰度计算模块包括:
统计单元,统计所述待筛选照片的噪点数目、分辨率及灰度变化率;
运算单元,对所述噪点数目、分辨率及灰度变化率加权求和以得到所述清晰度参数。
在本申请第二方面的某些实施方式中,所述合成模块包括:
相似度判断单元,判断是否有至少两张待筛选照片的相似匹配度大于一预设于所述智能终端内的匹配度阈值;
降噪处理单元,当所述相似度判断单元判断至少两张待筛选照片的相似匹配度大于所述匹配度阈值时,对所有相似匹配度大于所述匹配度阈值的待筛选照片降噪处理;
合成单元,合成降噪处理后的照片得到一合成照片。
在本申请第二方面的某些实施方式中,所述相似度判断单元包括:
缩放单元,缩小所述照片的像素并转换为灰度图;
灰度计算单元,计算所述灰度图的灰度平均值;
二进制转换单元,将所述灰度图中大于或等于所述灰度平均值的像素点设为1,小于所述灰度平均值的像素点设为0,得到一二进制序列;
位数判断单元,判断任意两张照片的二进制序列的差异位数是否小于一预设的位数阈值。
在本申请第二方面的某些实施方式中,所述合成单元合成降噪处理后的照片时,选取所述像素分辨率大于一预设于所述智能终端内像素分辨率阈值的照片进行合成。
采用了上述技术方案后,与现有技术相比,具有以下有益效果:
1.实现对清晰照片的自动保存,节约用户筛选操作时间;
2.对于模糊的照片,进行清晰化处理,合成较为清晰的照片。
附图说明
图1为符合本发明一优选实施例中智能终端的照片处理方法的流程示意图;
图2为符合本发明一优选实施例中图1中步骤S1的具体流程示意图;
图3为符合本发明一优选实施例中图1中步骤S4的具体流程示意图;
图4为符合本发明一优选实施例中图3中步骤S4-1的具体流程示意图;
图5为符合本发明一优选实施例中智能终端照片处理装置的结构示意图;
图6为符合本发明一优选实施例中清晰度计算模块的结构示意图;
图7为符合本发明一优选实施例中合成模块的结构示意图;
图8为符合本发明一优选实施例中相似度判断单元的结构示意图。
附图标记:
10-处理装置、11-清晰度计算模块、111-统计单元、112-运算单元、12-清晰度判断模块、13-保存模块、14-合成模块、141-相似度判断单元、1411-缩放单元、1412-灰度计算单元、1413-二进制转换单元、1414-位数判断单元、142-降噪处理单元、143-合成单元。
具体实施方式
以下由特定的具体实施例说明本申请的实施方式,熟悉此技术的人士可由本说明书所揭露的内容轻易地了解本申请的其他优点及功效。
在下述描述中,参考附图,附图描述了本申请的若干实施例。应当理解,还可使用其他实施例,并且可以在不背离本公开的精神和范围的情况下进行机械组成、结构、电气以及操作上的改变.下面的详细描述不应该被认为是限制性的,并且本申请的实施例的 范围仅由公布的专利的权利要求书所限定.这里使用的术语仅是为了描述特定实施例,而并非旨在限制本申请。空间相关的术语,例如“上”、“下”、“左”、“右”、“下面”、“下方”、“下部”、“上方”、“上部”等,可在文中使用以便于说明图中所示的一个元件或特征与另一元件或特征的关系。
虽然在一些实例中术语第一、第二等在本文中用来描述各种元件,但是这些元件不应当被这些术语限制。这些术语仅用来将一个元件与另一个元件进行区分。
再者,如同在本文中所使用的,单数形式“一”、“一个”和“该”旨在也包括复数形式,除非上下文中有相反的指示.应当进一步理解,术语“包含”、“包括”表明存在所述的特征、步骤、操作、元件、组件、项目、种类、和/或组,但不排除一个或多个其他特征、步骤、操作、元件、组件、项目、种类、和/或组的存在、出现或添加.此处使用的术语“或”和“和/或”被解释为包括性的,或意味着任一个或任何组合.因此,“A、B或C”或者“A、B和/或C”意味着“以下任一个:A;B;C;A和B;A和C;B和C;A、B和C”.仅当元件、功能、步骤或操作的组合在某些方式下内在地互相排斥时,才会出现该定义的例外。
参阅图1,为符合本发明一优选实施例中智能终端的照片处理方法的流程示意图,所述处理方法包括以下步骤:
S1:获取对同一目标物体拍摄的至少两张待筛选照片及每一所述待筛选照片的清晰度参数。
本实施例中的待筛选照片是指用户对于同一目标物体拍摄的照片,所述待筛选照片至少为两张。用户在对目标物体拍摄过程中,往往会在短时间内拍摄多张照片,或者是使用连续拍照功能拍摄多张照片,这些照片即本实施例中的待筛选照片,且这些待筛选照片收到拍摄条件的影响,可能会出现模糊不清晰的情况。本步骤对每一张所述待筛选照片进行清晰度参数计算,所述清晰度计算的方式可以根据所述待筛选照片的噪点、坏点、分辨率、灰度变化率中的一种或几种的结合。例如若以噪点来计算所述清晰度参数,可以统计所述待筛选照片中的噪点数目,所述噪点数目越大意味着清晰度越低,可以设置一个数值参数减去所述噪点数目得到所述清晰度参数,以便对不同的照片进行比较。
S2:是否至少一张所述待筛选照片的清晰度参数大于等于一预设于所述智能终端内的清晰度参数阈值。
本步骤中,所述智能终端内预设一个清晰度参数阈值,作为所述待筛选照片的清晰度参数比较基准。所述清晰度参数阈值的选取,可以按照用户的主观视觉标准,用户选 择刚好满足清晰度要求的照片,计算所述照片的清晰度参数作为所述清晰度参数阈值;也可以按照大数据统计的方式,统计多张照片的清晰度参数,按照一定的比例,例如清晰度参数排布前20%的标准选取相应的清晰度参数阈值。本步骤对步骤S1获取的所述待筛选照片分别计算相应的所述清晰度参数,并将每张照片的清晰度参数与所述清晰度参数阈值进行比较,判断是否有至少一张所述待筛选照片的清晰度参数大于等于所述清晰度参数阈值。
S3:当所述待筛选照片中至少一张照片的清晰度参数大于等于所述清晰度参数阈值时,保存所述至少一张照片中具有最大清晰度参数的照片。
当所述待筛选照片中,至少有一张照片的清晰度参数大于等于所述清晰度参数阈值,则满足本步骤的触发条件,保存满足清晰度要求的照片中具有最大清晰度参数的照片。例如一共有三章待筛选照片,分别是照片A、照片B、照片C、照片D,照片A的清晰度参数为80,照片B的清晰度参数为50,照片C的清晰度参数为75,照片D的清晰度参数为60。若所述清晰度参数阈值为70,则照片A和照片C满足大于等于所述清晰度参数阈值的条件,而照片A的清晰度参数又大于照片C,因此保存照片A。
S4:当所述待筛选照片的清晰度参数均小于所述清晰度参数阈值时,提取所述待筛选照片中的至少任意两张并合成,以形成一合成照片并保存。
当所述待筛选照片中,所有照片的清晰度参数均小于所述清晰度参数阈值时,则执行本步骤的内容,即提取所述待筛选照片中的至少任意两张进行合成,形成一张合成照片并保存。本步骤与步骤S3共同组成了对所述待筛选照片清晰度参数值的判断结果,分别是判断结果的两个互斥部分,即本步骤执行了所有照片的清晰度参数均较小的情况,也就是说所有的待筛选照片都比较模糊。本步骤对所述待筛选照片进行合成操作,目的是为了提升照片的清晰度,实现更佳的观看效果。被合成的所述待筛选照片可以是两张,也可以是三张及以上的数目。合成所述待筛选照片的方式可以是以其中一张照片为基准,针对所述照片中的模糊部分的像素,提取其他照片中的图像信息进行替换,直至所有照片中的内容都被替换完成,最后即可得到所述合成照片。或者对于所述待筛选的照片,每张照片的像素大小须相同,而后将各照片的像素按照比例进行叠加形成新的照片。
参阅图2,为符合本发明一优选实施例中图1中步骤S1的具体流程示意图,步骤S1包括:
S1-1:统计所述待筛选照片的噪点数目、分辨率及灰度变化率。
本步骤中分别统计所述待筛选照片中的噪点数目、分辨率及灰度变化率。所述噪点, 指图像中不该出现的外来像素,通常由电子干扰产生,看起来就像图像被弄脏了,布满一些细小的糙点。所述噪点数目即一张照片中噪点的数目,所述噪点的统计方式即遍历所述照片上的所有像素点,判断每个像素点与周围像素点的像素差别,若某个像素点与周围各像素点的像素差别都很大,则判定该像素点为噪点。所述分辨率是单位英寸中所包含的像素点数。可以把整个照片想象成是一个大型的棋盘,而分辨率的表示方式就是所有经线和纬线交叉点的数目,分辨率越高则照片越清晰。照片中的像素点为数字化信息,以特定的格式存储与所述智能终端内,很容易统计所述照片的分辨率。灰度值,指黑白图像中点的颜色深度,范围一般从0到255,白色为255,黑色为0。所述灰度变化率是指所述各行灰度值连续下降间隔像素点数的最大值,灰度变化率越高,证明色彩界限越清晰,图像清晰度高。由于像素本身就是数字化信息格式,因此可以从像素信息中得出所述灰度变化率。
S1-2:对所述噪点数目、分辨率及灰度变化率加权求和以得到所述清晰度参数。
本步骤对所述噪点数目、分辨率及灰度变化率进行加权求和运算。例如在一张照片中,其噪点数目为80,分辨率为100万,灰度变化率为300,则对上述三个参数赋予不同的权重系数,噪点数目的权重系数为-3,分辨率的权重为0.0002,灰度变化率的权重为1。则将上述噪点数目、分辨率、灰度变化率分别乘以各自的权重系数后求和,得到清晰度参数为340。
参阅图3,为符合本发明一优选实施例中图1中步骤S4的具体流程示意图,步骤S4包括:
S4-1:判断是否有至少两张待筛选照片的相似匹配度大于一预设于所述智能终端内的匹配度阈值。
本步骤对所述筛选照片的相似匹配度进行判断,对所述筛选照片进行相似匹配度判断时,至少有两张照片参与比较。本步骤计算参与比较的所述待筛选照片的相似匹配度,并将所述相似匹配度与所述智能终端内预设的匹配度阈值进行比较,判断是否有至少两张照片的相似匹配度大于所述匹配度阈值。计算所述待筛选照片的相似匹配度,可以对所述待筛选照片的像素进行算法计算,得到可比较的数值信息;比较常用的算法有感知哈希算法、尺度不变特征转换算法(SIFT)等。其中,尺度不变特征转换算法的步骤为:尺度空间极值检测:搜索所有尺度上的图像位置。通过高斯微分函数来识别潜在的对于尺度和旋转不变的兴趣点;关键点定位:在每个候选的位置上,通过一个拟合精细的模型来确定位置和尺度。关键点的选择依据于它们的稳定程度;方向确定:基于图像局部 的梯度方向,分配给每个关键点位置一个或多个方向;关键点描述:在每个关键点周围的邻域内,在选定的尺度上测量图像局部的梯度。
S4-2:当至少两张待筛选照片的相似匹配度大于所述匹配度阈值时,对所有相似匹配度大于所述匹配度阈值的待筛选照片降噪处理。
本步骤根据步骤S4-2的判断结果执行相应内容。当至少两张待筛选照片的相似匹配度大于所述匹配度阈值时,满足本步骤的触发条件,则对所有相似匹配度大于所述匹配度阈值的筛选照片降噪处理。对所述待筛选照片进行降噪处理的方式,可以是邻域平均法、中值滤波法、以及小波变换法。以邻域平均法为例,实现方法是通过一点和邻域内像素点求平均来去除突变的像素点,从而滤掉一定噪声,例如某个噪点的像素为50,而其相邻的像素点分别为150、160、140、145,则对相邻的像素点求平均值,四舍五入后得到149,再将噪点的像素改为149即可。
S4-3:合成降噪处理后的照片得到一合成照片。
本步骤承接步骤S4-2,将降噪处理后的照片进行合成,得到所述合成照片。合成照片的方法在步骤S4中已阐述,不再赘述。若步骤S4-2中处理的照片为两张以上,例如四张照片,则将者四张照片合成为一张照片。
参阅图4,为符合本发明一优选实施例中图3中步骤S4-1的具体流程示意图,对所述步骤S4-1进一步细化,所述步骤S4-1包括:
S4-1-1:缩小所述照片的像素并转换为灰度图。
本步骤首先将照片缩小到8x8的尺寸,总共64个像素。缩小照片的方法是先将照片划分为8x8的区域,然后计算每个区域内所有像素的平均值,然后以此平均值作为缩小后照片的像素即可。缩小照片的作用是去除各种图片尺寸和图片比例的差异,只保留结构、明暗等基本信息。而后将缩小后的图片,转为灰度图片,由于灰度值也是由0-255的数值表示,因此直接将所述缩小后图片的像素值对应转换为灰度值即可。
S4-1-2:计算所述灰度图的灰度平均值。
本步骤将步骤S4-1-1中得到的所述灰度图内的64个灰度值进行平均数计算,得到灰度平均值。
S4-1-3:将所述灰度图中大于或等于所述灰度平均值的像素点设为1,小于所述灰度平均值的像素点设为0,得到一二进制序列。
本步骤中,以所述灰度平均值为基准,将所述灰度图中每个像素点的灰度值与所述灰度平均值进行比较。若所述像素点的灰度值大于或等于所述灰度平均值,则将该像素 点设为1;若所述像素点的灰度值小于所述灰度平均值,则将该像素点设为0。这样,所述灰度图的所有像素点都表示为0或1,将这些像素点的值按照坐标顺序排列即可得到一个二进制序列。
S4-1-4:判断任意两张照片的二进制序列的差异位数是否小于一预设的位数阈值。
步骤S4-1-3可得到参与相似匹配度比较的所有照片的二进制序列,则比较这些照片的二进制序列的差异,比较方式为判断两个照片的二进制序列有多少位是不同的。以总长度为5位的二进制序列为例,二进制序列A为01010,二进制序列B为01001,可以看到二进制序列A与二进制序列B后两位不同,则两者有两位是不同的。对于本实施例,所述照片的二进制序列差异位数越多,则意味着参与比较的照片差异越大,因此须预设一位数阈值,作为判断所述照片二进制序列差异的标准。若两张照片的二进制序列差异位数小于所述位数阈值,则这两张照片的相似匹配度满足要求。
在本申请第一方面的某些实施方式中,执行步骤S4-3时,选取所述像素分辨率大于一预设于所述智能终端内像素分辨率阈值的照片进行合成。本改进对于合成降噪处理后的照片得到一合成照片的步骤进行了条件限制,即选取像素分辨率大于所述像素分辨率阈值的照片进行合成。所述步骤S4-2对所有相似匹配度大于所述匹配度阈值的照片进行了降噪处理,这些照片可能是多张,且经过降噪处理后其清晰度发生了变化,因此有必要对这些降噪处理后的照片进行筛选,选取其中清晰度较高的照片进行合成。所述像素分辨率即照片中的像素数量,只有照片的像素分辨率大于所述像素分辨率阈值时,意味着该照片是较为清晰的。
参阅图5,为符合本发明一优选实施例中智能终端照片处理装置的结构示意图,所述处理装置10包括:
- 清晰度计算模块11
清晰度计算模块11,计算每一所述待筛选照片的清晰度参数。清晰度计算模块11为软件模块,从所述智能终端中获取对同一目标物体拍摄的至少两张待筛选照片,并计算每一所述待筛选照片的清晰度参数。所述待筛选的照片在所述智能终端中以数字化信息的形式存储,具体来说就是按照像素点矩阵的形式存放,每个像素点为0~255的数值,代表了不同的颜色。而所述待筛选照片的清晰度参数计算的方式可以根据所述待筛选照片的噪点、坏点、分辨率、灰度变化率中的一种或几种的结合。以分辨率为例,分辨率即照片的像素点数量,不同的照片其像素点数可能是不同的,像素点越多,该照片就越能展现图像细节,也就越清晰;所述清晰度计算模块11统计所述待筛选照片的数量,可 以将像素点数量作为所述清晰度参数,或者将所述像素点数量经过线型运算后得到较小范围的数值,作为所述清晰度参数。
- 清晰度判断模块12
清晰度判断模块12,判断每一所述待筛选照片的清晰度参数是否大于一预设于所述智能终端内的清晰度参数阈值。所述清晰度判断模块12为软件模块,从所述清晰度计算模块11中获取所述待筛选照片的清晰度参数,并与预设于所述智能终端内的清晰度参数阈值进行比较。所述清晰度判断模块12进行的比较运算即数值大小比较运算,易于实现。所述清晰度判断模块12判断所述待筛选照片的清晰度参数是否大于所述清晰度参数阈值,以便作为后续处理的判断条件。
- 保存模块13
保存模块13,当所述清晰度判断模块12判断所述待筛选照片中至少一张照片的清晰度参数大于等于所述清晰度参数阈值时,保存所述至少一张照片中具有最大清晰度参数的照片。所述保存模块13的工作首先要满足前提条件,即所述清晰度判断模块12判断所述待筛选照片中至少一张照片的清晰度参数大于等于所述清晰度参数阈值,即满足清晰度要求的待筛选照片才能够被保存,所述保存模块13从所述清晰度判断模块12获取判断结果。所述保存模块13保存满足清晰度要求的照片时,选择满足满足清晰度要求照片中具有最大清晰度参数的照片,也就是仅保存清晰度最高的一张照片,这样可以保存对于同一目标物体拍摄最清晰的照片,节约所述智能终端的存储空间,节省用户的筛选操作时间。所述保存模块13保存照片时,按照所述智能终端支持的数据格式进行保存,如jpg、png等格式。
- 合成模块14
合成模块14,当所述清晰度判断模块12判断所述待筛选照片的清晰度参数均小于所述清晰度参数阈值时,提取所述待筛选照片中的至少任意两张并合成,以形成一合成照片并保存。所述合成模块14的工作同样须满足前提条件,即所述清晰度判断模块12判断所述待筛选照片的清晰度参数均小于所述清晰度参数阈值,也就是说所有的待筛选照片均不满足清晰度要求的情况。所述合成模块14提取所述待筛选照片中的至少任意两张作为合成素材,而后对被提取的照片进行合成操作,得到一张合成照片。具体的合成方法已在方法实施例中阐述。
参阅图6,为符合本发明一优选实施例中清晰度计算模块11的结构示意图,所述清晰度计算模块11包括:
- 统计单元111
统计单元111,统计所述待筛选照片的噪点数目、分辨率及灰度变化率。所述统计单元111为软件模块,统计三种参数,即噪点数目、分辨率及灰度变化率,这三种参数均可通过像素点的数值体现,因此可以通过对像素点数值的统计、比较等运算得到先关参数,具体的计算方式在方法实施例中已阐述。
- 运算单元112
运算单元112,对所述噪点数目、分辨率及灰度变化率加权求和以得到所述清晰度参数。所述运算单元112从所述统计单元111获取所述噪点数目、分辨率及灰度变化率的参数,而后对以上三种参数进行加权平均计算,得到所述清晰度参数。所述运算单元112实现了多个清晰度参数的归一化,以便对照片的清晰度参数进行统一比较。
参阅图7,为符合本发明一优选实施例中合成模块14的结构示意图,所述合成模块14包括:
- 相似度判断单元141
相似度判断单元141,判断是否有至少两张待筛选照片的相似匹配度大于一预设于所述智能终端内的匹配度阈值。所述相似度判断单元141首先对待筛选照片的相似匹配度进行计算,由于至少两张照片才能进行相似度的比较,因此须对至少两张待筛选照片进行相似匹配度的计算,也可以对三张及以上的待筛选照片进行计算。现有技术中对于照片的相似度计算已有成熟的算法,比较常用的算法有感知哈希算法、尺度不变特征转换算法(SIFT)等,具体的算法实现不再赘述。所述相似度判断单元141计算得到所述相似匹配度后,再与所述匹配度阈值进行比较,可以得出参与相似匹配度计算的照片是否满足相似度的要求,以便后续处理。
- 降噪处理单元142
降噪处理单元142,当所述相似度判断单元141判断至少两张待筛选照片的相似匹配度大于所述匹配度阈值时,对所有相似匹配度大于所述匹配度阈值的待筛选照片降噪处理。所述降噪处理单元142的工作首先须满足前提条件,即所述相似度判断单元141判断至少两张待筛选照片的相似匹配度大于所述匹配度阈值,也就是至少靓照待筛选照片的相似度较高。而后所述降噪处理单元142对满足相似匹配度要求的照片进行降噪处理,具体的处理方式已在方法实施例中阐述。降噪处理后的照片,减少了噪点对清晰度效果的影响。
- 合成单元143
合成单元143,合成降噪处理后的照片得到一合成照片。所述合成单元143,从所述降噪处理单元142获取降噪处理后的照片,并对这些照片进行合成,得到一张合成照片。照片合成的方式已在方法实施例中阐述。
参阅图8,为符合本发明一优选实施例中相似度判断单元141的结构示意图,所述相似度判断单元141包括:
- 缩放单元1411
缩放单元1411,缩小所述照片的像素并转换为灰度图。所述缩放单元1411首先将照片缩小到8x8的尺寸,总共64个像素。缩小照片的方法已在方法实施例中阐述。而后所述缩放单元1411将缩小后的图片转为灰度图片,由于灰度值也是由0-255的数值表示,因此直接将所述缩小后图片的像素值对应转换为灰度值即可。
- 灰度计算单元1412
灰度计算单元1412,从所述缩放单元1411获取所述灰度图,并计算所述灰度图的灰度平均值。所述灰度计算单元1412对所述灰度图内的64个灰度值进行平均数计算,得到灰度平均值。
- 二进制转换单元1413
二进制转换单元1413,将所述灰度图中大于或等于所述灰度平均值的像素点设为1,小于所述灰度平均值的像素点设为0,得到一二进制序列。所述二进制转换单元1413从所述缩放单元1411中获取所述灰度图,再从所述灰度计算单元1412中获取所述灰度平均值,而后以所述灰度平均值为基准,对比所述灰度图内每个像素的灰度值。若所述灰度图中像素的灰度值大于或等于所述灰度平均值,则将该像素点设为1;若所述灰度图中像素的灰度值小于所述灰度平均值,则将该像素点设为0。则所述灰度图被转换为64位的二进制序列。
- 位数判断单元1414
位数判断单元1414,判断任意两张照片的二进制序列的差异位数是否小于一预设的位数阈值。所述位数判断单元1414比较这些照片的二进制序列的差异,比较方式为判断两个照片的二进制序列有多少位是不同的。所述差异位数的比较与统计方式已在方法实施例中阐述。所述位数判断单元1414内预设一位数阈值,作为判断所述照片二进制序列差异的标准。若两张照片的二进制序列差异位数小于所述位数阈值,则这两张照片的相似匹配度满足要求。
在本申请第二方面的某些实施方式中,所述合成单元143合成降噪处理后的照片时, 选取所述像素分辨率大于一预设于所述智能终端内像素分辨率阈值的照片进行合成。本实施例改进中,所述合成单元143在合成照片之前,先对所述降噪处理后的照片做一次筛选,选取所述像素分辨率大于所述像素分辨率阈值的照片,即选择较为清晰的照片进行合成。所述合成单元143的筛选仅针对所述像素分辨率参数,以便节约计算过程,具体的计算方式已在方法实施例中阐述。
应当注意的是,本发明的实施例有较佳的实施性,且并非对本发明作任何形式的限制,任何熟悉该领域的技术人员可能利用上述揭示的技术内容变更或修饰为等同的有效实施例,但凡未脱离本发明技术方案的内容,依据本发明的技术实质对以上实施例所作的任何修改或等同变化及修饰,均仍属于本发明技术方案的范围内。

Claims (10)

  1. 一种智能终端的照片处理方法,其特征在于,包括以下步骤:
    获取对同一目标物体拍摄的至少两张待筛选照片及每一所述待筛选照片的清晰度参数;
    判断每一所述待筛选照片的清晰度参数是否大于一预设于所述智能终端内的清晰度参数阈值;
    当所述待筛选照片中至少一张照片的清晰度参数大于等于所述清晰度参数阈值时,保存所述至少一张照片中具有最大清晰度参数的照片;
    当所述待筛选照片的清晰度参数均小于所述清晰度参数阈值时,提取所述待筛选照片中的至少任意两张并合成,以形成一合成照片并保存。
  2. 如权利要求1所述的处理方法,其特征在于,
    获取对同一目标物体拍摄的至少两张待筛选照片及每一所述待筛选照片的清晰度参数的步骤包括:
    统计所述待筛选照片的噪点数目、分辨率及灰度变化率;
    对所述噪点数目、分辨率及灰度变化率加权求和以得到所述清晰度参数。
  3. 如权利要求1或2所述的处理方法,其特征在于,
    当所述待筛选照片的清晰度参数均小于所述清晰度参数阈值时,提取所述待筛选照片中的至少任意两张并合成,以形成一合成照片并保存的步骤包括:
    判断是否有至少两张待筛选照片的相似匹配度大于一预设于所述智能终端内的匹配度阈值;
    当至少两张待筛选照片的相似匹配度大于所述匹配度阈值时,对所有相似匹配度大于所述匹配度阈值的待筛选照片降噪处理;
    合成降噪处理后的照片得到一合成照片。
  4. 如权利要求3所述的处理方法,其特征在于,
    判断是否有至少两张照片的相似匹配度大于一预设于所述智能终端内的匹配度阈值的步骤包括:
    缩小所述照片的像素并转换为灰度图;
    计算所述灰度图的灰度平均值;
    将所述灰度图中大于或等于所述灰度平均值的像素点设为1,小于所述灰度平均值的像素点设为0,得到一二进制序列;
    判断任意两张照片的二进制序列的差异位数是否小于一预设的位数阈值。
  5. 如权利要求3所述的处理方法,其特征在于,
    合成降噪处理后的照片得到一合成照片时,选取所述像素分辨率大于一预设于所述智能终端内像素分辨率阈值的照片进行合成。
  6. 一种智能终端的照片处理装置,其特征在于,所述处理装置包括:
    清晰度计算模块,计算每一所述待筛选照片的清晰度参数;
    清晰度判断模块,判断每一所述待筛选照片的清晰度参数是否大于一预设于所述智能终端内的清晰度参数阈值;
    保存模块,当所述清晰度判断模块判断所述待筛选照片中至少一张照片的清晰度参数大于等于所述清晰度参数阈值时,保存所述至少一张照片中具有最大清晰度参数的照片;
    合成模块,当所述清晰度判断模块判断所述待筛选照片的清晰度参数均小于所述清晰度参数阈值时,提取所述待筛选照片中的至少任意两张并合成,以形成一合成照片并保存。
  7. 如权利要求6所述的处理方法,其特征在于,
    所述清晰度计算模块包括:
    统计单元,统计所述待筛选照片的噪点数目、分辨率及灰度变化率;
    运算单元,对所述噪点数目、分辨率及灰度变化率加权求和以得到所述清晰度参数。
  8. 如权利要求6或7所述的处理方法,其特征在于,
    所述合成模块包括:
    相似度判断单元,判断是否有至少两张待筛选照片的相似匹配度大于一预设于所述智能终端内的匹配度阈值;
    降噪处理单元,当所述相似度判断单元判断至少两张待筛选照片的相似匹配度大于所述匹配度阈值时,对所有相似匹配度大于所述匹配度阈值的待筛选照片降噪处理;
    合成单元,合成降噪处理后的照片得到一合成照片。
  9. 如权利要求8所述的处理方法,其特征在于,
    所述相似度判断单元包括:
    缩放单元,缩小所述照片的像素并转换为灰度图;
    灰度计算单元,计算所述灰度图的灰度平均值;
    二进制转换单元,将所述灰度图中大于或等于所述灰度平均值的像素点设为1,小于所述灰度平均值的像素点设为0,得到一二进制序列;
    位数判断单元,判断任意两张照片的二进制序列的差异位数是否小于一预设的位数阈值。
  10. 如权利要求8所述的处理方法,其特征在于,
    所述合成单元合成降噪处理后的照片时,选取所述像素分辨率大于一预设于所述智能终端内像素分辨率阈值的照片进行合成。
PCT/CN2017/095638 2017-08-02 2017-08-02 一种智能终端的照片处理方法及处理装置 Ceased WO2019023993A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201780095583.2A CN111183630B (zh) 2017-08-02 2017-08-02 一种智能终端的照片处理方法及处理装置
PCT/CN2017/095638 WO2019023993A1 (zh) 2017-08-02 2017-08-02 一种智能终端的照片处理方法及处理装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/095638 WO2019023993A1 (zh) 2017-08-02 2017-08-02 一种智能终端的照片处理方法及处理装置

Publications (1)

Publication Number Publication Date
WO2019023993A1 true WO2019023993A1 (zh) 2019-02-07

Family

ID=65232216

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/095638 Ceased WO2019023993A1 (zh) 2017-08-02 2017-08-02 一种智能终端的照片处理方法及处理装置

Country Status (2)

Country Link
CN (1) CN111183630B (zh)
WO (1) WO2019023993A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112257749A (zh) * 2020-09-21 2021-01-22 北京达佳互联信息技术有限公司 相似图片处理方法、装置、终端设备和存储介质
CN112365413A (zh) * 2020-10-30 2021-02-12 湖北锐世数字医学影像科技有限公司 图像处理方法、装置、设备、系统及计算机可读存储介质
CN112529831A (zh) * 2019-08-28 2021-03-19 深圳市熠摄科技有限公司 利用图像处理技术的地貌潜变观测设备
CN116630220A (zh) * 2023-07-25 2023-08-22 江苏美克医学技术有限公司 一种荧光图像景深融合成像方法、装置及存储介质
CN116673597A (zh) * 2023-07-28 2023-09-01 清华大学 用于双v复合型坡口的激光线图像特征提取系统及方法
CN118408478A (zh) * 2024-07-02 2024-07-30 青岛睿华建设工程有限公司 一种基于bim技术的智慧建造施工的精准测量装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11296692A (ja) * 1998-04-07 1999-10-29 Hitachi Ltd 画像処理方法および画像処理装置
CN105657242A (zh) * 2015-11-06 2016-06-08 乐视移动智能信息技术(北京)有限公司 夜景拍照方法、装置及移动终端
CN106570110A (zh) * 2016-10-25 2017-04-19 北京小米移动软件有限公司 图像去重方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7825963B2 (en) * 2007-09-19 2010-11-02 Nokia Corporation Method and system for capturing an image from video
JP5469537B2 (ja) * 2010-01-26 2014-04-16 日本放送協会 ビューファインダ映像生成装置
CN102333176A (zh) * 2010-07-14 2012-01-25 鸿富锦精密工业(深圳)有限公司 拍照装置及其拍照方法
CN106210496B (zh) * 2015-05-06 2019-12-13 小米科技有限责任公司 照片拍摄方法及装置
US10535193B2 (en) * 2015-09-08 2020-01-14 Canon Kabushiki Kaisha Image processing apparatus, image synthesizing apparatus, image processing system, image processing method, and storage medium
CN106331504B (zh) * 2016-09-30 2020-03-17 北京小米移动软件有限公司 拍摄方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11296692A (ja) * 1998-04-07 1999-10-29 Hitachi Ltd 画像処理方法および画像処理装置
CN105657242A (zh) * 2015-11-06 2016-06-08 乐视移动智能信息技术(北京)有限公司 夜景拍照方法、装置及移动终端
CN106570110A (zh) * 2016-10-25 2017-04-19 北京小米移动软件有限公司 图像去重方法及装置

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112529831A (zh) * 2019-08-28 2021-03-19 深圳市熠摄科技有限公司 利用图像处理技术的地貌潜变观测设备
CN112529831B (zh) * 2019-08-28 2024-05-24 深圳市熠摄科技有限公司 利用图像处理技术的地貌潜变观测设备
CN112257749A (zh) * 2020-09-21 2021-01-22 北京达佳互联信息技术有限公司 相似图片处理方法、装置、终端设备和存储介质
CN112365413A (zh) * 2020-10-30 2021-02-12 湖北锐世数字医学影像科技有限公司 图像处理方法、装置、设备、系统及计算机可读存储介质
CN116630220A (zh) * 2023-07-25 2023-08-22 江苏美克医学技术有限公司 一种荧光图像景深融合成像方法、装置及存储介质
CN116630220B (zh) * 2023-07-25 2023-11-21 江苏美克医学技术有限公司 一种荧光图像景深融合成像方法、装置及存储介质
CN116673597A (zh) * 2023-07-28 2023-09-01 清华大学 用于双v复合型坡口的激光线图像特征提取系统及方法
CN116673597B (zh) * 2023-07-28 2023-10-13 清华大学 用于双v复合型坡口的激光线图像特征提取系统及方法
CN118408478A (zh) * 2024-07-02 2024-07-30 青岛睿华建设工程有限公司 一种基于bim技术的智慧建造施工的精准测量装置

Also Published As

Publication number Publication date
CN111183630B (zh) 2021-08-10
CN111183630A (zh) 2020-05-19

Similar Documents

Publication Publication Date Title
CN111183630B (zh) 一种智能终端的照片处理方法及处理装置
KR100945809B1 (ko) 이미지의 이진화
US10565742B1 (en) Image processing method and apparatus
US9135683B2 (en) System and method for temporal video image enhancement
CN102542568B (zh) 图像处理装置及图像处理方法
EP3644599B1 (en) Video processing method and apparatus, electronic device, and storage medium
CN110942427B (zh) 一种图像降噪的方法及装置、设备、存储介质
CN108898567A (zh) 图像降噪方法、装置及系统
CN111131688B (zh) 一种图像处理方法、装置及移动终端
JP2009506688A (ja) 画像分割方法および画像分割システム
CN108604293A (zh) 提高图像质量的装置和方法
WO2008121280A2 (en) Edge mapping using panchromatic pixels
JP2003058894A (ja) ピクセル化された画像をセグメント化するための方法および装置
WO2014045026A1 (en) Systems and methods for reducing noise in video streams
JP2004310475A (ja) 画像処理装置、画像処理を行う携帯電話、および画像処理プログラム
CN108259770A (zh) 图像处理方法、装置、存储介质及电子设备
JP6375138B2 (ja) パープルフリンジ除去処理方法及びその処理を遂行するパープルフリンジ除去処理装置
US20220044349A1 (en) Multi-scale warping circuit for image fusion architecture
JP2019016117A (ja) 画像調整装置、局所的コントラスト量計算装置、方法、及びプログラム
WO2018011930A1 (ja) 画像処理装置、画像処理方法、及びプログラム
CN110298796A (zh) 基于改进Retinex与对数图像处理的低照度图像增强方法
CN112784854A (zh) 基于数理统计的服装颜色分割提取方法、装置和设备
CN111080683A (zh) 图像处理方法、装置、存储介质及电子设备
US8687912B2 (en) Adaptive overshoot control for image sharpening
US8582914B2 (en) Tone mapping with adaptive slope for image sharpening

Legal Events

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

Ref document number: 17919767

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17919767

Country of ref document: EP

Kind code of ref document: A1