WO2017092289A1 - 图像处理方法及装置 - Google Patents

图像处理方法及装置 Download PDF

Info

Publication number
WO2017092289A1
WO2017092289A1 PCT/CN2016/087492 CN2016087492W WO2017092289A1 WO 2017092289 A1 WO2017092289 A1 WO 2017092289A1 CN 2016087492 W CN2016087492 W CN 2016087492W WO 2017092289 A1 WO2017092289 A1 WO 2017092289A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
processed
feature
preset
obtaining
Prior art date
Application number
PCT/CN2016/087492
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 WO2017092289A1 publication Critical patent/WO2017092289A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/217Validation; Performance evaluation; Active pattern learning techniques
    • G06F18/2193Validation; Performance evaluation; Active pattern learning techniques based on specific statistical tests
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • G06V10/235Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition based on user input or interaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/255Detecting or recognising potential candidate objects based on visual cues, e.g. shapes
    • 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/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Definitions

  • the present disclosure relates to the field of image interception technology, and in particular, to an image processing method and apparatus.
  • Embodiments of the present disclosure provide an image processing method and apparatus.
  • the technical solution is as follows:
  • an image processing method including:
  • a screenshot of the image to be processed is obtained based on the evaluation value.
  • the obtaining an candidate region in the image to be processed that includes the reference target includes:
  • An candidate region including the reference target is extracted from the image to be processed according to a preset condition.
  • the obtaining a reference target of the image to be processed includes:
  • Determining that the target in the target set corresponding to the selected location is the reference target.
  • the obtaining a reference target of the image to be processed includes:
  • the target with the highest significance is determined as the benchmark target.
  • the extracting, from the to-be-processed image, the candidate region that includes the reference target according to the preset condition includes:
  • the candidate area extracted from the image to be processed meets at least one of the following preset conditions:
  • the candidate area When the candidate area includes a remaining target other than the reference target, the candidate area includes a complete remaining target;
  • the reference target is located at a preset position of the candidate area.
  • the obtaining an candidate area in the image to be processed that includes the reference target includes:
  • the candidate area is determined based on the selection area.
  • the extracting the preset feature from the candidate area includes:
  • Presetting features are extracted for the reference target and the candidate region in the candidate region, respectively.
  • obtaining, according to the evaluation value, a screenshot of the image to be processed including:
  • the candidate area having the highest evaluation value is determined as a screenshot of the image to be processed.
  • obtaining, according to the evaluation value, a screenshot of the image to be processed including:
  • the selected candidate area is determined as a screenshot of the image to be processed based on a user selected operation of the candidate area.
  • the calculating the evaluation value of the candidate area according to the preset feature includes:
  • the evaluation value of the sample image is trained to obtain a model between the preset feature and the evaluation value.
  • the method further includes: obtaining the preset image evaluation model
  • the obtaining the preset image evaluation model includes:
  • the preset feature includes at least one of the following features: an image feature and a shooting feature of the image;
  • the image feature includes at least one of the following features: a color feature, a texture feature, a shape feature, and a spatial relationship feature;
  • the photographing feature includes at least one of the following features: aperture, shutter, white balance, sensitivity, focal length, shooting time, shooting conditions, camera brand, model, color coding, sound recorded during shooting, shooting location, and Thumbnail.
  • an image processing apparatus comprising:
  • a first acquiring module configured to acquire an candidate region in the image to be processed that includes the reference target
  • An extraction module configured to extract a preset feature from an candidate area acquired by the first acquiring module
  • a calculation module configured to calculate an evaluation value of the candidate area according to the preset feature extracted by the extraction module
  • a second acquiring module configured to obtain a screenshot of the image to be processed according to the evaluation value calculated by the computing module.
  • the first acquiring module includes:
  • a first obtaining submodule configured to acquire a reference target of the image to be processed
  • a first extraction sub-module configured to extract, from the to-be-processed image, an candidate region that includes the reference target acquired by the first acquisition sub-module according to a preset condition.
  • the first acquiring sub-module is configured to perform target detection on the to-be-processed image to obtain a target set, obtain a click location of the image to be processed by the user, and determine a location corresponding to the selected location.
  • the target in the target set is the benchmark target.
  • the first obtaining submodule is configured to perform saliency detection on the image to be processed; and determine that the target with the highest saliency is the reference target.
  • the first extraction sub-module configured to extract the candidate area from the to-be-processed image, meets at least one preset condition:
  • the candidate area When the candidate area includes a remaining target other than the reference target acquired by the first acquisition sub-module, the candidate area includes a complete remaining target;
  • the reference target acquired by the first acquisition sub-module is located at a preset position of the candidate area.
  • the first acquiring module includes:
  • a second obtaining submodule configured to acquire a selected area of the user in the to-be-processed image, where the selected area includes the reference target;
  • a first determining submodule configured to determine the candidate area according to the selected area acquired by the second acquiring submodule.
  • the extracting module is configured to separately extract preset features from the reference target and the candidate region in the candidate region acquired by the first acquiring module.
  • the second obtaining module includes:
  • a third obtaining submodule configured to acquire an candidate region with the highest evaluation value calculated by the computing module
  • a second determining submodule configured to determine, by the third acquiring submodule, an candidate area with the highest evaluation value as a screenshot of the to-be-processed image.
  • the second obtaining module includes:
  • a sorting submodule configured to sort the candidate regions according to the evaluation values calculated by the computing module
  • a display submodule configured to display an alternate area after the sorting submodule is sorted
  • a third determining submodule configured to determine the selected candidate region as a screenshot of the image to be processed according to a selected operation of the candidate region displayed by the display submodule by the user.
  • the calculating module is configured to calculate an evaluation value of the candidate region according to the pre-obtained image evaluation model and the extracted preset feature, where the preset image evaluation model is based on the sample
  • the predetermined feature extracted in the image and the evaluation value of the sample image are trained to obtain a model between the preset feature and the evaluation value.
  • the device further includes: a third acquiring module, configured to obtain the preset image evaluation model;
  • the third obtaining module includes:
  • a fourth obtaining submodule configured to acquire a sample image
  • a detecting submodule configured to perform saliency detection on the sample image acquired by the fourth acquiring submodule, to obtain a saliency region of the sample image
  • a second extraction sub-module configured to extract the preset feature from the saliency region detected by the detection sub-module and the full image of the sample image
  • a fifth obtaining submodule configured to obtain an evaluation value of the sample image that is given in advance
  • a training sub-module configured to perform model training according to the evaluation value of the sample image obtained by the fifth acquisition sub-module and the preset feature extracted by the second extraction sub-module Preset image evaluation model.
  • the preset feature extracted by the extraction module includes at least one of the following features: an image feature and a captured feature of the image;
  • the image feature includes at least one of the following features: a color feature, a texture feature, a shape feature, and a spatial relationship feature;
  • the photographing feature includes at least one of the following features: aperture, shutter, white balance, sensitivity, focal length, shooting time, shooting conditions, camera brand, model, color coding, sound recorded during shooting, shooting location, and Thumbnail.
  • an image processing apparatus comprising:
  • a memory for storing processor executable instructions
  • processor is configured to:
  • a screenshot of the image to be processed is obtained based on the evaluation value.
  • the terminal automatically performs processing on the image to be intercepted in multiple ways, and evaluates the candidate regions intercepted by different methods, and provides the best-performing screenshots to the user, thereby improving the accuracy of the screenshot and the effect of the image, and reducing User manual screenshot operation to improve user experience and satisfaction.
  • all targets in the image to be processed can be detected and provided to the user for selection, and the user can select the most interesting target as the reference target according to his or her preference. It is also possible to find the target that the user may be most interested in through the saliency detection, simulate the user's click process, and use the most significant target as the benchmark target. In this way, the benchmark target can be accurately obtained, the part that the user is most interested in the image to be processed is found, and the accuracy of the subsequent selection candidate region is improved, so that the screenshot is more in line with the user's demand, and the user experience is better.
  • the candidate area including the reference target is extracted from the image to be processed according to the preset condition, so that the picture of the candidate area is more balanced, the picture expression is higher, and the picture interception effect is better.
  • the user can also select the area to be intercepted according to his or her preference, the operation is simple, and the user is convenient to use, and then the candidate area selected by the user can be evaluated to determine the effect of the user selecting the screenshot, so that the user experience degree better.
  • the evaluation value is calculated by extracting the feature from the candidate region, so that the candidate region with the best effect can be selected as a screenshot according to the evaluation value, thereby improving the user's experience and satisfaction with the screenshot.
  • the screenshot of the final image to be processed is best. It is most in line with user needs and improves user experience and satisfaction with screenshots.
  • a preset image evaluation model including a correspondence between preset features of the image and the evaluation value is obtained, so that the preset image evaluation model can be subsequently processed.
  • An alternative screenshot of the image is accurately and reliably evaluated so that a screenshot of the image to be processed can be obtained based on the evaluation result.
  • FIG. 1 is a flow chart showing an image processing method according to an exemplary embodiment.
  • FIG. 2 is a flowchart of an image processing method according to another exemplary embodiment.
  • FIG. 3 is a flowchart of an image processing method according to another exemplary embodiment.
  • FIG. 4 is a schematic diagram of a target in an image to be processed, according to an exemplary embodiment.
  • FIG. 5 is a flowchart of an image processing method according to another exemplary embodiment.
  • FIG. 6 is a flowchart of an image processing method according to another exemplary embodiment.
  • FIG. 7 is a schematic diagram of a process selection box to be processed, according to an exemplary embodiment.
  • FIG. 8 is a flowchart of an image processing method according to another exemplary embodiment.
  • FIG. 9 is a flowchart of an image processing method according to another exemplary embodiment.
  • FIG. 10 is a flowchart of an image processing method according to another exemplary embodiment.
  • FIG. 11 is a block diagram of an image processing apparatus according to an exemplary embodiment.
  • FIG. 12 is a block diagram of a first acquisition module, according to an exemplary embodiment.
  • FIG. 13 is a block diagram of a first acquisition module, according to another exemplary embodiment.
  • FIG. 14 is a block diagram of a second acquisition module, according to an exemplary embodiment.
  • FIG. 15 is a block diagram of a second acquisition module, according to another exemplary embodiment.
  • FIG. 16 is a block diagram of an image processing apparatus according to another exemplary embodiment.
  • FIG. 17 is a block diagram of an apparatus for image processing, according to an exemplary embodiment.
  • the technical solution provided by the embodiment of the present disclosure relates to a terminal, which automatically intercepts an image to be processed, and the process of intercepting takes into account the photographic composition skill and image feature, and reproduces the process of the photographer shooting and selecting the image, and combines the target detection result to avoid completeness.
  • the target is truncated, making the screenshots work better. And reduce user manual screenshot operations, improve user experience and satisfaction.
  • the terminal may be any device with image recognition function such as a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
  • FIG. 1 is a flowchart of an image processing method according to an exemplary embodiment. As shown in FIG. 1 , an image processing method is used in a terminal, including the following steps:
  • step S11 an candidate region including the reference target in the image to be processed is acquired.
  • step S12 extracting a preset feature from the candidate region
  • step S13 an evaluation value of the candidate region is calculated according to the preset feature
  • step S14 a screenshot of the image to be processed is obtained based on the evaluation value.
  • the terminal automatically performs processing on the image to be intercepted in multiple ways, and evaluates the candidate regions intercepted by different methods, and provides the best-performing screenshots to the user, thereby improving the accuracy of the screenshot and the effect of the image, and reducing User manual screenshot operation to improve user experience and satisfaction.
  • FIG. 2 is a flowchart of an image processing method according to another exemplary embodiment. As shown in FIG. 2, acquiring an candidate region including a reference target in an image to be processed includes:
  • step S21 acquiring a reference target of the image to be processed
  • step S22 an candidate region including the reference target is extracted from the image to be processed according to a preset condition.
  • the reference target for obtaining the image to be processed may be in the following manners.
  • Method 1 User selects the benchmark target
  • FIG. 3 is a flowchart of an image processing method according to another exemplary embodiment. As shown in FIG. 3, acquiring a reference target of an image to be processed includes:
  • step S31 target detection is performed on the image to be processed to obtain a target set
  • step S32 a click location of the image to be processed by the user is acquired
  • step S33 it is determined that the target in the target set corresponding to the selected position is the reference target.
  • an R-CNN (Region Base Cellular Neural Networks) algorithm may be employed, and all target frames in the image to be processed may be selected.
  • the user can click on the target target to be intercepted on the image to be processed, and determine the reference target according to the selected position of the user.
  • R-CNN Registered Base Cellular Neural Networks
  • all the objects in the image to be processed are detected and provided to the user for selection, and the user can select the most interested target as the reference target according to his or her preference.
  • Method 2 The terminal automatically detects the benchmark target
  • FIG. 5 is a flowchart of an image processing method according to another exemplary embodiment. As shown in FIG. 5, acquiring a reference target of an image to be processed includes:
  • step S51 the image to be processed is subjected to saliency detection
  • step S52 it is determined that the target with the highest significance is the reference target.
  • the saliency detection method in the related art it is obtained that the person riding the horse in the image to be processed has the highest saliency, and the person riding the horse can be used as the reference target.
  • the target that the user may be most interested in the image to be processed is found, the user's clicking process is simulated, and the target with the highest saliency is used as the benchmark target.
  • the reference target can be accurately obtained, the part that is most interested in the user in the image to be processed is found, and the accuracy of the subsequent selected candidate area is improved, so that the screenshot is more in line with the user's needs and the user experience. Good degree.
  • the process of recreating the composition of the photographer is considered in consideration of the photographic composition technique and the image feature, and the extraction of the candidate region needs to meet certain preset conditions. Extracting candidate regions including the reference target from the image to be processed according to preset conditions, including:
  • the candidate area extracted from the image to be processed meets at least one of the following preset conditions:
  • the candidate area includes the remaining targets other than the baseline target, the candidate area includes the complete remaining target.
  • the image to be processed must contain a more complete target if it contains the remaining targets in the image to be processed, and the remaining target is one or more targets other than the baseline target.
  • the reference target is a person riding a horse. If the candidate image contains a horse or a surrounding dog, the horse or dog must be completely contained, and only the part cannot be intercepted.
  • the benchmark target is located at a preset position in the candidate area.
  • the benchmark target needs to fall at the three-point point of the candidate area or the golden point.
  • the rule of thirds and the rule of golden division are the basic rules of composition in photography.
  • the extraction of the candidate region can also conform to the diagonal rule, that is, the edge of the picture is equally divided, and then half of the image is divided into three parts, and the points are connected by a straight line to form a diagonal channel. According to the diagonal rule, important elements should be placed on the focus channel.
  • the candidate area including the reference target is extracted from the image to be processed according to the preset condition, so that the picture of the candidate area is more balanced, the picture expression power is higher, and the picture interception effect is better.
  • FIG. 6 is a flowchart of an image processing method according to another exemplary embodiment. As shown in FIG. 6 , acquiring an candidate region including a reference target in an image to be processed includes:
  • step S61 a selection area of the user in the image to be processed is acquired, and the selection area includes a reference target;
  • step S62 an alternative area is determined based on the selected area.
  • a movable scalable selection frame 71 is displayed on the image to be processed 70, and the user can move the selection frame 71 on the image to be processed 70 or change the boundary of the selection frame 71 by dragging it. size. If the user is satisfied with the image within the range of the selection frame 71, the area in the selection frame 71 can be determined as the candidate area.
  • the user can also select the area to be intercepted according to his or her preference, the operation is simple, and the user is convenient to use, and then the candidate area selected by the user can be evaluated to determine the effect of the user selecting the screenshot, so that the user experience is better. .
  • extracting the preset feature for the candidate region includes extracting the preset feature separately from the reference target and the candidate region in the candidate region.
  • the feature is extracted separately from the reference target and the entire candidate region, and the extracted two-part feature is combined as a basis for evaluating the candidate region.
  • the evaluation value of the candidate region is calculated according to the preset feature, including:
  • the preset image evaluation model is a model between the preset feature and the evaluation value obtained after training based on the preset feature extracted in the sample image and the evaluation value of the sample image.
  • the preset image evaluation model may include: an evaluation value corresponding to each preset feature; or a weight corresponding to each preset feature for calculating the evaluation value; or, each preset feature corresponding to the calculation evaluation value Linear or nonlinear functions, etc.
  • the evaluation value is calculated by extracting the feature from the candidate region, so that the candidate region with the best effect can be selected as the screenshot according to the evaluation value, thereby improving the user's experience and satisfaction with the screenshot.
  • the screenshot of obtaining an image to be processed based on the evaluation value may be in the following manner.
  • Method A select the candidate area with the highest evaluation value
  • FIG. 8 is a flowchart of an image processing method according to another exemplary embodiment. As shown in FIG. 8, a screenshot of an image to be processed is obtained according to an evaluation value, including:
  • step S81 an candidate area having the highest evaluation value is obtained
  • step S82 the candidate area having the highest evaluation value is determined as a screenshot of the image to be processed.
  • Method B the user selects from the selected selected areas
  • FIG. 9 is a flowchart of an image processing method according to another exemplary embodiment. As shown in FIG. 9, a screenshot of an image to be processed is obtained according to an evaluation value, including:
  • step S91 the candidate regions are sorted according to the evaluation values
  • step S92 the sorted candidate regions are displayed
  • step S93 the selected candidate area is determined as a screenshot of the image to be processed according to the user's selection operation of the candidate area.
  • the screenshot of the image to be processed finally obtained is the best, which is most in line with the user's needs, and improves the user's experience and satisfaction with the screenshot.
  • the method further comprises: obtaining a preset image evaluation model.
  • obtaining a preset image evaluation model includes:
  • step S101 a sample image is acquired
  • the sample image may be subjected to saliency detection to obtain a saliency region of the sample image
  • step S103 extracting preset features of the salient region and the full image of the sample image
  • step S104 an evaluation value of the sample image given in advance is acquired
  • step S105 model training is performed according to the evaluation value of the sample image given in advance and the extracted preset feature, and a preset image evaluation model is obtained.
  • each sample image is calibrated, and each sample image corresponds to an evaluation value.
  • support vector regression can be used to train to obtain an image evaluation model model M.
  • the weight corresponding to the image feature is 0.8, and the weight corresponding to the feature is 0.2. Then, the evaluation value of the image to be processed can be calculated according to the weight.
  • a preset image evaluation model including a correspondence relationship between preset features and evaluation values of the image is obtained, so that the image to be processed can be subsequently used by the preset image evaluation model.
  • the alternative screenshots are evaluated accurately and reliably so that a screenshot of the image to be processed can be obtained based on the evaluation results.
  • the preset feature includes at least one of the following features: an image feature and a captured feature of the image.
  • the image feature includes at least one of the following features: a color feature, a texture feature, a shape feature, and a spatial relationship feature.
  • the shooting features include at least one of the following characteristics: aperture when shooting, shutter, white balance, sensitivity, focus, shooting time, shooting conditions, camera brand, model, color coding, sound recorded during shooting, shooting location, and thumbnail.
  • FIG. 11 is a block diagram of an image processing apparatus, which may be implemented as part or all of an electronic device by software, hardware, or a combination of both, according to an exemplary embodiment. As shown in FIG. 11, the image processing apparatus includes:
  • the first obtaining module 111 is configured to acquire an candidate region in the image to be processed that includes the reference target;
  • the extraction module 112 is configured to extract preset features from the candidate regions acquired by the first obtaining module 111;
  • the calculation module 113 is configured to calculate an evaluation value of the candidate region according to the preset feature extracted by the extraction module 112;
  • the second obtaining module 114 is configured to obtain a screenshot of the image to be processed according to the evaluation value calculated by the calculation module 113.
  • the terminal automatically performs processing on the image to be intercepted in multiple ways, and evaluates the candidate regions intercepted by different methods, and provides the best-performing screenshots to the user, thereby improving the accuracy of the screenshot and the effect of the image, and reducing User manual screenshot operation to improve user experience and satisfaction.
  • FIG. 12 is a block diagram of a first obtaining module according to an exemplary embodiment. As shown in FIG. 12, the first obtaining module 111 includes:
  • the first obtaining submodule 121 is configured to acquire a reference target of the image to be processed
  • the first extraction sub-module 122 is configured to extract, from the image to be processed, an candidate region including the reference target acquired by the first acquisition sub-module 121 according to a preset condition.
  • the function of the first obtaining submodule 121 can be implemented in the following manners.
  • Method 1 User selects the benchmark target
  • the first obtaining sub-module 121 is configured to perform target detection on the image to be processed to obtain a target set; obtain a click location of the image to be processed by the user; and determine a target in the target set corresponding to the selected location as a reference target.
  • all target frames in the image to be processed can be selected.
  • the user can click on the target target to be intercepted on the image to be processed, and determine the reference target according to the selected position of the user.
  • all the objects in the image to be processed are detected and provided to the user for selection, and the user can select the most interested target as the reference target according to his or her preference.
  • the first obtaining sub-module 121 is configured to perform saliency detection on the image to be processed; and determine the target with the highest saliency as the reference target.
  • the target that the user may be most interested in the image to be processed is found, the user's clicking process is simulated, and the target with the highest saliency is used as the benchmark target.
  • the first obtaining sub-module 121 can accurately acquire the reference target, find the part that is most interested in the user in the image to be processed, and improve the accuracy of the subsequent selected candidate area, so that the screenshot is more Meet user needs and have a good user experience.
  • the process of recreating the composition of the photographer is considered in consideration of the photographic composition technique and the image feature, and the extraction of the candidate region needs to meet certain preset conditions.
  • the first extraction sub-module 122 is configured to select an candidate area from the image to be processed, and meets at least one preset condition:
  • the candidate region includes the remaining targets other than the reference target acquired by the first acquisition sub-module 121, the candidate region includes the complete remaining target.
  • the image to be processed must contain a more complete target if it contains other remaining targets in the image to be processed.
  • the reference target is a person riding a horse. If the candidate image contains a horse or a surrounding dog, the horse or dog must be completely contained, and only the part cannot be intercepted.
  • Condition 2 The reference target acquired by the first obtaining sub-module 121 is located at a preset position of the candidate area.
  • the benchmark target needs to fall at the three-point point of the candidate area or the golden point.
  • the rule of thirds and the rule of golden division are the basic rules of composition in photography.
  • the extraction of the candidate region can also conform to the diagonal rule, that is, the edge of the picture is equally divided, and then half of the image is divided into three parts, and the points are connected by a straight line to form a diagonal channel. According to the diagonal rule, important elements should be placed on the focus channel.
  • the candidate area including the reference target is extracted from the image to be processed according to the preset condition, so that the picture of the candidate area is more balanced, the picture expression power is higher, and the picture interception effect is better.
  • FIG. 13 is a block diagram of a first obtaining module according to another exemplary embodiment. As shown in FIG. 13, the first obtaining module 111 includes:
  • the second obtaining sub-module 131 is configured to acquire a selection area of the user in the image to be processed, where the selection area includes a reference target;
  • the first determining submodule 132 is configured to determine the candidate region according to the selected region acquired by the second obtaining submodule 132.
  • a movable scalable selection frame 71 is displayed on the image to be processed 70, and the user can move the selection frame 71 on the image to be processed 70 or change the boundary of the selection frame 71 by dragging it. size. If the user is satisfied with the image within the range of the selection frame 71, the area in the selection frame 71 can be determined as the candidate area.
  • the user can also select the area to be intercepted according to his or her preference, and the operation is simple, and the user is convenient to use.
  • the candidate area selected by the user can then be evaluated to determine the effect of the user selecting the screenshot, so that the user experience is better.
  • the extraction module 112 is configured to extract preset features respectively from the reference target and the candidate region in the candidate region acquired by the first obtaining module 111.
  • the feature is extracted separately from the reference target and the entire candidate region, and the extracted two-part feature is combined as a basis for evaluating the candidate region.
  • the calculating module 113 is configured to calculate an evaluation value of the candidate region according to the image evaluation model obtained in advance and the extracted preset feature, wherein the preset image evaluation model is based on the preset extracted in the sample image.
  • the feature and the evaluation value of the sample image are trained to obtain a model between the preset feature and the evaluation value.
  • the preset image evaluation model may include: an evaluation value corresponding to each preset feature; or a weight corresponding to each preset feature for calculating the evaluation value; or, each preset feature corresponding to the calculation A linear or non-linear function of the evaluation value.
  • the evaluation value is calculated by extracting the feature from the candidate region, so that the candidate region with the best effect can be selected as the screenshot according to the evaluation value, thereby improving the user's experience and satisfaction with the screenshot.
  • the function of the second obtaining module 131 can be implemented in the following manner.
  • Method A select the candidate area with the highest evaluation value
  • FIG. 14 is a block diagram of a second obtaining module according to an exemplary embodiment. As shown in FIG. 14, the second obtaining module 131 includes:
  • the third obtaining sub-module 141 is configured to acquire an candidate area with the highest evaluation value calculated by the calculating module 113;
  • the second determining sub-module 142 is configured to determine, by the third obtaining sub-module 141, that the candidate region with the highest evaluation value is the screenshot of the image to be processed.
  • Method B the user selects from the selected selected areas
  • FIG. 15 is a block diagram of a second obtaining module according to another exemplary embodiment. As shown in FIG. 15, the second obtaining module 131 includes:
  • the sorting sub-module 151 is configured to sort the candidate regions according to the evaluation values calculated by the calculation module 113;
  • the display sub-module 152 is configured to display the sorted candidate area after the sorting sub-module 151 is sorted;
  • the third determination sub-module 153 is configured to determine the selected candidate region as a screenshot of the image to be processed based on the user's selected operation of the candidate region displayed by the display sub-module 152.
  • the screenshot of the image to be processed finally obtained is the best, which is most in line with the user's needs, and improves the user's experience and satisfaction with the screenshot.
  • FIG. 16 is a block diagram of an image processing apparatus according to another exemplary embodiment. As shown in FIG. 16, the apparatus further includes a third acquisition module 115 configured to obtain a preset image evaluation model. As shown in Figure 16, the third acquisition Module 115 includes:
  • a fourth obtaining submodule 161 configured to acquire a sample image
  • the detecting sub-module 162 is configured to perform saliency detection on the sample image acquired by the fourth acquiring sub-module 161 to obtain a saliency region of the sample image;
  • the second extraction sub-module 163 is configured to perform extraction of preset features on the saliency region detected by the detection sub-module 162 and the full image of the sample image;
  • a fifth obtaining submodule 164 configured to obtain an evaluation value of the sample image given in advance
  • the training sub-module 165 is configured to perform model training according to the evaluation value of the predetermined sample image acquired by the fifth acquisition sub-module 164 and the preset feature extracted by the second extraction sub-module 163, to obtain a preset image evaluation model. .
  • the weight corresponding to the image feature is 0.8, and the weight corresponding to the feature is 0.2. Then, the evaluation value of the image to be processed can be calculated according to the weight.
  • a preset image evaluation model including a correspondence relationship between preset features and evaluation values of the image is obtained, so that the image to be processed can be subsequently used by the preset image evaluation model.
  • the alternative screenshots are evaluated accurately and reliably so that a screenshot of the image to be processed can be obtained based on the evaluation results.
  • the preset feature extracted by the extraction module 112 includes at least one of the following features: an image feature and a captured feature of the image;
  • the image feature includes at least one of the following features: a color feature, a texture feature, a shape feature, and a spatial relationship feature;
  • the shooting features include at least one of the following characteristics: aperture when shooting, shutter, white balance, sensitivity, focus, shooting time, shooting conditions, camera brand, model, color coding, sound recorded during shooting, shooting location, and thumbnail.
  • the present disclosure also provides an image processing apparatus, including:
  • a memory for storing processor executable instructions
  • processor is configured to:
  • a screenshot of the image to be processed is obtained based on the evaluation value.
  • FIG. 17 is a block diagram of an apparatus for image processing, which is applicable to a terminal device, according to an exemplary embodiment.
  • the device 1700 can be a video camera, a recording device, a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
  • Apparatus 1700 can include one or more of the following components: processing component 1702, memory 1704, power component 1706, multimedia component 1708, audio component 1710, input/output (I/O) interface 1712, sensor component 1714, And communication component 1716.
  • Processing component 1702 typically controls the overall operation of device 1700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • Processing component 1702 can include one or more processors 1720 to execute instructions to perform all or part of the steps described above.
  • processing component 1702 can include one or more modules to facilitate interaction between component 1702 and other components.
  • processing component 1702 can include a multimedia module to facilitate interaction between multimedia component 1708 and processing component 1702.
  • Memory 1704 is configured to store various types of data to support operation at device 1700. Examples of such data include instructions for any application or method operating on device 1700, contact data, phone book data, messages, pictures, videos, and the like. Memory 1704 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Disk or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Disk Disk or Optical Disk.
  • Power component 1706 provides power to various components of device 1700.
  • Power component 1706 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 1700.
  • Multimedia component 1708 includes a screen between the device 1700 and a user that provides an output interface.
  • the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor may sense not only the boundary of the touch or sliding action, but also the duration and pressure associated with the touch or slide operation.
  • the multimedia component 1708 includes a front camera and/or a rear camera. When the device 1700 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 1710 is configured to output and/or input an audio signal.
  • the audio component 1710 includes a microphone (MIC) that is configured to receive an external audio signal when the device 1700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode.
  • the received audio signal may be further stored in memory 1704 or transmitted via communication component 1716.
  • the audio component 1710 also includes a speaker for outputting an audio signal.
  • the I/O interface 1712 provides an interface between the processing component 1702 and a peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.
  • Sensor assembly 1714 includes one or more sensors for providing device 1700 with a status assessment of various aspects.
  • sensor component 1714 can detect the on/off state of device 1700, the relative positioning of the components, such as The components are the display and keypad of the device 1700.
  • the sensor assembly 1714 can also detect changes in the position of one component of the device 1700 or device 1700, the presence or absence of contact of the user with the device 1700, the orientation or acceleration/deceleration of the device 1700, and the device 1700. temperature change.
  • Sensor assembly 1714 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
  • Sensor assembly 1714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 1714 can also include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 1716 is configured to facilitate wired or wireless communication between device 1700 and other devices.
  • the device 1700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof.
  • communication component 1716 receives broadcast signals or broadcast associated information from an external broadcast management system via a broadcast channel.
  • the communication component 1716 also includes a near field communication (NFC) module to facilitate short range communication.
  • NFC near field communication
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • apparatus 1700 can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor, or other electronic component implementation for performing the above methods.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A gate array
  • controller microcontroller, microprocessor, or other electronic component implementation for performing the above methods.
  • non-transitory computer readable storage medium comprising instructions, such as a memory 1704 comprising instructions executable by processor 1720 of apparatus 1700 to perform the above method.
  • the non-transitory computer readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
  • a non-transitory computer readable storage medium when instructions in the storage medium are executed by a processor of apparatus 1700, to enable apparatus 1700 to perform the method of image processing described above, the method comprising:
  • a screenshot of the image to be processed is obtained based on the evaluation value.
  • the obtaining an candidate region in the image to be processed that includes the reference target includes:
  • An candidate region including the reference target is extracted from the image to be processed according to a preset condition.
  • the obtaining a reference target of the image to be processed includes:
  • Determining that the target in the target set corresponding to the selected location is the reference target.
  • the obtaining a reference target of the image to be processed includes:
  • the target with the highest significance is determined as the benchmark target.
  • the extracting, from the to-be-processed image, the candidate region that includes the reference target according to the preset condition includes:
  • the candidate area extracted from the image to be processed meets at least one of the following preset conditions:
  • the candidate area When the candidate area includes a remaining target other than the reference target, the candidate area includes a complete remaining target;
  • the reference target is located at a preset position of the candidate area.
  • the obtaining an candidate area in the image to be processed that includes the reference target includes:
  • the candidate area is determined based on the selection area.
  • the extracting the preset feature from the candidate area includes:
  • Presetting features are extracted for the reference target and the candidate region in the candidate region, respectively.
  • obtaining, according to the evaluation value, a screenshot of the image to be processed including:
  • the candidate area having the highest evaluation value is determined as a screenshot of the image to be processed.
  • obtaining, according to the evaluation value, a screenshot of the image to be processed including:
  • the selected candidate area is determined as a screenshot of the image to be processed based on a user selected operation of the candidate area.
  • the calculating the evaluation value of the candidate area according to the preset feature includes:
  • the evaluation value of the sample image is trained to obtain a model between the preset feature and the evaluation value.
  • the method further includes: obtaining the preset image evaluation model
  • the obtaining the preset image evaluation model includes:
  • the preset feature includes at least one of the following features: an image feature and a shooting feature of the image;
  • the image feature includes at least one of the following features: a color feature, a texture feature, a shape feature, and a spatial relationship feature;
  • the photographing feature includes at least one of the following features: aperture, shutter, white balance, sensitivity, focal length, shooting time, shooting conditions, camera brand, model, color coding, sound recorded during shooting, shooting location, and Thumbnail.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Analysis (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种图像处理方法及装置。该方法包括:获取待处理图像中包括基准目标的备选区域(S11);对备选区域提取预设特征(S12);根据预设特征计算备选区域的评价值(S13);根据评价值获得待处理图像的截图(S14)。上述方法中,终端自动对待处理图像进行多种方式的截取,并对不同方式截取到的备选区域进行评价,以提供给用户效果最好的截图,提高截图的准确性和图片效果,减少用户手动截图操作,提高用户体验度和满意度。

Description

图像处理方法及装置
相关申请的交叉引用
本申请基于申请号为201510886435.5、申请日为2015年12月4日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及图像截取技术领域,尤其涉及图像处理方法及装置。
背景技术
目前,用户在微信、微博等社交软件中发表图片时,经常会对图像进行预处理,图像截取就是常用的处理方法。在一张原始图片中截取出比较“好看”的部分,包含用户重点感兴趣的目标区域。
发明内容
本公开实施例提供图像处理方法及装置。所述技术方案如下:
根据本公开实施例的第一方面,提供一种图像处理方法,包括:
获取待处理图像中包括基准目标的备选区域;
对所述备选区域提取预设特征;
根据所述预设特征计算所述备选区域的评价值;
根据所述评价值获得所述待处理图像的截图。
可选的,所述获取待处理图像中包括所述基准目标的备选区域,包括:
获取待处理图像的基准目标;
根据预设条件从所述待处理图像中提取包括所述基准目标的备选区域。
可选的,所述获取待处理图像的基准目标,包括:
对所述待处理图像进行目标检测,得到目标集合;
获取用户对所述待处理图像的点选位置;
确定所述点选位置对应的所述目标集合中的目标为所述基准目标。
可选的,所述获取待处理图像的基准目标,包括:
对所述待处理图像进行显著性检测;
确定显著性最高的目标为所述基准目标。
可选的,所述根据预设条件从所述待处理图像中提取包括所述基准目标的备选区域,包括:
从所述待处理图像中提取到的所述备选区域,符合以下至少一个预设条件:
当所述备选区域包括除所述基准目标外的剩余目标时,所述备选区域包括完整的剩余目标;
所述基准目标位于所述备选区域的预设位置。
可选的,所述获取待处理图像中包括基准目标的备选区域,包括:
获取用户在所述待处理图像中的选择区域,所述选择区域包括所述基准目标;
根据所述选择区域确定所述备选区域。
可选的,所述对所述备选区域提取预设特征,包括:
对所述备选区域中的基准目标及所述备选区域分别提取预设特征。
可选的,所述根据所述评价值获得所述待处理图像的截图,包括:
获取所述评价值最高的备选区域;
将所述评价值最高的备选区域确定为所述待处理图像的截图。
可选的,所述根据所述评价值获得所述待处理图像的截图,包括:
根据所述评价值对所述备选区域进行排序;
显示所述排序后的备选区域;
根据用户对所述备选区域的选定操作,将选定的备选区域确定为所述待处理图像的截图。
可选的,所述根据所述预设特征计算所述备选区域的评价值,包括:
根据预先获得的图像评价模型及提取的所述预设特征,计算所述备选区域的评价值,其中,所述预设图像评价模型为根据在样本图像中提取的所述预设特征及所述样本图像的评价值训练获得的所述预设特征与评价值之间的模型。
可选的,所述方法还包括:获得所述预设图像评价模型;
所述获得所述预设图像评价模型,包括:
获取样本图像;
对所述样本图像进行显著性检测,得到所述样本图像的显著性区域;
对所述显著性区域及所述样本图像的全图进行所述预设特征的提取;
获取预先给出的所述样本图像的评价值;
根据预先给出的所述样本图像的评价值及提取到的所述预设特征进行模型训练,得到所述预设图像评价模型。
可选的,所述预设特征包括以下至少一项特征:图像特征及所述图像的拍摄特征;
所述图像特征包括以下至少一个特征:颜色特征、纹理特征、形状特征、空间关系特征;
所述拍摄特征包括以下至少一个特征:所述拍摄时的光圈、快门、白平衡、感光度、焦距、拍摄时间、拍摄条件、相机品牌、型号、色彩编码、拍摄时录制的声音、拍摄地点及缩略图。
根据本公开实施例的第二方面,提供一种图像处理装置,包括:
第一获取模块,用于获取待处理图像中包括基准目标的备选区域;
提取模块,用于对所述第一获取模块获取的备选区域提取预设特征;
计算模块,用于根据所述提取模块提取的预设特征计算所述备选区域的评价值;
第二获取模块,用于根据所述计算模块计算的评价值获得所述待处理图像的截图。
可选的,所述第一获取模块包括:
第一获取子模块,用于获取待处理图像的基准目标;
第一提取子模块,用于根据预设条件从所述待处理图像中提取包括所述第一获取子模块获取的基准目标的备选区域。
可选的,所述第一获取子模块,用于对所述待处理图像进行目标检测,得到目标集合;获取用户对所述待处理图像的点选位置;确定所述点选位置对应的所述目标集合中的目标为所述基准目标。
可选的,所述第一获取子模块,用于对所述待处理图像进行显著性检测;确定显著性最高的目标为所述基准目标。
可选的,所述第一提取子模块,用于从所述待处理图像中提取到的所述备选区域,符合以下至少一个预设条件:
当所述备选区域包括除所述第一获取子模块获取的基准目标外的剩余目标时,所述备选区域包括完整的剩余目标;
所述第一获取子模块获取的基准目标位于所述备选区域的预设位置。
可选的,所述第一获取模块包括:
第二获取子模块,用于获取用户在所述待处理图像中的选择区域,所述选择区域包括所述基准目标;
第一确定子模块,用于根据所述第二获取子模块获取的选择区域确定所述备选区域。
可选的,所述提取模块,用于对所述第一获取模块获取的备选区域中的基准目标及所述备选区域分别提取预设特征。
可选的,所述第二获取模块包括:
第三获取子模块,用于获取所述计算模块计算的评价值最高的备选区域;
第二确定子模块,用于将所述第三获取子模块获取到评价值最高的备选区域确定为所述待处理图像的截图。
可选的,所述第二获取模块包括:
排序子模块,用于根据所述计算模块计算的评价值对所述备选区域进行排序;
显示子模块,用于显示所述排序子模块排序后的备选区域;
第三确定子模块,用于根据用户对所述显示子模块显示的备选区域的选定操作,将选定的备选区域确定为所述待处理图像的截图。
可选的,所述计算模块,用于根据预先获得的图像评价模型及提取的所述预设特征,计算所述备选区域的评价值,其中,所述预设图像评价模型为根据在样本图像中提取的所述预设特征及所述样本图像的评价值训练获得的所述预设特征与评价值之间的模型。
可选的,所述装置还包括:第三获取模块,用于获得所述预设图像评价模型;
所述第三获取模块包括:
第四获取子模块,用于获取样本图像;
检测子模块,用于对所述第四获取子模块获取的样本图像进行显著性检测,得到所述样本图像的显著性区域;
第二提取子模块,用于对所述检测子模块检测到的显著性区域及所述样本图像的全图进行所述预设特征的提取;
第五获取子模块,用于获取预先给出的所述样本图像的评价值;
训练子模块,用于根据所述第五获取子模块获取到的预先给出的所述样本图像的评价值及所述第二提取子模块提取到的所述预设特征进行模型训练,得到所述预设图像评价模型。
可选的,所述提取模块提取的预设特征包括以下至少一项特征:图像特征及所述图像的拍摄特征;
所述图像特征包括以下至少一个特征:颜色特征、纹理特征、形状特征、空间关系特征;
所述拍摄特征包括以下至少一个特征:所述拍摄时的光圈、快门、白平衡、感光度、焦距、拍摄时间、拍摄条件、相机品牌、型号、色彩编码、拍摄时录制的声音、拍摄地点及缩略图。
根据本公开实施例的第三方面,提供一种图像处理装置,包括:
处理器;
用于存储处理器可执行指令的存储器;
其中,所述处理器被配置为:
获取待处理图像中包括基准目标的备选区域;
对所述备选区域提取预设特征;
根据所述预设特征计算所述备选区域的评价值;
根据所述评价值获得所述待处理图像的截图。
本公开的实施例提供的技术方案可以包括以下有益效果:
本实施例中,终端自动对待处理图像进行多种方式的截取,并对不同方式截取到的备选区域进行评价,已提供给用户效果最好的截图,提高截图的准确性和图片效果,减少用户手动截图操作,提高用户体验度和满意度。
在另一个实施例中,可以对待处理图像中所有目标进行检测并提供给用户选择,用户可以根据自身喜好选择出最感兴趣的目标作为基准目标。也可以通过显著性检测,找到待处理图像中用户可能最感兴趣的目标,模拟用户的点选过程,将显著性最高的目标作为基准目标。这样,可以准确地获取基准目标,找到在待处理图像中用户最感兴趣的部分,提高后续选择备选区域的准确性,使得截图更符合用户需求,用户体验度较好。
在另一个实施例中,根据预设条件从待处理图像中提取包括基准目标的备选区域,使得备选区域的画面更加平衡,画面表现力更高,图片截取效果更好。
在另一个实施例中,用户也可根据自身喜好选择所要截取的区域,操作简单,用户使用方便,之后可以对用户选择的备选区域进行评价,以确定用户选择截图的效果,这样用户体验度较好。
在另一个实施例中,通过对备选区域提取特征计算评价值,使得可以根据评价值选择效果最好的备选区域作为截图,提高用户对截图的体验度和满意度。
在另一个实施例中,通过自动为用户选择评价值最高的备选区域,或用户从排序后的被选区域中选择所需备选区域,使得最终得到的待处理图像的截图效果最好,最符合用户需求,提高用户对截图的体验度和满意度。
在另一个实施例中,通过预先对大量样本图像进行训练,得到包括图像的预设特征与评价值之间的对应关系的预设图像评价模型,从而后续可以使用该预设图像评价模型对待处理图像的备选截图进行准确可靠地评价,使得可以根据评价结果获得对待处理图像的截图。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例, 并与说明书一起用于解释本公开的原理。
图1是根据一示例性实施例示出的一种图像处理方法的流程图。
图2是根据另一示例性实施例示出的一种图像处理方法的流程图。
图3是根据另一示例性实施例示出的一种图像处理方法的流程图。
图4是根据一示例性实施例示出的待处理图像中目标的示意图。
图5是根据另一示例性实施例示出的一种图像处理方法的流程图。
图6是根据另一示例性实施例示出的一种图像处理方法的流程图。
图7是根据一示例性实施例示出的对待处理图像选择框的示意图。
图8是根据另一示例性实施例示出的一种图像处理方法的流程图。
图9是根据另一示例性实施例示出的一种图像处理方法的流程图。
图10是根据另一示例性实施例示出的一种图像处理方法的流程图。
图11是根据一示例性实施例示出的一种图像处理装置的框图。
图12是根据一示例性实施例示出的第一获取模块的框图。
图13是根据另一示例性实施例示出的第一获取模块的框图。
图14是根据一示例性实施例示出的第二获取模块的框图。
图15是根据另一示例性实施例示出的第二获取模块的框图。
图16是根据另一示例性实施例示出的一种图像处理装置的框图。
图17是根据一示例性实施例示出的一种用于图像处理的装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
本公开实施例提供的技术方案,涉及终端,自动对待处理图像进行截取,截取的过程考虑了摄影构图技巧和图像特征,重现摄影师拍摄和选择图片的过程,并结合目标检测结果,避免完整目标被截断,使得截图效果更好。并且减少用户手动截图操作,提高用户体验度和满意度。
该终端可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等任一具有图像识别功能的设备。
图1是根据一示例性实施例示出的一种图像处理方法的流程图,如图1所示,图像处理方法用于终端中,包括以下步骤:
在步骤S11中,获取待处理图像中包括基准目标的备选区域。
在步骤S12中,对备选区域提取预设特征;
在步骤S13中,根据预设特征计算备选区域的评价值;
在步骤S14中,根据评价值获得待处理图像的截图。
本实施例中,终端自动对待处理图像进行多种方式的截取,并对不同方式截取到的备选区域进行评价,已提供给用户效果最好的截图,提高截图的准确性和图片效果,减少用户手动截图操作,提高用户体验度和满意度。
图2是根据另一示例性实施例示出的一种图像处理方法的流程图,如图2所示,获取待处理图像中包括基准目标的备选区域,包括:
在步骤S21中,获取待处理图像的基准目标;
在步骤S22中,根据预设条件从待处理图像中提取包括基准目标的备选区域。
其中,获取待处理图像的基准目标可以有以下几种方式。
方式一、用户选择基准目标
图3是根据另一示例性实施例示出的一种图像处理方法的流程图,如图3所示,获取待处理图像的基准目标,包括:
在步骤S31中,对待处理图像进行目标检测,得到目标集合;
在步骤S32中,获取用户对待处理图像的点选位置;
在步骤S33中,确定点选位置对应的目标集合中的目标为基准目标。
例如,如图4所示,可以采用R-CNN(Regions Base cellular neural networks,基于区域的卷积神经网络)算法,可将待处理图像中的所有目标框选出来。用户可在待处理图像上点选所要截取的基准目标,根据用户的点选位置确定基准目标。
在方式一中,对待处理图像中所有目标进行检测并提供给用户选择,用户可以根据自身喜好选择出最感兴趣的目标作为基准目标。
方式二、终端自动检测出基准目标
图5是根据另一示例性实施例示出的一种图像处理方法的流程图,如图5所示,获取待处理图像的基准目标,包括:
在步骤S51中,对待处理图像进行显著性检测;
在步骤S52中,确定显著性最高的目标为基准目标。
例如,如图4所示,通过相关技术中的显著性检测方法,得到待处理图像中骑马的人显著性最高,可将该骑马的人作为基准目标。
在方式二中,通过显著性检测,找到待处理图像中用户可能最感兴趣的目标,模拟用户的点选过程,将显著性最高的目标作为基准目标。
本实施例中,通过上述两种方式,可以准确地获取基准目标,找到在待处理图像中用户最感兴趣的部分,提高后续选择备选区域的准确性,使得截图更符合用户需求,用户体验度较好。
在另一个实施例中,在考虑摄影构图技巧和图像特征,重现摄影师构图的过程,对备选区域的提取需要满足一定预设条件。根据预设条件从待处理图像中提取包括基准目标的备选区域,包括:
从待处理图像中提取到的备选区域,符合以下至少一个预设条件:
条件一、当备选区域包括除基准目标外的剩余目标时,备选区域包括完整的剩余目标。
待处理图像除了包含基准目标外,如果包含待处理图像中剩余目标,必须包含比较完整的目标,该剩余目标即处基准目标之外的其他一个或多个目标。例如,如图4所示,基准目标为骑马的人,如果备选图像包含马或周围的狗,则必须完整包含马或狗,不能只截取部分。
条件二、基准目标位于备选区域的预设位置。
例如,基准目标需要落在备选区域的三分点处或黄金分割点处。
三分法则和黄金分割法则是摄影中的基本构图法则。
三分法则的理论基础是,人们的目光总是自然地落在一幅画面三分之二处的位置上。尽量使主要的被摄体位于画面三等分线的焦点上,效果会比位于中心位置更好。
黄金分割法则的理论基础是,一幅画面中的某些位置点会自动地吸引观众的目光。同样,某些比例(无论是巧合或精心布置的)也会自然地令观众感到舒服。达·芬奇研究了人类对美和和谐的观念,并提出了称为“黄金分割”的原则。其实在达·芬奇之前,巴比伦人、埃及人以及古希腊学者就已经开始在建筑和艺术中应用黄金分割法则了。
要得到“黄金点”,需要用4条直线将一副画面分成不相等的9个区域。每条线分割的原则是:将画面分为一大一小两部分,其中较大部分的边长与较小部分的之比,等于全部画面边长与较大部分的之比。最终4条直线的交点,就是所谓的“黄金点”了。
另外,备选区域的提取还可以符合对角线法则,即将画面的一条边平分,然后将其中一半再平分为三份,用直线连接其中几点,就构成了对角线通道。根据对角线法则,重要元素应该置于对焦通道上。
本实施例中,根据上述预设条件从待处理图像中提取包括基准目标的备选区域,使得备选区域的画面更加平衡,画面表现力更高,图片截取效果更好。
在另一个实施例中,备选区域也可以用户手动选取。图6是根据另一示例性实施例示出的一种图像处理方法的流程图,如图6所示,获取待处理图像中包括基准目标的备选区域,包括:
在步骤S61中,获取用户在待处理图像中的选择区域,选择区域包括基准目标;
在步骤S62中,根据选择区域确定备选区域。
例如,如图7所示,在待处理图像70上显示一个可移动可缩放的选择框71,用户可在待处理图像70上移动该选择框71,或通过拖动选择框71的边界改变其大小。若用户对选择框71范围内的图像满意,可将选择框71中的区域确定为备选区域。
本实施例中,用户也可根据自身喜好选择所要截取的区域,操作简单,用户使用方便,之后可以对用户选择的备选区域进行评价,以确定用户选择截图的效果,这样用户体验度较好。
在另一个实施例中,对备选区域提取预设特征,包括:对备选区域中的基准目标及备选区域分别提取预设特征。
本实施例中,将基准目标和整个备选区域分别提取特征,并将提取的两部分特征合并,作为用于评价备选区域的依据。
在另一个实施例中,根据预设特征计算备选区域的评价值,包括:
根据预先获得的图像评价模型及提取的预设特征,计算备选区域的评价值,其中,预设图像评价模型为根据在样本图像中提取的预设特征及样本图像的评价值训练获得的预设特征与评价值之间的模型。
其中,预设图像评价模型为根据在样本图像中提取的预设特征及样本图像的评价值训练后,获得的预设特征与评价值之间的模型。预设图像评价模型中可以包括:每项预设特征对应的评价值;或,每项预设特征对应的用于计算评价值的权重;或,每项预设特征对应的用于计算评价值的线性或非线性函数等。
本实施例中,通过对备选区域提取特征计算评价值,使得可以根据评价值选择效果最好的备选区域作为截图,提高用户对截图的体验度和满意度。
在另一个实施例中,根据评价值获得待处理图像的截图可以采用以下方式。
方式A、选择评价值最高的备选区域
图8是根据另一示例性实施例示出的一种图像处理方法的流程图,如图8所示,根据评价值获得待处理图像的截图,包括:
在步骤S81中,获取评价值最高的备选区域;
在步骤S82中,将评价值最高的备选区域确定为待处理图像的截图。
方式B、用户从排序后的被选区域中选择
图9是根据另一示例性实施例示出的一种图像处理方法的流程图,如图9所示,根据评价值获得待处理图像的截图,包括:
在步骤S91中,根据评价值对备选区域进行排序;
在步骤S92中,显示排序后的备选区域;
在步骤S93中,根据用户对备选区域的选定操作,将选定的备选区域确定为待处理图像的截图。
本实施例中,通过上述方式A和B,使得最终得到的待处理图像的截图效果最好,最符合用户需求,提高用户对截图的体验度和满意度。
在另一个实施例中,该方法还包括:获得预设图像评价模型。
其中,图10是根据另一示例性实施例示出的一种图像处理方法的流程图,如图10所示,获得预设图像评价模型,包括:
在步骤S101中,获取样本图像;
在步骤S102中,可以对样本图像进行显著性检测,进而得到样本图像的显著性区域;
在步骤S103中,对显著性区域及样本图像的全图进行预设特征的提取;
在步骤S104中,获取预先给出的样本图像的评价值;
在步骤S105中,根据预先给出的样本图像的评价值及提取到的预设特征进行模型训练,得到预设图像评价模型。
本实施例通过将所有样本图像进行标定,每幅样本图像对应一个评估值。
所有样本图像提取预设特征后,可以使用支持向量回归(SVR)进行训练,得到图像评价模型模型M。
例如,通过模型训练,得到图像特征对应的权重为0.8,拍摄特征对应的权重为0.2。则后续可根据该权重计算待处理图像的评价值。
本实施例中,通过预先对大量样本图像进行训练,得到包括图像的预设特征与评价值之间的对应关系的预设图像评价模型,从而后续可以使用该预设图像评价模型对待处理图像的备选截图进行准确可靠地评价,使得可以根据评价结果获得对待处理图像的截图。
本实施例中,预设特征包括以下至少一项特征:图像特征及图像的拍摄特征。
图像特征包括以下至少一个特征:颜色特征、纹理特征、形状特征、空间关系特征。
拍摄特征包括以下至少一个特征:拍摄时的光圈、快门、白平衡、感光度、焦距、拍摄时间、拍摄条件、相机品牌、型号、色彩编码、拍摄时录制的声音、拍摄地点及缩略图。
下述为本公开装置实施例,可以用于执行本公开方法实施例。
图11是根据一示例性实施例示出的一种图像处理装置的框图,该装置可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部。如图11所示,该图像处理装置包括:
第一获取模块111,被配置为获取待处理图像中包括基准目标的备选区域;
提取模块112,被配置为对第一获取模块111获取的备选区域提取预设特征;
计算模块113,被配置为根据提取模块112提取的预设特征计算备选区域的评价值;
第二获取模块114,被配置为根据计算模块113计算的评价值获得待处理图像的截图。
本实施例中,终端自动对待处理图像进行多种方式的截取,并对不同方式截取到的备选区域进行评价,已提供给用户效果最好的截图,提高截图的准确性和图片效果,减少用户手动截图操作,提高用户体验度和满意度。
图12是根据一示例性实施例示出的第一获取模块的框图,如图12所示,第一获取模块111包括:
第一获取子模块121,被配置为获取待处理图像的基准目标;
第一提取子模块122,被配置为根据预设条件从待处理图像中提取包括第一获取子模块121获取的基准目标的备选区域。
其中,第一获取子模块121的功能可以有以下几种方式实现。
方式一、用户选择基准目标
第一获取子模块121,被配置为对待处理图像进行目标检测,得到目标集合;获取用户对待处理图像的点选位置;确定点选位置对应的目标集合中的目标为基准目标。
例如,如图4所示,采用R-CNN(Regions Base cellular neural networks,基于区域的卷积神经网络)算法,可将待处理图像中的所有目标框选出来。用户可在待处理图像上点选所要截取的基准目标,根据用户的点选位置确定基准目标。
在方式一中,对待处理图像中所有目标进行检测并提供给用户选择,用户可以根据自身喜好选择出最感兴趣的目标作为基准目标。
方式二、自动检测出基准目标
第一获取子模块121,被配置为对待处理图像进行显著性检测;确定显著性最高的目标为基准目标。
例如,如图4所示,通过显著性检测,得到待处理图像中骑马的人显著性最高,可将该骑马的人作为基准目标。
在方式二中,通过显著性检测,找到待处理图像中用户可能最感兴趣的目标,模拟用户的点选过程,将显著性最高的目标作为基准目标。
本实施例中,通过上述两种方式,第一获取子模块121可以准确地获取基准目标,找到在待处理图像中用户最感兴趣的部分,提高后续选择备选区域的准确性,使得截图更符合用户需求,用户体验度较好。
在另一个实施例中,在考虑摄影构图技巧和图像特征,重现摄影师构图的过程,对备选区域的提取需要满足一定预设条件。第一提取子模块122,被配置为从待处理图像中提取到的备选区域,符合以下至少一个预设条件:
条件一、当备选区域包括除第一获取子模块121获取的基准目标外的剩余目标时,备选区域包括完整的剩余目标。
待处理图像除了包含基准目标外,如果包含待处理图像中其他的剩余目标,必须包含比较完整的目标。例如,如图4所示,基准目标为骑马的人,如果备选图像包含马或周围的狗,则必须完整包含马或狗,不能只截取部分。
条件二、第一获取子模块121获取的基准目标位于备选区域的预设位置。
例如,基准目标需要落在备选区域的三分点处或黄金分割点处。
三分法则和黄金分割法则是摄影中的基本构图法则。
三分法则的理论基础是,人们的目光总是自然地落在一幅画面三分之二处的位置上。尽量使主要的被摄体位于画面三等分线的焦点上,效果会比位于中心位置更好。
黄金分割法则的理论基础是,一幅画面中的某些位置点会自动地吸引观众的目光。同样,某些比例(无论是巧合或精心布置的)也会自然地令观众感到舒服。达·芬奇研究了人类对美和和谐的观念,并提出了称为“黄金分割”的原则。其实在达·芬奇之前,巴比伦人、埃及人以及古希腊学者就已经开始在建筑和艺术中应用黄金分割法则了。
要得到“黄金点”,需要用4条直线将一副画面分成不相等的9个区域。每条线分割的原则是:将画面分为一大一小两部分,其中较大部分的边长与较小部分的之比,等于全部画面边长与较大部分的之比。最终4条直线的交点,就是所谓的“黄金点”了。
另外,备选区域的提取还可以符合对角线法则,即将画面的一条边平分,然后将其中一半再平分为三份,用直线连接其中几点,就构成了对角线通道。根据对角线法则,重要元素应该置于对焦通道上。
本实施例中,根据上述预设条件从待处理图像中提取包括基准目标的备选区域,使得备选区域的画面更加平衡,画面表现力更高,图片截取效果更好。
在另一个实施例中,备选区域也可以用户手动选取。图13是根据另一示例性实施例示出的第一获取模块的框图,如图13所示,第一获取模块111包括:
第二获取子模块131,被配置为获取用户在待处理图像中的选择区域,选择区域包括基准目标;
第一确定子模块132,被配置为根据第二获取子模块132获取的选择区域确定备选区域。
例如,如图7所示,在待处理图像70上显示一个可移动可缩放的选择框71,用户可在待处理图像70上移动该选择框71,或通过拖动选择框71的边界改变其大小。若用户对选择框71范围内的图像满意,可将选择框71中的区域确定为备选区域。
本实施例中,用户也可根据自身喜好选择所要截取的区域,操作简单,用户使用方便, 之后可以对用户选择的备选区域进行评价,以确定用户选择截图的效果,这样用户体验度较好。
可选的,提取模块112,被配置为对第一获取模块111获取的备选区域中的基准目标及备选区域分别提取预设特征。
本实施例中,将基准目标和整个备选区域分别提取特征,并将提取的两部分特征合并,作为用于评价备选区域的依据。
可选的,计算模块113,被配置为根据预先获得的图像评价模型及提取的预设特征,计算备选区域的评价值,其中,预设图像评价模型为根据在样本图像中提取的预设特征及样本图像的评价值训练获得的预设特征与评价值之间的模型。
其中,预设图像评价模型中可以包括:每项预设特征对应的评价值;或,每项预设特征对应的用于计算评价值的权重;或,每项预设特征对应的用于计算评价值的线性或非线性函数。
本实施例中,通过对备选区域提取特征计算评价值,使得可以根据评价值选择效果最好的备选区域作为截图,提高用户对截图的体验度和满意度。
在另一个实施例中,第二获取模块131的功能可以采用以下方式实现。
方式A、选择评价值最高的备选区域
图14是根据一示例性实施例示出的第二获取模块的框图,如图14所示,第二获取模块131包括:
第三获取子模块141,被配置为获取计算模块113计算的评价值最高的备选区域;
第二确定子模块142,被配置为将第三获取子模块141获取到评价值最高的备选区域确定为待处理图像的截图。
方式B、用户从排序后的被选区域中选择
图15是根据另一示例性实施例示出的第二获取模块的框图,如图15所示,第二获取模块131包括:
排序子模块151,被配置为根据计算模块113计算的评价值对备选区域进行排序;
显示子模块152,被配置为显示排序子模块151排序后的备选区域;
第三确定子模块153,被配置为根据用户对显示子模块152显示的备选区域的选定操作,将选定的备选区域确定为待处理图像的截图。
本实施例中,通过上述方式A和B,使得最终得到的待处理图像的截图效果最好,最符合用户需求,提高用户对截图的体验度和满意度。
图16是根据另一示例性实施例示出的一种图像处理装置的框图,如图16所示,该装置还包括:第三获取模块115,被配置为获得预设图像评价模型。如图16所示,第三获取 模块115包括:
第四获取子模块161,被配置为获取样本图像;
检测子模块162,被配置为对第四获取子模块161获取的样本图像进行显著性检测,得到样本图像的显著性区域;
第二提取子模块163,被配置为对检测子模块162检测到的显著性区域及样本图像的全图进行预设特征的提取;
第五获取子模块164,被配置为获取预先给出的样本图像的评价值;
训练子模块165,被配置为根据第五获取子模块164获取到的预先给出的样本图像的评价值及第二提取子模块163提取到的预设特征进行模型训练,得到预设图像评价模型。
例如,通过模型训练,得到图像特征对应的权重为0.8,拍摄特征对应的权重为0.2。则后续可根据该权重计算待处理图像的评价值。
本实施例中,通过预先对大量样本图像进行训练,得到包括图像的预设特征与评价值之间的对应关系的预设图像评价模型,从而后续可以使用该预设图像评价模型对待处理图像的备选截图进行准确可靠地评价,使得可以根据评价结果获得对待处理图像的截图。
可选的,提取模块112提取的预设特征包括以下至少一项特征:图像特征及图像的拍摄特征;
图像特征包括以下至少一个特征:颜色特征、纹理特征、形状特征、空间关系特征;
拍摄特征包括以下至少一个特征:拍摄时的光圈、快门、白平衡、感光度、焦距、拍摄时间、拍摄条件、相机品牌、型号、色彩编码、拍摄时录制的声音、拍摄地点及缩略图。
本公开还提供一种图像处理装置,包括:
处理器;
用于存储处理器可执行指令的存储器;
其中,所述处理器被配置为:
获取待处理图像中包括基准目标的备选区域;
对所述备选区域提取预设特征;
根据所述预设特征计算所述备选区域的评价值;
根据所述评价值获得所述待处理图像的截图。
图17是根据一示例性实施例示出的一种用于图像处理的装置的框图,该装置适用于终端设备。例如,装置1700可以是摄像机,录音设备,移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。
装置1700可以包括以下一个或多个组件:处理组件1702,存储器1704,电源组件1706,多媒体组件1708,音频组件1710,输入/输出(I/O)的接口1712,传感器组件1714,以 及通信组件1716。
处理组件1702通常控制装置1700的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理元件1702可以包括一个或多个处理器1720来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件1702可以包括一个或多个模块,便于处理组件1702和其他组件之间的交互。例如,处理部件1702可以包括多媒体模块,以方便多媒体组件1708和处理组件1702之间的交互。
存储器1704被配置为存储各种类型的数据以支持在设备1700的操作。这些数据的示例包括用于在装置1700上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器1704可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件1706为装置1700的各种组件提供电力。电源组件1706可以包括电源管理系统,一个或多个电源,及其他与为装置1700生成、管理和分配电力相关联的组件。
多媒体组件1708包括在所述装置1700和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件1708包括一个前置摄像头和/或后置摄像头。当设备1700处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件1710被配置为输出和/或输入音频信号。例如,音频组件1710包括一个麦克风(MIC),当装置1700处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器1704或经由通信组件1716发送。在一些实施例中,音频组件1710还包括一个扬声器,用于输出音频信号。
I/O接口1712为处理组件1702和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件1714包括一个或多个传感器,用于为装置1700提供各个方面的状态评估。例如,传感器组件1714可以检测到设备1700的打开/关闭状态,组件的相对定位,例如所 述组件为装置1700的显示器和小键盘,传感器组件1714还可以检测装置1700或装置1700一个组件的位置改变,用户与装置1700接触的存在或不存在,装置1700方位或加速/减速和装置1700的温度变化。传感器组件1714可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件1714还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件1714还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件1716被配置为便于装置1700和其他设备之间有线或无线方式的通信。装置1700可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件1716经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件1716还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,装置1700可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器1704,上述指令可由装置1700的处理器1720执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
一种非临时性计算机可读存储介质,当所述存储介质中的指令由装置1700的处理器执行时,使得装置1700能够执行上述图像处理的方法,所述方法包括:
获取待处理图像中包括基准目标的备选区域;
对所述备选区域提取预设特征;
根据所述预设特征计算所述备选区域的评价值;
根据所述评价值获得所述待处理图像的截图。
可选的,所述获取待处理图像中包括所述基准目标的备选区域,包括:
获取待处理图像的基准目标;
根据预设条件从所述待处理图像中提取包括所述基准目标的备选区域。
可选的,所述获取待处理图像的基准目标,包括:
对所述待处理图像进行目标检测,得到目标集合;
获取用户对所述待处理图像的点选位置;
确定所述点选位置对应的所述目标集合中的目标为所述基准目标。
可选的,所述获取待处理图像的基准目标,包括:
对所述待处理图像进行显著性检测;
确定显著性最高的目标为所述基准目标。
可选的,所述根据预设条件从所述待处理图像中提取包括所述基准目标的备选区域,包括:
从所述待处理图像中提取到的所述备选区域,符合以下至少一个预设条件:
当所述备选区域包括除所述基准目标外的剩余目标时,所述备选区域包括完整的剩余目标;
所述基准目标位于所述备选区域的预设位置。
可选的,所述获取待处理图像中包括基准目标的备选区域,包括:
获取用户在所述待处理图像中的选择区域,所述选择区域包括所述基准目标;
根据所述选择区域确定所述备选区域。
可选的,所述对所述备选区域提取预设特征,包括:
对所述备选区域中的基准目标及所述备选区域分别提取预设特征。
可选的,所述根据所述评价值获得所述待处理图像的截图,包括:
获取所述评价值最高的备选区域;
将所述评价值最高的备选区域确定为所述待处理图像的截图。
可选的,所述根据所述评价值获得所述待处理图像的截图,包括:
根据所述评价值对所述备选区域进行排序;
显示所述排序后的备选区域;
根据用户对所述备选区域的选定操作,将选定的备选区域确定为所述待处理图像的截图。
可选的,所述根据所述预设特征计算所述备选区域的评价值,包括:
根据预先获得的图像评价模型及提取的所述预设特征,计算所述备选区域的评价值,其中,所述预设图像评价模型为根据在样本图像中提取的所述预设特征及所述样本图像的评价值训练获得的所述预设特征与评价值之间的模型。
可选的,所述方法还包括:获得所述预设图像评价模型;
所述获得所述预设图像评价模型,包括:
获取样本图像;
对所述样本图像进行显著性检测,得到所述样本图像的显著性区域;
对所述显著性区域及所述样本图像的全图进行所述预设特征的提取;
获取预先给出的所述样本图像的评价值;
根据预先给出的所述样本图像的评价值及提取到的所述预设特征进行模型训练,得到所述预设图像评价模型。
可选的,所述预设特征包括以下至少一项特征:图像特征及所述图像的拍摄特征;
所述图像特征包括以下至少一个特征:颜色特征、纹理特征、形状特征、空间关系特征;
所述拍摄特征包括以下至少一个特征:所述拍摄时的光圈、快门、白平衡、感光度、焦距、拍摄时间、拍摄条件、相机品牌、型号、色彩编码、拍摄时录制的声音、拍摄地点及缩略图。
本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。

Claims (25)

  1. 一种图像处理方法,其特征在于,包括:
    获取待处理图像中包括基准目标的备选区域;
    对所述备选区域提取预设特征;
    根据所述预设特征计算所述备选区域的评价值;
    根据所述评价值获得所述待处理图像的截图。
  2. 根据权利要求1所述的方法,其特征在于,所述获取待处理图像中包括所述基准目标的备选区域,包括:
    获取待处理图像的基准目标;
    根据预设条件从所述待处理图像中提取包括所述基准目标的备选区域。
  3. 根据权利要求2述的方法,其特征在于,所述获取待处理图像的基准目标,包括:
    对所述待处理图像进行目标检测,得到目标集合;
    获取用户对所述待处理图像的点选位置;
    确定所述点选位置对应的所述目标集合中的目标为所述基准目标。
  4. 根据权利要求2述的方法,其特征在于,所述获取待处理图像的基准目标,包括:
    对所述待处理图像进行显著性检测;
    确定显著性最高的目标为所述基准目标。
  5. 根据权利要求2所述的方法,其特征在于,所述根据预设条件从所述待处理图像中提取包括所述基准目标的备选区域,包括:
    从所述待处理图像中提取到的所述备选区域,符合以下至少一个预设条件:
    当所述备选区域包括除所述基准目标外的剩余目标时,所述备选区域包括完整的剩余目标;
    所述基准目标位于所述备选区域的预设位置。
  6. 根据权利要求1所述的方法,其特征在于,所述获取待处理图像中包括基准目标的备选区域,包括:
    获取用户在所述待处理图像中的选择区域,所述选择区域包括所述基准目标;
    根据所述选择区域确定所述备选区域。
  7. 根据权利要求1所述的方法,其特征在于,所述对所述备选区域提取预设特征,包括:
    对所述备选区域中的基准目标及所述备选区域分别提取预设特征。
  8. 根据权利要求1所述的方法,其特征在于,所述根据所述评价值获得所述待处理图 像的截图,包括:
    获取所述评价值最高的备选区域;
    将所述评价值最高的备选区域确定为所述待处理图像的截图。
  9. 根据权利要求1所述的方法,其特征在于,所述根据所述评价值获得所述待处理图像的截图,包括:
    根据所述评价值对所述备选区域进行排序;
    显示所述排序后的备选区域;
    根据用户对所述备选区域的选定操作,将选定的备选区域确定为所述待处理图像的截图。
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,所述根据所述预设特征计算所述备选区域的评价值,包括:
    根据预先获得的图像评价模型及提取的所述预设特征,计算所述备选区域的评价值,其中,所述预设图像评价模型为根据在样本图像中提取的所述预设特征及所述样本图像的评价值训练获得的所述预设特征与评价值之间的模型。
  11. 根据权利要求10所述的方法,其特征在于,所述方法还包括:获得所述预设图像评价模型;
    所述获得所述预设图像评价模型,包括:
    获取样本图像;
    获得所述样本图像的显著性区域;
    对所述显著性区域及所述样本图像的全图进行所述预设特征的提取;
    获取预先给出的所述样本图像的评价值;
    根据预先给出的所述样本图像的评价值及提取到的所述预设特征进行模型训练,得到所述预设图像评价模型。
  12. 根据权利要求1-9中任一项所述的方法,其特征在于,所述预设特征包括以下至少一项特征:图像特征及所述图像的拍摄特征;
    所述图像特征包括以下至少一个特征:颜色特征、纹理特征、形状特征、空间关系特征;
    所述拍摄特征包括以下至少一个特征:所述拍摄时的光圈、快门、白平衡、感光度、焦距、拍摄时间、拍摄条件、相机品牌、型号、色彩编码、拍摄时录制的声音、拍摄地点及缩略图。
  13. 一种图像处理装置,其特征在于,包括:
    第一获取模块,用于获取待处理图像中包括基准目标的备选区域;
    提取模块,用于对所述第一获取模块获取的备选区域提取预设特征;
    计算模块,用于根据所述提取模块提取的预设特征计算所述备选区域的评价值;
    第二获取模块,用于根据所述计算模块计算的评价值获得所述待处理图像的截图。
  14. 根据权利要求13所述的装置,其特征在于,所述第一获取模块包括:
    第一获取子模块,用于获取待处理图像的基准目标;
    第一提取子模块,用于根据预设条件从所述待处理图像中提取包括所述第一获取子模块获取的基准目标的备选区域。
  15. 根据权利要求14所述的装置,其特征在于,所述第一获取子模块,用于对所述待处理图像进行目标检测,得到目标集合;获取用户对所述待处理图像的点选位置;确定所述点选位置对应的所述目标集合中的目标为所述基准目标。
  16. 根据权利要求14所述的装置,其特征在于,所述第一获取子模块,用于对所述待处理图像进行显著性检测;确定显著性最高的目标为所述基准目标。
  17. 根据权利要求14所述的装置,其特征在于,所述第一提取子模块,用于从所述待处理图像中提取到的所述备选区域,符合以下至少一个预设条件:
    当所述备选区域包括除所述第一获取子模块获取的基准目标外的剩余目标时,所述备选区域包括完整的剩余目标;
    所述第一获取子模块获取的基准目标位于所述备选区域的预设位置。
  18. 根据权利要求13所述的装置,其特征在于,所述第一获取模块包括:
    第二获取子模块,用于获取用户在所述待处理图像中的选择区域,所述选择区域包括所述基准目标;
    第一确定子模块,用于根据所述第二获取子模块获取的选择区域确定所述备选区域。
  19. 根据权利要求13所述的装置,其特征在于,所述提取模块,用于对所述第一获取模块获取的备选区域中的基准目标及所述备选区域分别提取预设特征。
  20. 根据权利要求13所述的装置,其特征在于,所述第二获取模块包括:
    第三获取子模块,用于获取所述计算模块计算的评价值最高的备选区域;
    第二确定子模块,用于将所述第三获取子模块获取到评价值最高的备选区域确定为所述待处理图像的截图。
  21. 根据权利要求13所述的装置,其特征在于,所述第二获取模块包括:
    排序子模块,用于根据所述计算模块计算的评价值对所述备选区域进行排序;
    显示子模块,用于显示所述排序子模块排序后的备选区域;
    第三确定子模块,用于根据用户对所述显示子模块显示的备选区域的选定操作,将选定的备选区域确定为所述待处理图像的截图。
  22. 根据权利要求13-21中任一项所述的装置,其特征在于,所述计算模块,用于根据预先获得的图像评价模型及提取的所述预设特征,计算所述备选区域的评价值,其中,所述预设图像评价模型为根据在样本图像中提取的所述预设特征及所述样本图像的评价值训练获得的所述预设特征与评价值之间的模型。
  23. 根据权利要求22所述的装置,其特征在于,所述装置还包括:第三获取模块,用于获得所述预设图像评价模型;
    所述第三获取模块包括:
    第四获取子模块,用于获取样本图像;
    检测子模块,用于获得所述样本图像的显著性区域;
    第二提取子模块,用于对所述检测子模块检测到的显著性区域及所述样本图像的全图进行所述预设特征的提取;
    第五获取子模块,用于获取预先给出的所述样本图像的评价值;
    训练子模块,用于根据所述第五获取子模块获取到的预先给出的所述样本图像的评价值及所述第二提取子模块提取到的所述预设特征进行模型训练,得到所述预设图像评价模型。
  24. 根据权利要求13-21中任一项所述的装置,其特征在于,所述提取模块提取的预设特征包括以下至少一项特征:图像特征及所述图像的拍摄特征;
    所述图像特征包括以下至少一个特征:颜色特征、纹理特征、形状特征、空间关系特征;
    所述拍摄特征包括以下至少一个特征:所述拍摄时的光圈、快门、白平衡、感光度、焦距、拍摄时间、拍摄条件、相机品牌、型号、色彩编码、拍摄时录制的声音、拍摄地点及缩略图。
  25. 一种图像处理装置,其特征在于,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为:
    获取待处理图像中包括基准目标的备选区域;
    对所述备选区域提取预设特征;
    根据所述预设特征计算所述备选区域的评价值;
    根据所述评价值获得所述待处理图像的截图。
PCT/CN2016/087492 2015-12-04 2016-06-28 图像处理方法及装置 WO2017092289A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510886435.5 2015-12-04
CN201510886435.5A CN105528786B (zh) 2015-12-04 2015-12-04 图像处理方法及装置

Publications (1)

Publication Number Publication Date
WO2017092289A1 true WO2017092289A1 (zh) 2017-06-08

Family

ID=55770989

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/087492 WO2017092289A1 (zh) 2015-12-04 2016-06-28 图像处理方法及装置

Country Status (4)

Country Link
US (1) US10534972B2 (zh)
EP (1) EP3176731A1 (zh)
CN (1) CN105528786B (zh)
WO (1) WO2017092289A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170285916A1 (en) * 2016-03-30 2017-10-05 Yan Xu Camera effects for photo story generation

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105528786B (zh) * 2015-12-04 2019-10-01 小米科技有限责任公司 图像处理方法及装置
CN106408603B (zh) * 2016-06-21 2023-06-02 北京小米移动软件有限公司 拍摄方法及装置
CN106503614B (zh) * 2016-09-14 2020-01-17 厦门黑镜科技有限公司 一种照片获取方法及装置
CN106650737B (zh) * 2016-11-21 2020-02-28 中国科学院自动化研究所 图像自动裁剪方法
WO2018090355A1 (zh) * 2016-11-21 2018-05-24 中国科学院自动化研究所 图像自动裁剪方法
CN106874957A (zh) * 2017-02-27 2017-06-20 苏州大学 一种滚动轴承故障诊断方法
CN108234870B (zh) * 2017-12-27 2019-10-11 Oppo广东移动通信有限公司 图像处理方法、装置、终端及存储介质
CN108198130B (zh) * 2017-12-28 2021-09-28 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备
CN108366203B (zh) * 2018-03-01 2020-10-13 北京金山安全软件有限公司 一种构图方法、装置、电子设备及存储介质
CN109089042B (zh) * 2018-08-30 2020-12-15 Oppo广东移动通信有限公司 图像处理方式识别方法、装置、存储介质及移动终端
CN112241670B (zh) * 2019-07-18 2024-03-01 杭州海康威视数字技术股份有限公司 图像处理方法及装置
CN111161354A (zh) * 2019-12-30 2020-05-15 广东博智林机器人有限公司 相机位姿确定方法、装置、电子设备及存储介质
CN112016548B (zh) * 2020-10-15 2021-02-09 腾讯科技(深圳)有限公司 一种封面图展示方法及相关装置
CN114529495A (zh) * 2020-11-09 2022-05-24 北京小米移动软件有限公司 图像处理方法、装置以及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103854253A (zh) * 2014-03-31 2014-06-11 深圳市金立通信设备有限公司 一种图片处理方法及终端
CN103905700A (zh) * 2012-12-26 2014-07-02 佳能株式会社 图像处理设备、摄像设备和图像处理方法
US20140185957A1 (en) * 2013-01-03 2014-07-03 Samsung Electronics Co., Ltd Apparatus and method for processing image in device having camera
CN103914689A (zh) * 2014-04-09 2014-07-09 百度在线网络技术(北京)有限公司 基于人脸识别的图片裁剪方法及装置
CN103996186A (zh) * 2014-04-29 2014-08-20 小米科技有限责任公司 图像裁剪方法及装置
CN105528786A (zh) * 2015-12-04 2016-04-27 小米科技有限责任公司 图像处理方法及装置

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0116877D0 (en) * 2001-07-10 2001-09-05 Hewlett Packard Co Intelligent feature selection and pan zoom control
JP4624947B2 (ja) 2006-03-22 2011-02-02 富士フイルム株式会社 画像のトリミング方法および装置並びにプログラム
EP2107787A1 (en) * 2008-03-31 2009-10-07 FUJIFILM Corporation Image trimming device
ES2388413B1 (es) * 2010-07-01 2013-08-22 Telefónica, S.A. Método para la clasificación de videos.
US8363984B1 (en) * 2010-07-13 2013-01-29 Google Inc. Method and system for automatically cropping images
US8692907B2 (en) 2010-09-13 2014-04-08 Sony Corporation Image capturing apparatus and image capturing method
CN102137271A (zh) * 2010-11-04 2011-07-27 华为软件技术有限公司 一种图像质量评价方法及装置
US8938116B2 (en) 2011-12-08 2015-01-20 Yahoo! Inc. Image cropping using supervised learning
EP3413263A1 (en) * 2013-09-18 2018-12-12 Intel Corporation Automated image cropping and sharing
EP2916325A1 (en) * 2014-03-06 2015-09-09 Thomson Licensing Method and device for processing a picture
US9715862B2 (en) * 2014-03-28 2017-07-25 Canon Kabushiki Kaisha Image processing apparatus and control method thereof
US9538065B2 (en) 2014-04-03 2017-01-03 Qualcomm Incorporated System and method for multi-focus imaging
US9626584B2 (en) * 2014-10-09 2017-04-18 Adobe Systems Incorporated Image cropping suggestion using multiple saliency maps
CN104504649A (zh) * 2014-12-30 2015-04-08 百度在线网络技术(北京)有限公司 图片的裁剪方法和装置
US10318848B2 (en) * 2015-12-15 2019-06-11 Qualcomm Incorporated Methods for object localization and image classification

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103905700A (zh) * 2012-12-26 2014-07-02 佳能株式会社 图像处理设备、摄像设备和图像处理方法
US20140185957A1 (en) * 2013-01-03 2014-07-03 Samsung Electronics Co., Ltd Apparatus and method for processing image in device having camera
CN103854253A (zh) * 2014-03-31 2014-06-11 深圳市金立通信设备有限公司 一种图片处理方法及终端
CN103914689A (zh) * 2014-04-09 2014-07-09 百度在线网络技术(北京)有限公司 基于人脸识别的图片裁剪方法及装置
CN103996186A (zh) * 2014-04-29 2014-08-20 小米科技有限责任公司 图像裁剪方法及装置
CN105528786A (zh) * 2015-12-04 2016-04-27 小米科技有限责任公司 图像处理方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170285916A1 (en) * 2016-03-30 2017-10-05 Yan Xu Camera effects for photo story generation

Also Published As

Publication number Publication date
CN105528786A (zh) 2016-04-27
EP3176731A1 (en) 2017-06-07
US20170161582A1 (en) 2017-06-08
CN105528786B (zh) 2019-10-01
US10534972B2 (en) 2020-01-14

Similar Documents

Publication Publication Date Title
WO2017092289A1 (zh) 图像处理方法及装置
WO2016011747A1 (zh) 肤色调整方法和装置
JP6134446B2 (ja) 画像分割方法、画像分割装置、画像分割デバイス、プログラム及び記録媒体
CN106408603B (zh) 拍摄方法及装置
JP6357589B2 (ja) 画像表示方法、装置、プログラムおよび記録媒体
WO2016127671A1 (zh) 图像滤镜生成方法及装置
WO2017031901A1 (zh) 人脸识别方法、装置及终端
WO2017088266A1 (zh) 图片处理方法及装置
RU2664003C2 (ru) Способ и устройство для определения ассоциированного пользователя
US11308692B2 (en) Method and device for processing image, and storage medium
WO2016192325A1 (zh) 视频文件的标识处理方法及装置
TW202113670A (zh) 一種圖像處理方法、電子設備和儲存介質
US20210256672A1 (en) Method, electronic device and storage medium for processing image
WO2018120662A1 (zh) 一种拍照方法,拍照装置和终端
KR101641175B1 (ko) 이미지 리타겟팅 방법, 장치, 단말기, 프로그램 및 기록매체
WO2018098860A1 (zh) 照片合成方法及装置
WO2020119254A1 (zh) 滤镜推荐方法、装置、电子设备及存储介质
CN109784327B (zh) 边界框确定方法、装置、电子设备及存储介质
WO2020233201A1 (zh) 图标位置确定方法和装置
CN106339705A (zh) 图片获取方法及装置
US9665925B2 (en) Method and terminal device for retargeting images
CN112669231A (zh) 图像处理方法、图像处理模型的训练方法、装置、介质
CN105635573B (zh) 摄像头视角调整方法和装置
CN106469446B (zh) 深度图像的分割方法和分割装置
CN110910304B (zh) 图像处理方法、装置、电子设备及介质

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: 16869602

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: 16869602

Country of ref document: EP

Kind code of ref document: A1