WO2019091486A1 - Photographing processing method and device, terminal, and storage medium - Google Patents

Photographing processing method and device, terminal, and storage medium Download PDF

Info

Publication number
WO2019091486A1
WO2019091486A1 PCT/CN2018/115226 CN2018115226W WO2019091486A1 WO 2019091486 A1 WO2019091486 A1 WO 2019091486A1 CN 2018115226 W CN2018115226 W CN 2018115226W WO 2019091486 A1 WO2019091486 A1 WO 2019091486A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
target
shooting
frames
parameter
Prior art date
Application number
PCT/CN2018/115226
Other languages
French (fr)
Chinese (zh)
Inventor
陈岩
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019091486A1 publication Critical patent/WO2019091486A1/en

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/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/682Vibration or motion blur correction
    • H04N23/684Vibration or motion blur correction performed by controlling the image sensor readout, e.g. by controlling the integration time
    • H04N23/6845Vibration or motion blur correction performed by controlling the image sensor readout, e.g. by controlling the integration time by combination of a plurality of images sequentially taken
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time

Definitions

  • the embodiments of the present invention relate to the field of computer technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for photographing processing.
  • the smartphone When the user wants to use the smartphone to shoot, the user first turns on the camera function, and then on the screen of the smartphone, you can see the picture captured by the lens. By viewing the screen, the user adjusts the direction of the smartphone until it is determined that the target subject is clear and in the proper position. By clicking the shooting option, the smartphone can take a picture of the target subject. When the user wants to shoot a distant subject, the user can increase the zoom factor, enlarge the proportion of the subject in the picture, and then click the shooting option to shoot.
  • the embodiment of the present application provides a method, a device, a terminal, and a storage medium for photographing processing, which can improve the sharpness of a captured picture.
  • the technical solution is as follows:
  • a method of photographing processing comprising:
  • an apparatus for photographing processing comprising:
  • a receiving module configured to receive a photographing instruction
  • a shooting module configured to continuously capture a plurality of frames according to the photographing instruction when a current zoom ratio of the camera is greater than a preset threshold
  • the processing module is configured to perform anti-shake synthesis processing on the multi-frame picture to obtain a target picture.
  • a terminal comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or a set of instructions, the at least one instruction, A method of loading, and executing, at least a portion of a program, the set of codes, or a set of instructions by the processor to implement the photographing process described in the above aspects.
  • a computer readable storage medium stores at least one instruction, at least one program, a code set, or a set of instructions, the at least one instruction, the at least one program
  • the method of photographing processing as described in the above aspect is implemented when the code set or instruction set is loaded and executed by a processor.
  • FIG. 1 is a flowchart of a method for photographing processing provided by an embodiment of the present application
  • FIG. 2 is an interface diagram of a photographing process provided by an embodiment of the present application.
  • FIG. 3 is a flowchart of a method for photographing processing provided by an embodiment of the present application.
  • FIG. 4 is an interface diagram of a photographing process provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an apparatus for photographing processing according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a method for photographing processing according to an embodiment of the present application.
  • FIG. 7 is a structural block diagram of a terminal according to an embodiment of the present application.
  • the embodiment of the present application provides a method, an apparatus, a terminal, and a storage medium for photographing processing, and the method can be implemented by a terminal.
  • the terminal can be a smart phone, a tablet, or the like.
  • the terminal may include components such as a processor, a memory, a screen, an image detecting component, and the like.
  • the processor can be a CPU (Central Processing Unit), etc., and can be used to process photographing instructions, call and run an anti-shake synthesis algorithm, and control screen display pictures.
  • the memory may be a RAM (Random Access Memory), a Flash (flash memory), etc., and may be used to store received data, data required for processing, data generated during processing, and the like, such as a zoom factor. Preset threshold, ambient light intensity, and correspondence table between zoom magnification and exposure and number of shot frames, multi-frame images captured, and the like.
  • the screen can be a touch screen, and can be used to display an image that the camera can capture, a target image that is captured, and the like.
  • the image detecting unit may be a camera or the like.
  • the terminal may also include a transceiver, an audio output component, an audio input component, and the like.
  • the transceiver can be used for data transmission with other devices, and can include an antenna, a matching circuit, a modem, and the like.
  • the audio output unit can be a speaker, a headphone, or the like.
  • the audio input component can be a microphone or the like.
  • the user when using the terminal for shooting, the user usually uses the zoom function of the terminal to increase the zoom factor of the terminal camera, thereby enlarging the details of the subject.
  • the zoom factor of the camera increases, the slight jitter during shooting is also amplified, affecting the sharpness of the captured photo.
  • the terminal in order to improve the photographing quality of a photograph in a zoom scene, the terminal usually solves the anti-shake problem by means of an OIS (Optical Image Stabilization) device or an image sharpening algorithm.
  • OIS Optical Image Stabilization
  • the OIS device has a higher cost of anti-shake, and the image sharpening algorithm does not have the effect of anti-shake.
  • the terminal in the zoom shooting scene, when the zoom ratio is high, the terminal continuously captures multiple frames of pictures, and performs anti-shake synthesis processing on the multi-frame pictures, thereby finally generating a picture with higher definition and reducing the user's shooting.
  • step 101 the terminal receives a photographing instruction.
  • the user when the user wants to use the smart phone to take a picture, the user can turn on the camera function of the smart phone, and through the screen of the smart phone, as shown in FIG. 2, the user can see the image that the camera can capture. If the user wants to shoot a relatively distant subject, the user can manually adjust the zoom factor of the camera in the smartphone to enlarge the image of the subject. In this process, the user can observe whether the image of the shooting target to be photographed conforms to his or her mind through the screen of the smartphone. When the user feels satisfied, he can click the camera option, and the terminal will receive the photographing instruction.
  • step 102 if the current zoom magnification of the camera is greater than a preset threshold, the terminal continuously captures a plurality of frames according to the photographing instruction.
  • the terminal may detect the current zoom factor of the camera, and acquire a preset threshold of the zoom factor stored in advance, and compare the current zoom factor of the camera with a preset preset threshold.
  • the terminal may determine the current photographing parameters, such as aperture, shutter speed, sensitivity, white balance, and the like when receiving the photographing instruction. At this time, the terminal can obtain the camera parameters set by the user, and can also calculate the camera parameters based on the preset algorithm and the environment parameters. Then, take a picture based on the camera parameters.
  • the current photographing parameters such as aperture, shutter speed, sensitivity, white balance, and the like
  • the terminal may acquire the photographing parameter set by the user, or calculate the photographing parameter based on the preset algorithm and the environment parameter, and then continuously capture the multi-frame image based on the photographing parameter.
  • the specific frame number of the multi-frame picture can be preset and stored in the terminal memory by the technician, or the specific frame number of the multi-frame picture can also be determined based on the current shooting parameters, which is not limited herein.
  • the preset threshold of the pre-stored zoom factor may be a value set by the user, or may be a value obtained by a technician according to a plurality of test results, and the value is a critical value.
  • the smartphone increases the zoom factor for shooting, the details of the picture will be enlarged.
  • the user clicks on the shooting option the hand will slightly vibrate, which will cause slight jitter of the phone, and this slight jitter will blur the picture, making The sharpness of the captured picture is reduced.
  • the zoom magnification of the camera is greater than the critical value, the sharpness of the picture taken without the anti-shake processing does not satisfy the requirements of the majority of the user for the sharpness of the picture.
  • the zoom magnification of the camera is less than the critical value, the sharpness of the picture taken without the anti-shake processing can satisfy the user's requirement for the sharpness of the picture.
  • this step may include the following steps.
  • Step 102A If the current zoom magnification of the camera is greater than the preset threshold, determining a second shooting parameter according to the first shooting parameter, where the first shooting parameter includes a current zoom factor, and the second shooting parameter includes a target shooting frame number, and the target shooting The number of frames is the number of frames of a multi-frame picture.
  • the first shooting parameter includes at least a current zoom factor of the camera
  • the second shooting parameter includes at least a target shooting frame of the continuously captured multi-frame picture
  • the current zooming ratio of the camera is positively correlated with the target shooting frame number. That is, the larger the zoom magnification, the more the number of consecutively taken picture frames.
  • Step 102B continuously capture a plurality of frames according to the second shooting parameter.
  • the terminal continuously captures the picture of the target shooting frame number when receiving the photographing instruction, so as to perform anti-shake synthesis processing on the multi-frame image obtained by the shooting.
  • the terminal determines that the number of target shooting frames is 4 frames according to the current zoom magnification, so that when the photographing instruction is received, Take 4 frames of pictures in succession.
  • step 103 anti-shake synthesis processing is performed on the multi-frame picture to obtain a target picture.
  • the step includes the step 103A: the terminal performs anti-shake synthesis processing on the picture of the target number of frames to obtain a target picture.
  • the center picture is the picture with the highest resolution in the picture of the target number of frames, and the rest of the pictures are pictures with a higher definition than the definition threshold except the center picture. .
  • an anti-shake synthesis algorithm is invoked, and in the multi-frame picture, one of the picture pictures is selected as the center picture according to a preset selection condition.
  • the preset selection condition may be selecting multiple frames. The clearest picture in the picture. Then, the resolution of the remaining multi-frame pictures is analyzed, and the picture in which the definition is lower than the preset definition threshold is determined as an invalid picture, and the invalid picture is deleted, thereby obtaining the remaining pictures.
  • the terminal divides the central picture and the remaining pictures according to a preset segmentation manner, and is divided into multiple parts, and the central picture is completely divided with the remaining pictures.
  • the embodiment of the present application does not limit the manner in which the picture is divided.
  • the terminal divides the center picture and the remaining pictures into 10 picture blocks of 10 ⁇ 10.
  • the target picture part of the center picture is processed according to the target picture part in the remaining pictures.
  • each part of the center detection center picture corresponding to the remaining pictures for any part of the center picture, determining whether the part in the remaining picture is clearer than the part in the center picture, if the remaining pictures are in the picture
  • the portion of the central image is processed based on the portion of the remaining pictures, wherein the processing includes at least one of brightness compensation and partial replacement.
  • the terminal After processing each picture part in the center picture, the terminal determines the processed center picture as the target picture.
  • the terminal when the terminal receives the photographing instruction, it determines whether the current zoom magnification of the camera is greater than a preset threshold, and when the zoom magnification is greater than the preset threshold, continuously captures multiple frames according to the photographing instruction, thereby Performing anti-shake synthesis processing on the multi-frame picture to obtain a target picture with higher definition; using the photographing processing method provided by the embodiment of the present application, when the zoom magnification is increased for shooting, the picture blurred due to slight jitter of the user passes through After the anti-shake synthesis process, a clearer picture can be obtained, which improves the sharpness of the picture taken in the zoom shooting scene.
  • the anti-shake processing may be cancelled, and the image obtained according to the regular photographing manner may be retained, and the corresponding processing may be as follows: displaying the target image and displaying the un-anti-shake option;
  • the click command for the anti-shake option is cancelled, the first frame image in the multi-frame picture is used to replace the target picture.
  • the terminal displays the target picture to the user. While the target image is displayed, the Undo Anti Shake option can be displayed. If the user wants to go through the anti-shake target image, the user can directly save the target image. If the user does not want the target image after anti-shake processing, but wants the original image without anti-shake processing, for example, the user wants to capture the dynamic effect of water flow, the dynamic effect of this water flow is actually the dynamic of the water flow. Blurring, and the image obtained by anti-shake processing will eliminate this blurring effect, so the target image does not achieve the desired effect of the user, but the original image after anti-shake processing has such an effect.
  • the user can click to undo the anti-shake option, as shown in Figure 4.
  • the terminal After receiving the click command of the undo anti-shake option, the terminal acquires the first frame image in the captured multi-frame picture in the buffer area, and replaces the target picture with the first frame picture. Then, the first frame picture is displayed to the user. After the user sees the picture, if you are satisfied with the picture, you can choose to store it. If you are not satisfied, you can choose to delete and retake the picture.
  • the determined second shooting parameter when the first shooting parameter includes a current zoom factor and a current ambient light parameter (which may be ambient light intensity), the determined second shooting parameter includes a target shooting frame number and a target exposure degree.
  • the step 102A may include the following steps: if the current zoom factor of the camera is greater than the preset threshold, determining the target exposure degree and the target shooting frame number according to the corresponding relationship between the first shooting parameter and the second shooting parameter stored in advance;
  • Step 102B may include the step of continuously capturing a picture of the number of target shooting frames based on the target exposure.
  • the technician performs experiments according to different exposure degrees and shooting frames in different ambient light intensities and different zoom magnification scenarios.
  • a technician can take a photo at a certain exposure and a certain number of frames in a scene with a certain ambient light intensity and a zoom factor, and then keep the ambient light intensity, zoom factor, and number of shots unchanged.
  • Exposure take pictures according to the adjusted exposure, adjust the exposure, and then take the picture according to the adjusted exposure, repeat the above process, test the exposure value in the range of values, and select all The best picture in the picture determines the exposure of the picture. Then, you can determine the ambient light intensity and the exposure and the number of frames for the zoom factor, which can make the picture taken best.
  • the technician can get the corresponding exposure degree and the number of shooting frames in the scene of any ambient light intensity and zoom magnification, and shooting with the exposure degree and the number of shooting frames can make the picture better.
  • the technician stores the correspondence in the terminal and can store it in the form of a correspondence table, as shown in Table 1.
  • the terminal When detecting that the current zoom magnification of the camera is greater than or equal to the preset threshold, the terminal detects the ambient light intensity of the current shooting environment, and then, the terminal acquires a correspondence table of the pre-stored ambient light intensity, zoom magnification, exposure, and number of shot frames. . Then, the terminal may search for the current ambient light intensity and the exposure degree and the number of shooting frames corresponding to the current zoom factor of the camera (ie, the target exposure degree and the target shooting frame number) according to the correspondence table, and then, according to the target exposure degree, The currently captured picture is the first frame picture, and the picture of the target number of frames is continuously captured.
  • the terminal detects that the ambient light intensity of the current shooting environment is 100 and the current zoom magnification of the camera is 3, according to the correspondence table described above, it can be known that the target exposure degree is +1, the target shooting frame number is 3, and then, The terminal continuously shoots 3 frames of pictures according to the target exposure.
  • the determined second shooting parameter when the first shooting parameter includes a current zoom factor and a current ambient light parameter (which may be ambient light intensity), the determined second shooting parameter includes a target shooting frame number and a target exposure.
  • the step 102A may further include the following steps: if the current zoom factor of the camera is greater than the preset threshold, input the current ambient light parameter and the current zoom factor into the pre-trained shooting parameter determination model to obtain the target exposure. And the target shooting frame number; correspondingly, the step 102B may further include the step of continuously capturing the picture of the target shooting frame number based on the target exposure degree.
  • the shooting parameter determination model is obtained through deep learning training, and is used to determine the target exposure degree and the target shooting frame number.
  • the terminal can determine the current exposure degree and the number of shooting frames based on the ambient light parameter and the zoom factor.
  • the shooting parameter determination model can be obtained through deep learning training.
  • the training process can be as follows:
  • the technician can take a picture according to a certain exposure degree and the first shooting frame number in the first ambient light intensity and the first zoom multiple, and perform a synthesis process to obtain the processed composite picture, and then keep the first The ambient light intensity, the first zoom factor, and the number of first shot frames are unchanged, the exposure is adjusted, the picture is taken according to the adjusted exposure degree, and the composite image is processed to obtain the processed composite picture, and then the exposure is adjusted, and then adjusted. After the exposure, the picture is taken and synthesized, and the processed and synthesized pictures are obtained.
  • a good picture ie, the first composite picture
  • determining a first exposure corresponding to the first composite picture and then determining that the first ambient light intensity and the first zoom multiple correspond to the first exposure and the first number of shots Can make the best pictures get.
  • the first ambient light intensity, the first zoom factor, the first exposure, and the first number of shot frames are stored as a set of samples into the training set.
  • the technician can get multiple sets of ambient light intensity, zoom factor, exposure and the number of shot frames.
  • the ambient light intensity and zoom factor are sample input, and the exposure and number of shots are sample output.
  • the number of frames and the training function adjust the shooting parameter determination model, repeat the above training process, and train the shooting parameter model to obtain the trained shooting parameter model.
  • the terminal When detecting that the current zoom ratio of the camera is greater than or equal to the preset threshold, the terminal detects the ambient light intensity of the current shooting environment, and then inputs the ambient light intensity of the current shooting environment and the current zoom factor into the trained shooting parameter determination model.
  • the current ambient light intensity, the target exposure corresponding to the zoom factor, and the number of target shot frames can be obtained.
  • the terminal moving speed may also be considered.
  • the above step 102A may further include the following steps: if the current zooming ratio of the camera is greater than the pre- When the threshold is set, the current ambient light parameter, the current zoom factor and the current terminal moving speed are input into the pre-trained shooting parameter determination model to obtain the target exposure degree and the target shooting frame number.
  • the terminal moving speed is a moving speed at which the user's hand shake causes the terminal to move when the user's handheld terminal performs photographing.
  • the terminal moving speed can be measured by a gyro sensor and/or an acceleration sensor in the terminal.
  • the shooting parameter determination model when the shooting parameter determination model is trained according to the above steps, samples formed by multiple sets of ambient light intensity, zoom magnification, terminal moving speed, exposure, and number of shooting frames, wherein ambient light intensity, zoom magnification, and terminal movement are obtained, The speed is the sample input, the exposure and the number of frames taken are the sample output. The plurality of sets of samples are input into the shooting parameter determination model to obtain the actual exposure and the actual number of captured frames. The photographing parameter determination model is adjusted based on the obtained actual exposure and the actual number of photographed frames and the sample exposure and the number of sample shot frames and the training function. By repeating the above training process and training the shooting parameter model, a trained shooting parameter model can be obtained.
  • the terminal detects the ambient light intensity of the current shooting environment and the terminal moving speed, and then, the ambient light intensity of the current shooting environment,
  • the current terminal moving speed and the current zoom factor are input to the trained shooting parameter determination model, and the current ambient light intensity, the zoom magnification, the target exposure speed corresponding to the terminal moving speed, and the target shooting frame number can be obtained.
  • the embodiment of the present invention further provides a device for photographing processing.
  • the device includes: a receiving module 510, a photographing module 520, and a processing module 530.
  • the receiving module 510 is configured to receive a photographing instruction
  • the photographing module 520 is configured to continuously capture a plurality of frames according to the photographing instruction when the current zoom magnification of the camera is greater than a preset threshold;
  • the processing module 530 is configured to perform anti-shake synthesis processing on the multi-frame picture to obtain a target picture.
  • the shooting module 520 is configured to:
  • the current zoom factor of the camera is greater than the preset threshold, determining a second shooting parameter according to the first shooting parameter, where the first shooting parameter includes the current zoom factor, and the second shooting parameter includes a target shooting
  • the number of frames, the number of target shooting frames is the number of frames of the multi-frame picture
  • the processing module 530 is configured to:
  • the first shooting parameter includes the current zoom factor and a current ambient light parameter
  • the second shooting parameter includes the target shooting frame number and a target exposure degree
  • the shooting module 520 is configured for:
  • the current zoom factor of the camera is greater than the preset threshold, input the current ambient light parameter and the current zoom factor into a pre-trained shooting parameter determination model to obtain the target exposure and the target shooting Number of frames;
  • the first shooting parameter includes the current zoom factor and a current ambient light parameter
  • the second shooting parameter includes the target shooting frame number and a target exposure degree
  • the shooting module 520 is configured for:
  • the first shooting parameter further includes a current terminal moving speed
  • the shooting module 520 is configured to:
  • the current zoom factor of the camera is greater than the preset threshold, input the current ambient light parameter, the current zoom factor, and the current terminal moving speed into a pre-trained shooting parameter determination model to obtain the Target exposure and the number of target shot frames.
  • processing module 530 is further configured to:
  • the target picture part of the central picture is processed according to the target picture part in the remaining pictures
  • the processed center picture is determined as the target picture.
  • the apparatus further includes:
  • the display module 540 is configured to display the target picture and display the undo anti-shake option
  • the replacement module 550 is configured to replace the target picture with a first frame picture in the multi-frame picture when a click instruction to the undo anti-shake option is detected.
  • the apparatus for photographing processing provided by the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the function distribution may be completed by different functional modules as needed. The internal structure of the terminal is divided into different functional modules to complete all or part of the functions described above.
  • the apparatus for photographing processing provided by the above embodiment is the same as the method embodiment of the photographing processing, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
  • FIG. 7 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • the terminal may be used to implement the method for photographing processing provided in the foregoing embodiment. Specifically:
  • the terminal 700 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more computer readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, and a WiFi (wireless fidelity, wireless).
  • the fidelity module 170 includes a processor 180 having one or more processing cores, and a power supply 190 and the like. It will be understood by those skilled in the art that the terminal structure shown in FIG. 6 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements. among them:
  • the RF circuit 110 can be used for transmitting and receiving information or during a call, and receiving and transmitting signals. Specifically, after receiving downlink information of the base station, the downlink information is processed by one or more processors 180. In addition, the data related to the uplink is sent to the base station. .
  • the RF circuit 110 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier). , duplexer, etc.
  • RF circuitry 110 can also communicate with the network and other devices via wireless communication.
  • the wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access). , Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), e-mail, SMS (Short Messaging Service), and the like.
  • GSM Global System of Mobile communication
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • e-mail Short Messaging Service
  • the memory 120 can be used to store software programs and modules, and the processor 180 executes various functional applications and data processing by running software programs and modules stored in the memory 120.
  • the memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to The data created by the use of the terminal 700 (such as audio data, phone book, etc.) and the like.
  • memory 120 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, memory 120 may also include a memory controller to provide access to memory 120 by processor 180 and input unit 130.
  • the input unit 130 can be configured to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
  • input unit 130 can include touch-sensitive surface 131 as well as other input devices 132.
  • Touch-sensitive surface 131 also referred to as a touch display or trackpad, can collect touch operations on or near the user (such as a user using a finger, stylus, etc., on any suitable object or accessory on touch-sensitive surface 131 or The operation near the touch-sensitive surface 131) and driving the corresponding connecting device according to a preset program.
  • the touch-sensitive surface 131 can include two portions of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 180 is provided and can receive commands from the processor 180 and execute them.
  • the touch-sensitive surface 131 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 130 can also include other input devices 132.
  • other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • Display unit 140 can be used to display information entered by the user or information provided to the user and various graphical user interfaces of terminal 700, which can be constructed from graphics, text, icons, video, and any combination thereof.
  • the display unit 140 may include a display panel 141.
  • the display panel 141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.
  • the touch-sensitive surface 131 may cover the display panel 141, and when the touch-sensitive surface 131 detects a touch operation thereon or nearby, it is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 according to the touch event The type provides a corresponding visual output on display panel 141.
  • touch-sensitive surface 131 and display panel 141 are implemented as two separate components to implement input and input functions, in some embodiments, touch-sensitive surface 131 can be integrated with display panel 141 for input. And output function.
  • Terminal 700 can also include at least one type of sensor 150, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may close the display panel 141 when the terminal 700 moves to the ear. / or backlight.
  • the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the gesture of the mobile phone such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the terminal 700 can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, here Let me repeat.
  • the audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the terminal 700.
  • the audio circuit 160 can transmit the converted electrical data of the received audio data to the speaker 161 for conversion to the sound signal output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal by the audio circuit 160. After receiving, it is converted into audio data, and then processed by the audio data output processor 180, transmitted to the terminal, for example, via the RF circuit 110, or outputted to the memory 120 for further processing.
  • the audio circuit 160 may also include an earbud jack to provide communication of the peripheral earphones with the terminal 700.
  • WiFi is a short-range wireless transmission technology
  • the terminal 700 can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 170, which provides wireless broadband Internet access for users.
  • FIG. 6 shows the WiFi module 170, it can be understood that it does not belong to the essential configuration of the terminal 700, and may be omitted as needed within the scope of not changing the essence of the invention.
  • the processor 180 is the control center of the terminal 700, connecting various portions of the entire handset with various interfaces and lines, by running or executing software programs and/or modules stored in the memory 120, and recalling data stored in the memory 120, The various functions and processing data of the terminal 700 are performed to perform overall monitoring of the mobile phone.
  • the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 180.
  • the terminal 700 also includes a power source 190 (such as a battery) for powering various components.
  • a power source 190 such as a battery
  • the power source can be logically coupled to the processor 180 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • Power supply 190 may also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
  • the terminal 700 may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • the display unit of the terminal 700 is a touch screen display
  • the terminal 700 further includes a memory, and one or more programs, wherein one or more programs are stored in the memory and configured to be one or one
  • the above processor executes the one or more programs to implement any of the above-described methods of photographing processing.
  • a computer readable storage medium having stored therein at least one instruction, at least one program, a code set, or a set of instructions, the at least one instruction, the at least one program, The method of implementing any of the above-described photographing processes when the code set or instruction set is loaded and executed by a processor.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Abstract

