CN106612398B - Method and system for quick photographing - Google Patents

Method and system for quick photographing Download PDF

Info

Publication number
CN106612398B
CN106612398B CN201611224573.8A CN201611224573A CN106612398B CN 106612398 B CN106612398 B CN 106612398B CN 201611224573 A CN201611224573 A CN 201611224573A CN 106612398 B CN106612398 B CN 106612398B
Authority
CN
China
Prior art keywords
photographing
face frame
age
overlapping area
gender
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
CN201611224573.8A
Other languages
Chinese (zh)
Other versions
CN106612398A (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.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen 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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201611224573.8A priority Critical patent/CN106612398B/en
Publication of CN106612398A publication Critical patent/CN106612398A/en
Application granted granted Critical
Publication of CN106612398B publication Critical patent/CN106612398B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/178Human faces, e.g. facial parts, sketches or expressions estimating age from face image; using age information for improving recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

The invention provides a method for quick photographing, which comprises the following steps: acquiring first face frame information of a first photographic object; acquiring second face frame information of a second photographic object; calculating the overlapping area of the first face frame and the second face frame; judging whether the area of the overlapping area is larger than or equal to a preset overlapping area threshold value or not; and when the area of the overlapping area is determined to be larger than or equal to the preset overlapping area threshold value, when a photographing instruction is received for the second time, the gender and/or age of the second photographing object is not identified, and the second photographing object is directly photographed. The invention also provides a system for rapid photographing. The invention can control the identification frequency of the gender and/or the age when taking a picture, reduce the processing time of taking a picture and ensure that the picture is more smooth.

Description

Method and system for quick photographing
Technical Field
The invention relates to the technical field of image processing, in particular to a method and a system for quick photographing.
Background
With the development of science and technology, more and more electronic devices such as mobile phones and tablet computers supporting the photographing function are applied to the electronic market, and these electronic devices usually perform face detection and identification such as gender and age when photographing, so that the same person can perform face detection and identification such as gender and age again even if the same person slightly shakes in the same scene.
The photographing mode of performing face detection and recognition at every moment consumes time, wastes resources of a processor of the electronic equipment, reduces photographing speed and affects user experience. Further, slight shaking may cause inconsistency in the recognition results of sex and/or age in two consecutive times.
Disclosure of Invention
In view of the above, there is a need for a method for quick photographing, which can control the recognition frequency of gender and/or age during photographing, reduce the processing time of photographing, and make photographing more smooth; meanwhile, the first recognition result is still maintained for the small shaking of the same photographic subject.
A quick photographing method is applied to electronic equipment and comprises the following steps:
acquiring first face frame information of a first photographic object;
acquiring second face frame information of a second photographic object;
calculating the overlapping area of the first face frame and the second face frame;
judging whether the area of the overlapping area is larger than or equal to a preset overlapping area threshold value or not; and
when the area of the overlapping area is determined to be larger than or equal to the preset overlapping area threshold value, when the photographing instruction is received for the second time, the gender and/or age of the second photographing object is not identified, and the second photographing object is directly photographed.
According to a preferred embodiment of the present invention, after the acquiring the first face frame information of the first photographic subject, before the acquiring the second face frame information of the second photographic subject, the method further comprises:
and when a photographing instruction is received for the first time, identifying the gender and/or the age of the first photographing object according to a prestored gender and/or age identification algorithm.
According to a preferred embodiment of the invention, the method further comprises:
and taking the identification result of the sex and/or the age of the first photographic subject as the identification result of the sex and/or the age of the second photographic subject.
According to a preferred embodiment of the invention, the method further comprises:
and when the area of the overlapping area is smaller than the overlapping area threshold value, when a photographing instruction is received for the second time, recognizing the gender and/or the age of the second photographing object according to the gender and/or age recognition algorithm, and photographing the second photographing object.
According to a preferred embodiment of the present invention,
the first face frame information includes: a first center coordinate point of the rectangular frame, a first border length of the rectangular frame, and a first border width of the rectangular frame;
the second face frame information includes: a second center coordinate point of the rectangular frame, a second border length of the rectangular frame, and a second border width of the rectangular frame.
There is also a need to provide a fast photographing system, which can control the recognition frequency of gender and/or age during photographing, reduce the processing time of photographing, and make the photographing more smooth; meanwhile, the first recognition result is still maintained for the small shaking of the same photographic subject.
A quick photographing system applied to an electronic device comprises:
the first acquisition module is used for acquiring first face frame information of a first photographic object;
the second acquisition module is used for acquiring second face frame information of a second photographic object;
the calculation module is used for calculating the overlapping area of the first face frame and the second face frame;
the judging module is used for judging whether the area of the overlapping area is larger than or equal to a preset overlapping area threshold value or not; and
and the first photographing module is used for not identifying the gender and/or the age of the second photographing object when the judging module determines that the area of the overlapping area is larger than or equal to the preset overlapping area threshold value and receives a photographing instruction for the second time, and directly photographing the second photographing object.
According to a preferred embodiment of the invention, the system further comprises:
and the second photographing module is used for recognizing the gender and/or the age of the first photographing object according to a pre-stored gender and/or age recognition algorithm when a photographing instruction is received for the first time after the first acquisition module acquires the first face frame information of the first photographing object and before the second acquisition module acquires the second face frame information of the second photographing object.
According to a preferred embodiment of the present invention, the first photographing module is further configured to:
and taking the identification result of the sex and/or the age of the first photographic subject as the identification result of the sex and/or the age of the second photographic subject.
According to a preferred embodiment of the present invention, the second photographing module is further configured to:
when the judging module determines that the area of the overlapping area is smaller than the overlapping area threshold value, when a photographing instruction is received for the second time, recognizing the gender and/or the age of the second photographing object according to the gender and/or age recognition algorithm, and photographing the second photographing object.
According to a preferred embodiment of the present invention,
the first face frame information includes: a first center coordinate point of the rectangular frame, a first border length of the rectangular frame, and a first border width of the rectangular frame;
the second face frame information includes: a second center coordinate point of the rectangular frame, a second border length of the rectangular frame, and a second border width of the rectangular frame.
Compared with the prior art, the method and the system for quickly photographing determine whether to identify the gender and/or the age again by detecting the contact ratio of the face frames of the front image and the back image. When photographing, if the shaking of a photographing object is small, so that the overlapping area of the front face image frame and the rear face image frame is large, the same person is assumed, and gender and/or age are/is identified only once, so that the time delay is reduced, and the photographing speed is increased. If the shaking of the photographed object is large and the overlapping area of the front and rear face image frames is small, the current photographed object can be considered to leave or a new photographed object enters the scene.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart of a method of a preferred embodiment of the present invention.
Fig. 2 is a schematic position diagram of the first embodiment when the first face frame and the second face frame are overlapped according to the present invention.
Fig. 3 is a schematic position diagram of the second embodiment when the first face frame and the second face frame are overlapped according to the present invention.
Fig. 4 is a schematic position diagram of the third embodiment when the first face frame and the second face frame are overlapped according to the present invention.
Fig. 5 is a schematic position diagram of a fourth embodiment when the first face frame and the second face frame overlap according to the present invention.
Fig. 6 is a schematic structural diagram of an electronic device for implementing the fast photographing method according to the preferred embodiment of the present invention.
FIG. 7 is a functional block diagram of a preferred embodiment of the fast photographing system of the present invention.
Description of the main elements
Figure BDA0001193336960000061
Figure BDA0001193336960000071
The following detailed description will further illustrate the invention in conjunction with the above-described figures.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings and specific embodiments, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Furthermore, it should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
Referring to fig. 1, a flow chart of a preferred embodiment of the fast photographing method of the present invention is shown. The method in the preferred embodiment is performed by an electronic device.
In this embodiment, the electronic device may be, for example, a smart phone, a tablet computer, a digital camera, and other imaging devices. The electronic equipment at least comprises a display screen and a camera, wherein the display screen is used for displaying a photo-object captured by the camera, and the photo-object can be a person or an animal. The following embodiments of the present invention are mainly described by way of figures.
The execution sequence in the flowchart shown in fig. 1 may be changed and some may be omitted according to different requirements.
S11, the electronic device obtains first face frame information of the first photographic subject.
In this embodiment, a user starts a photographing function of the electronic device through a camera application program or a preset voice, and the electronic device drives the camera to be turned on when detecting that the photographing function is triggered for the first time. The user shoots the face of the first photographic subject by using the camera to obtain a first image of the first photographic subject. The first image is a global image containing a face and contains a plurality of information, and the main information is concentrated on the face.
In this embodiment, the electronic device stores a face detection algorithm in advance, and the face detection algorithm searches for a corresponding feature region in a captured image and uses the found feature region as a face region.
When the camera captures face information, the electronic device performs face detection on the captured face image, and usually positions the face in the captured image in the form of a red rectangular frame. The first face frame is a rectangular frame when the face detection algorithm is adopted to detect the face for the first time.
In this embodiment, the first face frame information includes: a first center coordinate point of the rectangular frame, a first frame length of the rectangular frame, and a first frame width of the rectangular frame.
In this embodiment, the electronic device is also pre-stored with a gender and/or age identification algorithm.
S12, the electronic device obtains second face frame information of the second photographic subject.
In this embodiment, the second photo object and the first photo object may be the same photo object, and for convenience of description, the photo object captured by the camera for the second time when the first photo object shakes or moves is referred to as the second photo object.
The electronic device performs face detection on the face image captured by the camera for the second time, and usually locates the face in the captured image in the form of a red rectangular frame. The second face frame is a rectangular frame when the face detection algorithm is adopted to detect the face for the second time.
In this embodiment, the second face frame information includes: a second center coordinate point of the rectangular frame, a second border length of the rectangular frame, and a second border width of the rectangular frame.
In the present embodiment, the length and width are in terms of the length and width of the display screen of the electronic device.
After the S11, before the S12, that is, after the acquiring the first face frame information of the first photographic subject, and before the acquiring the second face frame information of the second photographic subject, the method of quick photography may further include: and when the electronic equipment receives a photographing instruction for the first time, recognizing the gender and/or the age of the first photographing object according to the gender and/or age recognition algorithm.
S13, the electronic equipment calculates the overlapping area of the first face frame and the second face frame.
In this embodiment, after acquiring the first face frame information, the electronic device stores the first face frame information in a memory or a memory chip or a memory module, and after acquiring the second face frame information, the electronic device stores the second face frame information in a memory or a memory chip or a memory module.
According to the relationship between the first position of the first photographing object and the second position of the second photographing object, the overlapping area of the first face frame and the second face frame can be divided into four situations, which are specifically shown in fig. 2 to 5 and described correspondingly.
S14, the electronic equipment judges whether the area of the overlapping area is larger than or equal to a preset overlapping area threshold value.
In this embodiment, the electronic device sets a coincidence area threshold in advance.
When the electronic device determines that the area of the overlap region is greater than or equal to the preset overlap area threshold, performing S15; otherwise, when the electronic device determines that the area of the overlap region is smaller than the preset overlap area threshold, S16 is executed.
S15, when the electronic device receives the photographing instruction for the second time, the electronic device does not identify the gender and/or age of the second photographing object, and directly photographs the second photographing object.
In this embodiment, when the electronic device determines that the area of the overlapping area is greater than or equal to the preset overlapping area threshold, it is determined that the first photographic subject and the second photographic subject are the same photographic subject, and therefore when a photographing instruction of a user is received for the second time, the photographic subject is directly photographed, and the sex and/or the age of the second photographic subject is no longer recognized according to the sex and/or the age recognition algorithm. At this time, the electronic device also takes the recognition result of the sex and/or age of the first photographic subject as the recognition result of the sex and/or age of the second photographic subject.
And S16, when the electronic equipment receives the photographing instruction for the second time, recognizing the gender and/or the age of the second photographing object according to the gender and/or age recognition algorithm, and photographing the second photographing object.
In this embodiment, when the electronic device determines that the area of the overlapping area is smaller than the preset overlapping area threshold, the first photographic subject and the second photographic subject are considered to be different photographic subjects, so that when a photographing instruction of a user is received for the second time, it is necessary to identify the gender and/or the age of the second photographic subject according to the gender and/or age identification algorithm, and acquire an image of the second photographic subject after identifying the gender and/or the age of the second photographic subject. That is to say, the electronic device identifies the sex and/or the age of the first photographic subject as a first identification result, and identifies the sex and/or the age of the second photographic subject as a second identification result, and the first identification result is different from the second identification result.
Fig. 1 illustrates the method for quick photographing according to the present invention in detail, and fig. 2 to 5 are combined to describe the overlapping area between the first face frame of the first photographing object and the second face frame of the second photographing object in detail.
For convenience of the following description, an XY coordinate system is established with the short side direction of the display screen of the electronic device as the X axis, the long side direction of the display screen as the Y axis, and the lower left corner of the display screen as the coordinate origin O, and the area value of the overlapping area can be easily calculated by placing the first face frame and the second face frame in the established XY coordinate system.
Fig. 2 is a schematic diagram of a position relationship of the first embodiment when the first face frame and the second face frame overlap.
In the present embodiment, the first face frame 100 is located at the upper left corner of the coordinate system, the first center point coordinate of the first face frame 100 is (m, n), and the first frame length parallel to the X-axis direction is l1And a first frame width parallel to the Y-axis direction is l2. The second face frame 200 is located at the lower right corner of the coordinate system, the second center point coordinate of the second face frame 200 is (p, q), and the length of the second frame parallel to the X-axis direction is k1And a second frame width parallel to the Y-axis direction is k2. The region where the first face frame 100 and the second face frame 200 overlap is a shaded region, and the area S1 of the shaded region is calculated as shown in the following expression (1-1).
Figure BDA0001193336960000121
Fig. 3 is a schematic diagram of a position relationship of the second embodiment when the first face frame and the second face frame are overlapped.
In the present embodiment, the first face frame 100 is located at the lower left corner of the coordinate system, the first center point coordinate of the first face frame 100 is (m, n), and the first frame length parallel to the X-axis direction is l1And a first frame width parallel to the Y-axis direction is l2. The second face frame 200 is located at the lower right corner of the coordinate system, the second center point coordinate of the second face frame 200 is (p, q), and the length of the second frame parallel to the X-axis direction is k1And a second frame width parallel to the Y-axis direction is k2. The region where the first face frame 100 and the second face frame 200 overlap is a shaded region, and the area S2 of the shaded region is calculated as shown in the following equation (1-2).
Figure BDA0001193336960000122
Fig. 4 is a schematic diagram of a position relationship of the third embodiment when the first face frame and the second face frame overlap.
In the present embodiment, the first face frame 100 is located at the upper left corner of the coordinate system, the first center point coordinate of the first face frame 100 is (m, n), and the first frame length parallel to the X-axis direction is l1And a first frame width parallel to the Y-axis direction is l2. The second face frame 200 is located at the lower right corner of the coordinate system, the second center point coordinate of the second face frame 200 is (p, q), and the length of the second frame parallel to the X-axis direction is k1And a second frame width parallel to the Y-axis direction is k2. The region where the first face frame 100 and the second face frame 200 overlap is a shaded region, and the area S3 of the shaded region is calculated as shown in the following equation (1-3).
Figure BDA0001193336960000131
Fig. 5 is a schematic diagram of a position relationship of the second embodiment when the first face frame and the second face frame are overlapped.
In the present embodiment, the first face frame 100 is located at the upper left corner of the coordinate system, and the first center point of the first face frame 100 is locatedDenoted by (m, n), a first frame length l parallel to the X-axis direction1And a first frame width parallel to the Y-axis direction is l2. The second face frame 200 is located at the lower right corner of the coordinate system, the second center point coordinate of the second face frame 200 is (p, q), and the length of the second frame parallel to the X-axis direction is k1And a second frame width parallel to the Y-axis direction is k2. The region where the first face frame 100 and the second face frame 200 overlap is a shaded region, and the area S4 of the shaded region is calculated as shown in the following expression (1-4).
Figure BDA0001193336960000141
In summary, the method for quick photographing according to the present invention obtains first face frame information of a first photographing object, obtains second face frame information of a second photographing object, calculates an overlapping area of the first face frame and the second face frame, determines whether an area of the overlapping area is greater than or equal to a preset overlapping area threshold, and does not identify a gender and/or an age of the photographing object when it is determined that the area of the overlapping area is greater than or equal to the preset overlapping area threshold and a photographing instruction is received for a second time.
According to the invention, when the area of the overlapping area of the face frame is detected for the first time and the second time to be larger than or equal to the preset overlapping area threshold value, the first photographing object and the second photographing object are considered to be the same object, so that sex and/or age of the same photographing object do not need to be identified again when the photographing instruction is triggered for the second time. Therefore, gender and/or age of the photographed object do not need to be identified every time the photographing is carried out, the photographing speed is improved, and the user experience is improved.
The above description is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and it will be apparent to those skilled in the art that modifications may be made without departing from the inventive concept of the present invention, and these modifications are within the scope of the present invention.
The following describes a hardware structure and a functional module of the electronic device implementing the above fast photographing method with reference to fig. 6 to 7.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device for implementing the fast photographing method according to the present invention.
In the preferred embodiment of the present invention, the electronic device 1 includes a memory 11, at least one processor 12, at least one communication bus 13, a display screen 14, and at least one camera 15.
It will be appreciated by those skilled in the art that the configuration of the electronic device shown in fig. 3 does not constitute a limitation of the embodiment of the present invention, and may be a bus-type configuration or a star-type configuration, and the electronic device 1 may further include more or less hardware or software than those shown in the figures, or different component arrangements.
In some embodiments, the electronic device 1 includes an electronic device capable of automatically performing numerical calculations and/or information processing according to instructions set or stored in advance, and the hardware includes but is not limited to a microprocessor, an application specific integrated circuit, a programmable gate array, a digital processor, an embedded device, and the like. The electronic device 1 may further include a user device, which includes, but is not limited to, any electronic product that can interact with a user through a keyboard, a mouse, a remote controller, a touch panel, or a voice control device, for example, any imaging device with a camera 15, such as a personal computer, a tablet computer, a smart phone, and a digital camera.
It should be noted that the electronic device 1 is only an example, and other existing or future electronic products, such as those that can be adapted to the present invention, should also be included in the scope of the present invention, and are included herein by reference.
In some embodiments, the memory 11 is used for storing program codes and various data, such as a snapshot system installed in the electronic device 1, and realizes high-speed and automatic access to programs or data during the operation of the electronic device 1. The Memory 11 includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an electronically Erasable rewritable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc Memory, a magnetic disk Memory, a tape Memory, or any other medium readable by a computer that can be used to carry or store data.
In the present embodiment, the memory 11 stores a face detection algorithm in advance, which is used for face detection when the camera 15 captures an image of a photographic subject. The memory 11 also stores a gender and/or age identification algorithm in advance, which is used for identifying the gender and/or age of the photographic subject when a user triggers a photographing instruction.
In some embodiments, the at least one processor 12 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The at least one processor 12 is a Control Unit (Control Unit) of the electronic device 1, connects various components of the electronic device 1 by various interfaces and lines, and executes various functions and processes data of the electronic device 1, such as a system for performing quick photography, by running or executing programs or modules stored in the memory 11 and calling data stored in the memory 11.
In this embodiment, the processor 12 calls the program code in the memory 11 to execute: acquiring first face frame information of a first photographic object; acquiring second face frame information of a second photographic object; calculating the overlapping area of the first face frame and the second face frame; judging whether the area of the overlapping area is larger than or equal to a preset overlapping area threshold value or not; and when the area of the overlapping area is determined to be larger than or equal to the preset overlapping area threshold value, when the photographing instruction is received for the second time, the gender and/or the age of the second photographing object are not identified.
In some embodiments, the at least one communication bus 13 is configured to enable connectivity communication between the memory 11, the at least one processor 12, the display screen 14, and the at least one camera 15, among others.
In some embodiments, the display screen 14 may be used to display information entered by or provided to a viewer as well as various graphical viewer interfaces of the electronic device 1, which may be made up of graphics, text, icons, video, and any combination thereof. The Display screen 14 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-emitting diode (OLED), or the like.
The display screen 14 may also include a touch panel. If the display screen 14 includes a touch panel, the display screen 14 may be implemented as a touch screen to receive input signals from a viewer. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of the touch or slide action but also detect the duration and pressure associated with the touch or slide operation. The display panel and the touch panel may implement input and output functions as two separate components, but in some embodiments the display panel and the touch panel may be integrated to implement input and output functions.
In some embodiments, the at least one camera 15 is provided with a light sensing element, such as a charge-coupled device (CCD), which may be used to sense light entering the camera. In some embodiments, the at least one camera 15 may be a stationary camera or a rotatable camera.
The electronic device 1 may comprise two cameras 15. In some embodiments, the two cameras 15 may be a front camera and a rear camera of the electronic device 1, respectively. In some embodiments, the two cameras 15 may be arranged side by side on the same side of the electronic device 1 for achieving the effect of, for example, taking a wide-angle picture.
In other embodiments, the at least one camera 15 may not be disposed on the electronic device 1, but may exist independently, and is connected to the electronic device 1 in a wired or wireless manner.
Although not shown, the electronic device 1 may further include a power source (such as a battery) for supplying power to each component, and preferably, the power source may be logically connected to the at least one processor 12 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The power supply may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
Referring to fig. 7, a functional block diagram of the fast photographing system 10 according to the preferred embodiment of the invention is shown.
In some embodiments, the snapshot system 10 operates in the electronic device 1. The snapshot system 10 may include a plurality of functional modules comprised of program code segments. Program code for various program segments of the snapshot system 10 may be stored in the memory 11 and executed by the at least one processor 12 to perform (described in detail with respect to fig. 1) a snapshot.
In this embodiment, the quick photo taking system 10 may be divided into a plurality of functional modules according to the functions performed by the quick photo taking system. The functional module may include: the system comprises a first acquisition module 100, a second acquisition module 101, a calculation module 102, a judgment module 103, a first photographing module 104 and a second photographing module 105. The module referred to in the present invention refers to a series of computer program segments capable of being executed by at least one processor 12 and performing a fixed function, which are stored in the memory 11. In the present embodiment, the functions of the modules will be described in detail in the following embodiments.
The first obtaining module 100 is configured to obtain first face frame information of a first photo object.
In this embodiment, a user starts a photographing function of the electronic device through a camera application program or a preset voice, and the electronic device drives the camera to be turned on when detecting that the photographing function is triggered for the first time. The user shoots the face of the first photographic subject by using the camera to obtain a first image of the first photographic subject. The first image is a global image containing a face and contains a plurality of information, and the main information is concentrated on the face.
In this embodiment, the electronic device stores a face detection algorithm in advance, and the face detection algorithm searches for a corresponding feature region in a captured image and uses the found feature region as a face region.
When the camera captures face information, the electronic device performs face detection on the captured face image, and usually positions the face in the captured image in the form of a red rectangular frame. The first face frame is a rectangular frame when the face detection algorithm is adopted to detect the face for the first time.
In this embodiment, the first face frame information includes: a first center coordinate point of the rectangular frame, a first frame length of the rectangular frame, and a first frame width of the rectangular frame.
In this embodiment, the electronic device is also pre-stored with a gender and/or age identification algorithm.
The second obtaining module 101 is configured to obtain second face frame information of a second photographic subject.
In this embodiment, the second photo object and the first photo object may be the same photo object, and for convenience of description, the photo object captured by the camera for the second time when the first photo object shakes or moves is referred to as the second photo object.
The electronic device performs face detection on the face image captured by the camera for the second time, and usually locates the face in the captured image in the form of a red rectangular frame. The second face frame is a rectangular frame when the face detection algorithm is adopted to detect the face for the second time.
In this embodiment, the second face frame information includes: a second center coordinate point of the rectangular frame, a second border length of the rectangular frame, and a second border width of the rectangular frame.
In the present embodiment, the length and width are in terms of the length and width of the display screen of the electronic device.
After the first acquiring module 100 acquires the first face frame information of the first photographing object and before the second acquiring module 101 acquires the second face frame information of the second photographing object, the system 10 for quick photographing may further include the second photographing module 105: and the gender and/or age identification algorithm is used for identifying the gender and/or age of the first photographic subject according to the gender and/or age identification algorithm when a photographing instruction is received for the first time.
The calculating module 102 is configured to calculate an overlapping area of the first face frame and the second face frame.
In this embodiment, the first obtaining module 100 stores the first face frame information in a memory or a memory chip or a memory module after obtaining the first face frame information, and the second obtaining module 101 stores the second face frame information in a memory or a memory chip or a memory module after obtaining the second face frame information.
According to the relationship between the first position of the first photographing object and the second position of the second photographing object, the overlapping area of the first face frame and the second face frame can be divided into four situations, which are specifically shown in fig. 2 to 5 and described correspondingly.
The judging module 103 is configured to judge whether the area of the overlapping area is greater than or equal to a preset overlapping area threshold.
In this embodiment, the electronic device sets a coincidence area threshold in advance.
When the judging module 103 determines that the area of the overlapping region is greater than or equal to the preset overlapping area threshold, the first photographing module 104 is executed; otherwise, when the judging module 103 determines that the area of the overlapping region is smaller than the preset overlapping area threshold, the second photographing module 105 is executed.
The first photographing module 104 is configured to, when receiving the photographing instruction for the second time, directly photograph the second photographing object without identifying the gender and/or age of the second photographing object.
In this embodiment, when the determining module 103 determines that the area of the overlapping area is greater than or equal to the preset overlapping area threshold, it is determined that the first photographing object and the second photographing object are the same photographing object, and therefore when receiving the photographing instruction of the user for the second time, the first photographing module 104 directly photographs the photographing object and does not recognize the gender and/or the age of the second photographing object according to the gender and/or age recognition algorithm. At this time, the first photographing module 104 also takes the recognition result of the sex and/or age of the first photographing object as the recognition result of the sex and/or age of the second photographing object.
The second photographing module 105 is further configured to, when receiving a photographing instruction for the second time, recognize the gender and/or the age of the second photographing object according to the gender and/or age recognition algorithm, and photograph the second photographing object at the same time.
In this embodiment, when the determining module 103 determines that the area of the overlapping area is smaller than the preset overlapping area threshold, the first photo-object and the second photo-object are considered to be different photo-objects, and therefore when receiving the photo-instruction of the user for the second time, the second photo-module 105 needs to identify the gender and/or the age of the second photo-object according to the gender and/or the age identification algorithm, and acquire the image of the second photo-object after identifying the gender and/or the age of the second photo-object. That is, the second photographing module 105 recognizes the sex and/or age of the first photographing object as a first recognition result, and recognizes the sex and/or age of the second photographing object as a second recognition result, wherein the first recognition result is different from the second recognition result.
Fig. 1 illustrates the method for quick photographing according to the present invention in detail, and fig. 2 to 5 are combined to describe the overlapping area between the first face frame of the first photographing object and the second face frame of the second photographing object in detail.
For convenience of the following description, an XY coordinate system is established with the short side direction of the display screen of the electronic device as the X axis, the long side direction of the display screen as the Y axis, and the lower left corner of the display screen as the coordinate origin O, and the area value of the overlapping area can be easily calculated by placing the first face frame and the second face frame in the established XY coordinate system.
Fig. 2 is a schematic diagram of a position relationship of the first embodiment when the first face frame and the second face frame overlap.
In the present embodiment, the first face frame 100 is located at the upper left corner of the coordinate system, the first center point coordinate of the first face frame 100 is (m, n), and the first frame length parallel to the X-axis direction is l1And a first frame width parallel to the Y-axis direction is l2. The second face frame 200 is located at the lower right corner of the coordinate system, the second center point coordinate of the second face frame 200 is (p, q), and the length of the second frame parallel to the X-axis direction is k1And a second frame width parallel to the Y-axis direction is k2. The region where the first face frame 100 and the second face frame 200 overlap is a shaded region, and the area S1 of the shaded region is calculated as follows (1)-1).
Figure BDA0001193336960000241
Fig. 3 is a schematic diagram of a position relationship of the second embodiment when the first face frame and the second face frame are overlapped.
In the present embodiment, the first face frame 100 is located at the lower left corner of the coordinate system, the first center point coordinate of the first face frame 100 is (m, n), and the first frame length parallel to the X-axis direction is l1And a first frame width parallel to the Y-axis direction is l2. The second face frame 200 is located at the lower right corner of the coordinate system, the second center point coordinate of the second face frame 200 is (p, q), and the length of the second frame parallel to the X-axis direction is k1And a second frame width parallel to the Y-axis direction is k2. The region where the first face frame 100 and the second face frame 200 overlap is a shaded region, and the area S2 of the shaded region is calculated as shown in the following equation (1-2).
Figure BDA0001193336960000251
Fig. 4 is a schematic diagram of a position relationship of the third embodiment when the first face frame and the second face frame overlap.
In the present embodiment, the first face frame 100 is located at the upper left corner of the coordinate system, the first center point coordinate of the first face frame 100 is (m, n), and the first frame length parallel to the X-axis direction is l1And a first frame width parallel to the Y-axis direction is l2. The second face frame 200 is located at the lower right corner of the coordinate system, the second center point coordinate of the second face frame 200 is (p, q), and the length of the second frame parallel to the X-axis direction is k1And a second frame width parallel to the Y-axis direction is k2. The region where the first face frame 100 and the second face frame 200 overlap is a shaded region, and the area S3 of the shaded region is calculated as shown in the following equation (1-3).
Figure BDA0001193336960000261
Fig. 5 is a schematic diagram of a position relationship of the second embodiment when the first face frame and the second face frame are overlapped.
In the present embodiment, the first face frame 100 is located at the upper left corner of the coordinate system, the first center point coordinate of the first face frame 100 is (m, n), and the first frame length parallel to the X-axis direction is l1And a first frame width parallel to the Y-axis direction is l2. The second face frame 200 is located at the lower right corner of the coordinate system, the second center point coordinate of the second face frame 200 is (p, q), and the length of the second frame parallel to the X-axis direction is k1And a second frame width parallel to the Y-axis direction is k2. The region where the first face frame 100 and the second face frame 200 overlap is a shaded region, and the area S4 of the shaded region is calculated as shown in the following expression (1-4).
Figure BDA0001193336960000262
In summary, in the system 10 for quick photographing according to the present invention, the first obtaining module 100 obtains first face frame information of a first photographing object, the second obtaining module 101 obtains second face frame information of a second photographing object, the calculating module 102 calculates a coincidence area between the first face frame and the second face frame, the determining module 103 determines whether an area of the coincidence area is greater than or equal to a preset coincidence area threshold, and when the determining module 103 determines that the area of the coincidence area is greater than or equal to the preset coincidence area threshold, the first photographing module 104 does not identify a gender and/or an age of the photographing object when receiving a photographing instruction for the second time. According to the invention, when the area of the overlapping area of the face frame is detected for the first time and the second time to be larger than or equal to the preset overlapping area threshold value, the first photographing object and the second photographing object are considered to be the same object, so that sex and/or age of the same photographing object do not need to be identified again when the photographing instruction is triggered for the second time. Therefore, gender and/or age of the photographed object do not need to be identified every time the photographing is carried out, the photographing speed is improved, and the user experience is improved.
The integrated unit implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, an electronic device, or a network device) or a processor (processor) to execute parts of the methods according to the embodiments of the present invention.
In a further embodiment, referring to fig. 1, the at least one processor 12 may execute an operating system of the electronic device 1, and various installed application programs (such as the fast photographing system 10), program codes, and the like, for example, the above modules include a first obtaining module 100, a second obtaining module 101, a calculating module 102, a determining module 103, a first photographing module 104, and a second photographing module 105.
The memory 11 has program code stored therein, and the at least one processor 12 can call the program code stored in the memory 11 to perform related functions. For example, the modules (the first obtaining module 100, the second obtaining module 101, the calculating module 102, the judging module 103, the first photographing module 104, and the second photographing module 105) illustrated in fig. 7 are program codes stored in the memory 11 and executed by the at least one processor 12, so as to implement the functions of the modules for the purpose of quick photographing.
In one embodiment of the present invention, the memory 11 stores a plurality of instructions that are executed by the at least one processor 12 to enable taking a picture quickly. In particular, execution of the plurality of instructions by the at least one processor 12 includes:
acquiring first face frame information of a first photographic object;
acquiring second face frame information of a second photographic object;
calculating the overlapping area of the first face frame and the second face frame;
judging whether the area of the overlapping area is larger than or equal to a preset overlapping area threshold value or not; and
when the area of the overlapping area is determined to be larger than or equal to the preset overlapping area threshold value, when the photographing instruction is received for the second time, the gender and/or age of the second photographing object is not identified, and the second photographing object is directly photographed.
According to a preferred embodiment, after said obtaining first face frame information of a first photographic subject and before said obtaining second face frame information of a second photographic subject, execution of said plurality of instructions by said at least one processor 12 further comprises:
and when a photographing instruction is received for the first time, identifying the gender and/or the age of the first photographing object according to a prestored gender and/or age identification algorithm.
According to a preferred embodiment, execution of the plurality of instructions by the at least one processor 12 further comprises:
and taking the identification result of the sex and/or the age of the first photographic subject as the identification result of the sex and/or the age of the second photographic subject.
According to a preferred embodiment, execution of the plurality of instructions by the at least one processor 12 further comprises:
and when the area of the overlapping area is smaller than the overlapping area threshold value, when a photographing instruction is received for the second time, recognizing the gender and/or the age of the second photographing object according to the gender and/or age recognition algorithm, and photographing the second photographing object.
In accordance with a preferred embodiment of the present invention,
the first face frame information includes: a first center coordinate point of the rectangular frame, a first border length of the rectangular frame, and a first border width of the rectangular frame;
the second face frame information includes: a second center coordinate point of the rectangular frame, a second border length of the rectangular frame, and a second border width of the rectangular frame.
Specifically, the at least one processor 12 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1, which is not repeated herein.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or that the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A quick photographing method is applied to electronic equipment, and is characterized by comprising the following steps:
acquiring first face frame information of a first photographic object;
acquiring second face frame information of a second photographic object;
calculating the overlapping area of the first face frame and the second face frame;
judging whether the area of the overlapping area is larger than or equal to a preset overlapping area threshold value or not; and
when the area of the overlapping area is determined to be larger than or equal to the preset overlapping area threshold value, when the photographing instruction is received for the second time, the gender and/or age of the second photographing object is not identified, and the second photographing object is directly photographed.
2. The method of quick photographing according to claim 1, wherein after said acquiring first face frame information of a first photographic subject and before said acquiring second face frame information of a second photographic subject, the method further comprises:
and when a photographing instruction is received for the first time, identifying the gender and/or the age of the first photographing object according to a prestored gender and/or age identification algorithm.
3. The method of taking photographs quickly of claim 2 wherein the method further comprises:
and taking the identification result of the sex and/or the age of the first photographic subject as the identification result of the sex and/or the age of the second photographic subject.
4. The method of taking photographs quickly of claim 2 wherein the method further comprises:
and when the area of the overlapping area is smaller than the overlapping area threshold value, when a photographing instruction is received for the second time, recognizing the gender and/or the age of the second photographing object according to the gender and/or age recognition algorithm, and photographing the second photographing object.
5. The method of taking a quick photograph according to any one of claims 1 to 4,
the first face frame information includes: a first center coordinate point of the rectangular frame, a first border length of the rectangular frame, and a first border width of the rectangular frame;
the second face frame information includes: a second center coordinate point of the rectangular frame, a second border length of the rectangular frame, and a second border width of the rectangular frame.
6. A quick photographing system applied to an electronic device is characterized by comprising:
the first acquisition module is used for acquiring first face frame information of a first photographic object;
the second acquisition module is used for acquiring second face frame information of a second photographic object;
the calculation module is used for calculating the overlapping area of the first face frame and the second face frame;
the judging module is used for judging whether the area of the overlapping area is larger than or equal to a preset overlapping area threshold value or not; and
and the first photographing module is used for not identifying the gender and/or the age of the second photographing object when the judging module determines that the area of the overlapping area is larger than or equal to the preset overlapping area threshold value and receives a photographing instruction for the second time, and directly photographing the second photographing object.
7. The system for taking photographs quickly of claim 6 wherein the system further comprises:
and the second photographing module is used for recognizing the gender and/or the age of the first photographing object according to a pre-stored gender and/or age recognition algorithm when a photographing instruction is received for the first time after the first acquisition module acquires the first face frame information of the first photographing object and before the second acquisition module acquires the second face frame information of the second photographing object.
8. The system for rapid photographing according to claim 7, wherein the first photographing module is further configured to:
and taking the identification result of the sex and/or the age of the first photographic subject as the identification result of the sex and/or the age of the second photographic subject.
9. The system for rapid photographing according to claim 7, wherein the second photographing module is further configured to:
when the judging module determines that the area of the overlapping area is smaller than the overlapping area threshold value, when a photographing instruction is received for the second time, recognizing the gender and/or the age of the second photographing object according to the gender and/or age recognition algorithm, and photographing the second photographing object.
10. The snapshot system of any one of claims 6 to 9,
the first face frame information includes: a first center coordinate point of the rectangular frame, a first border length of the rectangular frame, and a first border width of the rectangular frame;
the second face frame information includes: a second center coordinate point of the rectangular frame, a second border length of the rectangular frame, and a second border width of the rectangular frame.
CN201611224573.8A 2016-12-27 2016-12-27 Method and system for quick photographing Active CN106612398B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611224573.8A CN106612398B (en) 2016-12-27 2016-12-27 Method and system for quick photographing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611224573.8A CN106612398B (en) 2016-12-27 2016-12-27 Method and system for quick photographing

