WO2022062318A1 - Procédé et dispositif de photographie - Google Patents

Procédé et dispositif de photographie Download PDF

Info

Publication number
WO2022062318A1
WO2022062318A1 PCT/CN2021/078543 CN2021078543W WO2022062318A1 WO 2022062318 A1 WO2022062318 A1 WO 2022062318A1 CN 2021078543 W CN2021078543 W CN 2021078543W WO 2022062318 A1 WO2022062318 A1 WO 2022062318A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
focal length
target subject
size
length value
Prior art date
Application number
PCT/CN2021/078543
Other languages
English (en)
Chinese (zh)
Inventor
肖斌
朱聪超
胡斌
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022062318A1 publication Critical patent/WO2022062318A1/fr

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2628Alteration of picture size, shape, position or orientation, e.g. zooming, rotation, rolling, perspective, translation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording

Definitions

  • the embodiments of the present application relate to the field of electronic technologies, and in particular, to a photographing method and device.
  • Hitchcock zoom also known as push zoom or dolly zoom
  • push zoom or dolly zoom is a special video shooting technique that can make the target subject appear the same size on the image during the video recording process, while the background appears far away.
  • the visual effect close to the target subject brings the visual impact of the background space compression/expansion to the user, so as to obtain a special video effect.
  • the embodiments of the present application provide a shooting method and device.
  • the electronic device can automatically adjust the focal length of the camera according to the imaging size of the target subject, Therefore, the imaging size of the target subject on the video image remains basically unchanged, without the need for additional auxiliary equipment such as slide rails and manual zooming by the user, which facilitates user operation, reduces the difficulty of user operation, and improves user shooting experience.
  • an embodiment of the present application provides a shooting method, which can be applied to an electronic device, where the electronic device includes a zoom camera.
  • the method includes: the electronic device displays a first recorded image on a shooting interface, the first recorded image includes a target subject image, the first recorded image is obtained according to the first original image, and the first original image adopts a first focal length through a zoom camera The value shot is obtained.
  • the electronic device determines a second focal length value corresponding to the second original image to be collected according to the first size of the target subject image on the first original image.
  • the electronic device displays a second recorded image on the shooting interface, the second recorded image includes the target subject image, and the second recorded image is obtained according to the second original image obtained by shooting the zoom camera with the second focal length value.
  • the electronic device can determine the focal length value used by the zoom camera to collect subsequent original images according to the size of the target subject image on the current original image, so that the size of the target subject image on different original images remains basically unchanged, so that according to the The size of the target subject image on different video images obtained from the original image basically remains unchanged, realizing Hitchcock zoom.
  • the electronic device when the user holds the electronic device away from/close to the target subject, the electronic device can automatically adjust the focal length value of the zoom camera according to the imaging size of the target subject, so that the size of the target subject on the video image is basically kept. It does not require additional auxiliary equipment such as slide rails and user manual zoom, which can facilitate users to shoot Hitchcock zoom video, reduce the difficulty of user operation, and improve user shooting experience.
  • the electronic device realizes the Hitchcock zoom through optical zooming instead of the digital zoom used for cropping and zooming to realize the Hitchcock zoom, so the resolution of the recorded image and the video image obtained by the electronic device during the shooting process The rate and definition are high, and the user shooting experience is better.
  • the method further includes: the electronic device The bifocal length value is updated to the target focal length value, the target focal length value is obtained according to the focal length value corresponding to the historical original image, and the second original image is captured by the zoom camera using the updated second focal length value.
  • the electronic device may update the second focal length value in combination with the focal length value corresponding to the historical original image, so as to perform focal length smoothing.
  • the electronic device acquires the second original image according to the updated second focal length value.
  • the difference between the target focal length value and the first focal length value corresponding to the first original image is less than or equal to the first preset value, and the difference between the target focal length value and the second focal length value The value is less than or equal to the second preset value.
  • the change of the focal length value after smoothing according to the target focal length value corresponding to different original images during the shooting process is relatively smooth, and the focal length value does not change back and forth between increasing or decreasing during the shooting process.
  • the size change of the target subject image on the original image, the recorded image and the video image obtained according to the smooth focal length value is also relatively smooth, and the size of the target subject image is basically unchanged, so that the screen of the recorded image in the whole shooting process transitions smoothly. There are no jumps and freezes, thereby improving user experience and shooting effects.
  • the imaging size of the background object can be prevented from being frequently reduced or increased, and the background space can be prevented from frequently changing between compression and expansion, so that a better shooting experience can be provided to the user.
  • the target focal length value is an average value of focal length values corresponding to multiple frames of historical original images.
  • the change of the focal length value updated according to the target focal length value is relatively smooth, and the size change of the target subject image on the original image, recorded image and video image obtained according to the smoothed focal length value is also relatively Smooth and basically unchanged in size.
  • the target focal length value is obtained by performing curve fitting on the focal length values corresponding to the multi-frame historical original images.
  • the change of the focal length value updated according to the target focal length value is relatively smooth, and the change of the size of the target subject image on the original image, recorded image and video image obtained according to the smoothed focal length value is also It is relatively smooth and the size is basically unchanged.
  • the second position coordinates of the target subject image on the second recorded image are obtained according to the initial position coordinates of the target subject image on the second original image and the position coordinates of the target subject image on the historical recorded images .
  • the electronic device may update the position of the target subject image on the second original image in combination with the position of the target subject image on the historically recorded image, so as to perform position smoothing.
  • the electronic device generates a second recorded image according to the second original image adjusted by the position of the target subject image.
  • the difference between the second position coordinates and the first position coordinates of the target subject image on the first recorded image is less than or equal to a third preset value, and the second position coordinates and the initial position The difference between the coordinates is less than or equal to the fourth preset value.
  • the positional change of the target subject image after the position adjustment corresponding to the different recorded images during the shooting process is relatively smooth, and the position change of the target subject image on the video image is also relatively smooth, so as to avoid sudden changes in the position of the target subject image and affect the user's Visual experience and shooting effects.
  • the second position coordinate is an average value of the position coordinates of the target subject image on the multiple frames of historically recorded images.
  • the positional change of the target subject image after the position adjustment corresponding to the different recorded images during the shooting process is relatively smooth, and the position change of the target subject image on the video image is also relatively smooth, so as to avoid sudden changes in the position of the target subject image and affect the user's Visual experience and shooting effects.
  • the second position coordinates are obtained by curve fitting the position coordinates of the target subject image on the multi-frame historical recorded images.
  • the positional change of the target subject image after the position adjustment corresponding to the different recorded images during the shooting process is relatively smooth, and the position change of the target subject image on the video image is also relatively smooth, so as to avoid sudden changes in the position of the target subject image and affect the user's Visual experience and shooting effects.
  • the method further includes: in the preview state of the target shooting mode, the electronic device detects a first preset operation in which the user indicates the target subject based on the preview image; determining the target in response to the first preset operation main body.
  • the user can specify the target principal.
  • the target subject is a character.
  • the electronic device determines the second focal length value corresponding to the second original image to be collected according to the first size of the target subject image on the first original image, including: The first size of the target subject image and the size reference value determine the second focal length value corresponding to the second original image to be collected.
  • the electronic device can determine the focal length value used by the zoom camera to collect subsequent original images according to the size of the target subject image on the current original image and the size reference value, so that the size of the target subject image on different original images remains basically unchanged, so that the The size of the target subject image on different video images remains basically unchanged, realizing Hitchcock zoom.
  • the electronic device determines the second focal length value corresponding to the second original image to be collected according to the first size of the target subject image on the first original image, including: For the first size, the first focal length value and the size reference value of the target subject image, formula 1 is used to determine the second focal length value corresponding to the second original image to be collected.
  • the second dimension is equal to the dimension reference value;
  • S3 represents a size reference value
  • S2 represents a first size
  • f1 represents a first focal length value
  • f2 represents a second focal length value
  • the electronic device can adjust the focal length value corresponding to the acquired subsequent original image according to the size of the target subject image on the current original image, the size reference value and the focal length value, and the zoom camera can collect the target subject on the subsequent original image according to the adjusted focal length value.
  • the size of the image is the same as the size reference value, so that the size of the target subject image on different subsequent original images can be basically consistent with the size reference value, so that the size of the target subject image on the adjacent original images is basically unchanged, so that adjacent video images
  • the size of the upper target subject image remains basically unchanged, enabling Hitchcock zoom.
  • the method further includes: prompting the user to set a size reference value on the preview interface by the electronic device. So, the user can set the size reference value of the target body according to the prompt.
  • the size of the target subject image on the preview image changes as the electronic device moves forward or backward
  • the size reference value is the size of the target subject image on the preview image
  • the user can hold the electronic device and move forward or backward to change the size of the target subject image on the preview image, thereby setting or adjusting the size of the size reference value.
  • the size of the target subject image on the preview image changes in response to the user's operation of adjusting the zoom magnification
  • the size reference value is the size of the target subject image on the preview image
  • the user can adjust the zoom ratio of the preview image to change the size of the target subject image on the preview image, thereby setting or adjusting the size of the size reference value.
  • the first focal length value is the focal length value corresponding to the first frame of the original image collected by the electronic device after recording starts
  • the first focal length value is a preset focal length value or a focal length set by the user value.
  • an embodiment of the present application provides a photographing apparatus, and the apparatus is included in an electronic device.
  • the device has the function of implementing the behavior of the electronic device in any of the above aspects and possible designs, so that the electronic device executes the photographing method performed by the electronic device in any of the possible designs in the above-mentioned aspects.
  • This function can be implemented by hardware or by executing corresponding software by hardware.
  • the hardware or software includes at least one module or unit corresponding to the above-mentioned functions.
  • the apparatus may include a display unit, a determination unit, a processing unit, and the like.
  • an embodiment of the present application provides an electronic device, including: a zoom camera for capturing images; a screen for displaying an interface, one or more processors; and a memory, where codes are stored.
  • the code is executed by the electronic device, the electronic device is caused to execute the photographing method executed by the electronic device in any possible design of the above aspect.
  • an embodiment of the present application provides an electronic device, including: one or more processors; and a memory, where codes are stored in the memory.
  • the electronic device is caused to execute the photographing method executed by the electronic device in any possible design of the above aspect.
  • an embodiment of the present application provides a computer-readable storage medium, including computer instructions, when the computer instructions are executed on an electronic device, the electronic device can execute the photographing method in any possible design of the foregoing aspect.
  • an embodiment of the present application provides a computer program product, which, when the computer program product runs on a computer, enables the computer to execute the photographing method performed by the electronic device in any of the possible designs in the above aspect.
  • an embodiment of the present application provides a chip system, and the chip system is applied to an electronic device.
  • the chip system includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected by lines; the interface circuit is used for receiving signals from the memory of the electronic device and sending signals to the processor, and the signals are included in the memory Stored computer instructions; when the processor executes the computer instructions, the electronic device is made to execute the photographing method in any possible design of the above aspect.
  • FIG. 1A is a schematic diagram of imaging provided by an embodiment of the present application.
  • FIG. 1B is another imaging schematic diagram provided by an embodiment of the present application.
  • 1C is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 2 is a flowchart of a shooting method provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a group of interfaces provided by the embodiment of the present application.
  • FIG. 4 is another set of interface schematic diagrams provided by the embodiment of the present application.
  • FIG. 5 is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIG. 6 is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIG. 7 is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIG. 8 is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIG. 9 is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIG. 10 is another set of interface schematic diagrams provided by the embodiment of the present application.
  • FIG. 11 is another set of interface schematic diagrams provided by this embodiment of the present application.
  • FIG. 12 is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIG. 13 is another set of interface schematic diagrams provided by this embodiment of the present application.
  • FIG. 14 is another set of interface schematic diagrams provided by an embodiment of the present application.
  • 15A is a schematic diagram of a comparison of a group of original images and recorded images provided by an embodiment of the present application.
  • FIG. 15B is another imaging schematic diagram provided by the embodiment of the present application.
  • 15C is a schematic diagram of a set of Bezier curve fitting provided by an embodiment of the present application.
  • 16 is a schematic diagram of a group of video images provided by an embodiment of the present application.
  • FIG. 17 is a flowchart of another shooting method provided by an embodiment of the present application.
  • FIG. 18 is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIG. 19 is another set of interface schematic diagrams provided by this embodiment of the application.
  • FIG. 21 is another set of interface schematic diagrams provided by this embodiment of the present application.
  • 22A is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIG. 22B is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIG. 23 is another set of interface schematic diagrams provided by this embodiment of the present application.
  • FIG. 24 is a flowchart of another shooting method provided by an embodiment of the present application.
  • first and second are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features.
  • a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
  • plural means two or more.
  • the embodiment of the present application provides a shooting method, which can be applied to an electronic device.
  • the electronic device can automatically record the image size of the target subject according to the image size of the target subject.
  • Adjust the focal length of the camera that is, perform optical zoom
  • Hitchcock zoom so that the size of the target subject in the video image is basically unchanged, giving the user a visual experience of background objects moving away from/close to the target subject and background space compression/expansion .
  • the target subject is the object to be photographed that the user pays attention to or is interested in, and the background object is other objects within the shooting range except the target subject.
  • the shooting methods provided by the embodiments of the present application do not require additional auxiliary equipment such as slide rails and manual zooming by the user, which can facilitate the user to shoot Hitchcock zoom video, reduce the difficulty and complexity of the user's operation, and improve the user's shooting experience.
  • the focal length of the camera changes or the distance between the user (ie, the shooting user) and the object to be shot changes, which can change the size of the object on the image captured by the electronic device.
  • the focal length of the camera should also change at the same time.
  • S1 represents the actual size of the target subject, which is a fixed value
  • S2 represents the imaging size of the target subject, that is, the size of the image of the target subject on the captured image
  • d1 represents the distance between the user and the target subject , d1 is approximately equal to the distance between the camera and the target body, that is, d1 can also be used to represent the object distance between the target body and the camera
  • f represents the focal length of the camera.
  • S1 is a fixed value.
  • the focal length f should also increase; The focal length f should also decrease as d1 decreases close to the target subject.
  • the above formula 1 can be simplified to formula 2.
  • the electronic device can increase the focal length f of the camera; when the user When moving forward, the distance d1 between the user and the target subject decreases.
  • the electronic device can reduce the focal length f of the camera.
  • Equation 3 L represents the size of the photosensitive sensor of the camera, which is a fixed value; if the focal length f of the camera is larger, the field of view FOV is smaller, and the scene range of the captured image is smaller; if the focal length f of the camera is smaller, the The larger the field of view FOV, the smaller the scene range of the captured image.
  • the electronic device can increase the focal length f of the camera, and the camera The field of view is reduced, the scene range of the captured image is reduced, and the background objects on the captured image are reduced.
  • the electronic device can reduce the focal length f of the camera and increase the field of view of the camera to capture the image. The scope of the scene increases, and the background objects on the captured image increase.
  • the imaging size of the background object (ie the size of the background object image on the captured image) is also different.
  • S3 represents the actual size of the background object 1 , which is a fixed value
  • d2 represents the depth difference between the target subject and the background object, which is a fixed value
  • S4 represents the imaging size of the background object 1 .
  • Equation 4 and Equation 5 to keep S2/S1 unchanged, when the distance d1 between the user and the target subject is larger, the focal length f of the camera increases, and the background object image on the captured image is also larger.
  • S5 represents the vertical distance between the center point of the background object 1 and the optical axis, which is a fixed value; d2 is also a fixed value.
  • the distance between the imaging center point of the background object 1 and the optical center is also larger, that is, The imaging center point of the background object 1 is farther and farther away from the image center, giving the user a visual experience of expanding the background space outward; when the distance d1 between the user and the target subject is smaller, the imaging center point of the background object 1 and the optical center The smaller the distance is, that is, the imaging center point of the background object 1 is getting closer and closer to the image center, giving the user a visual experience of inwardly compressing the background space.
  • the variation of the imaging size and imaging position of the background object at different depths is also different.
  • the larger d2 is, the smaller S4 and S6 are, that is, the variation of the imaging size and imaging position of the background object 2 with a larger depth value is smaller than the depth Changes in the imaging size and imaging position of the background object 1 with a small value. That is to say, the closer the background object is to the photographer, the faster the change rate of the imaging size and imaging position of the background object.
  • the electronic device can increase the focal length f of the camera, and the camera
  • the angle of view of the captured image decreases, the range of the scene on the captured image decreases, the background object on the captured image decreases, the image of the background object on the captured image increases, and the imaging center point of the background object image is farther and farther away from the center of the image.
  • the visual experience of the user expanding outward with the background space compared with the background object with a smaller depth, the imaging size of a background object with a larger depth increases more and faster, and the larger the imaging position is away from the center of the image, the faster the imaging speed.
  • the electronic device can reduce the focal length f of the camera and increase the field of view of the camera to capture the image.
  • the range of the scene on the screen increases, the background objects on the captured image increase, the background object image on the captured image decreases, and the imaging center point of the background object image is getting closer and closer to the center of the image, giving the user a visual sense of inward compression of the background space. experience.
  • the imaging size of a background object with a larger depth decreases more and faster, and the larger the imaging position is closer to the center of the image, the faster the imaging speed is.
  • the above d2 can be a positive value, that is to say, the background object can be located behind the target subject, and the distance between the background object and the user is greater than the distance between the target subject and the user; the above d2 can also be a negative value, That is to say, the background object may be located in front of the target subject, and the distance between the background object and the user is smaller than the distance between the target subject and the user.
  • the change trend of the image of the background object in front of the target subject is consistent with the change trend of the image of the background object behind the target subject, but the speed of change is different, and the closer the background object is to the user, the more the image changes. The speed is also faster.
  • the electronic device involved in the embodiments of the present application may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR)/virtual reality (VR) device, a notebook computer, and a super mobile personal computer
  • Mobile terminals such as (ultra-mobile personal computer, UMPC), netbook, personal digital assistant (personal digital assistant, PDA), etc., can also be equipment such as professional cameras, and the specific types of electronic equipment are not limited in the embodiments of the present application.
  • FIG. 1C shows a schematic structural diagram of the electronic device 100 .
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • graphics processor graphics processor
  • image signal processor image signal processor
  • ISP image signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • the camera 193 may include cameras with multiple focal lengths, and cameras with different focal lengths have different equivalent focal lengths.
  • the equivalent focal length of a common main camera can be about 20mm
  • the equivalent focal length of a wide-angle camera can be about 15mm
  • the equivalent focal length of a telephoto camera can be about 100mm.
  • a camera with a smaller equivalent focal length is suitable for shooting a wider picture
  • a camera with a larger equivalent focal length is suitable for shooting details of distant objects.
  • the camera 193 includes a zoom camera.
  • the zoom camera can adjust the focal length within a certain range, so that the object has different imaging sizes on the image, and the field of view and scene range of different widths are obtained.
  • the equivalent focal length of a zoom camera can vary from 10-100mm.
  • the zoom camera can be used to automatically adjust the focus according to the size of the target body on the image while the user holds the electronic device 100 away from/close to the target body.
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG Moving Picture Experts Group
  • MPEG2 moving picture experts group
  • MPEG3 MPEG4
  • MPEG4 Moving Picture Experts Group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, for example, video instance segmentation, image recognition, face recognition, speech recognition, text understanding, and the like.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 .
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the processor 110 runs the internal memory 121 by running the The stored instruction can realize that the zoom camera is controlled to automatically adjust the focus according to the imaging size of the target subject, so that the size of the target subject in the video image is basically unchanged.
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, voice commands, etc.
  • the gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 .
  • the angular velocity of electronic device 100 about three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse motion to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the touch screen when recording a video, can be used for interface display; in the process of the user moving away from/close to the target subject, the processor 110 such as the NPU can perform video instance segmentation on the target subject, so as to determine the real-time image on the image
  • the processor 110 such as the NPU can perform video instance segmentation on the target subject, so as to determine the real-time image on the image
  • the size of the target body; the size of the target body on the image changes as the user moves away from/close to the target body, which can be achieved by the processor 110 by running the instructions stored in the internal memory 121 to control the zoom camera to automatically adjust the focus according to the imaging size of the target body, Therefore, the size of the target subject in the video image is basically unchanged, giving the user a visual experience that the background object is far away/close to the target subject, and the background space is expanded/compressed, thereby realizing Hitchcock zoom.
  • the electronic device having a zoom camera as a mobile phone as an example. It can be understood that the electronic device may also be other devices such as a tablet computer with a zoom camera or a watch, and the specific type of the electronic device is not limited in this embodiment of the present application.
  • a shooting method provided by an embodiment of the present application may include:
  • the mobile phone activates the Hitchcock shooting function, and displays a preview image.
  • the shooting mode used for recording the Hitchcock zoom video may also have other names, which are not limited in this embodiment of the present application.
  • the phone can launch the camera app, or launch other apps with photo or video functions (such as AR apps such as Douyin or Hetu Cyberverse) to activate the phone's shooting function and enter Hitchcock mode.
  • apps with photo or video functions such as AR apps such as Douyin or Hetu Cyberverse
  • the mobile phone After the mobile phone detects that the user clicks the camera icon 301 shown in (a) in FIG. 3 , the mobile phone starts the shooting function and enters the photographing mode shown in (b) in FIG. 3 .
  • the mobile phone detects that the user clicks the control 302 shown in (b) in FIG. 3 , it enters the Hitchcock mode, and displays the preview interface shown in (c) in FIG. 3 in the preview state.
  • the mobile phone detects that the user clicks on the control 303 shown in (b) in FIG. 3 the interface as shown in (d) in FIG. 3 is displayed; after the mobile phone detects the operation that the user clicks the control 304 , enter the Hitchcock mode, and display the preview interface as shown in (c) in Figure 3 in the preview state.
  • the mobile phone After the mobile phone detects that the user draws the track of "xq" on the touch screen in the off-screen mode, the mobile phone starts the shooting function and enters the Hitchcock mode, and the display in the preview state is as shown in (c) in Figure 3. preview interface.
  • the mobile phone After detecting the user's voice command to enter the Hitchcock mode, the mobile phone starts the shooting function and enters the Hitchcock mode, and displays the preview interface as shown in (c) of FIG. 3 in the preview state.
  • the mobile phone can also enter the Hitchcock mode in response to other user touch operations, voice commands, or shortcut gestures, etc.
  • the embodiment of the present application does not limit the operation of triggering the mobile phone to enter the Hitchcock mode.
  • the zoom camera can use the focal length value of 1 to capture images. value.
  • a setting interface as shown in (b) in FIG. 4 can be displayed, and the user can set the zoom camera based on the setting page.
  • the initial focal length value is the focal length value of 1.
  • the preview interface of the mobile phone includes multiple optional focal length values, and the mobile phone determines the initial focal length value, that is, the focal length value according to the user’s selection. 1.
  • the mobile phone determines the target subject in the preview state of the Hitchcock mode.
  • the target subject can be determined, so that the imaging size of the target subject remains basically unchanged during the video recording process.
  • the target subject may be an object, and the position of the target subject may not move during the shooting process, or may move laterally at the same depth.
  • the target subject may also include multiple objects with the same depth, and the entirety of the multiple objects may be used as the target subject.
  • the images of the multiple objects are connected or partially overlapped.
  • the target subject may be automatically determined by the mobile phone or designated by the user, and the following two cases will be described respectively.
  • the mobile phone automatically determines the target subject, and the target subject may include one or more objects.
  • the target subject is a predetermined type of object.
  • the objects of the preset type are people, animals, famous buildings or landmarks, and the like.
  • the mobile phone determines an object of a preset type as the target subject based on the preview image.
  • the target subject is an object whose image on the preview image is located in the central area.
  • the target subject of interest to the user is usually facing the zoom camera, so the image of the target subject on the preview image is usually located in the center area.
  • the target subject is an object whose image on the preview image is close to the central area and whose area is greater than a preset threshold value of 1.
  • the target subject that the user is interested in usually faces the zoom camera and is close to the zoom camera, so that the image of the target subject on the preview image is close to the central area and the area is larger than the preset threshold 1.
  • the target subject is an object of a preset type near the central area of the image on the preview image.
  • the target subject is an object of a preset type whose area on the preview image is close to a central area and whose area is larger than a preset threshold.
  • the target subject is a preset type of object whose image on the preview image is close to the central area and has the smallest depth.
  • the target object is the object with the smallest depth among them.
  • the cell phone default target body includes only one object.
  • the target subject may be prompted to the user by displaying prompt information or voice broadcast.
  • the preset type is a person
  • the mobile phone determines that the target subject is a preset type of person 1 whose image on the preview image is close to the central area.
  • the mobile phone can select the character 1 through the box 501 to prompt the user that the character 1 is the target subject.
  • the preset type is a person
  • the mobile phone determines that the target subject is a person 2 and a person 3 of the preset type whose images on the preview image are close to the center area and have the same depth.
  • the mobile phone can frame the characters 2 and 3 through the circle 502 to prompt the user that the characters 2 and 3 are the target subjects.
  • the preset types include characters and animals
  • the mobile phone determines that the target subject is character 4 and animal 1 of preset types whose images on the preview image are close to the center area and have the same depth.
  • the mobile phone can prompt the user that the character 4 and the animal 1 are the target subjects by displaying prompt information.
  • the target subject can also be modified in response to the user's operation, such as switching, adding or deleting the target subject.
  • the target subject automatically determined by the mobile phone is person 1. After the mobile phone detects the operation of the user clicking on person 5 on the preview image, as shown in (b) of FIG. 6 As shown, the target subject is changed from character 1 to character 5.
  • the target subject automatically determined by the mobile phone is Person 1.
  • the mobile phone detects the operation of the user dragging the box to select Person 1 and Person 5 at the same time, as shown in FIG. 7 .
  • the target subject is modified from character 1 to character 1 and character 5.
  • the target subjects automatically determined by the mobile phone are person 1 and person 5. After the mobile phone detects the operation that the user can click on person 5, as shown in (b) of FIG. 8 . As shown, the target subject is modified from character 1 and character 5 to character 1.
  • the mobile phone first enters the target body modification mode according to the user's instruction, and then modifies the target body in response to the user's operation.
  • the user specifies a target subject, and the target subject includes one or more objects.
  • the target subject can be determined in response to the user's preset operation on the preview interface.
  • This preset operation is used to designate one or some objects as the target object.
  • the preset operation may be a touch operation, a voice command operation, a gesture operation, etc., which is not limited in the embodiment of the present application.
  • the touch operation may be a single click, a double click, a long press, a pressure press, or an operation of delineating an object, and the like.
  • the mobile phone determines the character 1 as the target subject as shown in (b) in FIG. 9 . .
  • the mobile phone may display prompt information: please specify the target subject, so that the image size of the target subject is basically unchanged during the shooting process. Then, the mobile phone determines the target subject in response to the user's preset operation on the preview interface. For example, after the mobile phone detects the user's operation to circle the person 1 shown in (a) in FIG. 10 , the mobile phone determines the corresponding person 1 as the target subject as shown in (b) in FIG. 10 . For another example, after the mobile phone detects the operation of the user's voice indicating that the person is the target subject, the mobile phone determines the person 1 as the target subject.
  • the mobile phone can display prompt information: a person is detected, whether to designate the person as the target. subject, so that the image size of the target subject remains basically unchanged during the shooting process? Then, in response to the user's operation of clicking the "Yes" control, the mobile phone determines that the character is the target subject as shown in (b) of FIG. 11 .
  • the mobile phone may prompt the user: please select only one object as the target body.
  • the mobile phone can also prompt the target subject to the user by displaying prompt information or voice broadcast. Moreover, the mobile phone can also modify the target subject in response to the user's operation, such as switching, adding or deleting the target subject. It will not be repeated here.
  • the mobile phone determines a size reference value of the target subject image.
  • the mobile phone can determine the size reference value of the target subject image, so that during the video shooting process, the mobile phone can automatically adjust based on the size reference value of the target subject image and the actual size of the target subject image focal length, so that the image size of the target subject during the shooting process is not much different from the size reference value, so that the image size of the target subject during the shooting process is basically unchanged.
  • the size reference value is used to describe the size value as the reference size of the target subject image, for example, the number of pixels included in the target subject image (or the area of the target subject image), or the number of pixels included in the target subject image It is represented by the ratio of the number of pixels in the entire image, etc.
  • the size reference value of the target subject image may be set by the user.
  • the mobile phone may prompt the user to set the size reference value of the target subject image.
  • the user/target subject can change the distance between the zoom camera and the target subject by moving forward/backward, thereby changing the size of the target subject image, so as to set the size reference value of the target subject image that the user wants.
  • the mobile phone does not need to implement Hitchcock zoom at this time, and will not adjust the focal length so that the size of the target subject image remains basically unchanged.
  • the focal length remains unchanged, the field of view of the zoom camera also remains unchanged, but the scene range on the preview image and the imaging size of the object on the preview image change.
  • the focal length remains unchanged, when the user/target subject retreats, the field of view of the zoom camera remains unchanged, but the objects on the preview image increase, and the range of the scene on the preview image becomes larger, and the target subject image on the preview image and The background object image becomes smaller.
  • the focal length remains the same, when the user/target subject moves forward, the field of view of the zoom camera remains unchanged, but the objects on the preview image decrease, the scene range of the preview image decreases, and the target subject image on the preview image and The background object image becomes larger.
  • the size value of the target subject image on the preview image is the size reference value.
  • the mobile phone may prompt the user on the preview interface: ask the user/target subject to move forward/backward, so as to set the target subject image to an appropriate size, so that the The size remains basically that size.
  • the target body image on the preview interface becomes larger.
  • the mobile phone determines the size of the current target body image as the size reference value.
  • the size reference value will be updated to the preview image after the user/target subject stops moving forward/backward this time.
  • the size value of the upper target subject image is the size value of the upper target subject image.
  • the mobile phone in the preview state of Hitchcock mode, after the mobile phone detects the user's operation of adjusting the zoom ratio of the image, the mobile phone adjusts the size of the target subject image on the preview interface, thereby setting the target desired by the user The size reference value of the subject image. 13 (a), the mobile phone can prompt the user: please set the size reference value of the target subject image, so that the size of the target subject image is basically kept at this size during the shooting process.
  • the user's operation of adjusting the zoom magnification of the image may be the user's zoom/zoom operation on the preview image as shown in (b) of FIG.
  • the mobile phone in response to the user's operation of adjusting the zoom ratio of the image, can adjust the size of the target subject image on the preview interface through optical zoom and/or digital zoom. After the user stops adjusting the zoom ratio, the mobile phone determines the size of the current target subject image as the size reference value. It should be noted that after the mobile phone adjusts the size of the target subject image on the preview interface through optical zooming, the focal length value 1 can be updated to the focal length value after optical zooming. After the mobile phone adjusts the size of the target subject image on the preview interface through digital zoom, the mobile phone can determine the corresponding image cropping ratio K during digital zooming, and the mobile phone keeps the cropping ratio K unchanged in the subsequent shooting process.
  • the size reference value will be updated to the preview image after the user stops adjusting the zoom magnification this time.
  • the size value of the upper target subject image is the size value of the upper target subject image.
  • the size of the image of the target subject is the size reference value.
  • the size reference value of the target subject image is a default value. In some technical solutions, if parameters such as object type or depth of the target subject are different, the default size reference value of the target subject image may also be different.
  • the mobile phone can also modify the size reference value of the target subject image in response to the user's preset operation.
  • the mobile phone enters the size reference value modification mode after detecting that the user clicks the control.
  • the user/target subject can move forward/backward to change the distance between the user and the target subject, or the user can adjust the zoom ratio based on the preview image to set the target subject image on the preview image to an appropriate size.
  • the mobile phone detects that the user clicks the "exit" control, it determines the size of the current target subject image as the reference value, and exits the reference value modification mode. It should be noted that, in the process of modifying the size reference value, the size of the target subject image changes accordingly, and the mobile phone does not adjust the focal length so that the size of the target subject image basically remains unchanged.
  • the reference value of the size of the target subject image is the size of the target subject image shown in (b) in FIG. 12 as an example for description.
  • the mobile phone in the preview state of the Hitchcock mode, when the target subject image is far away from the middle area of the preview image, the mobile phone can display prompt information or voice Prompt the user or the target subject to center the target subject by means of broadcasting or the like.
  • the mobile phone can prompt the user by displaying prompt information: please move the photographer or the target subject to the left/right to center the target subject as much as possible. Referring to (b) in Figure 14, when the target subject approaches the middle area of the image, the mobile phone can stop the prompt.
  • users can instruct the phone to start shooting when they want to shoot a video.
  • the user instructs to start shooting away/closer to the target subject.
  • Hitchcock zoom video during shooting in Hitchcock mode, the user can move away/closer to the target subject, and the distance between the user and the target subject will increase/decrease accordingly, thus achieving background space Dilated/compressed video effects.
  • the user in a rear-facing shooting scenario, the user can move back/forward during the shooting to move away from/closer to the target subject.
  • the following description will be mainly given as an example in which the user steps back during the shooting process, that is, away from the target subject, in a rear-facing shooting scene.
  • the mobile phone After detecting the user's shooting operation, the mobile phone uses the zoom camera to collect the original image 1 with a focal length value of 1.
  • the mobile phone After the mobile phone detects the user's shooting operation, it starts shooting a Hitchcock zoom video, so that the original image 1 is captured by the zoom camera with a focal length value of 1.
  • the focal length value 1 is 15mm. It should be noted that the focal length values listed in the embodiments of the present application are all equivalent focal lengths of the zoom camera.
  • the mobile phone detects that the user clicks the shooting control 1201 as shown in (b) in FIG. 12 , it determines that the shooting operation of the user is detected, thereby entering the shooting process of the Hitchcock zoom video.
  • the mobile phone detects the operation of the user's voice instructing to start shooting, it determines that the shooting operation of the user is detected, thereby entering the shooting process of the Hitchcock zoom video. It can be understood that there may also be many other ways for triggering the mobile phone to enter the Hitchcock zoom video shooting process, which is not limited in the embodiment of the present application.
  • the original image 1 obtained by the mobile phone corresponds to the distance between the user and the target subject and the focal length value 1 during the user's backward process.
  • the imaging size of the target subject and the background object on the original image 1 can be calculated and obtained according to the distance between the user and the target subject and the focal length value 1 .
  • the size of the target subject image on the original image 1 obtained by the zoom camera using the focal length value of 1 is the same as the size reference value. If the user moves forward/backward after the mobile phone detects the user's shooting operation, the size of the target subject image on the original image 1 acquired by the zoom camera using the focal length value 1 is different from the size reference value.
  • the zoom camera uses the focal length value of 1 to collect the original image 1 on the The difference between the size of the target subject image and the size reference value is also small.
  • the mobile phone generates the recorded image 1 according to the original image 1, and displays the recorded image 1 on the shooting interface.
  • the original image can be continuously collected according to the preset collection frame rate.
  • the original image is an image collected by the zoom camera and processed by ISP and the like.
  • the mobile phone performs electronic image stabilization (EIS) processing such as cropping of the original image and deformation processing such as affine transformation to obtain the recorded image.
  • EIS electronic image stabilization
  • the mobile phone generates a recorded image 1 according to the first frame of the original image collected by the user during the shooting process, that is, the original image 1, and displays the recorded image 1 on the shooting interface.
  • a schematic diagram of the recorded image 1 displayed on the shooting interface please refer to (b) in FIG. 15A .
  • the mobile phone performs video instance segmentation on the target subject on the original image 1, and obtains the size 1 and the position 1 of the target subject image.
  • the mobile phone can perform video instance segmentation on the target subject on the original image 1 acquired by the zoom camera with a focal length value of 1, and obtain the area mask of the target subject image, that is, the location area of the target subject image, so as to obtain the target subject image.
  • Size 1 and Position 1 For example, the size of the target subject image on the original image is the number of pixels included in the target subject image.
  • the location of the target subject image on the original image can be represented by coordinates.
  • the size 1 of the target subject image on the original image 1 can be used to determine the focal length value 2 corresponding to the next frame of the original image 2 to be collected. That is, the mobile phone can determine the focal length value 2 corresponding to the next frame of the original image 2 to be collected according to the size 1 of the target subject image on the original image 1 .
  • the position 1 of the target subject image on the original image 1 can be used for position smoothing of the target subject image on the subsequent original image.
  • the mobile phone determines, according to the size 1 and the size reference value of the target subject image on the original image 1, the focal length value 2 corresponding to the next frame of the original image 2 to be collected, and the size of the target subject image on the original image 2 corresponding to the focal length value 2 2 is equal to the dimension reference value.
  • the mobile phone can determine the focal length value 2 corresponding to the next frame of the original image 2 to be collected according to the size 1 of the target subject image on the historical original image 1 .
  • the mobile phone may calculate the focal length value 2 corresponding to the next frame of the original image 2 to be collected according to the difference or ratio between the size 1 of the target subject image on the original image 1 and the size reference value.
  • the zoom camera adopts the focal length value 2 to capture the original image 2
  • the size 2 of the target subject image on the original image 2 can be made consistent with the size reference value.
  • the focal length value 2 is 15.1 mm, which is greater than the focal length value 1. That is to say, in the Hitchcock zoom mode, when the user steps back and is away from the target subject, the focal length value increases so that the size of the target subject image remains basically unchanged.
  • f1 is the focal length value adopted at the current time t.
  • S3, f1, and S2 are all known quantities.
  • f2 is a focal length value that keeps the imaging size of the target subject on the original image collected at time t+1 basically unchanged. According to the imaging relationship shown in Figure 15B, the following formula 10-12 can be obtained:
  • Equation 10 The calculation formula of f2 can be obtained from Equation 10 and Equation 11:
  • f1 is the focal length value 1 corresponding to the original image 1
  • f2 is the focal length value 2 corresponding to the original image 2 to be collected. That is to say, the mobile phone can calculate the focal length value 2 corresponding to the original image 2 to be collected according to the size 1 , the focal length value 1 and the size reference value of the target subject image on the original image 1 .
  • the focal length value n may be a value updated to the smoothed focal length value n'.
  • the size of the target subject image is equal to the size reference value, so that the size of the target subject image can be kept basically unchanged during the shooting process.
  • the method may further include step 208:
  • the mobile phone determines the focal length value 2' according to the historical focal length value. If the focal length value 2' is different from the focal length value 2, the value of the focal length value 2 is updated to the value of the focal length value 2'.
  • the focal length value 2' is the focal length value determined by the mobile phone according to the historical focal length value and after the focal length smoothing process. If the focal length value 2 is different from the focal length value 2' after the focal length smoothing process, the mobile phone can update the focal length value 2 to the focal length value 2' after the focal length smoothing process. That is to say, the mobile phone can adjust the value of the focal length value 2 in combination with the historical focal length value.
  • the focal length value n that is not updated to the smoothed focal length value n' may be referred to as the original focal length value.
  • the difference between the focal length value 2' determined by the mobile phone according to the historical focal length value and the focal length value 2 is small, so that on the original image 2 acquired by the mobile phone using the focal length value 2', the size of the target subject image is different from the size reference value. Smaller, so that the size of the target subject image remains basically unchanged during the shooting process.
  • the focal length value 2' determined by the mobile phone according to the historical focal length value is consistent with the increase/decrease trend of the historical focal length value, which can make the change trend of the focal length value during the shooting process more stable, so that the focal length value changes smoothly, while There is no focal length value that changes back and forth between increasing or decreasing during shooting.
  • the imaging size of the background object on the image captured by the zoom camera also decreases or increases accordingly, and the background space is compressed or expanded accordingly.
  • the focal length value has a large sudden change, the imaging size of the background object will suddenly change by a large margin, and the amplitude of the background space compression or expansion is also obvious, and the user's visual experience and shooting experience are poor.
  • the focal length value frequently switches between increasing or decreasing the user may see that the imaging size of the background object frequently changes between decreasing and increasing, and the background space frequently changes between compression and expansion. , the user's visual experience and shooting effect are poor.
  • the mobile phone can make the focal length value change smoothly, so that the image size of the background object and the background space change smoothly, and avoid the focal length value going back and forth between increasing or decreasing during the shooting process Switching, thereby avoiding the frequent reduction or increase of the imaging size of the background object, and the frequent change of the background space between compression and expansion, so as to provide the user with a better shooting experience.
  • the smoothing of the focal length value can also make the picture of the recorded image transition smoothly during the entire shooting process without jumping and freezing, thereby improving the user experience and the shooting effect.
  • the mobile phone may determine the focal length value 2' according to the historical focal length value.
  • the difference ⁇ f between the focal length value 2' determined by the mobile phone according to the historical focal length value and the focal length value 1 may be less than or equal to the preset value 1, so that the change of the focal length value during the shooting process is relatively smooth.
  • the preset value 1 may be in the range of -0.1 mm to 0.1 mm.
  • the difference between the focal length value 2' and the focal length value 2 may be less than or equal to the preset value 2, so that the size 2 of the target subject image on the original image 2 corresponding to the focal length value 2' and the size reference value may have a smaller difference , keeping the size of the target subject basically unchanged.
  • the preset value 2 may be in the range of -0.02mm to 0.02mm.
  • the focal length value 2 is 15.1mm
  • the focal length value 2' is 15.12mm.
  • the focal length value 2' is the average value of each historical focal length value during the shooting process, or the average value of the M recent historical focal length values during the shooting process.
  • M is a positive integer, for example, it can be 5 or 10, etc.
  • the difference between the focal length value 2' obtained by this method and the focal length value 1 is small, which can make the change of the focal length value during the shooting process smoother; the difference between the focal length value 2' obtained by this method and the focal length value 2 is also Smaller, it can keep the imaging size of the target subject basically unchanged.
  • the mobile phone can be obtained by curve fitting the focal length values corresponding to the multi-frame historical original images, for example, second-order or third-order Bezier curve fitting can be used to smooth the focal length.
  • the method may further include:
  • the mobile phone uses the zoom camera to collect the original image 2 with the focal length value 2.
  • the focal length value 2 may be the focal length value 2 updated to the focal length value 2' in step 208; if the method does not include step 208, the focal length value may be step 207
  • the focal length value in is 2, which is the original focal length value.
  • the imaging size of the target subject in the original image 2 collected by the mobile phone with the focal length value 2 is not much different from the size reference value and the imaging size of the target subject in the original image 1. That is, the imaging size of the target subject is basically unchanged during the shooting process.
  • the mobile phone can automatically adjust the focal length value of the zoom camera according to the actual size and size reference value of the target subject image on the original image, so that the zoom camera captures the image of the target subject image on the original image according to the adjusted focal length value.
  • the size remains essentially the same, enabling a Hitchcock zoom.
  • the schematic diagram of the original image 2 may refer to (c) in FIG. 15A .
  • the scene range of the original image 2 is reduced, the background objects on the original image 2 are reduced, and the background object image on the original image 2 is reduced.
  • the imaging center point of the background object image on the original image 2 is farther and farther away from the center of the image, giving the user a visual experience of expanding the background space outward;
  • the imaging size of background objects with greater depth increases more and faster, and the larger the imaging position is farther away from the center of the image, the faster the imaging speed.
  • the mobile phone performs video instance segmentation on the target subject on the original image 2, and obtains the size 2 and the position 2 of the target subject image.
  • the processing process of obtaining the size 2 and position 2 of the target subject image by the mobile phone in step 210 is similar to the processing process of obtaining the size 1 and position 1 of the target subject image by the mobile phone in the above step 206, and the relevant description in the above step 206 can be referred to. , which will not be repeated here.
  • the method may further include step 211:
  • the mobile phone adjusts the position of the target subject image on the original image 2 according to the position 2 and the historical position of the target subject image on the original image 2.
  • the historical position here refers to the position of the target subject image on the historical original image.
  • the user's hand shake or shaking may cause the position of the target subject image to shift on different original images.
  • the mobile phone can determine the position offset of the current original image relative to the target subject image on the historical original image in various ways.
  • the mobile phone can perform key point matching (such as oriented fast and rotated brief (ORB) matching) through the area where the target subject image is located on the current original image and the area where the target subject image is located on the previous frame of the original image. ), thereby determining the position offset of the current original image relative to the target subject image on the historical original image.
  • key point matching such as oriented fast and rotated brief (ORB) matching
  • the mobile phone can pass the area where the target subject image is located on the current original image, and the historical P (an integer greater than 1, such as 2 or 3, etc.) frame original Key point matching is performed on the area where the target subject image is located on the image, so as to determine the position offset of the current original image relative to the target subject image on the historical original image.
  • the mobile phone can adjust the position of the target subject image on the current original image according to the position and historical position of the target subject image on the current original image, so as to perform position smoothing on the target subject image (also called target subject trajectory smoothing), so that The offset between the position of the target subject image on the current original image and the historical position is small, so that the displacement of the target subject image is relatively smooth, and the position of the target subject image is prevented from abruptly affecting the user's visual experience and shooting effect.
  • position smoothing on the target subject image also called target subject trajectory smoothing
  • the mobile phone is based on the current original image S on the target subject.
  • the position of the image and the position of the target subject image on the adjusted historical original image are used to adjust the position of the target subject image on the current original image S.
  • the historical original image after the position smooth adjustment is the historical recorded image. That is to say, for the current original image S (S is an integer greater than 2), the historical position represents the position of the target subject image on the historically recorded images.
  • the mobile phone adjusts the position of the target subject image on the original image S according to the position S of the target subject image on the original image S and the position of the target subject image on the historical original image. Position S and the position of the target subject image on the historical recorded images, and adjust the position of the target subject image on the original image S.
  • step 211 after the mobile phone performs video instance segmentation on the target subject, the position 2 of the target subject image on the original image 2 can be obtained.
  • the mobile phone can combine the EIS to adjust the position of the target subject image on the original image 2 by adjusting the crop region of the original image 2, so that the position of the target subject image on the original image 2 is different from the historical position.
  • the offset is small, so that the displacement of the target subject image is smoother, and the sudden change of the position will not affect the user's visual experience and shooting effect.
  • the positional smoothing processing of the target subject image can also make the picture of the recorded image transition smoothly without jumping during the whole shooting process, thereby improving the user experience and the shooting effect.
  • the mobile phone can crop 1/10 more of the width of the image on the left side of the original image 2 and less on the right side of the original image 2. Crop 1/10 of the width of the image to obtain a new original image 2, and adjust the position of the target subject image on the original image 2.
  • the mobile phone can obtain a new original image 2 by cropping by modifying the cropping area information in the warp info of the electronic image stabilization.
  • the new original image 2 is an original image 2 obtained by performing position smoothing on the target subject image.
  • the difference between the position of the adjusted target subject image on the original image 2 determined by the mobile phone according to the historical position and the position of the target subject image on the recorded image 1 may be less than or equal to the preset value 3;
  • the difference between the position of the adjusted target subject image on the position-determined original image 2 and the position of the target subject image on the original image 2 may be less than or equal to the preset value 4, so that the position of the target subject image changes during the shooting process. smooth.
  • the mobile phone can also use Bezier curve fitting to smooth the position of the target subject image according to the position of the target subject image on the historical original image.
  • the difference between the position of the adjusted target subject image on the original image S and the position of the target subject image on the recorded image S-1 may be less than or equal to the preset value 3;
  • the difference between the position of the adjusted target subject image on the recorded image S determined by the mobile phone according to the historical position and the position of the target subject image on the recorded image S may be less than or equal to the preset value 4, so that during the shooting process The position change of the target subject image is relatively smooth.
  • the position of the adjusted target subject image on the original image S may be the average value of the positions of the target subject image on each historically recorded image, or the most recent R historical records during the shooting process.
  • R is a positive integer, for example, it can be 5 or 10, etc.
  • the difference between the position of the adjusted target subject image obtained by the method and the historical position is small, and the difference between the target subject image before and after adjustment is small, which can make the position change of the target subject image relatively smooth during the shooting process.
  • the mobile phone may also use Bezier curve fitting to smooth the position of the target subject image according to the position of the target subject image on the historically recorded image.
  • the method may further include:
  • the mobile phone generates the recorded image 2 according to the original image 2, and displays the recorded image 2 on the shooting interface.
  • step 212 the mobile phone generates the recorded image 2 according to the original image 2 after the position is smoothed. If the method does not include step 211, the mobile phone can generate the recorded image 2 according to the original image 2 without position smoothing, and display the recorded image 2 on the shooting interface. In some embodiments, the mobile phone may further perform deformation processing such as affine transformation on the original image 2 to correct the original image 2 , thereby generating a better recorded image 2 .
  • the recorded image 2 is an image obtained after position smoothing compared with the original image 2 shown in (c) in FIG. 15A.
  • the scene range of the recorded image 2 is reduced, the background objects on the recorded image 2 are reduced, and the background on the recorded image 2 is reduced.
  • the image of the object is enlarged.
  • the imaging center point of the background object image on the recorded image 2 is farther and farther away from the center of the image, giving the user a visual experience of the background space expanding outward;
  • the imaging size of the background object with larger depth increases more and faster, and the larger the imaging position is away from the center of the image, the faster the imaging speed.
  • the method may further include:
  • the mobile phone determines, according to the size 2 and the size reference value of the target subject image on the original image 2, the focal length value 3 corresponding to the next frame of the original image 3 to be collected, and the size of the target subject image on the original image 3 corresponding to the focal length value 3 3 is equal to the size reference value.
  • the focal length value 3 may be 15.2 mm, which is greater than the focal length value 2. That is, to keep the size of the target subject image substantially constant as the user steps back, the focal length value should gradually increase.
  • the process of determining the focal length value 3 by the mobile phone in step 213 is similar to the process of determining the focal length value 2 in the above step 207 by the mobile phone. Reference can be made to the relevant description in the above step 207, which will not be repeated here.
  • the method may further include step 214:
  • the mobile phone determines the focal length value 3' according to the historical focal length value, and if the focal length value 3' is different from the focal length value 3, the value of the focal length value 3 is updated to the value of the focal length value 3'.
  • the process of updating the focal length value 3 by the mobile phone in step 214 is similar to the process of updating the focal length value 2 in the above step 208 by the mobile phone. Reference can be made to the relevant description in the above step 208, which will not be repeated here.
  • the method may further include:
  • the mobile phone uses the zoom camera to collect the original image 3 with the focal length value 3.
  • the focal length value 3 may be the focal length value 3 updated to the focal length value 3' in step 214; if the method does not include step 214, the focal length value may be step 213 The focal length value in 3.
  • the imaging size of the target subject in the original image 3 collected by the mobile phone with the focal length value 3 is not much different from the size reference value and the imaging size of the target subject in the original image 1. That is, the imaging size of the target subject is basically unchanged during the shooting process.
  • the schematic diagram of the original image 3 may refer to (e) in FIG. 15A .
  • the scene range of the original image 3 is reduced, and the background objects on the original image 3 are reduced,
  • the background object image on the original image 3 is enlarged.
  • the imaging center point of the background object image on the original image 3 is farther and farther away from the center of the image, giving the user a visual experience of expanding the background space;
  • the imaging size of a background object with a larger depth increases more and faster, and the larger the imaging position is away from the center of the image, the faster the imaging speed.
  • the mobile phone uses a process similar to that shown in steps 210-215 to process. That is, the method may also include:
  • the mobile phone performs video instance segmentation on the target subject on the original image Q to obtain the size Q and position Q of the target subject image, where Q is an integer greater than or equal to 3.
  • the mobile phone adjusts the position of the target subject image on the original image Q according to the position Q and the historical position of the target subject image on the original image Q.
  • the mobile phone generates the recorded image Q according to the original image Q, and displays the recorded image Q on the shooting interface.
  • the schematic diagram of the recorded image 3 can be referred to (f) in FIG. 15A .
  • the scene range of the recorded image 3 is reduced, and the background object on the recorded image 3 is reduced. Decrease, and the background object image on the recorded image 3 increases.
  • the imaging center point of the background object image on the recorded image 3 is farther and farther away from the center of the image, giving the user a visual experience of the background space expanding outward;
  • the image size of a background object with a larger depth increases more and faster, and the larger the imaging position is farther away from the center of the image, the faster the speed.
  • the mobile phone determines, according to the size Q of the target subject image on the original image Q and the size reference value, the focal length value Q+1 corresponding to the next frame of original image Q+1 to be collected, and the original image Q corresponding to the focal length value Q+1
  • the size Q+1 of the target subject image on +1 is equal to the size reference value.
  • the mobile phone determines the focal length value Q+1' according to the historical focal length value, and if the focal length value Q+1' is different from the focal length value Q+1, the value of the focal length value Q+1 is updated to the value of the focal length value Q+1'.
  • the mobile phone can use various methods to smooth the focal length, so as to determine the focal length value Q+1'.
  • Q is greater than 3
  • a Bezier curve fitting method is used to perform focal length smoothing, see (a)-(c) in FIG. 15C , the second-order Bezier curve fitting principle is:
  • points A, B and C are the focal length value n used to collect the original image, and when the focal length value n is the value after being updated to the focal length value n', then A Point, point B and point C are specifically the focal length value n'.
  • the horizontal axis represents the frame number of the original image
  • the vertical axis represents the focal length value (unit mm) used to acquire the original image.
  • the point represented by the triangle on the curve 1 is the original focal length value n obtained by calculation, that is, the focal length value that has not been updated to the smoothed focal length value n';
  • the point represented by the circle on the curve 2 is the smoothed focal length value n'.
  • curve 2 is relatively smooth, that is, the change between the focal length values n' is relatively smooth, and the change of the focal length value used between different original image frames is relatively smooth.
  • the difference between the focal length value n' on the curve 2 and the focal length value n on the curve 1 is small, and the size of the target subject image can be kept basically unchanged during the shooting process.
  • the first point represented by the circle on curve 2 represents the smoothed focal length value corresponding to the original image of the fourth frame, which is obtained by Bezier curve fitting according to the original focal length values corresponding to the original images of the first to third frames .
  • the second point represented by the circle on curve 2 represents the smoothed focal length value corresponding to the original image of the fifth frame, according to the original focal length value corresponding to the original image of the second to third frames and the smoothed focal length corresponding to the original image of the fourth frame value, obtained by Bezier curve fitting.
  • the third point represented by the circle on curve 2 represents the smoothed focal length value corresponding to the 6th frame of the original image, according to the original focal length value corresponding to the 3rd frame of the original image and the smoothed focal length corresponding to the 4th-5th frame of the original image value, obtained by Bezier curve fitting.
  • the 4th point represented by the circle on curve 2 represents the smoothed focal length value corresponding to the 7th frame of the original image, which is obtained by Bezier curve fitting according to the smoothed focal length values corresponding to the 4th to 6th frames of the original image;
  • the subsequent points indicated by the circles on the curve 2 are obtained by Bezier curve fitting according to the smoothed focal length values corresponding to the most recent historical 3 frames of original images.
  • the mobile phone uses the focal length value Q+1 to collect the original image Q+1 through the zoom camera.
  • the mobile phone crops the original image through digital zoom in the preview state to obtain the preview image and sets the size reference value of the target subject image, and the cropping ratio is K, the mobile phone also needs to The cropping ratio K is used to crop each original image, and then the above-mentioned processing operations in the shooting process are performed on the original image.
  • a video is generated, and the video image in the video is generated according to the recorded image.
  • a Hitchcock zoom video is generated, and the imaging size of the target subject on the video image in the video remains basically unchanged.
  • the schematic diagrams of the video images in the Hitchcock zoom video generated by the mobile phone may refer to (a)-(c) in FIG. 16 .
  • the mobile phone can automatically adjust the zoom camera according to the imaging size of the target subject.
  • the focal length value keeps the size of the target subject on the video image basically unchanged, without the need for additional auxiliary equipment such as slide rails and manual zooming by the user, which can facilitate the user to shoot Hitchcock zoom video, reduce the difficulty of user operation, and improve the User shooting experience.
  • the mobile phone can smoothly transition between the pictures of the recorded images through the smoothing of the focal length value and the smoothing of the position, so that the pictures of the video images generated according to the recorded images can also be smoothly transitioned.
  • the mobile phone automatically adjusts the focal length value of the zoom camera according to the imaging size of the target subject to realize Hitchcock zoom, that is to say, the mobile phone realizes Hitchcock zoom through optical zoom.
  • the mobile phone realizes Hitchcock zoom through optical zoom.
  • the process includes: the mobile phone performs video instance segmentation on the image collected by the zoom camera, obtains the mask of the target subject image to obtain the size and position of the target subject image, and performs key point matching on the target subject; and then according to the target subject image
  • the position of the main body track is smoothed (that is, position smoothing), and the crop region is determined for crop and warp processing, and the recorded image is obtained to output the video image.
  • the cropping area here is the cropping area in the warp info of the electronic image stabilization EIS.
  • the process also includes: the mobile phone calculates the focal length value of the next frame of image according to the size of the target subject image, performs focal length smoothing and then collects the next frame of image.
  • the Hitchcock zoom video saved in the mobile phone may be specially identified to be different from other videos, so as to facilitate the user to intuitively know the Hitchcock zoom video.
  • the Hitchcock zoom video displays a text mark 1801 with “xq”, for another example, referring to FIG. 18 (b), the Hitchcock zoom video displays a specific Symbol ID 1802.
  • the illustrations about the recorded images in the above embodiments are described by taking an example in which the user retreats, that is, is away from the target subject, in a rear-facing shooting scene.
  • the mobile phone can increase the focal length f of the camera, and the field of view of the camera decreases.
  • the scene range of the captured image decreases, the background objects on the recorded image decrease, the background object image on the recorded image increases, and the imaging center point of the background object image is further and further away from the center of the image, giving the user a background space to move outwards. Expanded visual experience.
  • the imaging size of a background object with a larger depth increases more and faster, and the larger the imaging position is away from the center of the image, the faster the imaging speed.
  • the recorded images during the shooting process can be referred to (a)-(c) in FIG. 19 or (a)-(c) in FIG. 20 .
  • the mobile phone can reduce the focal length f of the camera, and the field of view of the camera increases.
  • the range of the scene in the shot image increases, the background objects on the recorded image increase, the background object image on the recorded image decreases, and the imaging center point of the background object image is getting closer and closer to the center of the image, giving the user a background space inward. Compressed visual experience.
  • the imaging size of a background object with a larger depth decreases more and faster, and the larger the imaging position is closer to the center of the image, the faster the imaging speed is.
  • the target subject is usually stationary.
  • the target subject can also move left/right at the same depth, and the mobile phone can still achieve recording and shooting by using the shooting methods described in the above embodiments
  • the imaging size of the target subject image on the image and video image remains basically unchanged.
  • the mobile phone does not perform Hitchcock zooming in the preview state of the Hitchcock mode.
  • the mobile phone after determining the size reference value of the target subject image in the preview state of the Hitchcock mode, the mobile phone can also perform Hitchcock zoom in the preview state.
  • the mobile phone may prompt the user on the preview interface: ask the user/target subject to move forward/backward, so as to set the target subject image to an appropriate size, so that the The size remains basically that size.
  • the image of the target body on the preview interface becomes larger, and after the mobile phone detects that the user clicks the “determine size” control, the size of the current target body image is determined as Size reference value.
  • the mobile phone adjusts the size of the target subject image on the preview interface, thereby setting the size reference value of the target subject image that the user wants. 22B , the mobile phone can prompt the user: please set the size reference value of the target subject image, so that the size of the target subject image is basically kept at this size during the shooting process.
  • the user's operation of adjusting the zoom magnification of the image may be the user's zoom/zoom operation on the preview image as shown in (b) of FIG. 22B , or the user's drag operation on the zoom magnification adjustment lever, or the user's voice instruction Operations to adjust the zoom magnification, etc.
  • the mobile phone in response to the user's operation of adjusting the zoom ratio of the image, can adjust the size of the target subject image on the preview interface through optical zoom and/or digital zoom. After detecting that the user clicks the "OK" control, the mobile phone determines the size of the current target subject image as the size reference value. It should be noted that after the mobile phone adjusts the size of the target subject image on the preview interface through optical zooming, the focal length value 1 can be updated to the focal length value after optical zooming. After the mobile phone adjusts the size of the target subject image on the preview interface through digital zoom, the mobile phone can determine the corresponding image cropping ratio K during digital zooming, and the mobile phone keeps the cropping ratio K unchanged in the subsequent shooting process.
  • the Hitchcock zoom can be performed in the preview state, thereby presenting the Hitchcock zoom effect to the user on the preview interface in real time. Then, in response to the user's photographing operation, the above-mentioned steps 204-222 are performed.
  • the process of performing Hitchcock zooming on the mobile phone in the preview state is similar to the process of performing Hitchcock zooming on the mobile phone during the shooting process described in steps 204-222. The difference is that the user's shooting operation does not need to be detected during the preview process, the recorded image during the shooting process is replaced with the preview image, and the shooting interface during the shooting process is replaced with the preview interface.
  • the schematic diagram of the preview interface in which the user moves forward to perform Hitchcock zooming in the rear shooting scene may refer to (a)-(c) in FIG. 23 .
  • the electronic device takes the electronic device as a mobile phone as an example.
  • the electronic device is other devices such as a tablet computer with a zoom camera
  • the Hitchcock zoom video can still be recorded by the shooting method provided in the embodiment of the present application, which is not repeated here. Repeat.
  • FIG. 1 Another embodiment of the present application provides a photographing method, which can be implemented in an electronic device having the hardware structure shown in FIG. 1 .
  • the method may include:
  • the electronic device displays a first recorded image on a shooting interface, the first recorded image includes a target subject image, the first recorded image is obtained according to the first original image, and the first original image is captured by the zoom camera using the first focal length value get.
  • the first recorded image may be the above-mentioned recorded image 2
  • the first original image may be the above-mentioned original image 2
  • the first focal length value may be the above-mentioned focal length value 2
  • the value of the focal length value 2 may be the value of the focal length value 2' after the focal length smoothing process, and the target subject may be a person.
  • the first focal length value corresponding to the original image 1 may be a preset focal length value or a focal length value set by a user.
  • the electronic device determines, according to the first size of the target subject image on the first original image, a second focal length value corresponding to the second original image to be collected.
  • the first original image may be the above-mentioned original image 2
  • the second original image may be the above-mentioned original image 3
  • the second focal length value may be the above-mentioned focal length value 3 .
  • the electronic device displays a second recorded image on the shooting interface, the second recorded image includes the target subject image, the second recorded image is obtained according to the second original image, and the second original image is captured by the zoom camera using the second focal length value get.
  • the second original image may be the above-mentioned original image 3
  • the second recorded image may be the above-mentioned recorded image 3 .
  • the electronic device can determine the focal length value used by the zoom camera to collect subsequent original images according to the size of the target subject image on the current original image, so that the size of the target subject image on different original images remains basically unchanged, so that different The size of the target subject image on the video image remains basically unchanged, enabling Hitchcock zoom.
  • the electronic device can automatically adjust the focal length value of the zoom camera according to the imaging size of the target subject, so that the size of the target subject on the video image basically remains It does not require additional auxiliary equipment such as slide rails and user manual zoom, which can facilitate users to shoot Hitchcock zoom video, reduce the difficulty of user operation, and improve user shooting experience.
  • the electronic device realizes the Hitchcock zoom through optical zooming instead of the digital zoom used for cropping and zooming to realize the Hitchcock zoom, so the resolution of the recorded image and the video image obtained by the electronic device during the shooting process The rate and definition are high, and the user shooting experience is better.
  • the method further includes: the electronic device adds The second focal length value is updated to the target focal length value, the target focal length value is obtained according to the focal length value corresponding to the historical original image, and the second original image is captured by the zoom camera using the updated second focal length value. That is, the electronic device may update the second focal length value in combination with the focal length value corresponding to the historical original image, so as to perform focal length smoothing. The electronic device acquires the second original image according to the updated second focal length value.
  • the difference between the target focal length value and the first focal length value corresponding to the first original image is less than or equal to the first preset value, and the difference between the target focal length value and the second focal length value is less than or equal to the second preset value. set value.
  • the target focal length value is an average value of focal length values corresponding to multiple frames of historical original images.
  • the target focal length value is obtained by performing curve fitting on focal length values corresponding to multiple frames of historical original images.
  • the electronic device can perform focal length value smoothing, so that a smooth transition can also be made between the frames of the video images generated according to the recorded images.
  • the second position coordinates of the target subject image on the second recorded image are based on the initial position coordinates of the target subject image on the second original image and the position coordinates of the target subject image on the historical recorded images. get. That is, the electronic device can adjust the coordinate position of the target subject image on the second original image in combination with the position coordinates of the target subject image corresponding to the historical recorded images, thereby obtaining a second recorded image with a smoothed position.
  • the difference between the second position coordinate and the first position coordinate of the target subject image on the first recorded image is less than or equal to the third preset value, and the difference between the second position coordinate and the initial position coordinate is less than or equal to or equal to the fourth preset value.
  • the second position coordinate is an average value of the position coordinates of the target subject image on the multiple frames of historically recorded images.
  • the second position coordinates are obtained by performing curve fitting on the position coordinates of the target subject image on the multiple frames of historically recorded images.
  • the electronic device may perform position smoothing on the target subject image, so that a smooth transition can also be made between the frames of the video image generated according to the recorded image.
  • the method further includes: in the preview state of the target shooting mode, the electronic device detects a first preset operation in which the user indicates the target subject based on the preview image; determining in response to the first preset operation target subject. That is, the user can specify the target principal.
  • the first preset operation may be an operation in which the user selects a character on the preview image as shown in FIG. 10 .
  • the target subject is automatically identified by the electronic device.
  • the electronic device determines, according to the first size of the target subject image on the first original image, the second focal length value corresponding to the second original image to be collected, including: the electronic device determines, according to the first original image, the second focal length value corresponding to the second original image to be collected The first size and size reference value of the upper target subject image are used to determine the second focal length value corresponding to the second original image to be collected.
  • the electronic device can determine the focal length value used by the zoom camera to collect subsequent original images according to the size of the target subject image on the current original image and the size reference value, so that the size of the target subject image on different original images remains basically unchanged, so that the The size of the target subject image on different video images remains basically unchanged, realizing Hitchcock zoom.
  • the electronic device determines, according to the first size of the target subject image on the first original image, the second focal length value corresponding to the second original image to be collected, including: the electronic device determines, according to the first original image, the second focal length value corresponding to the second original image to be collected.
  • the first size, the first focal length value and the size reference value of the target subject image are determined by formula 1 to determine the second focal length value corresponding to the second original image to be collected, and the second original image corresponding to the second focal length value is on the target subject image.
  • the second dimension of is equal to the dimension reference;
  • S3 represents the size reference value
  • S2 is the first size
  • f1 is the first focal length value
  • f2 is the second focal length value
  • the electronic device can adjust the focal length value corresponding to the subsequent original image collected according to the size of the target subject image on the current original image, the size reference value and the focal length value, and the zoom camera collects the target subject on the subsequent original image according to the adjusted focal length value.
  • the size of the image is the same as the size reference value, so that the size of the target subject image on different subsequent original images can be basically consistent with the size reference value, so that the size of the target subject image on the adjacent original images is basically unchanged, so that adjacent video images
  • the size of the upper target subject image remains basically unchanged, enabling Hitchcock zoom.
  • the method further includes: prompting the user to set a size reference value on the preview interface by the electronic device. So, the user can set the size reference value of the target body according to the prompt.
  • the prompt interface can refer to (a) in FIG. 12 or (a) in FIG. 13 .
  • the size of the target subject image on the preview image changes as the electronic device moves forward or backward
  • the size reference value is the size of the target subject image on the preview image. The user can hold the electronic device to move forward or backward to change the size of the target subject image on the preview image, thereby setting or adjusting the size of the size reference value.
  • the size of the target subject image on the preview image changes in response to the user's operation of adjusting the zoom magnification
  • the size reference value is the size of the target subject image on the preview image. The user can adjust the zoom ratio of the preview image to change the size of the target subject image on the preview image, thereby setting or adjusting the size of the size reference value.
  • the user can set or modify the size of the size reference value.
  • the size reference value is a preset value.
  • the electronic device includes corresponding hardware and/or software modules for executing each function.
  • the present application can be implemented in hardware or in the form of a combination of hardware and computer software in conjunction with the algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functionality for each particular application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.
  • the electronic device can be divided into functional modules according to the above method examples.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that, the division of modules in this embodiment is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • Embodiments of the present application further provide an electronic device, including one or more processors and one or more memories.
  • the one or more memories are coupled to the one or more processors for storing computer program code, the computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform
  • the above-mentioned related method steps implement the shooting method in the above-mentioned embodiment.
  • Embodiments of the present application further provide a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to realize the above-mentioned embodiments shooting method in .
  • Embodiments of the present application also provide a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the above-mentioned relevant steps, so as to realize the photographing method executed by the electronic device in the above-mentioned embodiment.
  • the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the photographing method executed by the electronic device in the foregoing method embodiments.
  • the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference may be made to the above-provided method. The beneficial effects in the corresponding method will not be repeated here.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium.
  • the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.