Disclosed in the embodiments of the present application are a photographing processing method and device, a terminal, and a storage medium, belonging to the field of computer technologies. Said method comprises: receiving a photographing instruction; if the current zoom magnification of a camera is greater than a preset threshold, continuously photographing multiple frames according to the photographing instruction; and performing anti-shake synthesis processing on the multiple frames, so as to obtain a target picture. The embodiments of the present application can improve the definition of a photographed picture.

Description

拍照处理的方法、装置、终端和存储介质Photo processing method, device, terminal and storage medium
本申请实施例要求于2017年11月13日提交,申请号为201711116497.3、发明名称为“拍照处理的方法、装置、终端和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请实施例中。The present application claims the priority of the Chinese patent application filed on November 13, 2017, the application number is 201711116497.3, and the invention is entitled "method, device, terminal and storage medium for photographing processing", the entire contents of which are incorporated by reference. In the embodiment of the present application.
技术领域Technical field
本申请实施例涉及计算机技术领域,特别涉及一种拍照处理的方法、装置、终端和存储介质。The embodiments of the present invention relate to the field of computer technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for photographing processing.
背景技术Background technique
随着智能手机的普及,越来越多的用户使用智能手机拍摄图片。使用智能手机拍摄图片的操作简单,使用时方便又快捷。With the popularity of smartphones, more and more users are using smartphones to take pictures. The use of a smartphone to take pictures is simple and easy to use.
当用户想要使用智能手机进行拍摄时,用户首先打开拍照功能,然后在智能手机的屏幕上,可以看到镜头拍摄到的画面。用户通过观看该画面,调整智能手机的方向,直到确定目标拍摄对象清晰且处于恰当的位置,点击拍摄选项,智能手机就可以拍摄目标拍摄对象的图片。当用户想要对较远的拍摄目标进行拍摄时,用户可以增大变焦倍数,放大拍摄目标在图片中所占的比例,然后点击拍摄选项,进行拍摄。When the user wants to use the smartphone to shoot, the user first turns on the camera function, and then on the screen of the smartphone, you can see the picture captured by the lens. By viewing the screen, the user adjusts the direction of the smartphone until it is determined that the target subject is clear and in the proper position. By clicking the shooting option, the smartphone can take a picture of the target subject. When the user wants to shoot a distant subject, the user can increase the zoom factor, enlarge the proportion of the subject in the picture, and then click the shooting option to shoot.
发明内容Summary of the invention
本申请实施例提供了一种拍照处理的方法、装置、终端和存储介质,可以提高拍摄得到的图片的清晰度。所述技术方案如下:The embodiment of the present application provides a method, a device, a terminal, and a storage medium for photographing processing, which can improve the sharpness of a captured picture. The technical solution is as follows:
一方面,提供了一种拍照处理的方法,所述方法包括:In one aspect, a method of photographing processing is provided, the method comprising:
接收拍照指令;Receiving a photographing instruction;
若摄像头当前的变焦倍数大于预设阈值,则根据所述拍照指令连续拍摄多帧图片;If the current zoom magnification of the camera is greater than a preset threshold, continuously capturing a plurality of frames according to the photographing instruction;
对所述多帧图片进行防抖合成处理,得到目标图片。Performing anti-shake synthesis processing on the multi-frame picture to obtain a target picture.
另一方面,提供了一种拍照处理的装置,所述装置包括:In another aspect, an apparatus for photographing processing is provided, the apparatus comprising:
接收模块,用于接收拍照指令;a receiving module, configured to receive a photographing instruction;
拍摄模块,用于当摄像头当前的变焦倍数大于预设阈值时,根据所述拍照指令连续拍摄多帧图片;a shooting module, configured to continuously capture a plurality of frames according to the photographing instruction when a current zoom ratio of the camera is greater than a preset threshold;
处理模块,用于对所述多帧图片进行防抖合成处理,得到目标图片。The processing module is configured to perform anti-shake synthesis processing on the multi-frame picture to obtain a target picture.
另一方面,提供了一种终端,其特征在于,所述终端包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执 行以实现上述方面所述的拍照处理的方法。In another aspect, a terminal is provided, the terminal comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or a set of instructions, the at least one instruction, A method of loading, and executing, at least a portion of a program, the set of codes, or a set of instructions by the processor to implement the photographing process described in the above aspects.
另一方面,提供了一种计算机可读存储介质,其特征在于,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集被处理器加载并执行时实现任一种如上述方面所述的拍照处理的方法。In another aspect, a computer readable storage medium is provided, wherein the storage medium stores at least one instruction, at least one program, a code set, or a set of instructions, the at least one instruction, the at least one program The method of photographing processing as described in the above aspect is implemented when the code set or instruction set is loaded and executed by a processor.
附图说明DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. Other drawings may also be obtained from those of ordinary skill in the art in light of the inventive work.
图1是本申请实施例提供的一种拍照处理的方法的流程图;1 is a flowchart of a method for photographing processing provided by an embodiment of the present application;
图2是本申请实施例提供的一种拍照处理的界面图;2 is an interface diagram of a photographing process provided by an embodiment of the present application;
图3是本申请实施例提供的一种拍照处理的方法的流程图;3 is a flowchart of a method for photographing processing provided by an embodiment of the present application;
图4是本申请实施例提供的一种拍照处理的界面图;4 is an interface diagram of a photographing process provided by an embodiment of the present application;
图5是本申请实施例提供的一种拍照处理的装置的结构示意图;FIG. 5 is a schematic structural diagram of an apparatus for photographing processing according to an embodiment of the present application; FIG.
图6是本申请实施例提供的一种拍照处理的方法的结构示意图;FIG. 6 is a schematic structural diagram of a method for photographing processing according to an embodiment of the present application;
图7是本申请实施例提供的一种终端的结构框图。FIG. 7 is a structural block diagram of a terminal according to an embodiment of the present application.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
本申请实施例提供了一种拍照处理的方法、装置、终端和存储介质,该方法可以由终端实现。其中,终端可以是智能手机、平板电脑等。The embodiment of the present application provides a method, an apparatus, a terminal, and a storage medium for photographing processing, and the method can be implemented by a terminal. The terminal can be a smart phone, a tablet, or the like.
终端可以包括处理器、存储器、屏幕、图像检测部件等部件。处理器,可以为CPU(Central Processing Unit,中央处理单元)等,可以用于处理拍照指令,调用及运行防抖合成算法、控制屏幕显示图片等处理。存储器,可以为RAM(Random Access Memory,随机存取存储器),Flash(闪存)等,可以用于存储接收到的数据、处理过程所需的数据、处理过程中生成的数据等,如变焦倍数的预设阈值、环境光强度以及变焦倍数与曝光度以及拍摄帧数的对应关系表、拍摄的多帧图片等。屏幕可以是触控屏,可以用于显示摄像头能够拍摄到的图像、拍摄得到的目标图片等。图像检测部件可以是摄像头等。The terminal may include components such as a processor, a memory, a screen, an image detecting component, and the like. The processor can be a CPU (Central Processing Unit), etc., and can be used to process photographing instructions, call and run an anti-shake synthesis algorithm, and control screen display pictures. The memory may be a RAM (Random Access Memory), a Flash (flash memory), etc., and may be used to store received data, data required for processing, data generated during processing, and the like, such as a zoom factor. Preset threshold, ambient light intensity, and correspondence table between zoom magnification and exposure and number of shot frames, multi-frame images captured, and the like. The screen can be a touch screen, and can be used to display an image that the camera can capture, a target image that is captured, and the like. The image detecting unit may be a camera or the like.
终端还可以包括收发器、音频输出部件和音频输入部件等。收发器,可以用于与其它设备进行数据传输,可以包括天线、匹配电路、调制解调器等。音频输出部件可以是音箱、耳机等。音频输入部件可以是麦克风等。The terminal may also include a transceiver, an audio output component, an audio input component, and the like. The transceiver can be used for data transmission with other devices, and can include an antenna, a matching circuit, a modem, and the like. The audio output unit can be a speaker, a headphone, or the like. The audio input component can be a microphone or the like.
为了体现拍摄对象的细节(或拍摄较远的对象),用户在使用终端进行拍摄时,通常会利用终端的变焦功能,提高终端摄像头的变焦倍数,从而放大拍摄对象的细节。然而,随着摄像头变焦倍数的提高,拍摄过程中的轻微抖动也会被放大,影响拍摄照片的清晰度。In order to reflect the details of the subject (or to shoot distant objects), when using the terminal for shooting, the user usually uses the zoom function of the terminal to increase the zoom factor of the terminal camera, thereby enlarging the details of the subject. However, as the zoom factor of the camera increases, the slight jitter during shooting is also amplified, affecting the sharpness of the captured photo.
相关技术中,为了提高变焦场景下照片的拍摄质量,终端通常借助OIS(Optical Image Stabilization,光学防抖)器件,或通过图像锐化算法解决防抖问题。但是,OIS器件实现防抖的成本较高,而图像锐化算法实现防抖的效果不佳。In the related art, in order to improve the photographing quality of a photograph in a zoom scene, the terminal usually solves the anti-shake problem by means of an OIS (Optical Image Stabilization) device or an image sharpening algorithm. However, the OIS device has a higher cost of anti-shake, and the image sharpening algorithm does not have the effect of anti-shake.
本申请实施例中,在变焦拍摄场景下,终端在变焦倍数较高时,通过连续拍摄多帧图片,并对多帧图片进行防抖合成处理,最终生成清晰度较高的图片,降低用户拍摄时抖动对图片质量的影响。In the embodiment of the present application, in the zoom shooting scene, when the zoom ratio is high, the terminal continuously captures multiple frames of pictures, and performs anti-shake synthesis processing on the multi-frame pictures, thereby finally generating a picture with higher definition and reducing the user's shooting. The effect of jitter on picture quality.
下面将结合实施方式,对图1所示的处理流程进行详细的说明,内容可以如下:The processing flow shown in FIG. 1 will be described in detail below with reference to the embodiments, and the content can be as follows:
在步骤101中,终端接收拍照指令。In step 101, the terminal receives a photographing instruction.
在实施中,当用户想要使用智能手机拍摄图片时,用户可以打开智能手机的拍照功能,通过智能手机的屏幕,如图2所示,用户可以看到摄像头能够拍摄到的图像。如果用户想要拍摄比较远的拍摄目标,用户可以在智能手机中,手动调节摄像头的变焦倍数,放大拍摄目标的图像。在这个过程中,用户可以通过智能手机的屏幕观察即将拍摄的拍摄目标的图像是否符合自己的心意,当用户觉得满意时,可以点击拍照选项,终端就会接收到拍照指令。In the implementation, when the user wants to use the smart phone to take a picture, the user can turn on the camera function of the smart phone, and through the screen of the smart phone, as shown in FIG. 2, the user can see the image that the camera can capture. If the user wants to shoot a relatively distant subject, the user can manually adjust the zoom factor of the camera in the smartphone to enlarge the image of the subject. In this process, the user can observe whether the image of the shooting target to be photographed conforms to his or her mind through the screen of the smartphone. When the user feels satisfied, he can click the camera option, and the terminal will receive the photographing instruction.
在步骤102中,如果摄像头当前的变焦倍数大于预设阈值,则终端根据拍照指令连续拍摄多帧图片。In step 102, if the current zoom magnification of the camera is greater than a preset threshold, the terminal continuously captures a plurality of frames according to the photographing instruction.
在实施中,当终端接收到拍照指令后,终端可以检测摄像头当前的变焦倍数,并获取预先存储的变焦倍数的预设阈值,将摄像头当前的变焦倍数与预先存储的预设阈值进行比较。In the implementation, after the terminal receives the photographing instruction, the terminal may detect the current zoom factor of the camera, and acquire a preset threshold of the zoom factor stored in advance, and compare the current zoom factor of the camera with a preset preset threshold.
如果摄像头当前的变焦倍数小于预设阈值,则终端在接收到拍照指令时,可以确定当前的拍照参数,例如光圈、快门速度、感光度、白平衡等参数。此时终端可以获取用户设置的拍照参数,也可以基于预设算法和环境参数计算拍照参数。然后,基于拍照参数拍摄一张图片。If the current zoom magnification of the camera is less than the preset threshold, the terminal may determine the current photographing parameters, such as aperture, shutter speed, sensitivity, white balance, and the like when receiving the photographing instruction. At this time, the terminal can obtain the camera parameters set by the user, and can also calculate the camera parameters based on the preset algorithm and the environment parameters. Then, take a picture based on the camera parameters.
如果摄像头当前的变焦倍数大于或等于预设阈值,则终端可以获取用户设置的拍照参数,也可以基于预设算法和环境参数计算拍照参数,然后,基于拍照参数,连续拍摄多帧图片。该多帧图片的具体帧数可以由技术人员预先设置并存储在终端存储器中,或者该多帧图片的具体帧数也可以基于当前的拍摄参数确定,此处不做限定。If the current zoom ratio of the camera is greater than or equal to the preset threshold, the terminal may acquire the photographing parameter set by the user, or calculate the photographing parameter based on the preset algorithm and the environment parameter, and then continuously capture the multi-frame image based on the photographing parameter. The specific frame number of the multi-frame picture can be preset and stored in the terminal memory by the technician, or the specific frame number of the multi-frame picture can also be determined based on the current shooting parameters, which is not limited herein.
其中,预先存储的变焦倍数的预设阈值可以是用户自行设置的数值,也可以是技术人员根据多次试验结果得到的数值,该数值是一个临界值。在智能手机增大变焦倍数进行拍摄时,图片的细节就会放大,当用户点击拍摄选项时手产生轻微颤动,会造成手机的轻微抖动,而这轻微的抖动就会使图片变得模糊,使拍摄得到的图片的清晰度降低。当摄像头的变焦倍数大于该临界值时,不做 防抖处理拍摄得到的图片的清晰度不满足多数用户对图片的清晰度的要求。当摄像头的变焦倍数小于该临界值时,不做防抖处理拍摄得到的图片的清晰度可以满足用户对图片的清晰度的要求。The preset threshold of the pre-stored zoom factor may be a value set by the user, or may be a value obtained by a technician according to a plurality of test results, and the value is a critical value. When the smartphone increases the zoom factor for shooting, the details of the picture will be enlarged. When the user clicks on the shooting option, the hand will slightly vibrate, which will cause slight jitter of the phone, and this slight jitter will blur the picture, making The sharpness of the captured picture is reduced. When the zoom magnification of the camera is greater than the critical value, the sharpness of the picture taken without the anti-shake processing does not satisfy the requirements of the majority of the user for the sharpness of the picture. When the zoom magnification of the camera is less than the critical value, the sharpness of the picture taken without the anti-shake processing can satisfy the user's requirement for the sharpness of the picture.
在一种可能的实施方式中,如图3所示,本步骤可以包括如下步骤。In a possible implementation manner, as shown in FIG. 3, this step may include the following steps.
步骤102A,若摄像头当前的变焦倍数大于预设阈值,则根据第一拍摄参数确定第二拍摄参数,第一拍摄参数中包含当前的变焦倍数,第二拍摄参数中包含目标拍摄帧数,目标拍摄帧数是多帧图片的帧数。 Step 102A: If the current zoom magnification of the camera is greater than the preset threshold, determining a second shooting parameter according to the first shooting parameter, where the first shooting parameter includes a current zoom factor, and the second shooting parameter includes a target shooting frame number, and the target shooting The number of frames is the number of frames of a multi-frame picture.
可选的,第一拍摄参数中至少包含摄像头当前的变焦倍数,第二拍摄参数中至少包含连续拍摄的多帧图片的目标拍摄帧数,摄像头当前的变焦倍数与目标拍摄帧数呈正相关关系,即变焦倍数越大,连续拍摄的图片帧数越多。Optionally, the first shooting parameter includes at least a current zoom factor of the camera, and the second shooting parameter includes at least a target shooting frame of the continuously captured multi-frame picture, and the current zooming ratio of the camera is positively correlated with the target shooting frame number. That is, the larger the zoom magnification, the more the number of consecutively taken picture frames.
步骤102B,根据第二拍摄参数连续拍摄多帧图片。 Step 102B: continuously capture a plurality of frames according to the second shooting parameter.
根据确定出的第二拍摄参数,终端在接收到拍照指令时连续拍摄目标拍摄帧数的图片,以便后续对拍摄得到的多帧图片进行防抖合成处理。According to the determined second shooting parameter, the terminal continuously captures the picture of the target shooting frame number when receiving the photographing instruction, so as to perform anti-shake synthesis processing on the multi-frame image obtained by the shooting.
示意性的,当变焦倍数的预设阈值为4倍,且摄像头当前的变焦倍数为8倍时,终端根据当前的变焦倍数确定出目标拍摄帧数为4帧,从而在接收到拍照指令时,连续拍摄4帧图片。Illustratively, when the preset threshold of the zoom magnification is 4 times and the current zoom magnification of the camera is 8 times, the terminal determines that the number of target shooting frames is 4 frames according to the current zoom magnification, so that when the photographing instruction is received, Take 4 frames of pictures in succession.
在步骤103中,对多帧图片,进行防抖合成处理,得到目标图片。In step 103, anti-shake synthesis processing is performed on the multi-frame picture to obtain a target picture.
可选的,与上述步骤102A和102B对应的,如图3所示,本步骤包括步骤103A:终端对目标拍摄帧数的图片进行防抖合成处理,得到目标图片。Optionally, corresponding to the foregoing steps 102A and 102B, as shown in FIG. 3, the step includes the step 103A: the terminal performs anti-shake synthesis processing on the picture of the target number of frames to obtain a target picture.
其中,对目标拍摄帧数的图片进行防抖合成处理时,可以包括如下步骤:Wherein, when performing anti-shake synthesis processing on the picture of the target shooting frame number, the following steps may be included:
一、确定目标拍摄帧数的图片中的中心图片和其余图片,中心图片是目标拍摄帧数的图片中清晰度最高的图片,其余图片的是除中心图片外清晰度高于清晰度阈值的图片。First, determine the center picture and the remaining pictures in the picture of the target number of frames, the center picture is the picture with the highest resolution in the picture of the target number of frames, and the rest of the pictures are pictures with a higher definition than the definition threshold except the center picture. .
在实施中,拍摄多帧图片后,调用防抖合成算法,在这多帧图片中,按照预设的选择条件选择其中一帧图片作为中心图片,例如,预设的选择条件可以是选取多帧图片中最清晰的一帧图片。然后,分析其余多帧图片的清晰度,将其中清晰度低于预设的清晰度阈值的图片确定为无效图片,将无效图片删除,从而得到其余图片。In the implementation, after taking a multi-frame picture, an anti-shake synthesis algorithm is invoked, and in the multi-frame picture, one of the picture pictures is selected as the center picture according to a preset selection condition. For example, the preset selection condition may be selecting multiple frames. The clearest picture in the picture. Then, the resolution of the remaining multi-frame pictures is analyzed, and the picture in which the definition is lower than the preset definition threshold is determined as an invalid picture, and the invalid picture is deleted, thereby obtaining the remaining pictures.
二、对中心图片和其余图片进行分割。Second, split the center picture and the rest of the picture.
可选的,终端将中心图片以及其余图片按照预设的分割方式进行分割,分成多个部分,且中心图片与其余图片的分割方式完全相同。本申请实施例并不对分割图片的方式进行限定。Optionally, the terminal divides the central picture and the remaining pictures according to a preset segmentation manner, and is divided into multiple parts, and the central picture is completely divided with the remaining pictures. The embodiment of the present application does not limit the manner in which the picture is divided.
比如,终端将中心图片和其余图片分割为10×10的100个图片块。For example, the terminal divides the center picture and the remaining pictures into 10 picture blocks of 10×10.
三、若其余图片中目标图片部分的清晰度高于中心图片中目标图片部分的清晰度,则根据其余图片中的目标图片部分对中心图片的目标图片部分进行处理。3. If the resolution of the target picture part in the remaining pictures is higher than the definition of the target picture part in the center picture, the target picture part of the center picture is processed according to the target picture part in the remaining pictures.
可选的,终端检测中心图片与其余图片的相对应的每个部分,对于中心图片中的任一部分,判断在其余图片中的该部分是否比中心图片中的该部分更清晰,如果其余图片中的该部分更清晰,则基于其余图片中的该部分对中心图片 的该部分进行处理,其中,处理方式包括:亮度补偿、部分替换中的至少一种。Optionally, each part of the center detection center picture corresponding to the remaining pictures, for any part of the center picture, determining whether the part in the remaining picture is clearer than the part in the center picture, if the remaining pictures are in the picture The portion of the central image is processed based on the portion of the remaining pictures, wherein the processing includes at least one of brightness compensation and partial replacement.
四、将处理后的中心图片确定为目标图片。4. Determine the processed center image as the target image.
对中心图片中的,每个图片部分进行处理后,终端将处理后的中心图片确定为目标图片。After processing each picture part in the center picture, the terminal determines the processed center picture as the target picture.
综上所述,本申请实施例中,终端接收到拍照指令时,判断摄像头当前的变焦倍数是否大于预设阈值,并在变焦倍数大于预设阈值时,根据拍照指令连续拍摄多帧图片,从而对多帧图片进行防抖合成处理,得到清晰度更高的目标图片;采用本申请实施例提供的拍照处理方法,在增大变焦倍数进行拍摄时,因为用户的轻微抖动而模糊的图片,经过防抖合成处理后,可以得到更较为清晰的图片,达到了提高变焦拍摄场景下拍摄图片清晰度的效果In summary, in the embodiment of the present application, when the terminal receives the photographing instruction, it determines whether the current zoom magnification of the camera is greater than a preset threshold, and when the zoom magnification is greater than the preset threshold, continuously captures multiple frames according to the photographing instruction, thereby Performing anti-shake synthesis processing on the multi-frame picture to obtain a target picture with higher definition; using the photographing processing method provided by the embodiment of the present application, when the zoom magnification is increased for shooting, the picture blurred due to slight jitter of the user passes through After the anti-shake synthesis process, a clearer picture can be obtained, which improves the sharpness of the picture taken in the zoom shooting scene.
可选地,当用户不想要经过防抖处理后的图片,可以撤销防抖处理,保留按照常规拍照方式得到的图片,相应的处理可以如下:显示目标图片,并显示撤销防抖选项;当检测到对撤销防抖选项的点击指令时,使用多帧图片中的首帧图片,替换目标图片。Optionally, when the user does not want the image after the anti-shake processing, the anti-shake processing may be cancelled, and the image obtained according to the regular photographing manner may be retained, and the corresponding processing may be as follows: displaying the target image and displaying the un-anti-shake option; When the click command for the anti-shake option is cancelled, the first frame image in the multi-frame picture is used to replace the target picture.
在实施中,经过上述处理得到目标图片后,终端向用户显示目标图片。在显示目标图片的同时,可以显示撤销防抖选项。如果用户想要经过防抖处理后的目标图片,用户可以直接保存目标图片。如果用户不想要经过防抖处理后的目标图片,而是想要未经过防抖处理的原始图片,例如,用户想要拍摄出水流动的动态效果,这种水流动的动态效果其实是水流的动态模糊,而经过防抖处理得到的图片会消除这种模糊效果,因此目标图片达不到用户想要的效果,反而是为经过防抖处理的原始图片会有这样的效果。在这种情况下,用户可以点击撤销防抖选项,如图4所示。终端接收到撤销防抖选项的点击指令后,在缓存区中获取拍摄到的多帧图片中的首帧图片,使用该首帧图片替换目标图片。然后,将首帧图片显示给用户。用户看到图片后,如果满意这张图片可以选择存储,如果不满意可以选择删除,重新拍摄图片。In the implementation, after obtaining the target picture through the above processing, the terminal displays the target picture to the user. While the target image is displayed, the Undo Anti Shake option can be displayed. If the user wants to go through the anti-shake target image, the user can directly save the target image. If the user does not want the target image after anti-shake processing, but wants the original image without anti-shake processing, for example, the user wants to capture the dynamic effect of water flow, the dynamic effect of this water flow is actually the dynamic of the water flow. Blurring, and the image obtained by anti-shake processing will eliminate this blurring effect, so the target image does not achieve the desired effect of the user, but the original image after anti-shake processing has such an effect. In this case, the user can click to undo the anti-shake option, as shown in Figure 4. After receiving the click command of the undo anti-shake option, the terminal acquires the first frame image in the captured multi-frame picture in the buffer area, and replaces the target picture with the first frame picture. Then, the first frame picture is displayed to the user. After the user sees the picture, if you are satisfied with the picture, you can choose to store it. If you are not satisfied, you can choose to delete and retake the picture.
在一种可能的实施方式中,当第一拍摄参数包括当前的变焦倍数和当前的环境光参数(可以是环境光强度),而确定出的第二拍摄参数包括目标拍摄帧数和目标曝光度时,步骤102A可以包括如下步骤:若摄像头当前的变焦倍数大于预设阈值,则根据预先存储的第一拍摄参数与第二拍摄参数的对应关系,确定目标曝光度和目标拍摄帧数;相应的,步骤102B可以包括如下步骤:基于目标曝光度,连续拍摄目标拍摄帧数的图片。In a possible implementation manner, when the first shooting parameter includes a current zoom factor and a current ambient light parameter (which may be ambient light intensity), the determined second shooting parameter includes a target shooting frame number and a target exposure degree. The step 102A may include the following steps: if the current zoom factor of the camera is greater than the preset threshold, determining the target exposure degree and the target shooting frame number according to the corresponding relationship between the first shooting parameter and the second shooting parameter stored in advance; Step 102B may include the step of continuously capturing a picture of the number of target shooting frames based on the target exposure.
在实施中,技术人员在不同的环境光强度以及不同的变焦倍数的场景下,按照不同的曝光度以及拍摄帧数进行试验。例如,技术人员可以在某个环境光强度以及某个变焦倍数的场景下,按照某个曝光度以及某个拍摄帧数拍摄照片,然后保持环境光强度、变焦倍数以及拍摄帧数不变,调整曝光度,按照调整后的曝光度拍摄图片,再调整曝光度,然后按照调整后的曝光度拍摄图片,重复上述过程,将曝光度在取值范围中可以取到的值试验一遍后,选取所有图 片中效果最好的一张图片,确定该图片对应的曝光度,然后,可以确定该环境光强度以及该变焦倍数对应何种曝光度以及拍摄帧数,可以使拍摄得到的图片效果最好。按照上述过程经过大量试验,技术人员可以得到在任意环境光强度以及变焦倍数的场景下对应的曝光度以及拍摄帧数,以该曝光度以及拍摄帧数进行拍摄,可以使得到的图片效果更好。技术人员将这种对应关系存储在终端中,可以以对应关系表的形式进行存储,如表1所示。In the implementation, the technician performs experiments according to different exposure degrees and shooting frames in different ambient light intensities and different zoom magnification scenarios. For example, a technician can take a photo at a certain exposure and a certain number of frames in a scene with a certain ambient light intensity and a zoom factor, and then keep the ambient light intensity, zoom factor, and number of shots unchanged. Exposure, take pictures according to the adjusted exposure, adjust the exposure, and then take the picture according to the adjusted exposure, repeat the above process, test the exposure value in the range of values, and select all The best picture in the picture determines the exposure of the picture. Then, you can determine the ambient light intensity and the exposure and the number of frames for the zoom factor, which can make the picture taken best. According to the above process, after a lot of experiments, the technician can get the corresponding exposure degree and the number of shooting frames in the scene of any ambient light intensity and zoom magnification, and shooting with the exposure degree and the number of shooting frames can make the picture better. . The technician stores the correspondence in the terminal and can store it in the form of a correspondence table, as shown in Table 1.
表1Table 1
Figure PCTCN2018115226-appb-000001
Figure PCTCN2018115226-appb-000001
当检测到摄像头当前的变焦倍数大于或等于预设阈值时,终端检测当前拍摄环境的环境光强度,然后,终端获取预先存储的环境光强度、变焦倍数与曝光度、拍摄帧数的对应关系表。然后,终端可以根据该对应关系表,查找当前的环境光强度以及摄像头当前的变焦倍数对应的曝光度和拍摄帧数(即目标曝光度和目标拍摄帧数),然后,按照目标曝光度,以当前拍摄的图片为第一帧图片,连续拍摄目标拍摄帧数的图片。例如,终端检测到当前拍摄环境的环境光强度为100,摄像头当前的变焦倍数为3,则根据上述的对应关系表,可以得知目标曝光度为+1,目标拍摄帧数为3,然后,终端按照目标曝光度连续拍摄3帧图片。When detecting that the current zoom magnification of the camera is greater than or equal to the preset threshold, the terminal detects the ambient light intensity of the current shooting environment, and then, the terminal acquires a correspondence table of the pre-stored ambient light intensity, zoom magnification, exposure, and number of shot frames. . Then, the terminal may search for the current ambient light intensity and the exposure degree and the number of shooting frames corresponding to the current zoom factor of the camera (ie, the target exposure degree and the target shooting frame number) according to the correspondence table, and then, according to the target exposure degree, The currently captured picture is the first frame picture, and the picture of the target number of frames is continuously captured. For example, if the terminal detects that the ambient light intensity of the current shooting environment is 100 and the current zoom magnification of the camera is 3, according to the correspondence table described above, it can be known that the target exposure degree is +1, the target shooting frame number is 3, and then, The terminal continuously shoots 3 frames of pictures according to the target exposure.
在另一种可能的实施方式中,当第一拍摄参数包括当前的变焦倍数和当前的环境光参数(可以是环境光强度),而确定出的第二拍摄参数包括目标拍摄帧数和目标曝光度时,上述步骤102A还可以包括如下步骤:若摄像头当前的变焦倍数大于所述预设阈值,则将当前的环境光参数和当前的变焦倍数,输入预先训练的拍摄参数确定模型,得到目标曝光度和目标拍摄帧数;相应的,步骤102B还可以包括如下步骤:基于目标曝光度,连续拍摄目标拍摄帧数的图片。In another possible implementation manner, when the first shooting parameter includes a current zoom factor and a current ambient light parameter (which may be ambient light intensity), the determined second shooting parameter includes a target shooting frame number and a target exposure. The step 102A may further include the following steps: if the current zoom factor of the camera is greater than the preset threshold, input the current ambient light parameter and the current zoom factor into the pre-trained shooting parameter determination model to obtain the target exposure. And the target shooting frame number; correspondingly, the step 102B may further include the step of continuously capturing the picture of the target shooting frame number based on the target exposure degree.
其中,拍摄参数确定模型通过深度学习训练得到,用于确定目标曝光度与目标拍摄帧数。The shooting parameter determination model is obtained through deep learning training, and is used to determine the target exposure degree and the target shooting frame number.
在实施中,终端可以根据环境光参数、变焦倍数,基于拍摄参数确定模型得到当前的曝光度、拍摄帧数。拍摄参数确定模型可以经过深度学习训练得到,训练过程可以如下:In the implementation, the terminal can determine the current exposure degree and the number of shooting frames based on the ambient light parameter and the zoom factor. The shooting parameter determination model can be obtained through deep learning training. The training process can be as follows:
技术人员在不同的环境光强度以及不同的变焦倍数的场景下,按照不同的曝光度以及拍摄帧数进行试验。例如,技术人员可以在第一环境光强度以及第 一变焦倍数的场景下,按照某个曝光度以及第一拍摄帧数拍摄图片,并进行合成处理,得到处理后的合成图片,然后保持第一环境光强度、第一变焦倍数以及第一拍摄帧数不变,调整曝光度,按照调整后的曝光度拍摄图片,并进行合成处理,得到处理后的合成图片,再调整曝光度,然后按照调整后的曝光度拍摄图片,并进行合成处理,得到处理后的和合成图片,重复上述过程,将曝光度在取值范围中可以取到的值试验一遍后,选取所有得到的合成图片中效果最好的一张图片(即第一合成图片),确定第一合成图片对应的第一曝光度,然后,可以确定第一环境光强度以及第一变焦倍数对应第一曝光度以及第一拍摄帧数,可以使拍摄得到的图片效果最好。将第一环境光强度、第一变焦倍数、第一曝光度以及第一拍摄帧数作为一组样本存储到训练集中。按照上述过程重复试验,技术人员可以得到多组环境光强度、变焦倍数、曝光度以及拍摄帧数的样本,其中,环境光强度和变焦倍数为样本输入,曝光度和拍摄帧数为样本输出。将样本中的环境光强度和变焦倍数输入到拍摄参数确定模型中,得到模型输出曝光度和模型输出拍摄帧数,基于得到的模型输出曝光度和模型输出拍摄帧数与样本曝光度和样本拍摄帧数以及训练函数,对拍摄参数确定模型进行调整,重复上述的训练过程,对拍摄参数模型进行训练,可以得到训练好的拍摄参数模型。The technicians experimented with different exposures and shooting frames in different ambient light intensities and different zoom magnifications. For example, the technician can take a picture according to a certain exposure degree and the first shooting frame number in the first ambient light intensity and the first zoom multiple, and perform a synthesis process to obtain the processed composite picture, and then keep the first The ambient light intensity, the first zoom factor, and the number of first shot frames are unchanged, the exposure is adjusted, the picture is taken according to the adjusted exposure degree, and the composite image is processed to obtain the processed composite picture, and then the exposure is adjusted, and then adjusted. After the exposure, the picture is taken and synthesized, and the processed and synthesized pictures are obtained. The above process is repeated, and the value obtained by the exposure in the range of values is tested once, and all the obtained combined pictures are selected most. a good picture (ie, the first composite picture), determining a first exposure corresponding to the first composite picture, and then determining that the first ambient light intensity and the first zoom multiple correspond to the first exposure and the first number of shots Can make the best pictures get. The first ambient light intensity, the first zoom factor, the first exposure, and the first number of shot frames are stored as a set of samples into the training set. Repeat the test according to the above process, the technician can get multiple sets of ambient light intensity, zoom factor, exposure and the number of shot frames. The ambient light intensity and zoom factor are sample input, and the exposure and number of shots are sample output. Input the ambient light intensity and zoom factor in the sample into the shooting parameter determination model to obtain the model output exposure and the model output shooting frame number, based on the obtained model output exposure and model output shooting frame number and sample exposure and sample shooting. The number of frames and the training function adjust the shooting parameter determination model, repeat the above training process, and train the shooting parameter model to obtain the trained shooting parameter model.
当检测到摄像头当前的变焦倍数大于或等于预设阈值时,终端检测当前拍摄环境的环境光强度,然后,将当前拍摄环境的环境光强度和当前的变焦倍数输入训练好的拍摄参数确定模型,可以得到当前环境光强度、变焦倍数对应的目标曝光度和目标拍摄帧数。When detecting that the current zoom ratio of the camera is greater than or equal to the preset threshold, the terminal detects the ambient light intensity of the current shooting environment, and then inputs the ambient light intensity of the current shooting environment and the current zoom factor into the trained shooting parameter determination model. The current ambient light intensity, the target exposure corresponding to the zoom factor, and the number of target shot frames can be obtained.
为了进一步提高模型预测的准确性,可选地,在确定曝光度和拍摄帧数时,还可以考虑终端移动速度,相应的,上述步骤102A还可以包括如下步骤:若摄像头当前的变焦倍数大于预设阈值,则将当前的环境光参数、当前的变焦倍数和当前的终端移动速度,输入预先训练的拍摄参数确定模型,得到目标曝光度和目标拍摄帧数。In order to further improve the accuracy of the model prediction, optionally, when determining the exposure and the number of frames to be taken, the terminal moving speed may also be considered. Correspondingly, the above step 102A may further include the following steps: if the current zooming ratio of the camera is greater than the pre- When the threshold is set, the current ambient light parameter, the current zoom factor and the current terminal moving speed are input into the pre-trained shooting parameter determination model to obtain the target exposure degree and the target shooting frame number.
其中,终端移动速度是用户手持终端进行拍照时,用户的手抖动带动终端发生移动的移动速度。该终端移动速度可以通过终端中的陀螺仪传感器和/或加速度传感器测量得到。The terminal moving speed is a moving speed at which the user's hand shake causes the terminal to move when the user's handheld terminal performs photographing. The terminal moving speed can be measured by a gyro sensor and/or an acceleration sensor in the terminal.
在实施中,按照上述步骤训练拍摄参数确定模型时,可以得到多组环境光强度、变焦倍数、终端移动速度、曝光度以及拍摄帧数形成的样本,其中,环境光强度、变焦倍数和终端移动速度为样本输入,曝光度以及拍摄帧数为样本输出。将该多组样本输入到拍摄参数确定模型中,得到实际曝光度和实际拍摄帧数。基于得到的实际曝光度和实际拍摄帧数与样本曝光度和样本拍摄帧数以及训练函数,对拍摄参数确定模型进行调整。重复上述的训练过程,对拍摄参数模型进行训练,可以得到训练好的拍摄参数模型。In the implementation, when the shooting parameter determination model is trained according to the above steps, samples formed by multiple sets of ambient light intensity, zoom magnification, terminal moving speed, exposure, and number of shooting frames, wherein ambient light intensity, zoom magnification, and terminal movement are obtained, The speed is the sample input, the exposure and the number of frames taken are the sample output. The plurality of sets of samples are input into the shooting parameter determination model to obtain the actual exposure and the actual number of captured frames. The photographing parameter determination model is adjusted based on the obtained actual exposure and the actual number of photographed frames and the sample exposure and the number of sample shot frames and the training function. By repeating the above training process and training the shooting parameter model, a trained shooting parameter model can be obtained.
在使用该拍摄参数确定模型时,当检测到摄像头当前的变焦倍数大于或等于预设阈值时,终端检测当前拍摄环境的环境光强度以及终端移动速度,然后, 将当前拍摄环境的环境光强度、当前的终端移动速度以及当前的变焦倍数输入到训练好的拍摄参数确定模型,可以得到当前环境光强度、变焦倍数、终端移动速度对应的目标曝光度和目标拍摄帧数。When the model is used to determine the model, when detecting that the current zoom factor of the camera is greater than or equal to the preset threshold, the terminal detects the ambient light intensity of the current shooting environment and the terminal moving speed, and then, the ambient light intensity of the current shooting environment, The current terminal moving speed and the current zoom factor are input to the trained shooting parameter determination model, and the current ambient light intensity, the zoom magnification, the target exposure speed corresponding to the terminal moving speed, and the target shooting frame number can be obtained.
基于相同的技术构思,本发明实施例还提供了一种拍照处理的装置,如图5所示,该装置包括:接收模块510,拍摄模块520,处理模块530。Based on the same technical concept, the embodiment of the present invention further provides a device for photographing processing. As shown in FIG. 5, the device includes: a receiving module 510, a photographing module 520, and a processing module 530.
该接收模块510,被配置为接收拍照指令;The receiving module 510 is configured to receive a photographing instruction;
该拍摄模块520,被配置为当摄像头当前的变焦倍数大于预设阈值时,根据所述拍照指令连续拍摄多帧图片;The photographing module 520 is configured to continuously capture a plurality of frames according to the photographing instruction when the current zoom magnification of the camera is greater than a preset threshold;
该处理模块530,被配置为对所述多帧图片进行防抖合成处理,得到目标图片。The processing module 530 is configured to perform anti-shake synthesis processing on the multi-frame picture to obtain a target picture.
可选的,拍摄模块520,用于:Optionally, the shooting module 520 is configured to:
若摄像头当前的变焦倍数大于所述预设阈值,则根据第一拍摄参数确定第二拍摄参数,所述第一拍摄参数中包含所述当前的变焦倍数,所述第二拍摄参数中包含目标拍摄帧数,所述目标拍摄帧数是所述多帧图片的帧数;If the current zoom factor of the camera is greater than the preset threshold, determining a second shooting parameter according to the first shooting parameter, where the first shooting parameter includes the current zoom factor, and the second shooting parameter includes a target shooting The number of frames, the number of target shooting frames is the number of frames of the multi-frame picture;
根据所述第二拍摄参数连续拍摄所述多帧图片;And continuously capturing the multi-frame picture according to the second shooting parameter;
所述处理模块530,用于:The processing module 530 is configured to:
对所述目标拍摄帧数的图片进行防抖合成处理,得到所述目标图片。Performing anti-shake synthesis processing on the picture of the target number of shot frames to obtain the target picture.
可选地,所述第一拍摄参数包括所述当前的变焦倍数和当前的环境光参数,所述第二拍摄参数包括所述目标拍摄帧数和目标曝光度;所述拍摄模块520,被配置为:Optionally, the first shooting parameter includes the current zoom factor and a current ambient light parameter, the second shooting parameter includes the target shooting frame number and a target exposure degree; the shooting module 520 is configured for:
若摄像头当前的变焦倍数大于所述预设阈值,则将所述当前的环境光参数和所述当前的变焦倍数,输入预先训练的拍摄参数确定模型,得到所述目标曝光度和所述目标拍摄帧数;If the current zoom factor of the camera is greater than the preset threshold, input the current ambient light parameter and the current zoom factor into a pre-trained shooting parameter determination model to obtain the target exposure and the target shooting Number of frames;
基于所述目标曝光度,连续拍摄所述目标拍摄帧数的图片;And continuously taking a picture of the number of target shooting frames based on the target exposure;
可选地,所述第一拍摄参数包括所述当前的变焦倍数和当前的环境光参数,所述第二拍摄参数包括所述目标拍摄帧数和目标曝光度;所述拍摄模块520,被配置为:Optionally, the first shooting parameter includes the current zoom factor and a current ambient light parameter, the second shooting parameter includes the target shooting frame number and a target exposure degree; the shooting module 520 is configured for:
若摄像头当前的变焦倍数大于所述预设阈值,则根据预先存储的所述第一拍摄参数与所述第二拍摄参数的对应关系,确定当前的环境光参数和所述当前的变焦倍数对应的所述目标曝光度和所述目标拍摄帧数;Determining, according to a pre-stored correspondence between the first shooting parameter and the second shooting parameter, a current ambient light parameter corresponding to the current zoom factor, if the current zoom factor of the camera is greater than the preset threshold The target exposure degree and the number of target shooting frames;
基于所述目标曝光度,连续拍摄所述目标拍摄帧数的图片;And continuously taking a picture of the number of target shooting frames based on the target exposure;
可选地,所述第一拍摄参数还包括当前的终端移动速度,所述拍摄模块520,被配置为:Optionally, the first shooting parameter further includes a current terminal moving speed, and the shooting module 520 is configured to:
若摄像头当前的变焦倍数大于所述预设阈值,则将所述当前的环境光参数、所述当前的变焦倍数和所述当前的终端移动速度,输入预先训练的拍摄参数确定模型,得到所述目标曝光度和所述目标拍摄帧数。If the current zoom factor of the camera is greater than the preset threshold, input the current ambient light parameter, the current zoom factor, and the current terminal moving speed into a pre-trained shooting parameter determination model to obtain the Target exposure and the number of target shot frames.
可选的,所述处理模块530,还被配置为:Optionally, the processing module 530 is further configured to:
确定所述目标拍摄帧数的图片中的中心图片和其余图片,所述中心图片是 所述目标拍摄帧数的图片中清晰度最高的图片,所述其余图片的是除所述中心图片外清晰度高于清晰度阈值的图片;Determining a center picture and a remaining picture in the picture of the target number of shot frames, wherein the center picture is the highest-definition picture in the picture of the target number of shot frames, and the remaining pictures are clear except the center picture a picture that is above the sharpness threshold;
对所述中心图片和所述其余图片进行分割;Segmenting the center picture and the remaining pictures;
若所述其余图片中目标图片部分的清晰度高于所述中心图片中目标图片部分的清晰度,则根据其余图片中的目标图片部分对所述中心图片的目标图片部分进行处理;If the resolution of the target picture part in the remaining picture is higher than the definition of the target picture part in the central picture, the target picture part of the central picture is processed according to the target picture part in the remaining pictures;
将处理后的所述中心图片确定为所述目标图片。The processed center picture is determined as the target picture.
可选地,如图6所示,所述装置还包括:Optionally, as shown in FIG. 6, the apparatus further includes:
显示模块540,被配置为显示所述目标图片,并显示撤销防抖选项;The display module 540 is configured to display the target picture and display the undo anti-shake option;
替换模块550,被配置为当检测到对所述撤销防抖选项的点击指令时,使用所述多帧图片中的首帧图片,替换所述目标图片。The replacement module 550 is configured to replace the target picture with a first frame picture in the multi-frame picture when a click instruction to the undo anti-shake option is detected.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。With regard to the apparatus in the above embodiments, the specific manner in which the respective modules perform the operations has been described in detail in the embodiment relating to the method, and will not be explained in detail herein.
需要说明的是:上述实施例提供的拍照处理的装置在进行拍照处理时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将终端的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的拍照处理的装置与拍照处理的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that, when performing the photographing processing, the apparatus for photographing processing provided by the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the function distribution may be completed by different functional modules as needed. The internal structure of the terminal is divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for photographing processing provided by the above embodiment is the same as the method embodiment of the photographing processing, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
请参考图7,其示出了本发明实施例所涉及的终端的结构示意图,该终端可以用于实施上述实施例中提供的拍照处理的方法。具体来讲:Please refer to FIG. 7 , which is a schematic structural diagram of a terminal according to an embodiment of the present invention. The terminal may be used to implement the method for photographing processing provided in the foregoing embodiment. Specifically:
终端700可以包括RF(Radio Frequency,射频)电路110、包括有一个或一个以上计算机可读存储介质的存储器120、输入单元130、显示单元140、传感器150、音频电路160、WiFi(wireless fidelity,无线保真)模块170、包括有一个或者一个以上处理核心的处理器180、以及电源190等部件。本领域技术人员可以理解,图6中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:The terminal 700 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more computer readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, and a WiFi (wireless fidelity, wireless). The fidelity module 170 includes a processor 180 having one or more processing cores, and a power supply 190 and the like. It will be understood by those skilled in the art that the terminal structure shown in FIG. 6 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements. among them:
RF电路110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器180处理;另外,将涉及上行的数据发送给基站。通常,RF电路110包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM)卡、收发信机、耦合器、LNA(Low Noise Amplifier,低噪声放大器)、双工器等。此外,RF电路110还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于GSM(Global System of Mobile communication,全球移动通讯系统)、GPRS(General Packet Radio Service,通用分组无线服务)、CDMA(Code Division Multiple Access,码分多址)、WCDMA(Wideband Code Division Multiple Access,宽带码分多址)、LTE(Long  Term Evolution,长期演进)、电子邮件、SMS(Short Messaging Service,短消息服务)等。The RF circuit 110 can be used for transmitting and receiving information or during a call, and receiving and transmitting signals. Specifically, after receiving downlink information of the base station, the downlink information is processed by one or more processors 180. In addition, the data related to the uplink is sent to the base station. . Generally, the RF circuit 110 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier). , duplexer, etc. In addition, RF circuitry 110 can also communicate with the network and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access). , Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), e-mail, SMS (Short Messaging Service), and the like.
存储器120可用于存储软件程序以及模块,处理器180通过运行存储在存储器120的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端700的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器120还可以包括存储器控制器,以提供处理器180和输入单元130对存储器120的访问。The memory 120 can be used to store software programs and modules, and the processor 180 executes various functional applications and data processing by running software programs and modules stored in the memory 120. The memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to The data created by the use of the terminal 700 (such as audio data, phone book, etc.) and the like. Moreover, memory 120 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, memory 120 may also include a memory controller to provide access to memory 120 by processor 180 and input unit 130.
输入单元130可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,输入单元130可包括触敏表面131以及其他输入设备132。触敏表面131,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面131上或在触敏表面131附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器180,并能接收处理器180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面131。除了触敏表面131,输入单元130还可以包括其他输入设备132。具体地,其他输入设备132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 130 can be configured to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls. In particular, input unit 130 can include touch-sensitive surface 131 as well as other input devices 132. Touch-sensitive surface 131, also referred to as a touch display or trackpad, can collect touch operations on or near the user (such as a user using a finger, stylus, etc., on any suitable object or accessory on touch-sensitive surface 131 or The operation near the touch-sensitive surface 131) and driving the corresponding connecting device according to a preset program. Alternatively, the touch-sensitive surface 131 can include two portions of a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 180 is provided and can receive commands from the processor 180 and execute them. In addition, the touch-sensitive surface 131 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 131, the input unit 130 can also include other input devices 132. Specifically, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
显示单元140可用于显示由用户输入的信息或提供给用户的信息以及终端700的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元140可包括显示面板141,可选的,可以采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面板141。进一步的,触敏表面131可覆盖显示面板141,当触敏表面131检测到在其上或附近的触摸操作后,传送给处理器180以确定触摸事件的类型,随后处理器180根据触摸事件的类型在显示面板141上提供相应的视觉输出。虽然在图6中,触敏表面131与显示面板141是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面131与显示面板141集成而实现输入和输出功能。 Display unit 140 can be used to display information entered by the user or information provided to the user and various graphical user interfaces of terminal 700, which can be constructed from graphics, text, icons, video, and any combination thereof. The display unit 140 may include a display panel 141. Alternatively, the display panel 141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 131 may cover the display panel 141, and when the touch-sensitive surface 131 detects a touch operation thereon or nearby, it is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 according to the touch event The type provides a corresponding visual output on display panel 141. Although in FIG. 6, touch-sensitive surface 131 and display panel 141 are implemented as two separate components to implement input and input functions, in some embodiments, touch-sensitive surface 131 can be integrated with display panel 141 for input. And output function.
终端700还可包括至少一种传感器150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板141的亮度,接近传感器可在终端700移动到耳边时,关闭显示面板141和/或背光。作为运动传感器的一 种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端700还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。Terminal 700 can also include at least one type of sensor 150, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may close the display panel 141 when the terminal 700 moves to the ear. / or backlight. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the terminal 700 can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, here Let me repeat.
音频电路160、扬声器161,传声器162可提供用户与终端700之间的音频接口。音频电路160可将接收到的音频数据转换后的电信号,传输到扬声器161,由扬声器161转换为声音信号输出;另一方面,传声器162将收集的声音信号转换为电信号,由音频电路160接收后转换为音频数据,再将音频数据输出处理器180处理后,经RF电路110以发送给比如另一终端,或者将音频数据输出至存储器120以便进一步处理。音频电路160还可能包括耳塞插孔,以提供外设耳机与终端700的通信。The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the terminal 700. The audio circuit 160 can transmit the converted electrical data of the received audio data to the speaker 161 for conversion to the sound signal output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal by the audio circuit 160. After receiving, it is converted into audio data, and then processed by the audio data output processor 180, transmitted to the terminal, for example, via the RF circuit 110, or outputted to the memory 120 for further processing. The audio circuit 160 may also include an earbud jack to provide communication of the peripheral earphones with the terminal 700.
WiFi属于短距离无线传输技术,终端700通过WiFi模块170可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图6示出了WiFi模块170,但是可以理解的是,其并不属于终端700的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-range wireless transmission technology, and the terminal 700 can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 170, which provides wireless broadband Internet access for users. Although FIG. 6 shows the WiFi module 170, it can be understood that it does not belong to the essential configuration of the terminal 700, and may be omitted as needed within the scope of not changing the essence of the invention.
处理器180是终端700的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器120内的软件程序和/或模块,以及调用存储在存储器120内的数据,执行终端700的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器180可包括一个或多个处理核心;优选的,处理器180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器180中。The processor 180 is the control center of the terminal 700, connecting various portions of the entire handset with various interfaces and lines, by running or executing software programs and/or modules stored in the memory 120, and recalling data stored in the memory 120, The various functions and processing data of the terminal 700 are performed to perform overall monitoring of the mobile phone. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like. The modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 180.
终端700还包括给各个部件供电的电源190(比如电池),优选的,电源可以通过电源管理系统与处理器180逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源190还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The terminal 700 also includes a power source 190 (such as a battery) for powering various components. Preferably, the power source can be logically coupled to the processor 180 through a power management system to manage functions such as charging, discharging, and power management through the power management system. Power supply 190 may also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
尽管未示出,终端700还可以包括摄像头、蓝牙模块等,在此不再赘述。具体在本实施例中,终端700的显示单元是触摸屏显示器,终端700还包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行此一个或者一个以上程序来实现上述任一种拍照处理的方法。Although not shown, the terminal 700 may further include a camera, a Bluetooth module, and the like, and details are not described herein again. Specifically, in this embodiment, the display unit of the terminal 700 is a touch screen display, the terminal 700 further includes a memory, and one or more programs, wherein one or more programs are stored in the memory and configured to be one or one The above processor executes the one or more programs to implement any of the above-described methods of photographing processing.
在示例性实施例中,还提供了一种计算机可读存储介质,该存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集被处理器加载并执行时实现上述任一种拍照处理的方法。In an exemplary embodiment, there is also provided a computer readable storage medium having stored therein at least one instruction, at least one program, a code set, or a set of instructions, the at least one instruction, the at least one program, The method of implementing any of the above-described photographing processes when the code set or instruction set is loaded and executed by a processor.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通 过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium. The storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalents, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.