Publications (2)

Publication Number Publication Date
CN106612398A CN106612398A (en) 2017-05-03
CN106612398B true CN106612398B (en) 2020-06-05

Family

ID=58636368

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611224573.8A Active CN106612398B (en) 2016-12-27 2016-12-27 Method and system for quick photographing

Country Status (1)

Country Link
CN (1) CN106612398B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102760077A (en) * 2011-04-29 2012-10-31 广州三星通信技术研究有限公司 Method and device for self-adaptive application scene mode on basis of human face recognition
CN103945104A (en) * 2013-01-21 2014-07-23 联想(北京)有限公司 Information processing method and electronic equipment
CN105701466A (en) * 2016-01-13 2016-06-22 杭州奇客科技有限公司 Rapid all angle face tracking method
CN106156762A (en) * 2016-08-12 2016-11-23 乐视控股(北京)有限公司 Take pictures processing method and processing device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8363951B2 (en) * 2007-03-05 2013-01-29 DigitalOptics Corporation Europe Limited Face recognition training method and apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102760077A (en) * 2011-04-29 2012-10-31 广州三星通信技术研究有限公司 Method and device for self-adaptive application scene mode on basis of human face recognition
CN103945104A (en) * 2013-01-21 2014-07-23 联想(北京)有限公司 Information processing method and electronic equipment
CN105701466A (en) * 2016-01-13 2016-06-22 杭州奇客科技有限公司 Rapid all angle face tracking method
CN106156762A (en) * 2016-08-12 2016-11-23 乐视控股(北京)有限公司 Take pictures processing method and processing device

