CN114615426A - Shooting method, shooting device, electronic equipment and readable storage medium - Google Patents

Shooting method, shooting device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN114615426A
CN114615426A CN202210149231.3A CN202210149231A CN114615426A CN 114615426 A CN114615426 A CN 114615426A CN 202210149231 A CN202210149231 A CN 202210149231A CN 114615426 A CN114615426 A CN 114615426A
Authority
CN
China
Prior art keywords
image
images
frames
target
panoramic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210149231.3A
Other languages
Chinese (zh)
Inventor
王凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202210149231.3A priority Critical patent/CN114615426A/en
Publication of CN114615426A publication Critical patent/CN114615426A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/698Control of cameras or camera modules for achieving an enlarged field of view, e.g. panoramic image capture
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/95Computational photography systems, e.g. light-field imaging systems
    • H04N23/951Computational photography systems, e.g. light-field imaging systems by using two or more images to influence resolution, frame rate or aspect ratio

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Studio Devices (AREA)

Abstract

The application discloses a shooting method, a shooting device, electronic equipment and a readable storage medium, and belongs to the technical field of shooting. The shooting method comprises the following steps: acquiring a plurality of frames of first images when the electronic equipment is in a panoramic shooting mode; aligning and cutting the multiple frames of first images to obtain multiple frames of second images corresponding to the multiple frames of first images; and carrying out image splicing on the plurality of frames of second images and outputting a panoramic image.

Description