Claims (22)

  1. 一种拍照处理的方法,其特征在于,所述方法包括:A method for photographing processing, characterized in that the method comprises:
    接收拍照指令;Receiving a photographing instruction;
    若摄像头当前的变焦倍数大于预设阈值,则根据所述拍照指令连续拍摄多帧图片;If the current zoom magnification of the camera is greater than a preset threshold, continuously capturing a plurality of frames according to the photographing instruction;
    对所述多帧图片进行防抖合成处理,得到目标图片。Performing anti-shake synthesis processing on the multi-frame picture to obtain a target picture.
  2. 根据权利要求1所述的方法,其特征在于,所述若摄像头当前的变焦倍数大于预设阈值,则根据所述拍照指令连续拍摄多帧图片,包括:The method according to claim 1, wherein if the current zoom factor of the camera is greater than a preset threshold, continuously capturing the plurality of frames according to the photographing instruction comprises:
    若摄像头当前的变焦倍数大于所述预设阈值,则根据第一拍摄参数确定第二拍摄参数,所述第一拍摄参数中包含所述当前的变焦倍数,所述第二拍摄参数中包含目标拍摄帧数,所述目标拍摄帧数是所述多帧图片的帧数;If the current zoom factor of the camera is greater than the preset threshold, determining a second shooting parameter according to the first shooting parameter, where the first shooting parameter includes the current zoom factor, and the second shooting parameter includes a target shooting The number of frames, the number of target shooting frames is the number of frames of the multi-frame picture;
    根据所述第二拍摄参数连续拍摄所述多帧图片;And continuously capturing the multi-frame picture according to the second shooting parameter;
    所述对所述多帧图片进行防抖合成处理,得到目标图片,包括:Performing anti-shake synthesis processing on the multi-frame picture to obtain a target picture, including:
    对所述目标拍摄帧数的图片进行防抖合成处理,得到所述目标图片。Performing anti-shake synthesis processing on the picture of the target number of shot frames to obtain the target picture.
  3. 根据权利要求2所述的方法,其特征在于,所述第一拍摄参数包括所述当前的变焦倍数和当前的环境光参数,所述第二拍摄参数包括所述目标拍摄帧数和目标曝光度;The method according to claim 2, wherein the first shooting parameter comprises the current zoom factor and a current ambient light parameter, the second shooting parameter comprising the target shooting frame number and a target exposure degree ;
    所述若摄像头当前的变焦倍数大于所述预设阈值,则根据第一拍摄参数确定第二拍摄参数,包括:If the current zoom factor of the camera is greater than the preset threshold, determining the second shooting parameter according to the first shooting parameter, including:
    若摄像头当前的变焦倍数大于所述预设阈值,则将所述当前的环境光参数和所述当前的变焦倍数,输入预先训练的拍摄参数确定模型,得到所述目标曝光度和所述目标拍摄帧数;If the current zoom factor of the camera is greater than the preset threshold, input the current ambient light parameter and the current zoom factor into a pre-trained shooting parameter determination model to obtain the target exposure and the target shooting Number of frames;
    所述根据所述第二拍摄参数连续拍摄所述多帧图片,包括:The continuously capturing the multi-frame picture according to the second shooting parameter comprises:
    基于所述目标曝光度,连续拍摄所述目标拍摄帧数的图片。A picture of the number of target shooting frames is continuously captured based on the target exposure.
  4. 根据权利要求2所述的方法,其特征在于,所述第一拍摄参数包括所述当前的变焦倍数和当前的环境光参数,所述第二拍摄参数包括所述目标拍摄帧数和目标曝光度;The method according to claim 2, wherein the first shooting parameter comprises the current zoom factor and a current ambient light parameter, the second shooting parameter comprising the target shooting frame number and a target exposure degree ;
    所述若摄像头当前的变焦倍数大于所述预设阈值,则根据第一拍摄参数确定第二拍摄参数,包括:If the current zoom factor of the camera is greater than the preset threshold, determining the second shooting parameter according to the first shooting parameter, including:
    若摄像头当前的变焦倍数大于所述预设阈值,则根据预先存储的所述第一拍摄参数与所述第二拍摄参数的对应关系,确定所述目标曝光度和所述目标拍摄帧数;Determining the target exposure degree and the target shooting frame number according to a correspondence relationship between the first shooting parameter and the second shooting parameter stored in advance, if a current zoom ratio of the camera is greater than the preset threshold;
    所述根据所述第二拍摄参数连续拍摄所述多帧图片,包括:The continuously capturing the multi-frame picture according to the second shooting parameter comprises:
    基于所述目标曝光度,连续拍摄所述目标拍摄帧数的图片。A picture of the number of target shooting frames is continuously captured based on the target exposure.
  5. 根据权利要求3所述的方法,其特征在于,所述第一拍摄参数还包括当前的终端移动速度;The method according to claim 3, wherein the first shooting parameter further comprises a current terminal moving speed;
    所述若摄像头当前的变焦倍数大于所述预设阈值,则根据第一拍摄参数确定第二拍摄参数,包括:If the current zoom factor of the camera is greater than the preset threshold, determining the second shooting parameter according to the first shooting parameter, including:
    若摄像头当前的变焦倍数大于所述预设阈值,则将所述当前的环境光参数、所述当前的变焦倍数和所述当前的终端移动速度,输入预先训练的拍摄参数确定模型,得到所述目标曝光度和所述目标拍摄帧数。If the current zoom factor of the camera is greater than the preset threshold, input the current ambient light parameter, the current zoom factor, and the current terminal moving speed into a pre-trained shooting parameter determination model to obtain the Target exposure and the number of target shot frames.
  6. 根据权利要求2至5任一所述的方法,其特征在于,所述对所述目标拍摄帧数的图片进行防抖合成处理,得到所述目标图片,包括:The method according to any one of claims 2 to 5, wherein the anti-shake synthesis processing is performed on the picture of the target number of frames to obtain the target picture, including:
    确定所述目标拍摄帧数的图片中的中心图片和其余图片,所述中心图片是所述目标拍摄帧数的图片中清晰度最高的图片,所述其余图片的是除所述中心图片外清晰度高于清晰度阈值的图片;Determining a center picture and a remaining picture in the picture of the target number of shot frames, wherein the center picture is the highest-definition picture in the picture of the target number of shot frames, and the remaining pictures are clear except the center picture a picture that is above the sharpness threshold;
    对所述中心图片和所述其余图片进行分割;Segmenting the center picture and the remaining pictures;
    若所述其余图片中目标图片部分的清晰度高于所述中心图片中目标图片部分的清晰度,则根据其余图片中的目标图片部分对所述中心图片的目标图片部分进行处理;If the resolution of the target picture part in the remaining picture is higher than the definition of the target picture part in the central picture, the target picture part of the central picture is processed according to the target picture part in the remaining pictures;
    将处理后的所述中心图片确定为所述目标图片。The processed center picture is determined as the target picture.
  7. 根据权利要求1至5任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 5, wherein the method further comprises:
    显示所述目标图片,并显示撤销防抖选项;Displaying the target image and displaying the undo anti-shake option;
    当检测到对所述撤销防抖选项的点击指令时,使用所述多帧图片中的首帧图片,替换所述目标图片。When a click command to the undo anti-shake option is detected, the target picture is replaced with a first frame picture in the multi-frame picture.
  8. 一种拍照处理的装置,其特征在于,所述装置包括:A device for photographing processing, characterized in that the device comprises:
    接收模块,用于接收拍照指令;a receiving module, configured to receive a photographing instruction;
    拍摄模块,用于当摄像头当前的变焦倍数大于预设阈值时,根据所述拍照指令连续拍摄多帧图片;a shooting module, configured to continuously capture a plurality of frames according to the photographing instruction when a current zoom ratio of the camera is greater than a preset threshold;
    处理模块,用于对所述多帧图片,进行防抖合成处理,得到目标图片。The processing module is configured to perform anti-shake synthesis processing on the multi-frame picture to obtain a target picture.
  9. 根据权利要求8所述的装置,其特征在于,所述拍摄模块,用于:The apparatus according to claim 8, wherein the photographing module is configured to:
    若摄像头当前的变焦倍数大于所述预设阈值,则根据第一拍摄参数确定第二拍摄参数,所述第一拍摄参数中包含所述当前的变焦倍数,所述第二拍摄参数中包含目标拍摄帧数,所述目标拍摄帧数是所述多帧图片的帧数;If the current zoom factor of the camera is greater than the preset threshold, determining a second shooting parameter according to the first shooting parameter, where the first shooting parameter includes the current zoom factor, and the second shooting parameter includes a target shooting The number of frames, the number of target shooting frames is the number of frames of the multi-frame picture;
    根据所述第二拍摄参数连续拍摄所述多帧图片;And continuously capturing the multi-frame picture according to the second shooting parameter;
    所述处理模块,用于:The processing module is configured to:
    对所述目标拍摄帧数的图片进行防抖合成处理,得到所述目标图片。Performing anti-shake synthesis processing on the picture of the target number of shot frames to obtain the target picture.
  10. 根据权利要求9所述的装置,其特征在于,所述第一拍摄参数包括所述当前的变焦倍数和当前的环境光参数,所述第二拍摄参数包括所述目标拍摄 帧数和目标曝光度;The apparatus according to claim 9, wherein said first photographing parameter comprises said current zoom factor and current ambient light parameter, said second photographing parameter comprising said target photographing frame number and target exposure degree ;
    所述拍摄模块,还用于:The shooting module is further configured to:
    若摄像头当前的变焦倍数大于所述预设阈值,则将所述当前的环境光参数和所述当前的变焦倍数,输入预先训练的拍摄参数确定模型,得到所述目标曝光度和所述目标拍摄帧数;If the current zoom factor of the camera is greater than the preset threshold, input the current ambient light parameter and the current zoom factor into a pre-trained shooting parameter determination model to obtain the target exposure and the target shooting Number of frames;
    基于所述目标曝光度,连续拍摄所述目标拍摄帧数的图片。A picture of the number of target shooting frames is continuously captured based on the target exposure.
  11. 根据权利要求9所述的装置,其特征在于,所述第一拍摄参数包括所述当前的变焦倍数和当前的环境光参数,所述第二拍摄参数包括所述目标拍摄帧数和目标曝光度;The apparatus according to claim 9, wherein said first photographing parameter comprises said current zoom factor and current ambient light parameter, said second photographing parameter comprising said target photographing frame number and target exposure degree ;
    所述拍摄模块,还用于:The shooting module is further configured to:
    若摄像头当前的变焦倍数大于所述预设阈值,则根据预先存储的所述第一拍摄参数与所述第二拍摄参数的对应关系,确定当前的环境光参数和所述当前的变焦倍数对应的所述目标曝光度和所述目标拍摄帧数;Determining, according to a pre-stored correspondence between the first shooting parameter and the second shooting parameter, a current ambient light parameter corresponding to the current zoom factor, if the current zoom factor of the camera is greater than the preset threshold The target exposure degree and the number of target shooting frames;
    基于所述目标曝光度,连续拍摄所述目标拍摄帧数的图片。A picture of the number of target shooting frames is continuously captured based on the target exposure.
  12. 根据权利要求10所述的装置,其特征在于,所述第一拍摄参数还包括当前的终端移动速度,所述拍摄模块,还用于:The device according to claim 10, wherein the first shooting parameter further comprises a current terminal moving speed, and the shooting module is further configured to:
    若摄像头当前的变焦倍数大于所述预设阈值,则将所述当前的环境光参数、所述当前的变焦倍数和所述当前的终端移动速度,输入预先训练的拍摄参数确定模型,得到所述目标曝光度和所述目标拍摄帧数。If the current zoom factor of the camera is greater than the preset threshold, input the current ambient light parameter, the current zoom factor, and the current terminal moving speed into a pre-trained shooting parameter determination model to obtain the Target exposure and the number of target shot frames.
  13. 根据权利要求9至12任一所述的装置,其特征在于,所述处理模块,用于:The device according to any one of claims 9 to 12, wherein the processing module is configured to:
    确定所述目标拍摄帧数的图片中的中心图片和其余图片,所述中心图片是所述目标拍摄帧数的图片中清晰度最高的图片,所述其余图片的是除所述中心图片外清晰度高于清晰度阈值的图片;Determining a center picture and a remaining picture in the picture of the target number of shot frames, wherein the center picture is the highest-definition picture in the picture of the target number of shot frames, and the remaining pictures are clear except the center picture a picture that is above the sharpness threshold;
    对所述中心图片和所述其余图片进行分割;Segmenting the center picture and the remaining pictures;
    若所述其余图片中目标图片部分的清晰度高于所述中心图片中目标图片部分的清晰度,则根据其余图片中的目标图片部分对所述中心图片的目标图片部分进行处理;If the resolution of the target picture part in the remaining picture is higher than the definition of the target picture part in the central picture, the target picture part of the central picture is processed according to the target picture part in the remaining pictures;
    将处理后的所述中心图片确定为所述目标图片。The processed center picture is determined as the target picture.
  14. 根据权利要求8至12任一所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 8 to 12, wherein the device further comprises:
    显示模块,用于显示所述目标图片,并显示撤销防抖选项;a display module, configured to display the target image, and display an undo anti-shake option;
    替换模块,用于当检测到对所述撤销防抖选项的点击指令时,使用所述多帧图片中的首帧图片,替换所述目标图片。And a replacement module, configured to replace the target picture by using a first frame picture in the multi-frame picture when a click instruction to the undo anti-shake option is detected.
  15. 一种终端,其特征在于,所述终端包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、 所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如下方法:A terminal, comprising: a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or a command set, the at least one instruction, the at least one program, and the The code set or instruction set is loaded and executed by the processor to implement the following method:
    接收拍照指令;Receiving a photographing instruction;
    若摄像头当前的变焦倍数大于预设阈值,则根据所述拍照指令连续拍摄多帧图片;If the current zoom magnification of the camera is greater than a preset threshold, continuously capturing a plurality of frames according to the photographing instruction;
    对所述多帧图片进行防抖合成处理,得到目标图片。Performing anti-shake synthesis processing on the multi-frame picture to obtain a target picture.
  16. 根据权利要求15所述的终端,其特征在于,所述处理器,用于:The terminal according to claim 15, wherein the processor is configured to:
    若摄像头当前的变焦倍数大于所述预设阈值,则根据第一拍摄参数确定第二拍摄参数,所述第一拍摄参数中包含所述当前的变焦倍数,所述第二拍摄参数中包含目标拍摄帧数,所述目标拍摄帧数是所述多帧图片的帧数;If the current zoom factor of the camera is greater than the preset threshold, determining a second shooting parameter according to the first shooting parameter, where the first shooting parameter includes the current zoom factor, and the second shooting parameter includes a target shooting The number of frames, the number of target shooting frames is the number of frames of the multi-frame picture;
    根据所述第二拍摄参数连续拍摄所述多帧图片;And continuously capturing the multi-frame picture according to the second shooting parameter;
    对所述目标拍摄帧数的图片进行防抖合成处理,得到所述目标图片。Performing anti-shake synthesis processing on the picture of the target number of shot frames to obtain the target picture.
  17. 根据权利要求16所述的终端,其特征在于,所述第一拍摄参数包括所述当前的变焦倍数和当前的环境光参数,所述第二拍摄参数包括所述目标拍摄帧数和目标曝光度;The terminal according to claim 16, wherein the first shooting parameter comprises the current zoom factor and a current ambient light parameter, and the second shooting parameter comprises the target shooting frame number and a target exposure degree. ;
    所述处理器,还用于:The processor is further configured to:
    若摄像头当前的变焦倍数大于所述预设阈值,则将所述当前的环境光参数和所述当前的变焦倍数,输入预先训练的拍摄参数确定模型,得到所述目标曝光度和所述目标拍摄帧数;If the current zoom factor of the camera is greater than the preset threshold, input the current ambient light parameter and the current zoom factor into a pre-trained shooting parameter determination model to obtain the target exposure and the target shooting Number of frames;
    基于所述目标曝光度,连续拍摄所述目标拍摄帧数的图片。A picture of the number of target shooting frames is continuously captured based on the target exposure.
  18. 根据权利要求16所述的终端,其特征在于,所述第一拍摄参数包括所述当前的变焦倍数和当前的环境光参数,所述第二拍摄参数包括所述目标拍摄帧数和目标曝光度;The terminal according to claim 16, wherein the first shooting parameter comprises the current zoom factor and a current ambient light parameter, and the second shooting parameter comprises the target shooting frame number and a target exposure degree. ;
    所述处理器,还用于:The processor is further configured to:
    若摄像头当前的变焦倍数大于所述预设阈值,则根据预先存储的所述第一拍摄参数与所述第二拍摄参数的对应关系,确定所述目标曝光度和所述目标拍摄帧数;Determining the target exposure degree and the target shooting frame number according to a correspondence relationship between the first shooting parameter and the second shooting parameter stored in advance, if a current zoom ratio of the camera is greater than the preset threshold;
    基于所述目标曝光度,连续拍摄所述目标拍摄帧数的图片。A picture of the number of target shooting frames is continuously captured based on the target exposure.
  19. 根据权利要求16所述的终端,其特征在于,所述第一拍摄参数还包括当前的终端移动速度;The terminal according to claim 16, wherein the first shooting parameter further comprises a current terminal moving speed;
    所述处理器,还用于:The processor is further configured to:
    若摄像头当前的变焦倍数大于所述预设阈值,则将所述当前的环境光参数、所述当前的变焦倍数和所述当前的终端移动速度,输入预先训练的拍摄参数确定模型,得到所述目标曝光度和所述目标拍摄帧数。If the current zoom factor of the camera is greater than the preset threshold, input the current ambient light parameter, the current zoom factor, and the current terminal moving speed into a pre-trained shooting parameter determination model to obtain the Target exposure and the number of target shot frames.
  20. 根据权利要求16至19任一所述的终端,其特征在于,所述处理器, 还用于:The terminal according to any one of claims 16 to 19, wherein the processor is further configured to:
    确定所述目标拍摄帧数的图片中的中心图片和其余图片,所述中心图片是所述目标拍摄帧数的图片中清晰度最高的图片,所述其余图片的是除所述中心图片外清晰度高于清晰度阈值的图片;Determining a center picture and a remaining picture in the picture of the target number of shot frames, wherein the center picture is the highest-definition picture in the picture of the target number of shot frames, and the remaining pictures are clear except the center picture a picture that is above the sharpness threshold;
    对所述中心图片和所述其余图片进行分割;Segmenting the center picture and the remaining pictures;
    若所述其余图片中目标图片部分的清晰度高于所述中心图片中目标图片部分的清晰度,则根据其余图片中的目标图片部分对所述中心图片的目标图片部分进行处理;If the resolution of the target picture part in the remaining picture is higher than the definition of the target picture part in the central picture, the target picture part of the central picture is processed according to the target picture part in the remaining pictures;
    将处理后的所述中心图片确定为所述目标图片。The processed center picture is determined as the target picture.
  21. 根据权利要求15至19任一所述的终端,其特征在于,所述处理器,还用于:The terminal according to any one of claims 15 to 19, wherein the processor is further configured to:
    通过显示屏显示所述目标图片,并显示撤销防抖选项;Displaying the target image through the display screen and displaying the undo anti-shake option;
    当检测到对所述撤销防抖选项的点击指令时,使用所述多帧图片中的首帧图片,替换所述目标图片。When a click command to the undo anti-shake option is detected, the target picture is replaced with a first frame picture in the multi-frame picture.
  22. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集被处理器加载并执行时实现如权利要求1至7任一所述的拍照处理的方法。A computer readable storage medium, wherein the storage medium stores at least one instruction, at least one program, a code set or a set of instructions, the at least one instruction, the at least one program, the code set or A method of photographing processing according to any one of claims 1 to 7 when the instruction set is loaded and executed by a processor.
