CN112954225A - Multi-frame picture shooting method and device and computer readable storage medium - Google Patents

Multi-frame picture shooting method and device and computer readable storage medium Download PDF

Info

Publication number
CN112954225A
CN112954225A CN202110333543.5A CN202110333543A CN112954225A CN 112954225 A CN112954225 A CN 112954225A CN 202110333543 A CN202110333543 A CN 202110333543A CN 112954225 A CN112954225 A CN 112954225A
Authority
CN
China
Prior art keywords
axis
mean
shooting
mode
terminal
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.)
Granted
Application number
CN202110333543.5A
Other languages
Chinese (zh)
Other versions
CN112954225B (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN202110333543.5A priority Critical patent/CN112954225B/en
Publication of CN112954225A publication Critical patent/CN112954225A/en
Application granted granted Critical
Publication of CN112954225B publication Critical patent/CN112954225B/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/62Control of parameters via user interfaces
    • 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/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/681Motion detection
    • H04N23/6812Motion detection based on additional sensors, e.g. acceleration sensors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof

Abstract

The invention provides a multi-frame picture shooting method and device and a computer readable storage medium, and belongs to the technical field of picture shooting. According to the method, the terminal shooting mode is monitored through the historical data of the gyroscope, images are shot according to the determined shooting mode and the established strategy, when the tripod and the handheld mode are monitored to be in a shaking state through the gyroscope, the images are directly updated to the preview interface, the current shot image frame is reserved until the tripod and the handheld mode are monitored to be in a stable state, and therefore the completely aligned stable images can be obtained, the registration steps can be omitted, direct fusion is achieved, the registration time is saved, a user can obtain pictures with good shooting effects, the image shooting quality is guaranteed, and meanwhile the shooting effect and the time performance are optimized.

Description

Multi-frame picture shooting method and device and computer readable storage medium
Technical Field
The present invention relates to the field of picture taking technologies, and in particular, to a method and an apparatus for taking multiple frames of pictures, and a computer-readable storage medium.
Background
In the process of shooting by using the terminal equipment, in order to obtain a better picture shooting effect, multiple frames of pictures are generally required to be continuously shot, and then the multiple frames of pictures are fused into one picture, so that the shooting effect is optimized.
However, the shake of the terminal device in the shooting process can seriously affect the shooting effect, so that the images are generally required to be registered before fusion so as to eliminate the influence caused by the shake; the time consumption of the registration process is long, so that the image processing time is prolonged, and the user experience is reduced.
In order to reduce the influence of the shaking phenomenon on picture taking, a tripod is used for taking a picture in an important place at present, and when the picture is taken by using the tripod, slight shaking of the tripod is still caused at the moment that a user clicks a shutter, and the picture taking effect is still influenced.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for photographing a multi-frame picture, and a computer-readable storage medium, which aim to monitor a photographing mode of a terminal through gyroscope historical data, and use different photographing processes and different registration modes for different modes, thereby optimizing a photographing effect and time performance while ensuring photographing quality, and solving a problem that an existing photographed picture is easily affected by jitter.
The technical scheme adopted by the invention for solving the technical problems is as follows:
the first aspect of the present invention provides a method for shooting a plurality of frames of pictures, comprising the steps of:
monitoring a terminal shooting mode through historical data of a gyroscope;
shooting images according to the determined shooting mode and a set strategy, and updating the images captured by the camera to a preview interface;
when the shooting mode is in the tripod mode, the nearest N is acquired2Secondary gyroscope historical data and judging whether the terminal is in a shaking state or not, and executing corresponding strategies according to different states of the terminal; wherein N is2Is a natural number as a set threshold parameter;
and when the shooting mode is in the handheld mode, judging whether the terminal is in a shaking state, and continuously shooting the multi-frame images according to different states of the terminal and a set strategy.
In some embodiments, the monitoring of the terminal photographing mode through the gyroscope history data includes the steps of:
when a user enters a shooting preview interface, recording historical data of a gyroscope according to a set frequency F;
after the user clicks the shutter, the nearest N of the current time is obtained1Secondary gyroscope historical data; wherein N is1Is a predetermined threshold parameter, and N2<N1
Calculating N1Mean of x-axis, y-axis and z-axis of secondary gyroscope historical datax,meany,meanz
Judging the mean value mean of the x axis, the y axis or the z axisx,meany,meanzAnd a predetermined first threshold th1Determining the shooting mode of the current terminal equipment according to the size relation.
In some embodiments, the obtaining the nearest N is performed when the photographing mode is in the tripod mode2Secondary gyroscope historical data and judging whether the terminal is in a shaking state or not, and executing corresponding strategies according to different states of the terminal; wherein N is2Specifically, the method comprises the following steps of:
calculating N2Mean of x-, y-, and z-axes of secondary gyroscope historical data'x,mean′y,mean′z
Comparing x-axis or y-axis or z-axis mean'x,mean′y,mean′zAnd a predetermined third threshold th3Judging whether the current terminal is in a jitter state or not;
if x-axis or y-axis or z-axis mean'x,mean′y,mean′zGreater than a predetermined third threshold th3Judging that the current state is in a jitter state;
otherwise, i.e. x-axis or y-axis or z-axis mean'x,mean′y,mean′zIs less than a predetermined third threshold th3Then calculate N2Maximum values max 'of x-axis, y-axis and z-axis of secondary gyroscope historical data'x,max′y,max′z
If x-axis or y-axis or z-axis maximum value max'x,max′y,max′zGreater than a predetermined fourth threshold th4Judging that the current state is in a jitter state; wherein th3<th1And th4<th2
In some embodiments, further comprising the step of:
and if the camera is in the tripod shooting mode and in the shaking state, updating the image captured by the camera to a preview interface.
In some embodiments, further comprising the step of:
if the tripod is not in the shaking state at present, the tripod is considered to be in the stable state at present, and the node at the present time point is recorded;
setting a waiting state, and recording the waiting threshold duration time; and judging whether the waiting time reaches the waiting threshold duration, and if so, shooting and keeping the current image frame.
In some embodiments, when the shooting mode is in the handheld mode, and whether the terminal is in a shake state is determined, the method continuously shoots the multi-frame image according to the different states of the terminal and the established strategy includes the steps of:
judging whether the current handheld mode is in a jitter state or not;
if the image is in the shaking state, updating the shot image to a preview interface;
and if the current shot picture frame is in a non-jitter state, namely a stable state, the current shot picture frame is stored.
In an embodiment, the method further comprises the following steps:
judging whether the terminal finishes shooting;
if the terminal does not finish shooting, updating the shot image to a preview interface;
and if the terminal shooting is finished, ending.
The invention also provides a picture shooting device, which comprises a gyroscope, a data acquisition and calculation module, a shooting mode determination module, a tripod mode shooting module and a handheld mode shooting module which are connected with one another;
the gyroscope is used for sensing, detecting and recording shooting historical data of the terminal;
the data acquisition and calculation module acquires the N nearest to the current time1Secondary gyroscope historical data and calculate N1Secondary gyroscope historical dataMean of x, y, z axes ofx,meany,meanz
The shooting mode determining module is used for judging the mean value mean of the x axis, the y axis or the z axisx,meany,meanzAnd a predetermined first threshold th1Determining the shooting mode of the current terminal equipment according to the size relation;
the tripod mode shooting module is used for controlling shooting of images according to a set strategy of a tripod shooting mode;
and the handheld mode shooting module is used for controlling shooting of images according to a set strategy of the tripod shooting mode.
In some embodiments, the tripod mode photographing module includes a second data acquisition unit, a second data calculation unit, a first shake state judgment unit, a time point recording unit, an image frame saving unit, and a first photographing completion state judgment unit;
the second data obtaining unit is used for obtaining N2Secondary gyroscope historical data, wherein N2Is a predetermined threshold parameter, and N2<N1
The second data calculation unit is used for calculating N2Mean of x-, y-, and z-axes of secondary gyroscope historical data'x,mean′y,mean′z
The first jitter state judging unit compares x-axis or y-axis or z-axis mean value mean'x,mean′y,mean′zAnd a predetermined third threshold th3Judging whether the current terminal is in a jitter state or not;
the time point recording unit is used for recording a node at the current time point when the tripod is monitored to be in a stable state;
the image frame storage unit is used for setting a waiting state and recording the waiting threshold duration time; and judging whether the waiting time reaches the waiting threshold duration, and if so, shooting and keeping the current image frame.
The present application also provides a computer-readable storage medium comprising a processor, a computer-readable storage medium and a computer program stored on the computer-readable storage medium, which computer program, when executed by the processor, performs the steps of the method as described above.
The multi-frame picture shooting method, the device and the computer storage medium provided by the embodiment of the invention monitor the terminal shooting mode through the historical data of the gyroscope, then shoot the image according to the determined shooting mode and the established strategy, when the situation that the tripod and the handheld mode are in the shaking state is monitored through the gyroscope, the image is directly updated to the preview interface, the current shot image frame is reserved until the situation that the tripod and the handheld mode are in the stable state is monitored, and thus, the completely aligned stable image can be obtained, the registration steps can be omitted, the direct fusion can be realized, the registration time can be saved, and the user can obtain the picture with better shooting effect, so that the shooting quality of the image is ensured, and the shooting effect and the time performance are optimized.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a mobile terminal according to the present invention;
fig. 2 is a diagram of a communication network system architecture according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method of an embodiment of a multi-frame picture photographing method according to the present invention;
FIG. 4 is a flowchart of a method for capturing multiple frames according to another embodiment of the present invention;
FIG. 5 is a flowchart of a mode shooting method of a multi-frame picture shooting method according to an embodiment of the present invention;
FIG. 6 is a flowchart of another mode of a multi-frame image capturing method according to an embodiment of the present invention;
FIG. 7 is a flowchart of a multi-frame image capturing method according to another embodiment of the present invention;
fig. 8 is a flowchart of a method of capturing a multi-frame picture according to an embodiment of the present invention in a handheld mode;
FIG. 9 is a block diagram of an embodiment of a picture taking apparatus according to the present invention;
fig. 10 is a block diagram of another embodiment of a picture taking apparatus according to an embodiment of the invention.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present invention, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a PGW (PDN gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and communication network system, the present invention provides various embodiments of the method.
The first embodiment is as follows:
the present invention provides a multi-frame picture shooting method, please refer to fig. 3 to 6, which specifically includes the following steps:
s30, monitoring the terminal shooting mode through historical data of a gyroscope;
the method specifically comprises the following steps:
and S302, when the user enters the shooting preview interface, recording the historical data of the gyroscope according to a preset frequency F (for example, 10 times/S).
S304, after the user clicks the shutter, obtaining the nearest N of the current time1Secondary gyroscope historical data; wherein N is1For a given threshold parameter (e.g. N)1=30)。
S306, calculating N1Mean of x-axis, y-axis and z-axis of secondary gyroscope historical datax,meany,meanz
S308, judging the mean value mean of the x axis, the y axis or the z axisx,meany,meanzAnd a predetermined first threshold th1Determining the shooting mode of the current terminal equipment,
the photographing mode includes a hand-held mode and a tripod mode.
S3081 mean of x-axis, y-axis or z-axisx,meany,meanzGreater than a predetermined first threshold th1If yes, judging that the mobile phone is currently in the handheld mode; step S60 is executed.
S3082 mean of x-axis, y-axis or z-axisx,meany,meanzIs less than a predetermined first threshold th1Then calculate N1Maximum value max of x-axis, y-axis and z-axis of secondary gyroscope historical datax,maxy,maxz(ii) a And performs step S309;
s309, judging the maximum value max of the x-axis, the y-axis or the z-axisx,maxy,maxzAnd a predetermined second threshold th2Determining the mode of the current terminal equipment according to the size relation.
S3091 maximum value max of x-axis, y-axis or z-axisx,maxy,maxzGreater than a predetermined second threshold th2If yes, judging that the mobile phone is currently in the handheld mode; step S60 is executed.
S3092 maximum value max of x-axis, y-axis or z-axisx,maxy,maxzIs less than a predetermined second threshold th2(ii) a It is judged that the tripod mode is currently performed and step S50 is performed.
And S40, shooting images according to the determined shooting mode and a set strategy, and updating the images captured by the camera to a preview interface.
Specifically, the predetermined policy is different processing flows in the tripod mode and the handheld mode, and the predetermined policy specifically includes the following steps:
s50, when the shooting mode is in the tripod mode, obtaining the nearest N2Secondary gyroscope historical data and judging whether the terminal is in a shaking state or not, and executing corresponding strategies according to different states of the terminal, wherein N is2Is a predetermined threshold parameter, and N2<N1(e.g. N)210); the method specifically comprises the following steps:
s501, calculating N2Mean of x-, y-, and z-axes of secondary gyroscope historical data'x,mean′y,mean′z
S502, comparing x-axis or y-axis or z-axis mean'x,mean′y,mean′zAnd a predetermined third threshold th3Judging whether the current terminal is in a jitter state or not;
s503, if x-axis or y-axis or z-axis mean'x,mean′y,mean′zGreater than a predetermined third threshold th3Judging that the current state is in a jitter state; executing step S506;
s504, otherwise, namely x-axis or y-axis or z-axis mean'x,mean′y,mean′zIs less than a predetermined third threshold th3Then calculate N2Maximum values max 'of x-axis, y-axis and z-axis of secondary gyroscope historical data'x,max′y,max′z
S505, and the maximum value max of the x axis, the y axis or the z axis'x,max′y,max′zGreater than a predetermined fourth threshold th1Judging that the current state is in a jitter state; executing step S506;
wherein th3<th1And th4<th2And said first threshold value th1Second threshold th2Third threshold th3And a fourth threshold th4The value ranges of (1) and (2) are all 0-1, and specific data can be determined by testing according to experiments.
S506, if the camera is in the tripod shooting mode and in the shaking state at present, updating an image captured by the camera (the sensor) to a preview interface;
s507, if the tripod is not in the shaking state at present, the tripod is considered to be in the stable state at present, and a node at the present time point is recorded; executing step S508;
s508, setting a waiting state, and recording a waiting threshold duration time, wherein the time is 1S; judging whether the waiting time reaches a waiting threshold duration, and if so, shooting and reserving the current image frame; and if the waiting threshold duration is not reached, returning to execute the steps S501-S507.
S509, judging whether the terminal finishes shooting;
s510, if the terminal does not finish shooting, updating the shot image to a preview interface;
and S511, if the terminal shooting is finished, ending the process.
S60, when the shooting mode is in the handheld mode, judging whether the terminal is in a shaking state, and continuously shooting multi-frame images according to different states of the terminal and a set strategy; the hand-held mode established policy specifically includes:
s601, judging whether the current handheld mode is in a shaking state,
specifically, the method for determining the jitter status is described in steps S502 to S505, and will not be described herein again.
S602, if the image is in a shaking state, updating the shot image to a preview interface;
s603, if the camera is in a non-jitter state, namely a stable state, storing the current shot picture frame;
s604, judging whether the terminal finishes shooting;
s605, if the terminal is judged not to finish shooting, updating the shot image to a preview interface; repeating the steps S601-S604;
and S606, if the terminal shooting is judged to be finished, ending.
Referring to fig. 7 to 8, in an embodiment, the method further includes: if the terminal is still in a shaking state when the image shooting is finished, the following steps can be further executed;
s701, registering and fusing continuously shot multi-frame images;
s702, if the tripod is in a stable state when shooting is finished, acquiring a stable time node;
s703, taking the first frame image shot after the time node is acquired as a shot reference frame imagerefAn image;
s704, referring to the frame imagerefThe images are used as references to carry out registration and fusion on the shot multi-frame images;
s705, returning the fused image to the user as a result.
S801, if the current mode is in the handheld mode: continuously shooting a plurality of frames of images according to a set strategy;
s802, registering the continuously shot multi-frame images;
s803, fusing the registered images according to a set strategy;
and S804, returning the fused image to the user as a result.
According to the multi-frame picture shooting method, the shooting mode of the terminal is monitored through historical data of the gyroscope, then the picture is shot according to the determined shooting mode and the established strategy, when the situation that the tripod and the handheld mode are in the shaking state is monitored through the gyroscope, the picture is directly updated to the preview interface, the current shot picture frame is reserved until the situation that the tripod and the handheld mode are in the stable state is monitored, the completely aligned stable picture can be obtained, the registration step can be omitted, the direct fusion can be achieved, the registration time can be saved, the user can obtain the picture with the good shooting effect, the shooting quality of the picture can be guaranteed, and the shooting effect and the time performance can be optimized.
Example two:
the embodiment of the application provides a multi-frame picture shooting device, and the multi-frame picture shooting device realizes the multi-frame picture shooting method according to the embodiment I. Referring to fig. 9 and 10, the multi-frame image capturing device includes a gyroscope 91, a data acquisition and calculation module 92, a capturing mode determination module 93, a tripod mode capturing module 94, and a handheld mode capturing module 95.
The gyroscope 91 is used for sensing, detecting and recording terminal shooting history data;
specifically, when the user enters the shooting preview interface, the gyro 91 records the shooting history data at a given frequency F (e.g., 10 times/S).
The data acquisition and calculation module 92 acquires the latest N of the current time1Secondary gyroscope historical data and calculate N1Average values of the x axis, the y axis and the z axis of the secondary gyroscope historical data;
the shooting mode determining module 93 is configured to determine an x-axis or y-axis or z-axis meanx,meany,meanzAnd a predetermined first threshold th1Determining the shooting mode of the current terminal equipment according to the size relation;
in particular, if the mean of the x-axis or y-axis or z-axis is meanx,meany,meanzGreater than a predetermined first threshold th1If yes, judging that the mobile phone is currently in the handheld mode;
mean of x-axis or y-axis or z-axisx,meany,meanzIf it is smaller than the predetermined first threshold th1, N is calculated1Maximum value max of x-axis, y-axis and z-axis of secondary gyroscope historical datax,maxy,maxz(ii) a Judging the maximum value max of the x-axis, the y-axis or the z-axisx,maxy,maxzAnd a predetermined second threshold th2The magnitude relationship of (1);
maximum max of x-axis, y-axis or z-axisx,maxy,maxzGreater than a predetermined second threshold th2If yes, judging that the mobile phone is currently in the handheld mode; maximum max of x-axis, y-axis or z-axisx,maxy,maxzIs less than a predetermined second threshold th2(ii) a It is judged that the tripod mode is currently in.
The tripod mode photographing module 94 is configured to control photographing of an image according to a predetermined strategy of the tripod photographing mode.
The tripod-mode photographing module 94 includes a second data acquisition unit 941, a second data calculation unit 942, a first shake state determination unit 943, a time point recording unit 945, an image frame saving unit 946, and a first photographing completion state determination unit 947.
The second data acquisition ticketElement 941 for obtaining N2Secondary gyroscope historical data, wherein N2Is a predetermined threshold parameter, and N2<N1(e.g. N)2=10);
The second data calculating unit 942 is configured to calculate N2Mean of x-, y-, and z-axes of secondary gyroscope historical data'x,mean′y,mean′z
The first dither state determination unit 943 compares x-axis or y-axis or z-axis mean value mean'x,mean′y,mean′zAnd a predetermined third threshold th3Judging whether the current terminal is in a jitter state or not;
in particular, if the x-axis or y-axis or z-axis mean is'x,mean′y,mean′zGreater than a predetermined threshold th3Judging that the current state is in a jitter state;
otherwise, i.e. x-axis or y-axis or z-axis mean'x,mean′y,mean′zIs less than a predetermined third threshold th3Then calculate N2Maximum values max 'of x-axis, y-axis and z-axis of secondary gyroscope historical data'x,max′y,max′z
If x-axis or y-axis or z-axis maximum value max'x,max′y,max′zGreater than a predetermined fourth threshold th4Then, the current state is judged to be in a jitter state.
The time point recording unit 945 is used for recording a node at the current time point when the tripod is monitored to be in a stable state;
the image frame storage unit 946 is configured to set a waiting state and record a waiting threshold duration time; judging whether the waiting time reaches a waiting threshold duration, and if so, shooting and reserving the current image frame;
a first shooting completion state determination unit 947; whether the terminal finishes shooting or not is judged;
specifically, the first photographing completion state determination unit 947 is configured to determine whether photographing of the terminal is completed in the tripod mode, and if the photographing of the terminal is not completed, update the photographed image to the preview interface; and if the terminal shooting is finished, ending.
The handheld mode photographing module 95; for controlling the photographing of images according to a predetermined strategy of the hand-held photographing mode.
The handheld mode photographing module 95 includes a second shake mode determination unit 951, an image update unit 952, and a picture frame storage unit 953.
The second shake mode determination unit 951 is configured to determine whether the current handheld mode is in a shake state;
the image updating unit 952 is configured to update a captured image to a preview interface when the captured image is in a shake state;
and the picture frame storing unit 953, if in a non-shake state, i.e., a steady state, stores the currently taken picture frame.
The multi-frame picture shooting device provided by the embodiment of the application shoots historical data through the gyroscope detection recording terminal, and the data acquisition and calculation module 92 acquires the historical data of the gyroscope and calculates N1The method comprises the steps of determining a terminal shooting mode according to the average value of secondary gyroscope historical data, then shooting images according to a set strategy according to the determined shooting mode, directly updating the images to a preview interface when the shaking states of a tripod mode and a handheld mode are monitored and judged through a gyroscope, and only keeping the current shot image frames until the tripod and the handheld mode are monitored to be in a stable state, so that completely aligned stable images can be obtained, direct fusion of registration steps can be omitted, registration time is saved, a user can obtain pictures with good shooting effects, the shooting quality of the images is guaranteed, and the shooting effect and the time performance are optimized.
Example three:
according to an embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps in the broadcast sending method, where the specific steps are as described in the first embodiment, and are not described herein again.
The memory in the present embodiment may be used to store software programs as well as various data. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the mobile phone, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
According to an example of this embodiment, all or part of the processes in the methods of the embodiments described above may be implemented by a computer program to instruct related hardware, where the program may be stored in a computer-readable storage medium, and in this embodiment of the present invention, the program may be stored in the storage medium of a computer system and executed by at least one processor in the computer system, so as to implement the processes including the embodiments of the methods described above. The storage medium includes, but is not limited to, a magnetic disk, a flash disk, an optical disk, a Read-Only Memory (ROM), and the like.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A multi-frame picture shooting method is characterized by comprising the following steps:
monitoring a terminal shooting mode through historical data of a gyroscope;
shooting images according to the determined shooting mode and a set strategy, and updating the images captured by the camera to a preview interface;
when the shooting mode is in the tripod mode, the nearest N is acquired2Secondary gyroscope historical data and judging whether the terminal is in a shaking state or not, and executing corresponding strategies according to different states of the terminal; wherein N is2Is a natural number as a set threshold parameter;
and when the shooting mode is in the handheld mode, judging whether the terminal is in a shaking state, and continuously shooting the multi-frame images according to different states of the terminal and a set strategy.
2. The multi-frame picture photographing method according to claim 1, wherein the monitoring of the terminal photographing mode through the gyro history data comprises the steps of:
when a user enters a shooting preview interface, recording historical data of a gyroscope according to a set frequency F;
after the user clicks the shutter, the nearest N of the current time is obtained1Secondary gyroscope historical data; wherein N is1Is a predetermined threshold parameter, and N2<N1
Calculating N1Mean of x-axis, y-axis and z-axis of secondary gyroscope historical datax,meany,meanz
Judging the mean value mean of the x axis, the y axis or the z axisx,meany,meanzAnd a predetermined first threshold th1Determining the shooting mode of the current terminal equipment according to the size relation.
3. The multi-frame picture photographing method according to claim 2, wherein when the photographing mode is the tripod mode, the latest N is obtained2Secondary gyroscope historical data and judging whether the terminal is in a shaking state or not, and executing corresponding strategies according to different states of the terminal; wherein N is2Specifically, the method comprises the following steps of:
calculating N2Mean of x-, y-, and z-axes of secondary gyroscope historical data'x,mean′y,mean′z
Comparing x-axis or y-axis or z-axis mean'x,mean′y,mean′zAnd a predetermined third threshold th3Judging whether the current terminal is in a jitter state or not;
if x-axis or y-axis or z-axis mean'x,mean′y,mean′zGreater than a predetermined third threshold th3Judging that the current state is in a jitter state;
otherwise, i.e. x-axis or y-axis or z-axis mean'x,mean′y,mean′zIs less than a predetermined third threshold th3Then calculate N2Maximum values max 'of x-axis, y-axis and z-axis of secondary gyroscope historical data'x,max′y,max′z
If x-axis or y-axis or z-axis maximum value max'x,max′y,max′zGreater than a predetermined fourth threshold th4Judging that the current state is in a jitter state; wherein th3<th1And th4<th2
4. The multi-frame picture photographing method according to claim 3, further comprising the steps of:
and if the camera is in the tripod shooting mode and in the shaking state, updating the image captured by the camera to a preview interface.
5. The multi-frame picture photographing method according to claim 3, further comprising the steps of:
if the tripod is not in the shaking state at present, the tripod is considered to be in the stable state at present, and the node at the present time point is recorded;
setting a waiting state, and recording the waiting threshold duration time; and judging whether the waiting time reaches the waiting threshold duration, and if so, shooting and keeping the current image frame.
6. The multi-frame picture shooting method according to claim 2, wherein when the shooting mode is in the handheld mode, and whether the terminal is in a shaking state is judged, and the multi-frame pictures are continuously shot according to different states of the terminal and a predetermined strategy, comprising the steps of:
judging whether the current handheld mode is in a jitter state or not;
if the image is in the shaking state, updating the shot image to a preview interface;
and if the current shot picture frame is in a non-jitter state, namely a stable state, the current shot picture frame is stored.
7. The multi-frame picture photographing method according to any one of claims 4 to 6, further comprising the steps of:
judging whether the terminal finishes shooting;
if the terminal does not finish shooting, updating the shot image to a preview interface;
and if the terminal shooting is finished, ending.
8. A multi-frame picture shooting device is characterized by comprising a gyroscope, a data acquisition and calculation module, a shooting mode determination module, a tripod mode shooting module and a handheld mode shooting module which are mutually connected;
the gyroscope is used for sensing, detecting and recording shooting historical data of the terminal;
the data acquisition and calculation module acquires the N nearest to the current time1Secondary gyroscope historical data and calculate N1Mean of x-axis, y-axis and z-axis of secondary gyroscope historical datax,meany,meanz
The shooting mode determining module is used for judging the mean value mean of the x axis, the y axis or the z axisx,meany,meanzAnd a predetermined first threshold th1Determining the shooting mode of the current terminal equipment according to the size relation;
the tripod mode shooting module is used for controlling shooting of images according to a set strategy of a tripod shooting mode;
and the handheld mode shooting module is used for controlling shooting of images according to a set strategy of the tripod shooting mode.
9. The multi-frame picture photographing device according to claim 8, wherein the tripod mode photographing module includes a second data acquisition unit, a second data calculation unit, a first shake state judgment unit, a time point recording unit, an image frame saving unit, and a first photographing completion state judgment unit;
the second data obtaining unit is used for obtaining N2Secondary gyroscope historical data, wherein N2Is a predetermined threshold parameter, and N2<N1
The second data calculation unit is used for calculating N2Mean of x-, y-, and z-axes of secondary gyroscope historical data'x,mean′y,mean′z
The first jitter state judging unit compares x-axis or y-axis or z-axis mean value mean'x,mean′y,mean′zAnd a predetermined third threshold th3Judging whether the current terminal is in a jitter state or not;
the time point recording unit is used for recording a node at the current time point when the tripod is monitored to be in a stable state;
the image frame storage unit is used for setting a waiting state and recording the waiting threshold duration time; and judging whether the waiting time reaches the waiting threshold duration, and if so, shooting and keeping the current image frame.
10. A computer-readable storage medium, comprising a processor, a computer-readable storage medium, and a computer program stored on the computer-readable storage medium, which computer program, when executed by the processor, performs the steps of the method according to any one of claims 1 to 7.
CN202110333543.5A 2021-03-29 2021-03-29 Multi-frame picture shooting method and device and computer readable storage medium Active CN112954225B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110333543.5A CN112954225B (en) 2021-03-29 2021-03-29 Multi-frame picture shooting method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110333543.5A CN112954225B (en) 2021-03-29 2021-03-29 Multi-frame picture shooting method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112954225A true CN112954225A (en) 2021-06-11
CN112954225B CN112954225B (en) 2024-02-09