Shooting method, shooting device, electronic equipment and readable storage medium
Technical Field
The application belongs to the technical field of camera shooting, and particularly relates to a shooting method, a shooting device, electronic equipment and a readable storage medium.
Background
With the rapid development of communication technology, electronic devices are applied more and more widely, for example, panoramic photography is performed using electronic devices.
In the related art, when electronic equipment is used for panoramic shooting, a user controls the electronic equipment to translate or rotate to trigger the electronic equipment to shoot multi-frame images, and the multi-frame images are spliced to obtain a panoramic image.
However, in the process of manually controlling the electronic device to translate or rotate by a user, the electronic device inevitably shakes up and down, and the electronic device cannot be kept at the same horizontal height, so that the splicing regions of two adjacent frames of images cannot be completely matched, splicing dislocation of image data is caused, and further, a synthesized panoramic image is discontinuous or has a fault phenomenon and the like. Thus, the quality of the panoramic image photographed by the electronic device is poor.
Disclosure of Invention
An embodiment of the present application aims to provide a shooting method, a shooting device, an electronic device, and a readable storage medium, which can solve the problem of poor quality of a panoramic image shot by an electronic device in the related art.
In a first aspect, an embodiment of the present application provides a shooting method, where the method includes:
acquiring a plurality of frames of first images when the electronic equipment is in a panoramic shooting mode;
aligning and cutting the plurality of frames of first images to obtain a plurality of frames of second images corresponding to the plurality of frames of first images;
and carrying out image splicing on the plurality of frames of second images and outputting a panoramic image.
In a second aspect, an embodiment of the present application provides a shooting apparatus, including:
the acquisition module is used for acquiring a plurality of frames of first images when the electronic equipment is in a panoramic shooting mode;
the processing module is used for carrying out alignment processing and cutting processing on the multiple frames of first images to obtain multiple frames of second images corresponding to the multiple frames of first images;
and the output module is used for carrying out image splicing on the plurality of frames of second images and outputting the panoramic image.
In a third aspect, embodiments of the present application provide an electronic device, which includes a processor and a memory, where the memory stores a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product, stored on a storage medium, for execution by at least one processor to implement the method according to the first aspect.
In the embodiment of the application, when the electronic device is in a panoramic shooting mode, a plurality of frames of first images are acquired, the plurality of frames of first images are aligned and cut to obtain a plurality of frames of second images corresponding to the plurality of frames of first images, and the plurality of frames of second images are subjected to image splicing to obtain the panoramic image. In addition, in the panoramic shooting process, the spliced panoramic image is directly used as a preview image to be displayed, a user cannot perceive the shaking of the preview image, and the user experience is better.
Drawings
Fig. 1 is a schematic flowchart of a shooting method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a shooting preview interface provided in an embodiment of the present application;
fig. 3 is a schematic diagram of a panoramic image provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of another panoramic image provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a method for viewing a panoramic image according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of acquiring a target video according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a shooting device provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 9 is a schematic hardware structure diagram of an electronic device implementing an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below clearly with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/", and generally means that the former and latter related objects are in an "or" relationship.
The shooting method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Please refer to fig. 1, which is a flowchart illustrating a photographing method according to an embodiment of the present application. As shown in fig. 1, the method may include steps 1100-1300, described in detail below.
Step 1100, when the electronic device is in a panoramic shooting mode, acquiring multiple frames of first images.
In this embodiment, the multi-frame first image may be a multi-frame image continuously acquired by a camera of the electronic device. For example, any two adjacent images in the multiple first images may be two images shot by a camera of the electronic device at a preset time interval, or two images shot by the camera after the electronic device moves a preset distance or rotates a preset angle, which may be determined specifically according to an actual situation, and the embodiment of the present application is not limited.
In some embodiments of the present application, acquiring a plurality of frames of the first image may further include: receiving a second input of the user; and responding to the second input, and acquiring multiple frames of first images according to preset shooting parameters.
In this embodiment, the second input may be an input controlling the movement of the electronic device in the first direction. The second input may be an input for controlling the electronic device to translate in the first direction, or an input for controlling the electronic device to rotate in the first direction. The first direction may be a designated direction, for example, the first direction is a left direction, a right direction, a clockwise direction, a counterclockwise direction, or the like.
Illustratively, the second input may further include at least one of: an input for triggering the electronic device to start a panorama shooting mode, for example, a click input to a "shooting control" on a shooting preview interface; the input for triggering the electronic device to end the panoramic shooting, for example, the click input to the "shooting control" on the shooting preview interface, may be specifically determined according to the actual use requirement, and the embodiment of the present application is not limited.
In this embodiment, the photographing parameters may be photographing parameters corresponding to a panorama photographing mode set in advance. The photographing parameters may include a focus parameter, an exposure parameter, a resolution, and the like.
In some embodiments of the present application, before the electronic device is in the panorama shooting mode and acquires the plurality of frames of the first image, the method may further include: receiving a third input of the user; in response to a third input, starting a panoramic shooting mode; receiving a fourth input from the user; and responding to the fourth input, and starting the anti-shake function.
In this embodiment, the third input may be used to turn on a panorama mode of the camera application. Illustratively, the third input may be a click input of the target control by the user, or a specific gesture input by the user, which may be determined according to actual usage requirements, and this is not limited in this embodiment of the application. The specific gesture in the embodiment of the application can be any one of a single-click gesture, a sliding gesture and a dragging gesture; the click input in the embodiment of the application can be click input, double-click input, click input of any number of times and the like, and can also be long-time press input or short-time press input. It should be noted that the electronic device having a shooting function provides a user with a plurality of shooting modes, for example, a panorama mode, a beauty mode, a video recording mode, and the like. Similarly, in the present embodiment, the camera application of the electronic device includes a panorama shooting mode.
The fourth input may be for an anti-shake function of the panorama mode that is turned on. The fourth input may be, for example, a click input of the target control by the user, or a specific gesture input by the user, which may be specifically determined according to actual use requirements, and is not limited in this embodiment of the application. The specific gesture in the embodiment of the application may be any one of a single-click gesture, a sliding gesture and a dragging gesture; the click input in the embodiment of the application can be click input, double-click input, click input of any number of times and the like, and can also be long-time press input or short-time press input.
For example, please refer to fig. 2, which is a schematic diagram of a shooting preview interface according to an embodiment of the present application. Specifically, when a user uses the electronic device to shoot an image, the camera application program is started, the electronic device displays a shooting preview interface, the shooting preview interface comprises an option 201 of a panoramic shooting mode, a third input of the user to the option 201 of the panoramic shooting mode is received, and the panoramic shooting mode is entered. The shooting preview interface further includes an anti-shake option 202, which receives a fourth input from the user to the anti-shake option 202, and starts the anti-shake function in the panoramic shooting mode.
In the embodiment of the application, a user can select whether to start the panoramic shooting mode or not according to actual use requirements, and start the anti-shake function of the panoramic shooting mode, so that the multi-frame first image is aligned and cut in the panoramic shooting process, and splicing dislocation of image data caused by shaking is avoided.
After step 1100, step 1200 is executed to perform alignment processing and cropping processing on the multiple frames of first images, so as to obtain multiple frames of second images corresponding to the multiple frames of first images.
In this embodiment, the first image may be image data output by an image sensor of the electronic device, i.e., the first image is raw image data captured by the image sensor. The second image may be a preview image displayed by the electronic device. The second image is used for image stitching to obtain a panoramic image. The second image may be an image obtained by performing alignment processing and/or cropping processing on the first image.
In this embodiment, in the panoramic shooting process, a user is required to control the electronic device to move or rotate along a certain direction, which inevitably generates jitter, and causes a situation that the first image and the previous frame image of the first image are spliced and misaligned. In this regard, it is necessary to perform an alignment process and a cropping process on the first image, that is, to perform an alignment process on the first image and an image of a frame immediately preceding the first image.
For example, for a first frame image in a plurality of frames of first images, the alignment processing and the cropping processing are performed on the first image, and the cropping processing may be performed on the first frame image according to the display parameters of the preview image. For example, for the ith frame of image in the multiple frames of first images, the alignment processing and cropping processing may be performed on the first image by using the image of the frame immediately preceding the ith frame of image as a reference image, that is, by using the processed ith-1 frame of image as a reference image, performing the alignment processing on the ith frame of image and the processed ith-1 frame of image, and then performing the cropping processing on the processed ith frame of image according to the display parameters of the preview image. The ith frame image may be any one of the first images of the plurality of frames except the first frame image. Further, the display parameter of the preview image may be a display scale of the preview image, that is, the display scale may be a display scale of a panorama shooting mode of the electronic device.
In some embodiments of the present application, the multiple frames of first images include a first target image and a second target image which are adjacent to each other, and performing the alignment process on the multiple frames of first images may further include: and when the content of the first image area of the first target image is consistent with the content of the second image area of the second target image, performing alignment processing on the first image area of the first target image and the second image area of the second target image.
In this embodiment, the first target image and the second target image may be adjacent images of any two frames of the first image of the plurality of frames. And, the first target image may be an image acquired at the last time, which has been subjected to the alignment processing and the cropping processing. The second target image may be a raw image acquired by the image sensor at the current time. Here, the angle of view of the second target image is larger than that of the first target image, that is, the second target image includes more image information than that of the first target image. Based on the above, the second target image is subjected to alignment processing and cropping processing, and a corresponding second image can be obtained.
The second image area may be an image area of the second target image that is connected to the first image area of the first target image, and the second image area and the first image area contain image content that is consistent. By comparing the second target image with the first target image, image areas containing the same content in the second target image and the first target image can be determined. That is, when the content of the second image area of the second target image matches the content of the first image area of the first target image, the second image area of the second target image and the first image area of the first target image are aligned, that is, the second target image and the first target image at the last time after the alignment process is performed.
In some embodiments, target pixel points in the second target image and the first target image, which contain the same image information, may be determined, and the first target image is used as a reference image, and based on the target pixel points, the second target image and the first target image are aligned. The target pixel points may be pixel points that are included in the first target image and the second target image and contain the same image information, that is, the target pixel points may be consistent pixel points in the first target image and the second target image.
Referring to fig. 3 and 4, the procedure of performing the alignment process on the second target image and the first target image will be described. As shown in fig. 3, the panoramic image includes a second target image 302 captured at the current time and a processed first target image 301 at the previous time, and it can be seen that the second target image 302 is spliced and dislocated with the first target image 301 at the previous time. Under the condition that a user starts the anti-shake function of the panoramic shooting mode, a second target image 302 acquired at the current moment is acquired, the second target image 302 is compared with a first target image 301 at the previous moment, and an image area containing the same image information in the second target image 302 and the first target image 301 is determined. That is, the content of the second image area of the second target image 302 is consistent with the content of the first image area of the first target image 301, for example, the second image area of the second target image 302 is an image area where the hand and the foot of the small person are located, and the first image area of the first target image 301 is also an image area where the hand and the foot of the small person are located. Then, the first target image 301 is used as a reference image, and the second image area of the second target image 302 is aligned with the first image area of the first target image 301, that is, the second target image 302 is aligned with the first target image 301. Then, the second target image 302 is cut according to the display scale of the first target image 301, so as to obtain a second image corresponding to the second target image 302. As shown in fig. 4, the content of the second image area of the second image 402 is in an aligned state with the content of the first image area of the first target image 401.
In this embodiment, the multiple frames of first images include a first target image and a second target image which are adjacent to each other, and when the content of the first image area of the first target image is consistent with the content of the second image area of the second target image, the first image area of the first target image is aligned with the second image area of the second target image, so that in the process of panoramic shooting, each frame of first image in the multiple frames of first images is processed in such a way that the first image can be aligned with the previous frame of image, so as to obtain the second image corresponding to the first image, and the panoramic image is generated based on the modified second image, so that splicing misalignment of image data can be avoided, and further, discontinuity or a fault phenomenon of the synthesized panoramic image can be avoided.
After step 1200, step 1300 is executed to perform image stitching on the multiple frames of second images, and output a panoramic image.
In the present embodiment, the plurality of frames of second images correspond to the plurality of frames of first images one to one. Illustratively, the electronic device sequentially splices the multiple frames of second images to generate a panoramic image, or the electronic device sequentially splices the multiple frames of second images and other images to generate a panoramic image. In the embodiment of the present application, multiple frames of second images are sequentially spliced, and any related technology may be referred to in the specific process of generating a panoramic image, which is not described herein any more.
The panoramic image may be a panoramic image at any angle, for example, a 360-degree panoramic image, a 180-degree panoramic image, or the like; the panoramic image may also be a panoramic image in other forms, which may be determined according to actual use requirements, and the embodiment of the present application is not limited.
In some embodiments of the present application, after obtaining the plurality of frames of second images corresponding to the plurality of frames of first images, the method may further include: and generating a target video according to the plurality of frames of second images.
In specific implementation, under the condition that a command of finishing panoramic shooting is received, multiple frames of second images stored in the buffer are acquired, and the multiple frames of second images are transmitted to a video encoder to be subjected to video encoding, so that a target video is generated.
In this embodiment, in the panoramic shooting process, multiple frames of first images are acquired, the multiple frames of first images are aligned and cut to obtain multiple frames of second images corresponding to the multiple frames of first images, then the multiple frames of second images can be subjected to image splicing to output a panoramic image, and meanwhile, a target video is generated according to the multiple frames of second images.
In some embodiments of the application, after the generating the target video according to the plurality of frames of the second image, the method may further include: storing the panoramic image and the target video in an associated manner; displaying a first identifier indicating the target video in a case where the panoramic image is displayed.
In the present embodiment, the target video is a video associated with a panoramic image. The first identifier is used for indicating that a target video corresponding to the panoramic image is stored. The target video corresponding to the panoramic image can be acquired through the first identifier. For example, as shown in fig. 6, the first identifier may be an identifier corresponding to a control 602 labeled "panoramic video" in the shooting preview interface.
In some embodiments of the present application, after displaying the first identifier in a case where the panoramic image is displayed, the method may further include: receiving a first input to the first identification; in response to the first input, playing the target video associated with the panoramic image.
In this embodiment, the first input may be an input to acquire a target video associated with a panoramic image. The first input may be, for example, a click input of the target control by the user, or a specific gesture input by the user, which may be specifically determined according to actual use requirements, and is not limited in this embodiment of the application. The click input in the embodiment of the application can be single click input, double click input, click input of any number of times and the like, and can also be long-press input or short-press input. The specific gesture in the embodiment of the present application may be any one of a single-click gesture, a sliding gesture, and a dragging gesture. For example, as shown in FIG. 6, an input to a control 602 labeled "panoramic video" in the capture preview interface.
Referring to fig. 5 to 6, the viewing steps of the panoramic image and the target video will be explained. As shown in fig. 5, when entering the panoramic shooting mode and starting the anti-shake function of the panoramic shooting mode, the shooting of the panoramic image is started under the condition that the click input of the user on the shooting control is received, and the shooting of the panoramic image is ended under the condition that the click input of the user on the shooting control is received again, that is, a plurality of frames of first images are obtained, the plurality of frames of first images are aligned to obtain a plurality of frames of second images, the plurality of frames of second images are spliced to obtain the panoramic image, and the panoramic image 501 is displayed on the shooting preview interface. In addition, when the click input of the user to the shooting control is received again, the target video is generated according to the second images of the multiple frames. As shown in fig. 5, the shooting preview interface further includes an album control 502, and receives a click input from the user to the album control 502 to enter the album. Then, referring to fig. 6, a panoramic image 601 can be viewed in an album, the album further includes a control 602 marked with "panoramic video", and when a click input of the user to the control 602 marked with "panoramic video" is received, a target video corresponding to a label of the panoramic image is searched according to the label of the panoramic image, the target video 603 is displayed, and the user can play the target video. Here, the input for acquiring the target video associated with the panoramic image may be a click input for the panoramic image.
In this embodiment, after the target video is generated from the second images of multiple frames, the panoramic image and the target video are stored in association, and in a case where the panoramic image is displayed, the first identifier indicating the target video is displayed, so that the panoramic image with the associated target video may be marked to prompt the user that the target video associated with the panoramic image may be viewed. In addition, the user can play the target image associated with the panoramic image through the first input of the first identifier, and the operation is more convenient.
In some embodiments of the present application, the associating and storing the panoramic image and the target video may further include: and storing the panoramic image and the target video, and adding the same label to the panoramic image and the target video.
In specific implementation, when a panorama shooting mode of the electronic device is started, the electronic device sets a buffer (buffer), and after aligning and cropping a plurality of frames of first images to obtain a plurality of frames of second images corresponding to the plurality of frames of first images, stores the plurality of frames of second images into the buffer. Meanwhile, after the plurality of frames of second images are subjected to image splicing to obtain a panoramic image, a preset tag (tag) is added to the panoramic image. And then, under the condition that a command of finishing panoramic shooting is received, acquiring a plurality of frames of second images stored in the buffer, and transmitting the plurality of frames of second images into a video encoder for video encoding to generate a target video. The target video may then be stored in a buffer. Meanwhile, the same tag (tag) as the panoramic image is added to the target image so that the panoramic image and the target video are stored in association in the buffer. That is, the panoramic image is stored in association with the target video.
In this embodiment, after the target video is generated according to the multiple frames of second images, the panoramic image and the target video are stored in an associated manner, so that the target video associated with the panoramic image is obtained according to the association relationship between the panoramic image and the target video under the condition that the first input of the user to the first identifier is received.
In the embodiment of the application, when the electronic device is in a panoramic shooting mode, a plurality of frames of first images are acquired, the plurality of frames of first images are aligned and cut to obtain a plurality of frames of second images corresponding to the plurality of frames of first images, and the plurality of frames of second images are subjected to image splicing to obtain the panoramic image. In addition, in the panoramic shooting process, the spliced panoramic image is directly used as a preview image to be displayed, a user cannot perceive the shaking of the preview image, and the user experience is better.
According to the shooting method provided by the embodiment of the application, the execution main body can be a shooting device. The embodiment of the present application takes a method for executing shooting by a shooting device as an example, and describes a shooting device provided by the embodiment of the present application.
Corresponding to the above embodiments, referring to fig. 7, an embodiment of the present application further provides a camera 700, where the camera 700 includes an obtaining module 701, a processing module 702, and an output module 703.
The obtaining module 701 is configured to obtain multiple frames of first images when the electronic device is in a panoramic shooting mode;
the processing module 702 is configured to perform alignment processing and cropping processing on the multiple frames of first images to obtain multiple frames of second images corresponding to the multiple frames of first images;
the output module 703 is configured to perform image stitching on the multiple frames of second images, and output a panoramic image.
In the embodiment of the application, in the panoramic shooting process, when jitter occurs, each frame of image can be automatically corrected according to the previous frame of image, splicing dislocation of image data can be avoided, further, discontinuity or fault phenomenon of a synthesized panoramic image can be avoided, and the image quality of the panoramic image shot by the electronic equipment is improved. In addition, in the panoramic shooting process, the spliced panoramic image is directly used as a preview image to be displayed, a user cannot perceive the shaking of the preview image, and the user experience is better.
Optionally, the multiple frames of first images include a first target image and a second target image that are adjacent to each other, and the processing module 702 is specifically configured to: and when the content of the first image area of the first target image is consistent with the content of the second image area of the second target image, performing alignment processing on the first image area of the first target image and the second image area of the second target image.
In this embodiment, the multiple frames of first images include a first target image and a second target image that are adjacent to each other, and when the content of the first image area of the first target image is consistent with the content of the second image area of the second target image, the first image area of the first target image is aligned with the second image area of the second target image, so that in the process of panoramic shooting, each frame of first image in the multiple frames of first images is processed in such a manner that the first image can be aligned with the previous frame of image, so as to obtain the second image corresponding to the first image, and the panoramic image is generated based on the modified second image, so that splicing misalignment of image data can be avoided, and further, discontinuity of the synthesized panoramic image or a tomography phenomenon can be avoided.
Optionally, the apparatus further comprises: and the generating module is used for generating a target video according to the plurality of frames of second images.
In the embodiment, in the panoramic shooting process, a plurality of frames of first images are obtained, the plurality of frames of first images are subjected to alignment processing and cutting processing to obtain a plurality of frames of second images corresponding to the plurality of frames of first images, then the plurality of frames of second images can be subjected to image splicing to output the panoramic image, and meanwhile, the target video is generated according to the plurality of frames of second images.
Optionally, the apparatus further comprises: the storage module is used for storing the panoramic image and the target video in an associated manner; and the display module is used for displaying a first identifier under the condition of displaying the panoramic image, wherein the first identifier is used for indicating the target video.
Optionally, the apparatus further comprises: a receiving module, configured to receive a first input to the first identifier; a playback module to play the target video associated with the panoramic image in response to the first input.
In this embodiment, after the target video is generated from the multiple frames of second images, the panoramic image and the target video are stored in association, and in a case where the panoramic image is displayed, the first identifier indicating the target video is displayed, so that the panoramic image with the associated target video can be marked to prompt the user that the target video associated with the panoramic image can be viewed. In addition, the user can play the target image associated with the panoramic image through the first input of the first identifier, and the operation is more convenient.
Optionally, the storage module is specifically configured to: and storing the panoramic image and the target video, and adding the same label to the panoramic image and the target video.
In this embodiment, after the target video is generated according to the multiple frames of second images, the panoramic image and the target video are stored in an associated manner, so that the target video associated with the panoramic image is obtained according to the association relationship between the panoramic image and the target video under the condition that the first input of the user to the first identifier is received.
The shooting device in the embodiment of the present application may be an electronic device, or may be a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be a device other than a terminal. By way of example, the electronic Device may be a Mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic Device, a Mobile Internet Device (MID), an Augmented Reality (AR)/Virtual Reality (VR) Device, a robot, a wearable Device, an ultra-Mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the embodiment of the present application is not particularly limited.
The photographing apparatus in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The shooting device provided in the embodiment of the present application can implement each process implemented in the method embodiment of fig. 1, and is not described here again to avoid repetition.
Optionally, as shown in fig. 8, an electronic device 800 is further provided in this embodiment of the present application, and includes a processor 801 and a memory 802, where the memory 802 stores a program or an instruction that can be executed on the processor 801, and when the program or the instruction is executed by the processor 801, the steps of the foregoing shooting method embodiment are implemented, and the same technical effects can be achieved, and are not described again here to avoid repetition.
Fig. 9 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 900 includes, but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910.
Those skilled in the art will appreciate that the electronic device 900 may further include a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 910 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system. The electronic device structure shown in fig. 9 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is not repeated here.
Wherein, the processor 910 is configured to: acquiring a plurality of frames of first images when the electronic equipment is in a panoramic shooting mode; aligning and cutting the multiple frames of first images to obtain multiple frames of second images corresponding to the multiple frames of first images; and carrying out image splicing on the plurality of frames of second images and outputting a panoramic image.
In the embodiment of the application, in the panoramic shooting process, when jitter occurs, each frame of image can be automatically corrected according to the previous frame of image, splicing dislocation of image data can be avoided, further, discontinuity or fault phenomenon of a synthesized panoramic image can be avoided, and the image quality of the panoramic image shot by the electronic equipment is improved. In addition, in the panoramic shooting process, the spliced panoramic image is directly used as a preview image to be displayed, a user cannot perceive the shaking of the preview image, and the user experience is better.
Optionally, the multiple frames of first images include a first target image and a second target image which are adjacent to each other, and when the processor 910 aligns the multiple frames of first images, the processor is configured to: and when the content of the first image area of the first target image is consistent with the content of the second image area of the second target image, performing alignment processing on the first image area of the first target image and the second image area of the second target image.
In this embodiment, the multiple frames of first images include a first target image and a second target image which are adjacent to each other, and when the content of the first image area of the first target image is consistent with the content of the second image area of the second target image, the first image area of the first target image is aligned with the second image area of the second target image, so that in the process of panoramic shooting, each frame of first image in the multiple frames of first images is processed in such a way that the first image can be aligned with the previous frame of image, so as to obtain the second image corresponding to the first image, and the panoramic image is generated based on the modified second image, so that splicing misalignment of image data can be avoided, and further, discontinuity or a fault phenomenon of the synthesized panoramic image can be avoided.
Optionally, after obtaining the plurality of frames of second images corresponding to the plurality of frames of first images, the processor 910 is further configured to: and generating a target video according to the plurality of frames of second images.
In the embodiment, in the panoramic shooting process, a plurality of frames of first images are obtained, the plurality of frames of first images are subjected to alignment processing and cutting processing to obtain a plurality of frames of second images corresponding to the plurality of frames of first images, then the plurality of frames of second images can be subjected to image splicing to output the panoramic image, and meanwhile, the target video is generated according to the plurality of frames of second images.
Optionally, after generating a target video according to the multiple frames of second images, a memory 909 is configured to store the panoramic image and the target video in association; a display unit 906 configured to display a first identifier indicating the target video in a case where the panoramic image is displayed.
Optionally, after displaying the first identifier in a case of displaying the panoramic image, a user input unit 907 for receiving a first input to the first identifier; a processor 910 further configured to play the target video associated with the panoramic image in response to the first input.
In this embodiment, after the target video is generated from the second images of multiple frames, the panoramic image and the target video are stored in association, and in a case where the panoramic image is displayed, the first identifier indicating the target video is displayed, so that the panoramic image with the associated target video may be marked to prompt the user that the target video associated with the panoramic image may be viewed. In addition, the user can play the target image associated with the panoramic image through the first input of the first identifier, and the operation is more convenient.
Optionally, the memory 909 is configured to store the panoramic image and the target video and add the same tag to the panoramic image and the target video when the panoramic image and the target video are stored in association with each other.
In this embodiment, after the target video is generated according to the multiple frames of second images, the panoramic image and the target video are stored in an associated manner, so that the target video associated with the panoramic image is obtained according to the association relationship between the panoramic image and the target video under the condition that the first input of the user to the first identifier is received.
It should be understood that, in the embodiment of the present application, the input Unit 904 may include a Graphics Processing Unit (GPU) 9041 and a microphone 9042, and the Graphics Processing Unit 9041 processes image data of a still picture or a video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. A touch panel 9071 also referred to as a touch screen. The touch panel 9071 may include two parts, a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
The memory 909 may be used to store software programs as well as various data. The memory 909 may mainly include a first storage area storing a program or an instruction and a second storage area storing data, wherein the first storage area may store an operating system, an application program or an instruction (such as a sound playing function, an image playing function, and the like) required for at least one function, and the like. Further, the memory 909 may include volatile memory or nonvolatile memory, or the memory 909 may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. The volatile Memory may be a Random Access Memory (RAM), a Static Random Access Memory (Static RAM, SRAM), a Dynamic Random Access Memory (Dynamic RAM, DRAM), a Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), a Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, ddr SDRAM), an Enhanced Synchronous SDRAM (ESDRAM), a Synchronous Link DRAM (SLDRAM), and a Direct Memory bus RAM (DRRAM). The memory 109 in the embodiments of the subject application includes, but is not limited to, these and any other suitable types of memory.
Processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor, which primarily handles operations involving the operating system, user interface, and applications, and a modem processor, which primarily handles wireless communication signals, such as a baseband processor. It is to be appreciated that the modem processor described above may not be integrated into processor 910.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above shooting method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read only memory ROM, a random access memory RAM, a magnetic or optical disk, and the like.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above shooting method embodiment, and can achieve the same technical effect, and the details are not repeated here to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
Embodiments of the present application provide a computer program product, where the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the processes of the foregoing shooting method embodiments, and achieve the same technical effects, and in order to avoid repetition, details are not repeated here.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A photographing method, characterized in that the method comprises:
acquiring a plurality of frames of first images when the electronic equipment is in a panoramic shooting mode;
aligning and cutting the plurality of frames of first images to obtain a plurality of frames of second images corresponding to the plurality of frames of first images;
and carrying out image splicing on the plurality of frames of second images and outputting a panoramic image.
2. The method according to claim 1, wherein the plurality of frames of first images include a first target image and a second target image which are adjacent to each other, and the aligning the plurality of frames of first images includes:
and when the content of the first image area of the first target image is consistent with the content of the second image area of the second target image, performing alignment processing on the first image area of the first target image and the second image area of the second target image.
3. The method according to claim 1, wherein after obtaining the plurality of frames of second images corresponding to the plurality of frames of first images, the method further comprises:
and generating a target video according to the plurality of frames of second images.
4. The method according to claim 3, wherein after generating the target video according to the plurality of frames of second images, the method further comprises:
storing the panoramic image and the target video in an associated manner;
displaying a first identifier indicating the target video in a case where the panoramic image is displayed.
5. The method of claim 4, wherein after displaying the first identifier while displaying the panoramic image, the method further comprises:
receiving a first input to the first identification;
in response to the first input, playing the target video associated with the panoramic image.
6. The method of claim 4, wherein the storing the panoramic image in association with the target video comprises:
and storing the panoramic image and the target video, and adding the same label to the panoramic image and the target video.
7. A camera, characterized in that the camera comprises:
the acquisition module is used for acquiring a plurality of frames of first images when the electronic equipment is in a panoramic shooting mode;
the processing module is used for carrying out alignment processing and cutting processing on the multiple frames of first images to obtain multiple frames of second images corresponding to the multiple frames of first images;
and the output module is used for carrying out image splicing on the multi-frame second images and outputting the panoramic image.
8. The apparatus according to claim 7, wherein the multiple frames of first images include a first target image and a second target image that are adjacent to each other, and the processing module is specifically configured to:
and when the content of the first image area of the first target image is consistent with the content of the second image area of the second target image, performing alignment processing on the first image area of the first target image and the second image area of the second target image.
9. An electronic device, characterized in that it comprises a processor and a memory, said memory storing a program or instructions executable on said processor, said program or instructions, when executed by said processor, implementing the steps of the shooting method according to any one of claims 1-6.
10. A readable storage medium, characterized in that the readable storage medium stores thereon a program or instructions which, when executed by a processor, implement the steps of the photographing method according to any one of claims 1 to 6.
CN202210149231.3A 2022-02-17 2022-02-17 Shooting method, shooting device, electronic equipment and readable storage medium Pending CN114615426A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210149231.3A CN114615426A (en) 2022-02-17 2022-02-17 Shooting method, shooting device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210149231.3A CN114615426A (en) 2022-02-17 2022-02-17 Shooting method, shooting device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN114615426A true CN114615426A (en) 2022-06-10