PCT/CN2018/115226 2017-11-13 2018-11-13 Photographing processing method and device, terminal, and storage medium WO2019091486A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711116497.3 2017-11-13
CN201711116497.3A CN107770451A (en) 2017-11-13 2017-11-13 Take pictures method, apparatus, terminal and the storage medium of processing

Publications (1)

Publication Number Publication Date
WO2019091486A1 true WO2019091486A1 (en) 2019-05-16

Family

ID=61272800

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/115226 WO2019091486A1 (en) 2017-11-13 2018-11-13 Photographing processing method and device, terminal, and storage medium

Country Status (2)

Country Link
CN (1) CN107770451A (en)
WO (1) WO2019091486A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111369585A (en) * 2020-02-28 2020-07-03 上海顺久电子科技有限公司 Image processing method and device
EP3890306A1 (en) * 2020-03-30 2021-10-06 Beijing Xiaomi Mobile Software Co., Ltd. Photographing method and device, mobile terminal and storage medium

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770451A (en) * 2017-11-13 2018-03-06 广东欧珀移动通信有限公司 Take pictures method, apparatus, terminal and the storage medium of processing
CN109005355B (en) * 2018-09-28 2020-10-09 维沃移动通信有限公司 Shooting method and mobile terminal
CN109246364B (en) * 2018-10-26 2021-10-01 华为技术有限公司 Camera device adjusting method and related equipment
CN109510941B (en) * 2018-12-11 2021-08-03 努比亚技术有限公司 Shooting processing method and device and computer readable storage medium
CN110602411A (en) * 2019-08-07 2019-12-20 深圳市华付信息技术有限公司 Method for improving quality of face image in backlight environment
CN110536057B (en) * 2019-08-30 2021-06-08 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and computer readable storage medium
CN112804463A (en) * 2019-10-28 2021-05-14 中兴通讯股份有限公司 Exposure time control method, device, terminal and readable storage medium
CN110944114B (en) * 2019-11-28 2021-06-08 维沃移动通信有限公司 Photographing method and electronic equipment
CN112333381B (en) * 2020-03-20 2022-04-29 华为技术有限公司 Control method, voice coil motor, lens module and electronic equipment
CN113099122A (en) * 2021-03-31 2021-07-09 维沃移动通信有限公司 Shooting method, shooting device, shooting equipment and storage medium
CN114745502A (en) * 2022-03-30 2022-07-12 联想(北京)有限公司 Shooting method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095984A (en) * 2011-11-02 2013-05-08 卡西欧计算机株式会社 Electronic camera and imaging control method
CN104243809A (en) * 2013-06-20 2014-12-24 卡西欧计算机株式会社 Imaging apparatus and imaging method for imaging target subject and storage medium
US20160037067A1 (en) * 2014-08-01 2016-02-04 Samsung Electronics Co., Ltd. Method for generating image and electronic device thereof
CN105765965A (en) * 2014-11-05 2016-07-13 奥林巴斯株式会社 Image pickup device and image pickup device control method
CN107770451A (en) * 2017-11-13 2018-03-06 广东欧珀移动通信有限公司 Take pictures method, apparatus, terminal and the storage medium of processing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095984A (en) * 2011-11-02 2013-05-08 卡西欧计算机株式会社 Electronic camera and imaging control method
CN104243809A (en) * 2013-06-20 2014-12-24 卡西欧计算机株式会社 Imaging apparatus and imaging method for imaging target subject and storage medium
US20160037067A1 (en) * 2014-08-01 2016-02-04 Samsung Electronics Co., Ltd. Method for generating image and electronic device thereof
CN105765965A (en) * 2014-11-05 2016-07-13 奥林巴斯株式会社 Image pickup device and image pickup device control method
CN107770451A (en) * 2017-11-13 2018-03-06 广东欧珀移动通信有限公司 Take pictures method, apparatus, terminal and the storage medium of processing

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111369585A (en) * 2020-02-28 2020-07-03 上海顺久电子科技有限公司 Image processing method and device
CN111369585B (en) * 2020-02-28 2023-09-29 上海顺久电子科技有限公司 Image processing method and device
EP3890306A1 (en) * 2020-03-30 2021-10-06 Beijing Xiaomi Mobile Software Co., Ltd. Photographing method and device, mobile terminal and storage medium
US11490006B2 (en) 2020-03-30 2022-11-01 Beijing Xiaomi Mobile Software Co., Ltd. Photographing method and device, mobile terminal and storage medium