Landscapes

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

Abstract

Des modes de réalisation de la présente demande concernent le domaine technique de l'électronique. Un procédé et un dispositif de photographie sont décrits, pouvant ajuster automatiquement la distance focale d'un appareil photo lorsqu'un dispositif électronique est à distance/à proximité d'un corps cible, de sorte que la taille d'imagerie du corps cible sur une image vidéo est sensiblement inchangée, de manière à obtenir un travelling compensé sans instrument auxiliaire tel qu'un rail coulissant, et un zoom manuel, et pouvant réduire la difficulté d'utilisation d'un utilisateur et améliorer l'expérience de photographie de l'utilisateur. La solution consiste : à afficher, par un dispositif électronique, une première image photographiée sur une interface de photographie, la première image photographiée étant obtenue en fonction d'une première image d'origine, et la première image d'origine étant photographiée par un appareil photo à focale variable à l'aide d'une première valeur de longueur focale ; en fonction de la première taille de l'image d'un corps cible sur la première image d'origine, à déterminer une seconde valeur de longueur focale correspondant à une seconde image d'origine à collecter ; à afficher une seconde image photographiée sur l'interface de photographie, la seconde image photographiée étant obtenue en fonction de la seconde image d'origine, et la seconde image d'origine étant photographiée par l'appareil photo à focale variable à l'aide de la seconde valeur de longueur focale. Les modes de réalisation de la présente demande sont utilisés pour l'enregistrement vidéo.
PCT/CN2021/078543 2020-05-30 2021-03-01 Procédé et dispositif de photographie WO2022062318A1 (fr)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN202010480536 2020-05-30
CN202011044018.3 2020-09-28
CN202011044018.3A CN113747050B (zh) 2020-05-30 2020-09-28 一种拍摄方法及设备