Family

ID=76228386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110333543.5A Active CN112954225B (en) 2021-03-29 2021-03-29 Multi-frame picture shooting method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112954225B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116320752A (en) * 2022-09-09 2023-06-23 广东职业技术学院 Image shooting processing method and shooting processing equipment for coping with jitter

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070147814A1 (en) * 2005-12-28 2007-06-28 Seiko Epson Corporation Image capturing apparatus, method of controlling the same, and storage medium
CN103051836A (en) * 2012-12-14 2013-04-17 中兴通讯股份有限公司 Anti-shake photographing method and anti-shake photographing device for mobile terminal
CN105163110A (en) * 2015-09-02 2015-12-16 厦门美图之家科技有限公司 Camera cleanliness detection method and system and shooting terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070147814A1 (en) * 2005-12-28 2007-06-28 Seiko Epson Corporation Image capturing apparatus, method of controlling the same, and storage medium
CN103051836A (en) * 2012-12-14 2013-04-17 中兴通讯股份有限公司 Anti-shake photographing method and anti-shake photographing device for mobile terminal
CN105163110A (en) * 2015-09-02 2015-12-16 厦门美图之家科技有限公司 Camera cleanliness detection method and system and shooting terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116320752A (en) * 2022-09-09 2023-06-23 广东职业技术学院 Image shooting processing method and shooting processing equipment for coping with jitter