Also Published As

Publication number Publication date
CN106612398A (en) 2017-05-03

Similar Documents

Publication Publication Date Title
KR102171616B1 (en) Method and device for preventing incorrect contact of terminal
KR102039427B1 (en) Smart glass
US10452890B2 (en) Fingerprint template input method, device and medium
US20170032219A1 (en) Methods and devices for picture processing
WO2017209560A1 (en) Screen output method and electronic device supporting same
WO2018021736A1 (en) Apparatus and method for processing a beauty effect
US20160283022A1 (en) Method and Device for Awakening an Element
CN108090908B (en) Image segmentation method, device, terminal and storage medium
US20170123587A1 (en) Method and device for preventing accidental touch of terminal with touch screen
US10708512B2 (en) Method and device for capturing image and storage medium
US9536159B2 (en) Smart glasses and method for recognizing and prompting face using smart glasses
US20170185820A1 (en) Method, device and medium for fingerprint identification
CN112492201B (en) Photographing method and device and electronic equipment
US20160350584A1 (en) Method and apparatus for providing contact card
KR20140071802A (en) Shortcut information execution system and method of mobile terminal based face recognition
US11574502B2 (en) Method and device for identifying face, and computer-readable storage medium
CN103576862A (en) Gesture-control camera shooting method and device
CN113709368A (en) Image display method, device and equipment
CN106612398B (en) Method and system for quick photographing
CN103873755A (en) System and method for shooting leaping people
CN113268211A (en) Image acquisition method and device, electronic equipment and storage medium
EP3211564A1 (en) Method and device for verifying a fingerprint
CN112734661A (en) Image processing method and device
CN106557766B (en) Fuzzy character processing method and system and electronic equipment
CN112153291B (en) Photographing method and electronic equipment

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