Publications (1)

Publication Number Publication Date
WO2022062318A1 true WO2022062318A1 (fr) 2022-03-31

Family

ID=78728055

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2021/078543 WO2022062318A1 (fr) 2020-05-30 2021-03-01 Procédé et dispositif de photographie
PCT/CN2021/094695 WO2021244295A1 (fr) 2020-05-30 2021-05-19 Procédé et dispositif d'enregistrement vidéo

Family Applications After (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/094695 WO2021244295A1 (fr) 2020-05-30 2021-05-19 Procédé et dispositif d'enregistrement vidéo

Country Status (2)

Country Link
CN (2) CN113747050B (fr)
WO (2) WO2022062318A1 (fr)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002338B (zh) * 2021-12-10 2023-06-02 荣耀终端有限公司 一种拍摄参数的控制方法及装置
CN118138876A (zh) * 2022-01-25 2024-06-04 荣耀终端有限公司 切换摄像头的方法与电子设备
CN114500852B (zh) * 2022-02-25 2024-04-19 维沃移动通信有限公司 拍摄方法、拍摄装置、电子设备和可读存储介质
CN116723394B (zh) * 2022-02-28 2024-05-10 荣耀终端有限公司 多摄策略调度方法及其相关设备
CN117441344A (zh) * 2022-05-16 2024-01-23 北京小米移动软件有限公司 一种图像处理方法、装置、终端及存储介质
CN116051368B (zh) * 2022-06-29 2023-10-20 荣耀终端有限公司 图像处理方法及其相关设备
CN116055871B (zh) * 2022-08-31 2023-10-20 荣耀终端有限公司 视频处理方法及其相关设备
CN115965942B (zh) * 2023-03-03 2023-06-23 安徽蔚来智驾科技有限公司 位置估计方法、车辆控制方法、设备、介质及车辆
CN117596497A (zh) * 2023-09-28 2024-02-23 书行科技(北京)有限公司 图像渲染方法、装置、电子设备和计算机可读存储介质
CN117459830B (zh) * 2023-12-19 2024-04-05 北京搜狐互联网信息服务有限公司 一种移动设备自动变焦的方法及系统

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007086269A (ja) * 2005-09-21 2007-04-05 Hitachi Kokusai Electric Inc カメラ装置およびカメラ装置のズームレンズ光学系の焦点距離調節方法
CN109361865A (zh) * 2018-11-21 2019-02-19 维沃移动通信(杭州)有限公司 一种拍摄方法及终端
CN109379537A (zh) * 2018-12-30 2019-02-22 北京旷视科技有限公司 滑动变焦效果实现方法、装置、电子设备及计算机可读存储介质
CN110198413A (zh) * 2019-06-25 2019-09-03 维沃移动通信有限公司 一种视频拍摄方法、视频拍摄装置和电子设备
CN110557550A (zh) * 2018-05-31 2019-12-10 杭州海康威视数字技术股份有限公司 聚焦方法、装置及计算机可读存储介质
CN110651466A (zh) * 2018-05-31 2020-01-03 深圳市大疆创新科技有限公司 可移动平台的拍摄控制方法和设备
CN110785993A (zh) * 2018-11-30 2020-02-11 深圳市大疆创新科技有限公司 拍摄设备的控制方法、装置、设备及存储介质

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4991899B2 (ja) * 2010-04-06 2012-08-01 キヤノン株式会社 撮像装置及びその制御方法
CN104717427B (zh) * 2015-03-06 2018-06-08 广东欧珀移动通信有限公司 一种自动变焦方法、装置和移动终端
JP6512897B2 (ja) * 2015-03-30 2019-05-15 キヤノン株式会社 ズーム制御装置、ズーム制御装置の制御方法
CN106412547B (zh) * 2016-08-29 2019-01-22 厦门美图之家科技有限公司 一种基于卷积神经网络的图像白平衡方法、装置和计算设备
KR20180056182A (ko) * 2016-11-18 2018-05-28 엘지전자 주식회사 이동 단말기 및 그 제어 방법
US10321069B2 (en) * 2017-04-25 2019-06-11 International Business Machines Corporation System and method for photographic effects
CN108234879B (zh) * 2018-02-02 2021-01-26 成都西纬科技有限公司 一种获取滑动变焦视频的方法和装置
US10791310B2 (en) * 2018-10-02 2020-09-29 Intel Corporation Method and system of deep learning-based automatic white balancing
CN110262737A (zh) * 2019-06-25 2019-09-20 维沃移动通信有限公司 一种视频数据的处理方法及终端
CN111083380B (zh) * 2019-12-31 2021-06-11 维沃移动通信有限公司 一种视频处理方法、电子设备及存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007086269A (ja) * 2005-09-21 2007-04-05 Hitachi Kokusai Electric Inc カメラ装置およびカメラ装置のズームレンズ光学系の焦点距離調節方法
CN110557550A (zh) * 2018-05-31 2019-12-10 杭州海康威视数字技术股份有限公司 聚焦方法、装置及计算机可读存储介质
CN110651466A (zh) * 2018-05-31 2020-01-03 深圳市大疆创新科技有限公司 可移动平台的拍摄控制方法和设备
CN109361865A (zh) * 2018-11-21 2019-02-19 维沃移动通信(杭州)有限公司 一种拍摄方法及终端
CN110785993A (zh) * 2018-11-30 2020-02-11 深圳市大疆创新科技有限公司 拍摄设备的控制方法、装置、设备及存储介质
CN109379537A (zh) * 2018-12-30 2019-02-22 北京旷视科技有限公司 滑动变焦效果实现方法、装置、电子设备及计算机可读存储介质
CN110198413A (zh) * 2019-06-25 2019-09-03 维沃移动通信有限公司 一种视频拍摄方法、视频拍摄装置和电子设备

Also Published As

Publication number Publication date
CN113747085B (zh) 2023-01-06
CN113747085A (zh) 2021-12-03
WO2021244295A1 (fr) 2021-12-09
CN113747050A (zh) 2021-12-03
CN113747050B (zh) 2023-04-18

Similar Documents

Publication Publication Date Title
WO2022062318A1 (fr) Procédé et dispositif de photographie
US11860511B2 (en) Image pickup device and method of tracking subject thereof
US10291842B2 (en) Digital photographing apparatus and method of operating the same
US20230328356A1 (en) Photographing Method and Device
TWI706379B (zh) 圖像處理方法及裝置、電子設備和儲存介質
KR102114377B1 (ko) 전자 장치에 의해 촬영된 이미지들을 프리뷰하는 방법 및 이를 위한 전자 장치
CN114339102B (zh) 一种录像方法及设备
CN113747049B (zh) 一种延时摄影的拍摄方法及设备
JP2007251429A (ja) 動画撮影装置及びズーム調整方法
WO2022105734A1 (fr) Procédé et dispositif d'enregistrement vidéo au ralenti
WO2021185374A1 (fr) Procédé de capture d'image et dispositif électronique
WO2021238317A1 (fr) Procédé et dispositif de capture d'image panoramique
CN117692771A (zh) 一种对焦方法及相关装置
WO2022228259A1 (fr) Procédé de suivi de cible et appareil associé
CN114339101B (zh) 一种录像方法及设备
WO2022143311A1 (fr) Procédé et appareil de photographie pour recommandation intelligente de visée
CN114390191B (zh) 录像方法、电子设备及存储介质
CN117278839A (zh) 一种拍摄方法、电子设备及存储介质
CN112367467B (zh) 显示控制方法、装置、电子设备和介质
US11330166B2 (en) Method of automatically photographing an image, image processing device and image processing system performing the same
US11601588B2 (en) Take-off capture method and electronic device, and storage medium
WO2022062554A1 (fr) Procédé d'enregistrement vidéo à multiples lentilles et dispositif associé
CN117135443A (zh) 一种图像抓拍方法及电子设备

Legal Events

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

Ref document number: 21870707

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

Country of ref document: EP

Kind code of ref document: A1