Family

ID=81859292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210149231.3A Pending CN114615426A (en) 2022-02-17 2022-02-17 Shooting method, shooting device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114615426A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117714899A (en) * 2023-07-28 2024-03-15 荣耀终端有限公司 Shooting method for time-lapse shooting and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104539847A (en) * 2014-12-26 2015-04-22 宇龙计算机通信科技(深圳)有限公司 Panoramic photographing method and mobile terminal
CN106851398A (en) * 2017-03-10 2017-06-13 北京小鸟看看科技有限公司 The storage method of panoramic video file, player method, storage device and player
CN108259743A (en) * 2018-01-15 2018-07-06 维沃移动通信有限公司 Panoramic picture image pickup method and electronic equipment
CN108259740A (en) * 2017-12-29 2018-07-06 维沃移动通信有限公司 A kind of method, apparatus and mobile terminal of panoramic picture generation
CN109859104A (en) * 2019-01-19 2019-06-07 创新奇智(重庆)科技有限公司 A kind of video generates method, computer-readable medium and the converting system of picture
CN111935408A (en) * 2020-09-02 2020-11-13 Oppo广东移动通信有限公司 Panoramic image shooting method and system, electronic device and readable storage medium
CN112288877A (en) * 2020-10-28 2021-01-29 北京字节跳动网络技术有限公司 Video playing method and device, electronic equipment and storage medium
CN112995491A (en) * 2019-12-13 2021-06-18 阿里巴巴集团控股有限公司 Video generation method and device, electronic equipment and computer storage medium
CN113891018A (en) * 2021-11-23 2022-01-04 维沃移动通信有限公司 Shooting method and device and electronic equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104539847A (en) * 2014-12-26 2015-04-22 宇龙计算机通信科技(深圳)有限公司 Panoramic photographing method and mobile terminal
CN106851398A (en) * 2017-03-10 2017-06-13 北京小鸟看看科技有限公司 The storage method of panoramic video file, player method, storage device and player
CN108259740A (en) * 2017-12-29 2018-07-06 维沃移动通信有限公司 A kind of method, apparatus and mobile terminal of panoramic picture generation
CN108259743A (en) * 2018-01-15 2018-07-06 维沃移动通信有限公司 Panoramic picture image pickup method and electronic equipment
CN109859104A (en) * 2019-01-19 2019-06-07 创新奇智(重庆)科技有限公司 A kind of video generates method, computer-readable medium and the converting system of picture
CN112995491A (en) * 2019-12-13 2021-06-18 阿里巴巴集团控股有限公司 Video generation method and device, electronic equipment and computer storage medium
CN111935408A (en) * 2020-09-02 2020-11-13 Oppo广东移动通信有限公司 Panoramic image shooting method and system, electronic device and readable storage medium
CN112288877A (en) * 2020-10-28 2021-01-29 北京字节跳动网络技术有限公司 Video playing method and device, electronic equipment and storage medium
CN113891018A (en) * 2021-11-23 2022-01-04 维沃移动通信有限公司 Shooting method and device and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117714899A (en) * 2023-07-28 2024-03-15 荣耀终端有限公司 Shooting method for time-lapse shooting and electronic equipment