Also Published As

Publication number Publication date
CN107770451A (en) 2018-03-06

Similar Documents

Publication Publication Date Title
WO2019091486A1 (en) Photographing processing method and device, terminal, and storage medium
CN108513070B (en) Image processing method, mobile terminal and computer readable storage medium
CN107124555B (en) Method and device for controlling focusing, computer equipment and computer readable storage medium
WO2019129020A1 (en) Automatic focusing method of camera, storage device and mobile terminal
CN109688322B (en) Method and device for generating high dynamic range image and mobile terminal
WO2018228241A1 (en) Image selection method and related product
WO2016019926A1 (en) Photo shooting method, device, and mobile terminal
CN107241552B (en) Image acquisition method, device, storage medium and terminal
WO2018219275A1 (en) Focusing method and device, computer-readable storage medium, and mobile terminal
WO2018219267A1 (en) Exposure method and device, computer-readable storage medium, and mobile terminal
CN109462745B (en) White balance processing method and mobile terminal
WO2017124899A1 (en) Information processing method, apparatus and electronic device
CN109471579B (en) Terminal screen information layout adjustment method and device, mobile terminal and storage medium
CN110913139A (en) Photographing method and electronic equipment
CN109348137B (en) Mobile terminal photographing control method and device, mobile terminal and storage medium
WO2019029379A1 (en) Interaction object control method and device, terminal and computer-readable storage medium
JP6862564B2 (en) Methods, devices and non-volatile computer-readable media for image composition
CN111031248A (en) Shooting method and electronic equipment
CN112188082A (en) High dynamic range image shooting method, shooting device, terminal and storage medium
KR20220093246A (en) Filming method and electronic device
CN105635553B (en) Image shooting method and device
CN109167917B (en) Image processing method and terminal equipment
WO2022033272A1 (en) Image processing method and electronic device
WO2019137535A1 (en) Object distance measurement method and terminal device
CN107798662B (en) Image processing method and mobile terminal

Legal Events

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

Ref document number: 18876504

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18876504

Country of ref document: EP

Kind code of ref document: A1