CN110121030B - Method for storing shot image and electronic equipment - Google Patents

Method for storing shot image and electronic equipment Download PDF

Info

Publication number
CN110121030B
CN110121030B CN201910423560.0A CN201910423560A CN110121030B CN 110121030 B CN110121030 B CN 110121030B CN 201910423560 A CN201910423560 A CN 201910423560A CN 110121030 B CN110121030 B CN 110121030B
Authority
CN
China
Prior art keywords
image
electronic device
person
portrait
eyes
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.)
Active
Application number
CN201910423560.0A
Other languages
Chinese (zh)
Other versions
CN110121030A (en
Inventor
魏代玉
罗巍
邓斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Device Co Ltd
Original Assignee
Huawei Device 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 Huawei Device Co Ltd filed Critical Huawei Device Co Ltd
Priority to CN201910423560.0A priority Critical patent/CN110121030B/en
Publication of CN110121030A publication Critical patent/CN110121030A/en
Application granted granted Critical
Publication of CN110121030B publication Critical patent/CN110121030B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/765Interface circuits between an apparatus for recording and another apparatus
    • H04N5/77Interface circuits between an apparatus for recording and another apparatus between a recording apparatus and a television camera
    • H04N5/772Interface circuits between an apparatus for recording and another apparatus between a recording apparatus and a television camera the recording apparatus and the television camera being placed in the same enclosure
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses a method for saving shot images and electronic equipment, wherein the method comprises the following steps: judging whether the portrait of the shot person in the image obtained at the first moment meets the storage condition; and after the portrait of the shot person in the image obtained at the first moment does not meet the storage condition, selecting at least one image meeting the storage condition from a set time period after the first moment and/or before the first moment, and storing the at least one image meeting the storage condition.

Description

Method for storing shot image and electronic equipment
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method for saving a captured image and an electronic device.
Background
With the continuous development of science and technology, electronic technology has also gained rapid development, and the variety of electronic products is also more and more, and people also enjoy various conveniences brought by the development of science and technology. People can enjoy comfortable life brought along with the development of science and technology through various types of electronic equipment.
For example, electronic devices such as smart phones, tablet computers, or digital cameras have an image capturing function, and users can use the electronic devices to capture images anytime and anywhere, thereby keeping a nice moment in life. In the process of taking a picture by using these electronic devices, taking the example of taking a picture, if the eyes of the person to be taken are closed at the moment of taking the picture due to flash or blinking in the taken picture, or if the picture of the person to be taken is blurred due to shaking of the electronic device at the moment of taking the picture, the user needs to take the picture again, which takes more time.
Therefore, in the prior art, when an electronic device such as a smart phone, a tablet computer or a digital camera shoots an image, the shot image does not meet the requirement, so that the user needs to spend time to shoot again.
Disclosure of Invention
The embodiment of the invention provides a method for storing a shot image and electronic equipment, which are used for solving the technical problem that in the prior art, when electronic equipment such as a smart phone, a tablet personal computer or a digital camera shoots an image, a user needs to spend time for shooting again because the shot image does not meet requirements.
In a first aspect of the present invention, a method for saving a captured image is provided, including: judging whether the portrait of the shot person in the image obtained at the first moment meets the storage condition; and after the portrait of the shot person in the image obtained at the first moment does not meet the storage condition, selecting at least one image meeting the storage condition from a set time period after the first moment and/or before the first moment, and storing the at least one image meeting the storage condition.
With reference to the first aspect, in a first possible implementation manner, the determining whether the portrait of the photographed person in the image obtained at the first time meets a storage condition specifically includes: judging whether the eyes of the shot person are open in the image obtained at the first moment, wherein when the eyes of the shot person are closed, the portrait of the shot person in the image obtained at the first moment is determined not to meet the storage condition; and/or judging whether the portrait of the shot person in the image obtained at the first moment is fuzzy, wherein when the portrait of the shot person in the image obtained at the first moment is fuzzy, the portrait of the shot person in the image obtained at the first moment is determined not to meet the storage condition.
With reference to the first possible implementation manner, in a second possible implementation manner, before the determining whether the eyes of the photographer are open in the image obtained at the first time, the method further includes: determining that the eyes of the person to be photographed are in an eye-open state or an eye-closed state based on at least one image obtained before the first time, wherein when the eyes of the person to be photographed are in the eye-open state, the steps of: and judging whether the eyes of the shot person in the image obtained at the first moment are open or not.
With reference to the first possible implementation manner, in a third possible implementation manner, the determining whether the eyes of the photographer in the image obtained at the first time are open specifically includes: preprocessing the face area of the shot person in the image obtained at the first moment; positioning at least two feature points of the face region, and obtaining a feature vector consisting of at least two features extracted from the region where the at least two feature points are located, wherein the at least two feature points at least comprise eye feature points and canthus feature points; and judging whether the eyes of the shot person are open in the image obtained at the first moment based on the characteristic vector.
With reference to the first possible implementation manner, in a fourth possible implementation manner, the determining whether the portrait of the subject in the image obtained at the first time is blurred specifically includes: performing edge detection on the portrait of the shot person in the image obtained at the first moment to obtain a plurality of first intensity values corresponding to a plurality of edge points of local maximum values; reducing the image obtained at the first moment according to a preset proportion, and carrying out edge detection on the portrait of the shot person in the reduced image to obtain a plurality of second intensity values corresponding to the plurality of edge points of the local maximum value; judging whether the difference between the second intensity value and the first intensity value corresponding to each edge point in the plurality of edge points is greater than a threshold value, wherein when the difference between the second intensity value and the first intensity value is greater than the threshold value, each edge point is determined to be fuzzy; and judging whether the number of the blurred edge points in the plurality of edge points is greater than a preset value or not, wherein when the number of the blurred edge points is greater than the preset value, the human image blur of the shot person in the image obtained at the first moment is determined.
In a second aspect of the present invention, there is also provided an electronic device, including: the image acquisition unit is arranged on the shell; and the processing unit is connected with the image acquisition unit and used for judging whether the portrait of the shot person in the image acquired by the image acquisition unit at the first moment meets a storage condition, selecting at least one image meeting the storage condition from a set time period after and/or before the first moment after the portrait of the shot person in the image acquired at the first moment does not meet the storage condition, and storing the at least one image meeting the storage condition.
With reference to the second aspect, in a first possible implementation manner, the processing unit is specifically configured to determine whether the eyes of the person to be photographed in the image obtained at the first time are open, wherein when the eyes of the person to be photographed are closed, it is determined that the person image of the person to be photographed in the image obtained at the first time does not satisfy the storage condition, and/or it is determined whether the person image of the person to be photographed in the image obtained at the first time is blurred, and when the person image of the person to be photographed in the image obtained at the first time is blurred, it is determined that the person image of the person to be photographed in the image obtained at the first time does not satisfy the storage condition.
With reference to the first possible implementation manner, in a second possible implementation manner, the processing unit is further configured to determine that the eyes of the subject are in an eye-open state or an eye-closed state based on at least one image obtained before the first time, before the determining whether the eyes of the subject are open in the image obtained at the first time.
With reference to the first possible implementation manner, in a third possible implementation manner, the processing unit is specifically configured to pre-process a face region of the subject in the image obtained at the first time, locate at least two feature points of the face region, obtain a feature vector composed of at least two features extracted from a region where the at least two feature points are located, where the at least two feature points include at least an eye feature point and an eye corner feature point, and determine, based on the feature vector, whether the eyes of the subject in the image obtained at the first time are open.
With reference to the first possible implementation manner, in a fourth possible implementation manner, the processing unit is specifically configured to perform edge detection on the portrait of the person to be photographed in the image obtained at the first time, obtain a plurality of first intensity values corresponding to a plurality of edge points of a local maximum value, reduce the image obtained at the first time according to a preset scale, perform edge detection on the portrait of the person to be photographed in the reduced image, obtain a plurality of second intensity values corresponding to the plurality of edge points of the local maximum value, and determine whether a difference between the second intensity value corresponding to each of the plurality of edge points and the first intensity value is greater than a threshold value, where when the difference between the second intensity value and the first intensity value is greater than the threshold value, it is determined that each of the edge points is blurred, and determine whether the number of blurred edge points in the plurality of edge points is greater than a preset value, and when the number of the blurred edge points is greater than the preset value, determining that the portrait of the shot person is blurred in the image obtained at the first moment.
One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
since it is judged whether or not the portrait of the person to be photographed in the image obtained at the first timing satisfies the storage condition, and after the portrait of the person to be photographed in the image obtained at the first timing does not satisfy the storage condition, selecting at least one image meeting the storage condition from a set time period after the first moment and/or before the first moment, and at least one image meeting the storage condition is stored, thereby avoiding the situation that the eyes of the photographer are closed at the moment of photographing or the image is blurred and the like which do not meet the requirements in the image obtained at the first moment, therefore, the problem that when electronic equipment such as a smart phone, a tablet personal computer or a digital camera and the like in the prior art shoots images is solved, the technical problem that the user needs to spend time to shoot again because the shot image does not meet the requirement is solved, and the technical effect of saving the time spent by the user to shoot the image again is realized.
Drawings
FIG. 1 is a flowchart of a method for saving a captured image according to an embodiment of the present invention;
fig. 2 is a flowchart of an electronic device to which a method for saving a captured image is applied according to an embodiment of the present invention;
fig. 3 is a functional block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method for storing a shot image and electronic equipment, and solves the technical problem that in the prior art, when electronic equipment such as a smart phone, a tablet personal computer or a digital camera shoots an image, a user needs to spend time for shooting again because the shot image does not meet requirements.
In order to solve the technical problems, the technical scheme in the embodiment of the invention has the following general idea:
firstly, judging whether the portrait of a shot person in an image obtained at a first moment meets a storage condition;
then, after the portrait of the person to be photographed in the image obtained at the first time does not satisfy the storage condition, at least one image satisfying the storage condition is selected from a set time period, for example, 2 seconds or 3 seconds, after and/or before the first time, and the at least one image satisfying the storage condition is stored.
As can be seen from the above, since it is determined whether or not the portrait of the subject in the image obtained at the first timing satisfies the saving condition, and after the portrait of the person to be shot in the image obtained at the first moment does not meet the storage condition, selecting at least one image meeting the storage condition from a set time period after the first moment and/or before the first moment, and at least one image meeting the storage condition is stored, thereby avoiding the situation that the eyes of the photographer are closed at the moment of photographing or the image is blurred and the like which do not meet the requirements in the image obtained at the first moment, therefore, the problem that when electronic equipment such as a smart phone, a tablet personal computer or a digital camera and the like in the prior art shoots images is solved, the technical problem that the user needs to spend time to shoot again because the shot image does not meet the requirement exists, so that the time spent by the user to shoot the image again can be saved.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Referring to fig. 1, fig. 1 is a flowchart of a method for saving a captured image according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
s1: judging whether the portrait of the shot person in the image obtained at the first moment meets the storage condition;
s2: after the portrait of the person to be shot in the image obtained at the first moment does not meet the storage condition, at least one image meeting the storage condition is selected from a set time period after the first moment and/or before the first moment, and the at least one image meeting the storage condition is stored.
With continuing reference to fig. 2, fig. 2 is a flowchart illustrating an operation of an electronic device applying a method for saving a captured image according to an embodiment of the present invention, and in the following section, the method for saving a captured image and the electronic device according to the embodiment of the present invention will be described in detail with reference to fig. 1 and fig. 2.
As shown in fig. 2, when an electronic device such as a smart phone, a tablet computer, or a digital camera, which is applied with the method for saving a captured image according to the embodiment of the present invention, captures an image, an image capture unit such as a camera of the electronic device is called first, and then the image captured by the image capture unit is displayed on a preview screen of the electronic device, of course, a plurality of preview images within a set time period need to be saved at this time, where the set time period may be, for example, 2 seconds, 3 seconds, and the like, and the plurality of saved preview images may be full-size (fullsize) images, and a person skilled in the art can set a specific value of the set time period according to an actual situation, without limitation.
According to a plurality of preview images stored in a set time period, electronic equipment such as a smart phone, a tablet personal computer or a digital camera can judge whether a face exists in a shot image, specifically, a classifier can be trained offline first, the meaning of the classifier is that a feature value of an image sub-window can be calculated, when the feature value in the sub-window meets a threshold condition, the sub-window can be judged as including the face by the electronic equipment, otherwise, the sub-window is not including the face.
When the classifier detects an image, image data is continuously reduced according to a certain proportion to obtain scaled images of different scales, then sub-windows of all positions are exhausted on the image of each scale, the size of the sub-window is determined according to the characteristics of the classifier, generally 20 × 20 (the unit can be pixel), for each sub-window, the classifier is used for calculating the characteristic value of the sub-window, when the characteristic value meets a threshold value condition, the window can be judged as including a human face by electronic equipment, otherwise, the window does not include the human face, finally, all sub-windows of the images of all scales are searched, and the human face results of all the sub-windows of the full image are combined, so that whether the shot image includes the human face or not is determined.
Of course, in practical applications, the electronic device may determine that there is a face in the captured image when each of the plurality of stored preview images includes a face, or may determine that there is a face in the captured image when the number of preview images including faces exceeds a certain number, which is not limited herein.
As shown in fig. 2, after determining that there is a face in the captured image, an electronic device such as a smart phone, a tablet computer, or a digital camera may enter a face mode. Of course, in addition to automatically entering the face mode by the electronic device such as the smart phone, the tablet pc, or the digital camera according to the determination result of the stored multiple preview images, the electronic device may be triggered to enter the face mode by pressing an operation key by the user, or triggered to enter the face mode by touching a touch key on a touch screen of the electronic device by the user, which is not limited herein.
Of course, if there is no face in the captured image, or the user does not control the electronic device to enter the face mode, the electronic device performs capturing and storing according to the normal mode, which is not described herein again.
After determining that the captured image includes a face image according to the plurality of preview images stored within the set time period, the method for storing the captured image according to the embodiment of the present invention further includes: the eyes of the subject are determined to be in an eye-open state or an eye-closed state based on at least one image obtained before the first time.
Specifically, if the number of preview images in which the eyes of the subject are closed exceeds a certain ratio, for example, exceeds 80%, among the plurality of stored preview images, it indicates that the eyes of the subject are in a closed state; if the number of the preview images of the open eyes of the photographed person exceeds a certain ratio, for example, exceeds 60%, it indicates that the eyes of the photographed person are in the open eye state.
In a specific implementation process, the determining that the eyes of the person to be photographed in the image obtained at the first time are open or closed may specifically be:
firstly, preprocessing a face region of a person to be photographed in an image obtained at a first moment, such as performing illumination correction, scaling to a certain ratio, and the like, then locating at least two feature points of the face region, and obtaining a feature vector composed of at least two features extracted from a region where the at least two feature points are located, where the at least two feature points include at least an eye feature point and an eye corner feature point, and of course, eyebrows, facial muscles, and the like, and finally, classifying and regressing the feature vector, and calculating a blink degree value, so as to be able to determine that the eyes of the person to be photographed in the preview image are open or closed, for example, the closed degree (i.e. blink value) between an upper eyelid and a lower eyelid of the eyes exceeds 60%, that is to determine that the eyes of the person to be photographed in the preview image are closed, as a matter of course, through the description of this embodiment, those skilled in the art can set the blink value to a suitable value range according to the actual situation to meet the needs of the actual situation, and details are not repeated herein.
Certainly, the method for determining whether the eyes of the photographer in the preview image are open or closed is only an example in the present embodiment, and through the description of the present embodiment, a person skilled in the art can select other suitable manners to determine whether the eyes of the photographer in the preview image are open or closed according to actual situations, and details are not repeated here.
Referring to fig. 1 and fig. 2 together, after determining that the eyes of the photographer are open in the image captured at the first moment, the method for saving the captured image according to the embodiment of the present invention proceeds to step S1, that is: and judging whether the portrait of the shot person in the image obtained at the first moment meets the storage condition.
In practical application, the first time may be a time when the storage instruction is received, for example, the first time may be a time when the user presses a shutter button of the electronic device with a finger, or a time when a photographing button of the electronic device is clicked or touched, or may be a time when the user sets an automatic photographing, which is not limited herein; the storage condition may be "the eyes of the subject are open in the image obtained at the first time", or "the person image of the subject is clear in the image obtained at the first time", and of course, the storage condition may also be set by the user according to actual conditions so as to meet the use requirements of the user in different use scenes, and if the image that the subject desires to obtain is a closed-eye image, the user may set the storage condition as "the eyes of the subject are closed in the image obtained at the first time", which is not limited herein.
In a specific implementation process, it is determined whether the portrait of the subject in the image obtained at the first time satisfies the storage condition, specifically, the storage condition may be: judging whether the eyes of the person to be shot in the image obtained at the first moment are open or not, wherein when the eyes of the person to be shot are closed, the image obtained at the first moment is determined not to meet the storage condition, and/or judging whether the portrait of the person to be shot in the image obtained at the first moment is blurred or not, wherein when the portrait of the person to be shot in the image obtained at the first moment is blurred, the image obtained at the first moment is determined not to meet the storage condition.
Whether the eyes of the photographer in the image obtained at the first time are open or not may be determined in a similar manner as the determination of whether the eyes of the photographer in the preview image are open or not described in the foregoing section, and details thereof are not repeated here.
Judging whether the portrait of the person to be shot in the image obtained at the first moment is fuzzy, wherein the judging step can be that the portrait of the person to be shot in the image obtained at the first moment is subjected to edge detection to obtain a plurality of first intensity values corresponding to a plurality of edge points of a local maximum value, the image obtained at the first moment is reduced according to a preset proportion, the portrait of the person to be shot in the reduced image is subjected to edge detection to obtain a plurality of second intensity values corresponding to the plurality of edge points of the local maximum value, then judging whether the difference between the second intensity value corresponding to each edge point in the plurality of edge points and the first intensity value is larger than a threshold value, wherein when the difference between the second intensity value and the first intensity value is larger than the threshold value, each edge point is determined to be fuzzy, and finally judging whether the number of fuzzy edge points in the plurality of edge points is larger than a preset value, wherein when the number of the fuzzy edge points is larger than the preset value, the method comprises the steps of determining that the portrait of a shot person in an image obtained at a first moment is fuzzy.
Through the description of the embodiment, a person skilled in the art can set the threshold value to be a suitable value according to the actual situation to meet the requirement of the actual situation, and details are not described herein.
Certainly, the method for determining whether the portrait of the person to be photographed in the image obtained at the first time is blurred in this embodiment is only an example, and through the description of this embodiment, a person skilled in the art can select other suitable manners to determine whether the portrait of the person to be photographed in the image obtained at the first time is blurred according to the actual situation, and details are not repeated here.
The above sections describe two forms of determining whether the portrait of the person to be photographed in the image obtained at the first time meets the storage condition, and through the description of this embodiment, those skilled in the art can derive other forms of determining whether the portrait of the person to be photographed in the image obtained at the first time meets the storage condition, which are not described herein again.
With continued reference to fig. 1 and fig. 2, after step S1, after determining that the portrait of the person to be captured in the image obtained at the first time does not satisfy the storage condition, the method for storing the captured image according to the embodiment of the present invention proceeds to step S2, that is: and selecting at least one image meeting the storage condition from a set time period after the first moment and/or before the first moment, and storing the at least one image meeting the storage condition.
Specifically, since the first time is a time when a saving instruction is received, for example, a time when a user presses a shutter or a set time when automatic photographing is performed, at least one image satisfying the saving condition is selected in a set time period after the first time and/or before the first time, that is, at another time near the first time, and a person skilled in the art can set a specific value of the set time period, for example, 2 seconds, 3 seconds, or the like, according to actual conditions, and save the selected at least one image satisfying the saving condition, for example, the selected at least one image may be saved in a memory card of the electronic device.
Whether the image after the first time and/or within the set time period before the first time meets the storage condition is determined according to a principle similar to the method described in the previous section, and for brevity of the description, the description is omitted here.
As can be seen from the above, since it is determined whether or not the portrait of the subject in the image obtained at the first timing satisfies the saving condition, and after the portrait of the person to be shot in the image obtained at the first moment does not meet the storage condition, selecting at least one image meeting the storage condition from a set time period after the first moment and/or before the first moment, and at least one image meeting the storage condition is stored, thereby avoiding the situation that the eyes of the photographer are closed at the moment of photographing or the image is blurred and the like which do not meet the requirements in the image obtained at the first moment, therefore, the problem that when electronic equipment such as a smart phone, a tablet personal computer or a digital camera and the like in the prior art shoots images is solved, the technical problem that the user needs to spend time to shoot again because the shot image does not meet the requirement is solved, and the technical effect of saving the time spent by the user to shoot the image again is realized.
Based on the same inventive concept, an embodiment of the present invention further provides an electronic device, and in practical applications, the electronic device may be a smart phone, a tablet computer, or a digital camera, which is not limited herein.
Referring to fig. 3, fig. 3 is a functional block diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 3, the electronic device includes: an image acquisition unit 301; and the processing unit 302 is connected to the image acquisition unit 301, and is configured to determine whether the portrait of the person to be photographed in the image acquired by the image acquisition unit 301 at the first time meets the storage condition, where the first time is a time when the storage instruction is received, select at least one image meeting the storage condition from a set time period after and/or before the first time after the portrait of the person to be photographed in the image acquired at the first time does not meet the storage condition, and store the at least one image meeting the storage condition.
The Image capturing unit 301 may be a camera, and may include a lens, a CCD sensor or a CMOS sensor, an ISP (Image Signal Processing, Image Signal processor), and other elements; the Processing Unit 302 may be a Central Processing Unit (CPU), an ARM architecture processor integrated with an ISP, an X86 architecture processor, or the like, and is not limited herein.
In this embodiment of the present invention, the processing unit 302 is specifically configured to determine whether the eyes of the person to be photographed in the image obtained at the first time are open, wherein when the eyes of the person to be photographed are closed, it is determined that the person image of the person to be photographed in the image obtained at the first time does not satisfy the saving condition, and/or determine whether the person image of the person to be photographed in the image obtained at the first time is blurred, wherein when the person image of the person to be photographed in the image obtained at the first time is blurred, it is determined that the person image of the person to be photographed in the image obtained at the first time does not satisfy the saving condition.
In this embodiment of the present invention, the processing unit 302 is further configured to determine that the eyes of the subject are in the eye-open state or the eye-closed state based on at least one image obtained before the first time, before determining whether the eyes of the subject are open in the image obtained at the first time.
In this embodiment of the present invention, the processing unit 302 is specifically configured to pre-process a face region of a person to be photographed in an image obtained at a first time, locate at least two feature points of the face region, obtain a feature vector composed of at least two features extracted from a region where the at least two feature points are located, where the at least two feature points include at least an eye feature point and an eye corner feature point, and determine whether an eye of the person to be photographed in the image obtained at the first time is open based on the feature vector.
In this embodiment of the present invention, the processing unit 302 is specifically configured to perform edge detection on a portrait of a person to be photographed in an image obtained at a first time, obtain a plurality of first intensity values corresponding to a plurality of edge points of a local maximum value, and reducing the image obtained at the first moment according to a preset proportion, carrying out edge detection on the portrait of the shot person in the reduced image to obtain a plurality of second intensity values corresponding to a plurality of edge points of a local maximum value, and determining whether the difference between the first intensity value and the second intensity value corresponding to each of the plurality of edge points is greater than a threshold value, wherein, when the difference between the second intensity value and the first intensity value is larger than the threshold value, each edge point is determined to be fuzzy, and whether the number of the fuzzy edge points in the plurality of edge points is larger than a preset value is judged, and when the number of the blurred edge points is greater than a preset value, determining that the portrait of the shot person in the image obtained at the first moment is blurred.
The electronic device in this embodiment and the method for saving a captured image in the foregoing embodiment are based on two aspects of the same inventive concept, and the implementation process of the method has been described in detail in the foregoing, so that a person skilled in the art can clearly understand the structure and implementation process of the electronic device in this embodiment according to the foregoing description, and for brevity of the description, details are not repeated here.
The technical scheme in the embodiment of the invention at least has the following technical effects or advantages:
since it is judged whether or not the portrait of the person to be photographed in the image obtained at the first timing satisfies the storage condition, and after the portrait of the person to be photographed in the image obtained at the first timing does not satisfy the storage condition, selecting at least one image meeting the storage condition from a set time period after the first moment and/or before the first moment, and at least one image meeting the storage condition is stored, thereby avoiding the situation that the eyes of the photographer are closed at the moment of photographing or the image is blurred and the like which do not meet the requirements in the image obtained at the first moment, therefore, the problem that when electronic equipment such as a smart phone, a tablet personal computer or a digital camera and the like in the prior art shoots images is solved, the technical problem that the user needs to spend time to shoot again because the shot image does not meet the requirement is solved, and the technical effect of saving the time spent by the user to shoot the image again is realized.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (12)

1. A method for shooting images is applied to electronic equipment with a touch screen and a camera, wherein the electronic equipment comprises a mobile phone or a tablet personal computer, and the method is characterized by comprising the following steps:
the electronic equipment detects a first operation acting on the touch screen;
the electronic equipment responds to the first operation and triggers a preset mode;
the electronic equipment detects a second operation for shooting;
the electronic equipment responds to the second operation to obtain an image;
the electronic device determines that the eyes of the person to be photographed in the image are closed-eye and the portrait of the person to be photographed in the image is blurred;
the electronic device does not save the image;
the electronic equipment saves another image obtained before or after the image is obtained, wherein the eyes of the shot person in the other image are open, and the portrait of the shot person in the other image is clear;
alternatively, the first and second electrodes may be,
the electronic device determining that the eyes of the photographed person in the image are closed;
the electronic device does not save the image;
the electronic equipment saves another image obtained before or after the image is obtained, wherein the eyes of the photographed person in the other image are open;
alternatively, the first and second electrodes may be,
the electronic device determining that a portrait of the photographer in the image is blurred;
the electronic device does not save the image;
the electronic device saves another image obtained before or after obtaining the image, and the portrait of the photographed person in the another image is clear.
2. The method of claim 1, wherein the electronic device determining whether the subject's eyes in the image are open or closed comprises:
the electronic equipment preprocesses the face area of the shot person in the image;
positioning at least two feature points of the face region, and obtaining a feature vector consisting of at least two features extracted from the region where the at least two feature points are located, wherein the at least two feature points at least comprise eye feature points and canthus feature points;
determining whether the eyes of the subject in the image are open or closed based on the feature vector.
3. The method of claim 1, wherein said determining whether the person of the subject in the image is blurred comprises:
the electronic equipment carries out edge detection on the portrait of the shot person in the image to obtain a plurality of first intensity values corresponding to a plurality of edge points of local maximum values;
reducing the image according to a preset proportion, and carrying out edge detection on the portrait of the shot person in the reduced image to obtain a plurality of second intensity values corresponding to the plurality of edge points of the local maximum value;
determining whether a difference between the second intensity value and the first intensity value corresponding to each of the plurality of edge points is greater than a threshold, wherein each of the edge points is determined to be blurred when the difference between the second intensity value and the first intensity value is greater than the threshold;
and determining whether the number of blurred edge points in the plurality of edge points is greater than a preset value, wherein when the number of blurred edge points is greater than the preset value, it is determined that the portrait of the shot person in the image is blurred.
4. A method for shooting images is applied to electronic equipment with a touch screen and a camera, wherein the electronic equipment comprises a mobile phone or a tablet personal computer, and the method is characterized by comprising the following steps:
the electronic equipment automatically triggers a preset mode according to the judgment result of the preview image;
the electronic device detects an operation for shooting;
the electronic equipment responds to the operation to obtain an image;
the electronic equipment determines that eyes of a shot person in the image are closed eyes and a portrait of the shot person in the image is blurred;
the electronic device does not save the image;
the electronic equipment saves another image obtained before or after the image is obtained, wherein the eyes of the shot person in the other image are open, and the portrait of the shot person in the other image is clear;
alternatively, the first and second electrodes may be,
the electronic device determining that the eyes of the photographed person in the image are closed;
the electronic device does not save the image;
the electronic equipment saves another image obtained before or after the image is obtained, wherein the eyes of the photographed person in the other image are open;
alternatively, the first and second electrodes may be,
the electronic device determining that a portrait of the photographer in the image is blurred;
the electronic device does not save the image;
the electronic device saves another image obtained before or after obtaining the image, and the portrait of the photographed person in the another image is clear.
5. The method of claim 4, wherein the electronic device determining whether the person image of the subject in the image is blurred comprises:
the electronic equipment carries out edge detection on the portrait of the shot person in the image to obtain a plurality of first intensity values corresponding to a plurality of edge points of local maximum values;
reducing the image according to a preset proportion, and carrying out edge detection on the portrait of the shot person in the reduced image to obtain a plurality of second intensity values corresponding to the plurality of edge points of the local maximum value;
determining whether a difference between the second intensity value and the first intensity value corresponding to each of the plurality of edge points is greater than a threshold, wherein each of the edge points is determined to be blurred when the difference between the second intensity value and the first intensity value is greater than the threshold;
and determining whether the number of blurred edge points in the plurality of edge points is greater than a preset value, wherein when the number of blurred edge points is greater than the preset value, it is determined that the portrait of the shot person in the image is blurred.
6. The method of claim 4, wherein the electronic device determining whether the subject's eyes in the image are open or closed comprises:
the electronic equipment preprocesses the face area of the shot person in the image;
positioning at least two feature points of the face region, and obtaining a feature vector consisting of at least two features extracted from the region where the at least two feature points are located, wherein the at least two feature points at least comprise eye feature points and canthus feature points;
determining whether the eyes of the subject in the image are open or closed based on the feature vector.
7. An electronic device, comprising: a memory, one or more processors, a camera, a plurality of applications, and one or more programs; wherein the one or more programs are stored in the memory, the electronic device comprising a cell phone or a tablet computer, wherein the one or more processors, when executing the one or more programs, cause the electronic device to implement the method of any of claims 1-3.
8. An electronic device comprising a mobile phone or a tablet computer, wherein the electronic device comprises means for performing the method of any one of claims 1 to 3.
9. A computer-readable storage medium comprising instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of claims 1-3, the electronic device comprising a cell phone or a tablet computer.
10. An electronic device, comprising: a memory, one or more processors, a camera, a plurality of applications, and one or more programs; wherein the one or more programs are stored in the memory, the electronic device comprising a cell phone or a tablet computer, wherein the one or more processors, when executing the one or more programs, cause the electronic device to implement the method of any of claims 4-6.
11. An electronic device comprising a mobile phone or a tablet computer, wherein the electronic device comprises means for performing the method of any one of claims 4 to 6.
12. A computer-readable storage medium comprising instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of claims 4-6, the electronic device comprising a cell phone or a tablet computer.
CN201910423560.0A 2013-11-22 2013-11-22 Method for storing shot image and electronic equipment Active CN110121030B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910423560.0A CN110121030B (en) 2013-11-22 2013-11-22 Method for storing shot image and electronic equipment

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
PCT/CN2013/087725 WO2015074261A1 (en) 2013-11-22 2013-11-22 Method for saving photographed image, and electronic device
CN201910423560.0A CN110121030B (en) 2013-11-22 2013-11-22 Method for storing shot image and electronic equipment
CN201380078887.XA CN105453533B (en) 2013-11-22 2013-11-22 A kind of method and electronic equipment saving shooting image

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201380078887.XA Division CN105453533B (en) 2013-11-22 2013-11-22 A kind of method and electronic equipment saving shooting image

Publications (2)

Publication Number Publication Date
CN110121030A CN110121030A (en) 2019-08-13
CN110121030B true CN110121030B (en) 2020-11-24

Family

ID=53178830

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201910423560.0A Active CN110121030B (en) 2013-11-22 2013-11-22 Method for storing shot image and electronic equipment
CN201380078887.XA Active CN105453533B (en) 2013-11-22 2013-11-22 A kind of method and electronic equipment saving shooting image

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201380078887.XA Active CN105453533B (en) 2013-11-22 2013-11-22 A kind of method and electronic equipment saving shooting image

Country Status (2)

Country Link
CN (2) CN110121030B (en)
WO (1) WO2015074261A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105592263B (en) * 2015-12-17 2019-02-22 小米科技有限责任公司 Image capturing method, device and terminal
CN112843678B (en) * 2020-12-31 2023-05-23 上海米哈游天命科技有限公司 Method and device for shooting image, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101584205A (en) * 2007-01-15 2009-11-18 松下电器产业株式会社 Imaging device
CN102622740A (en) * 2011-01-28 2012-08-01 鸿富锦精密工业(深圳)有限公司 Anti-eye-closure portrait shooting system and method
CN103096124A (en) * 2013-02-20 2013-05-08 浙江宇视科技有限公司 Auxiliary focusing method and auxiliary focusing device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5169139B2 (en) * 2007-10-25 2013-03-27 株式会社ニコン Camera and image recording program
JP5055166B2 (en) * 2008-02-29 2012-10-24 キヤノン株式会社 Eye open / closed degree determination device, method and program, and imaging device
CN103369214A (en) * 2012-03-30 2013-10-23 华晶科技股份有限公司 An image acquiring method and an image acquiring apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101584205A (en) * 2007-01-15 2009-11-18 松下电器产业株式会社 Imaging device
CN102622740A (en) * 2011-01-28 2012-08-01 鸿富锦精密工业(深圳)有限公司 Anti-eye-closure portrait shooting system and method
CN103096124A (en) * 2013-02-20 2013-05-08 浙江宇视科技有限公司 Auxiliary focusing method and auxiliary focusing device

Also Published As

Publication number Publication date
CN105453533A (en) 2016-03-30
CN110121030A (en) 2019-08-13
CN105453533B (en) 2019-05-28
WO2015074261A1 (en) 2015-05-28

Similar Documents

Publication Publication Date Title
CN112135046B (en) Video shooting method, video shooting device and electronic equipment
CN103685940A (en) Method for recognizing shot photos by facial expressions
US9838616B2 (en) Image processing method and electronic apparatus
CN107277375B (en) Self-photographing method and mobile terminal
CN109218614B (en) Automatic photographing method of mobile terminal and mobile terminal
US20170161553A1 (en) Method and electronic device for capturing photo
KR20160040711A (en) Automated selection of keeper images from a burst photo captured set
CN104683692A (en) Continuous shooting method and continuous shooting device
CN107395957B (en) Photographing method and device, storage medium and electronic equipment
CN103297696A (en) Photographing method, photographing device and photographing terminal
US20110261219A1 (en) Imaging device, terminal device, and imaging method
WO2016144800A1 (en) Method and device for capturing images using image templates
CN112988010B (en) Image processing method, image processing device, electronic equipment and storage medium
CN108174082B (en) Image shooting method and mobile terminal
CN111640165A (en) Method and device for acquiring AR group photo image, computer equipment and storage medium
JP2012527139A (en) Camera device having image processing function
CN108259767B (en) Image processing method, image processing device, storage medium and electronic equipment
CN110121030B (en) Method for storing shot image and electronic equipment
CN107180417B (en) Photo processing method and device, computer readable storage medium and electronic equipment
CN115862081A (en) Image acquisition method, device, equipment and computer readable storage medium
JP6373446B2 (en) Program, system, apparatus and method for selecting video frame
CN106791407B (en) Self-timer control method and system
JP2019186791A (en) Imaging apparatus, control method of the imaging apparatus, and control program
CN116506724A (en) Photographing auxiliary method, photographing auxiliary device, medium and terminal
CN113766123B (en) Photographing beautifying method and terminal

Legal Events

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