Also Published As

Publication number Publication date
CN112954225B (en) 2024-02-09

Similar Documents

Publication Publication Date Title
CN108566510B (en) Flexible screen control method, mobile terminal and readable storage medium
CN109005574B (en) Cell selection method, mobile terminal and computer readable storage medium
CN110035176B (en) Brightness adjusting method of mobile terminal, mobile terminal and storage medium
CN107566734B (en) Intelligent control method, terminal and computer readable storage medium for portrait photographing
CN110187808B (en) Dynamic wallpaper setting method and device and computer-readable storage medium
CN108198150B (en) Method for eliminating image dead pixel, terminal and storage medium
CN112394896A (en) Method and device for controlling reverse screen projection frame rate and computer readable storage medium
CN108536383B (en) Game control method, game control equipment and computer readable storage medium
CN107896304B (en) Image shooting method and device and computer readable storage medium
CN111447371A (en) Automatic exposure control method, terminal and computer readable storage medium
CN112689191A (en) Screen projection control method, terminal and computer readable storage medium
CN107241504B (en) Image processing method, mobile terminal and computer readable storage medium
CN110086993B (en) Image processing method, image processing device, mobile terminal and computer readable storage medium
CN108848321B (en) Exposure optimization method, device and computer-readable storage medium
CN113347372A (en) Shooting light supplement method, mobile terminal and readable storage medium
CN112866685A (en) Screen projection delay measuring method, mobile terminal and computer readable storage medium
CN109561221B (en) Call control method, device and computer readable storage medium
CN112153305A (en) Camera starting method, mobile terminal and computer storage medium
CN109510941B (en) Shooting processing method and device and computer readable storage medium
CN111970738A (en) Network switching control method, equipment and computer readable storage medium
CN112954225B (en) Multi-frame picture shooting method and device and computer readable storage medium
CN111787234A (en) Shooting control method and device and computer readable storage medium
CN107743204B (en) Exposure processing method, terminal, and computer-readable storage medium
CN111614902A (en) Video shooting method and device and computer readable storage medium
CN111443818A (en) Screen brightness regulation and control method and device and computer readable storage medium

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