Similar Documents

Publication Publication Date Title
CN109525884B (en) Video sticker adding method, device, equipment and storage medium based on split screen
CN112492214B (en) Image shooting method and device, electronic equipment and readable storage medium
CN114125179B (en) Shooting method and device
CN112954212B (en) Video generation method, device and equipment
CN113794831B (en) Video shooting method, device, electronic equipment and medium
CN114390197A (en) Shooting method and device, electronic equipment and readable storage medium
CN114615426A (en) Shooting method, shooting device, electronic equipment and readable storage medium
CN114025237B (en) Video generation method and device and electronic equipment
CN114125297B (en) Video shooting method, device, electronic equipment and storage medium
CN114785957A (en) Shooting method and device thereof
CN115499589A (en) Shooting method, shooting device, electronic equipment and medium
CN112492213B (en) Image shooting method and device and electronic equipment
CN114390206A (en) Shooting method and device and electronic equipment
CN114827737A (en) Image generation method and device and electronic equipment
CN114285922A (en) Screenshot method, screenshot device, electronic equipment and media
CN114245018A (en) Image shooting method and device
CN112399092A (en) Shooting method and device and electronic equipment
CN115103112B (en) Lens control method and electronic equipment
CN112672059B (en) Shooting method and shooting device
CN115052107B (en) Shooting method, shooting device, electronic equipment and medium
CN113923367B (en) Shooting method and shooting device
CN114143455B (en) Shooting method and device and electronic equipment
CN114157810B (en) Shooting method, shooting device, electronic equipment and medium
CN115174812A (en) Video generation method, video generation device and electronic equipment
CN117676310A (en) Shooting method, shooting device, electronic equipment and medium

Legal Events

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