CN112492213B - Image shooting method and device and electronic equipment - Google Patents

Image shooting method and device and electronic equipment Download PDF

Info

Publication number
CN112492213B
CN112492213B CN202011412217.5A CN202011412217A CN112492213B CN 112492213 B CN112492213 B CN 112492213B CN 202011412217 A CN202011412217 A CN 202011412217A CN 112492213 B CN112492213 B CN 112492213B
Authority
CN
China
Prior art keywords
image
images
camera
target
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011412217.5A
Other languages
Chinese (zh)
Other versions
CN112492213A (en
Inventor
顾瀚之
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN202011412217.5A priority Critical patent/CN112492213B/en
Publication of CN112492213A publication Critical patent/CN112492213A/en
Application granted granted Critical
Publication of CN112492213B publication Critical patent/CN112492213B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/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
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing 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/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/681Motion detection
    • H04N23/6812Motion detection based on additional sensors, e.g. acceleration sensors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/69Control of means for changing angle of the field of view, e.g. optical zoom objectives or electronic zooming

Abstract

The application discloses an image shooting method and device and electronic equipment, belongs to the technical field of communication, and can solve the problem that the quality of panoramic images shot by electronic equipment in the related art is poor. The method comprises the following steps: receiving a first input of a user, wherein the first input is used for controlling the first electronic equipment to move along a first direction; in response to a first input, capturing, by a first camera, N frame images, wherein T frame first target images of the N frame images are: the first electronic equipment is obtained by controlling the first camera to rotate along the third direction through the first holder and then shooting under the condition that the target offset exists in the second direction; generating a panoramic image based on the N frames of images shot by the first camera; the second direction is perpendicular to the first direction, the third direction is opposite to the second direction, N is an integer larger than 1, and T is a positive integer smaller than N.

Description

Image shooting method and device and electronic equipment
Technical Field
The application belongs to the technical field of terminals, and particularly relates to an image shooting method and device and electronic equipment.
Background
With the rapid development of communication technology, electronic devices are increasingly used, for example, panoramic photography is performed using electronic devices.
At present, the panoramic shooting process is: a user controls the electronic equipment to move horizontally or rotate to trigger the electronic equipment to shoot multi-frame images, and then the multi-frame images are spliced to synthesize a panoramic image. In addition, in order to obtain a panoramic image with good quality, the splicing areas of any two adjacent frames of images in the multi-frame image need to be completely matched, so that the electronic equipment needs to be kept at the same horizontal height as much as possible in the panoramic shooting process.
However, in the process of manually controlling the translation or rotation of the electronic device, the electronic device inevitably shakes up and down, so that the electronic device cannot be kept at the same horizontal height, and therefore splicing dislocation of image data may be caused because the splicing areas of two adjacent frames of images cannot be completely matched, and further a synthesized panoramic image is discontinuous or has a fault phenomenon. Thus, the quality of the panoramic image photographed by the electronic device is poor.
Disclosure of Invention
The embodiment of the application aims to provide an image shooting method, an image shooting device and electronic equipment, and can solve the problem that the quality of panoramic images shot by electronic equipment in the related art is poor.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides an image capturing method, which is applied to a first electronic device including a first pan/tilt and a first camera, and the method includes: receiving a first input of a user, wherein the first input is used for controlling the first electronic equipment to move along a first direction; in response to a first input, capturing, by a first camera, N frame images, wherein T frame first target images of the N frame images are: the first electronic equipment is obtained by controlling the first camera to rotate along the third direction through the first holder and then shooting under the condition that the target offset exists in the second direction; generating a panoramic image based on the N frames of images shot by the first camera; the second direction is perpendicular to the first direction, the third direction is opposite to the second direction, N is an integer larger than 1, and T is a positive integer smaller than N.
In a second aspect, an embodiment of the present application provides an image capturing apparatus, which includes a first holder and a first camera, and includes: the device comprises a receiving module, a shooting module and a generating module; the receiving module is used for receiving a first input of a user, and the first input is used for controlling the first electronic equipment to move along a first direction; the shooting module is used for responding to a first input and shooting N frames of images through a first camera, wherein T frames of first target images in the N frames of images are as follows: the first electronic equipment is obtained by controlling the first camera to rotate along the third direction through the first holder and then shooting under the condition that the target offset exists in the second direction; the generating module is used for generating a panoramic image based on the N frames of images shot by the first camera; the second direction is perpendicular to the first direction, the third direction is opposite to the second direction, N is an integer larger than 1, and T is a positive integer smaller than N.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions 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 the embodiment of the application, the first electronic device may receive a first input from a user, where the first input is used to control the first electronic device to move in a first direction; in response to a first input, capturing, by a first camera, N frame images, wherein T frame first target images of the N frame images are: the first electronic equipment is obtained by controlling the first camera to rotate along the third direction through the first holder and then shooting under the condition that the target offset exists in the second direction; generating a panoramic image based on the N frames of images shot by the first camera; the second direction is perpendicular to the first direction, the third direction is opposite to the second direction, N is an integer larger than 1, and T is a positive integer smaller than N. In the scheme, in the process of shooting N frames of images, if the first electronic equipment is determined to have target offset in a second direction (which is perpendicular to the first direction), the first camera is controlled by the first tripod head to rotate in a third direction (which is opposite to the second direction) so as to correct the target offset of the first electronic equipment in the second direction, then the images (T frames of first target images in the N frames of images) are shot, if the first electronic equipment is determined not to have the target offset in the second direction (which is perpendicular to the first direction), the images (images in the N frames of images) can be directly shot, so that the target offset of the electronic equipment in the second direction can be corrected in real time (the problem that a user generates motion offset of the electronic equipment in the direction perpendicular to the motion direction due to shaking in the process of moving the electronic equipment can be solved), therefore, the shot N frames of images are basically positioned on the same horizontal plane, splicing dislocation of image data can be avoided, discontinuity or fault phenomenon of the synthesized panoramic image can be avoided, and the quality of the panoramic image shot by the electronic equipment is improved.
Drawings
Fig. 1 is a flowchart of an image capturing method provided in an embodiment of the present application;
fig. 2 is a schematic diagram of an image stitching area of an image capturing method according to an embodiment of the present disclosure;
fig. 3 is one of schematic views of a camera field of view of an image capturing method provided in an embodiment of the present application;
fig. 4 is a schematic moving diagram of an electronic device of an image capturing method according to an embodiment of the present application;
fig. 5 is a second schematic view of a camera view field of the image capturing method according to the embodiment of the present application;
FIG. 6 is a schematic interface diagram of an image capturing method according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an image capturing apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 9 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below 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, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
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 "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
In the embodiments of the present application, words such as "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the description of the embodiments of the present application, unless otherwise specified, "a plurality" means two or more, for example, a plurality of processing units means two or more processing units; plural elements means two or more elements, and the like.
The image capturing method, the image capturing apparatus, and the electronic device provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
The image shooting method provided by the embodiment of the application can be applied to a panoramic shooting scene, and the picture offset caused by the shake of the electronic equipment is compensated by controlling the camera (the first camera) to rotate through the cradle head (the first cradle head) under the condition that the electronic equipment generates the motion offset in the direction vertical to the motion direction. Specifically, in the process of shooting N frames of images, if the first electronic equipment is determined to have target offset in the second direction (which is perpendicular to the first direction), the first camera is controlled by the first holder to rotate along a third direction (opposite to the second direction) so as to correct the target offset of the first electronic equipment in the second direction, then, the image (T frames of first target images in the N frames of images) is shot, if the first electronic equipment is determined that no target offset exists in the second direction (which is perpendicular to the first direction), the image (the image in the N frames of images) can be shot directly, therefore, the problem that in the process of shooting the panoramic image, the electronic equipment shakes due to shaking in the process of controlling the electronic equipment to move by a user, so that the movement deviation is generated in the direction vertical to the movement direction can be well solved. And then N frame images shot can be basically positioned on the same horizontal plane, so that splicing dislocation of image data can be avoided, discontinuity or fault phenomenon of a synthesized panoramic image can be avoided, and the quality of the panoramic image shot by the electronic equipment is improved.
It should be noted that, in this embodiment of the application, the motor is included in the first cloud platform, and the first cloud platform passes through the motor to be connected with first camera to can rotate through the first camera of motor control. For example, in the process that the electronic device moves along a first direction, the electronic device measures and calculates offset data (offset direction, offset distance and offset angle) of the electronic device through a sensor such as a gyroscope and an accelerometer, the first pan-tilt acquires the offset data, and controls the first camera (according to the self posture of the first camera) to rotate along the horizontal (x-axis) or vertical (y-axis) direction within a certain angle in real time through a motor according to the offset data, so that high-precision adjustment is performed, picture shaking caused by shaking of the electronic device is compensated, and great-amplitude lossless anti-shaking is achieved. For a specific description of the first pan/tilt head controlling the first camera to rotate, reference may be made to the description in the related art, and details are not repeated here. The first camera is controlled by the first holder to rotate, so that the view field of the first camera can be changed under the condition that the first electronic device does not move, and therefore in the process of shooting the panoramic image, under the condition that the first electronic device has target offset, the first electronic device controls the first camera to rotate through the first holder so as to correct the image offset caused by the target offset (in the direction perpendicular to the moving direction of the shot panoramic image) of the first electronic device, therefore, the splicing area of any two adjacent images in the multi-frame image can be completely matched, and finally the panoramic image with better quality can be spliced.
Referring to fig. 1, an image capturing method provided in an embodiment of the present application is exemplarily described below by taking an execution subject as a first electronic device including a first pan/tilt and a first camera as an example. The method may include steps 201 through 203 described below.
Step 201, a first electronic device receives a first input of a user.
The first input is for controlling movement of the first electronic device in a first direction.
Alternatively, the first input may be an input for controlling the first electronic device to translate along the first direction by a user, or an input for controlling the first electronic device to rotate along the first direction by the user.
Optionally, the first input may further comprise at least one of: the method includes triggering an input of the first electronic device to start a panorama shooting mode (for example, a click input to a "shooting option" on a shooting preview interface), and triggering an input of the first electronic device to end panorama shooting (for example, a click input to a "shooting option" on a shooting preview interface), which may be specifically determined according to actual use requirements, and the embodiment of the present application is not limited.
Illustratively, the click input may be a short-press input, a long-press input, a single-click input, a double-click input, or the like.
Step 202, the first electronic device responds to the first input and shoots N frames of images through the first camera.
Wherein, the T frame first target images in the N frame images are: under the condition that the first electronic equipment has target deviation in the second direction, the first camera is controlled by the first holder to rotate along the third direction and then shooting is carried out.
The second direction is perpendicular to the first direction, the third direction is opposite to the second direction, N is an integer larger than 1, and T is a positive integer smaller than N.
It is understood that in the embodiments of the present application, the first direction is a specific direction, for example, the first direction is a left direction, a right direction, a clockwise direction, a counterclockwise direction, or the like.
It is understood that in the embodiments of the present application, the second direction is perpendicular to the first direction, for example, the first direction is horizontal to the left, and then the second direction is vertical to the bottom, or the second direction is vertical to the top.
It is understood that, in the embodiment of the present application, the second direction and the third direction are two directions that are opposite to each other, and are not specific directions, and the second direction and the third direction may change during the panoramic shooting process. For example, if the second direction is vertically downward, then the third direction is vertically upward; if the second direction is vertically upward, the third direction is vertically downward.
In the embodiment of the present application, the target offset refers to a displacement of the first electronic device in the second direction.
Optionally, in this embodiment of the application, the first electronic device may obtain the target offset of the first electronic device in the second direction through at least one sensor of a gravity sensor, a gyroscope sensor, and the like, and for specific description, reference may be made to related technologies, which are not repeated herein.
Optionally, in this embodiment of the application, the first electronic device may determine whether the first electronic device has a target offset in the second direction according to an image captured by the first camera during the panoramic shooting, and specifically, may determine whether the first electronic device has a target offset in the second direction by comparing image contents of the image 1 and the image 2 captured by the first electronic device and determining whether the image 2 has a target offset in the second direction with respect to the image 1. For example, the image 1 may be a first frame image of the N frame images for a period of time, the image 1 may be a second frame image of the N frame images for a later period of time, and then the image 1 may be a third frame image, a fourth frame image, and so on); the image 2 is an image acquired after the image 1, and the images 1 and 2 may be two adjacent frames of images, or two frames of images separated by a preset frame of image, and the latter (the images 1 and 2 are two frames of images separated by a preset frame of image) can more accurately determine the direction (i.e. the second direction) of the target offset of the image 2 relative to the image 1, so as to avoid that the direction of the offset is difficult to determine because the offset of the two adjacent frames of images is small.
Optionally, the first electronic device detects in real time whether there is a target shift in the second direction of the first electronic device after shooting a first frame image of the N frame images in the panorama shooting process in response to the first input.
Optionally, the first electronic device detects whether there is a target shift in the second direction by the first electronic device in real time within a preset time period after capturing a first frame image of the N frame images and before capturing each frame image of the N frame images other than the first frame image in response to the first input.
Under the condition that the target offset exists, the first camera is controlled to rotate along the third direction through the first holder, and image compensation at a certain angle is performed on the image acquired by the first camera, so that the image offset of the image caused by the target offset of the first electronic equipment in the second direction is corrected. Then one first target image in the T frames of first target images is shot. And if the target offset is determined not to exist, shooting one frame of image in the images except the first target image of the T frames in the N frames of images.
Optionally, any two adjacent images in the N frames of images may be two images shot by the first camera at a preset time interval, or two images shot by the first camera after the first 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.
Optionally, the similarity of the splicing region of any two adjacent images in the N frames of images is greater than or equal to a first threshold; the target offset is greater than or equal to a second threshold. The first threshold is a positive number less than or equal to 1 and the second threshold is a positive number. For example, the first threshold value is 95%, and the second threshold value is 0. Specific values of the first threshold and the second threshold may be determined according to actual needs, and the embodiment of the present application is not limited.
Optionally, the stitching regions of any two adjacent images in the N images completely coincide (i.e. the first threshold is 100%).
In the embodiment of the application, in the process of synthesizing the panoramic image, the first electronic device needs to splice the head and the tail of any two adjacent images in the N frames of images, if the similarity of the spliced area is greater than or equal to a first threshold value, the small range of the spliced area does not overlap, and the finally generated panoramic image cannot have the phenomenon of discontinuity or fault through cutting the image boundary (reducing the view field by an appropriate amount) by an appropriate amount (a small amount); if the splicing areas are completely overlapped, the finally generated panoramic image does not have discontinuity or fault phenomena, and the view field of the panoramic image can be kept unchanged.
Illustratively, as shown in fig. 2, the image a and the image b are two adjacent frames, and the shaded area is a splicing area of the image a and the image b.
And step 203, the first electronic equipment generates a panoramic image based on the N frames of images shot by the first camera.
Optionally, the first electronic device sequentially splices the N frames of images to generate a panoramic image, or the first electronic device sequentially splices the N frames of images and other images to generate a panoramic image.
In the embodiment of the present application, multiple frames of 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 again.
Alternatively, the panoramic image may be a panoramic image at any angle, for example, the panoramic image may be a 360-degree panoramic image, or a 180-degree panoramic image; 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 the embodiment of the application, the first electronic device may receive a first input from a user, where the first input is used to control the first electronic device to move in a first direction; in response to a first input, capturing, by a first camera, N frame images, wherein T frame first target images of the N frame images are: the first electronic equipment is obtained by controlling the first camera to rotate along the third direction through the first holder and then shooting under the condition that the target offset exists in the second direction; generating a panoramic image based on the N frames of images shot by the first camera; the second direction is perpendicular to the first direction, the third direction is opposite to the second direction, N is an integer larger than 1, and T is a positive integer smaller than N. In the scheme, in the process of shooting N frames of images, if the first electronic equipment is determined to have target offset in the second direction (which is perpendicular to the first direction), the first camera is controlled by the first tripod head to rotate in the third direction (which is opposite to the second direction) so as to correct the target offset, and then images (T frames of first target images in the N frames of images) are shot, if the first electronic equipment is determined to have no target offset in the second direction (which is perpendicular to the first direction), the images (images in the N frames of images) can be shot directly, so that the target offset of the electronic equipment in the second direction can be corrected in real time (the problem that the electronic equipment generates motion offset in the direction perpendicular to the motion direction due to shaking in the process of moving the electronic equipment by a user can be solved), and the shot N frames of images can be basically positioned on the same horizontal plane, the splicing dislocation of the image data can be avoided, the discontinuity or the fault phenomenon of the synthesized panoramic image can be avoided, and the image quality of the panoramic image shot by the electronic equipment is improved.
Optionally, the image shooting method provided in the embodiment of the present application may be applied to a scene in which one electronic device is used to shoot a panoramic image alone, or may also be applied to a scene in which two electronic devices are used to shoot a panoramic image together, which may be determined specifically according to actual use requirements, and the embodiment of the present application is not limited. Each electronic device for shooting the panoramic image by using the image shooting method provided by the application needs to comprise a holder and a camera which can be controlled to rotate by the holder.
The following description is made by way of example when the image capturing method provided by the embodiment of the present application is applied to a scene in which a 360-degree panoramic image is captured by using one electronic device alone.
Optionally, in this embodiment of the application, the first input is used to control the first electronic device to rotate along a first direction, the panoramic image is a 360-degree panoramic image, and the first image is obtained by shooting after the first camera is controlled to rotate by the first pan-tilt unit under the condition that a target condition is met; and the similarity between the first image and the second image is greater than or equal to a target threshold, the first image is the Nth image in the N frames of images, and the second image is the first image in the N frames of images.
It is understood that the target threshold is a positive number less than or equal to 1, for example, the target threshold is 95% or 100%. The value of the specific target threshold can be determined according to actual use requirements, and the embodiment of the application is not limited.
Optionally, the target threshold is 100%, and the first image and the second image are completely coincident.
Illustratively, the step 202 may specifically include the step 101 described below.
Step 101, the first electronic device controls the first camera to rotate through the first holder under the condition that the target condition is met, and shoots a first image.
Optionally, the nth frame image is completely coincident with the first frame image.
In the embodiment of the present application, through step 101, when a 360-degree panoramic image is shot, the similarity between the nth frame image and the first frame image may be greater than or equal to the target threshold, or even completely matched, so as to avoid a problem that the initial image position cannot be accurately aligned in the last stage of shooting by the handheld electronic device in the related art, and thus, the 360-degree panoramic image may be shot better.
Optionally, the target condition comprises any one of: the target image comprises a first image; the rotating angle of the first electronic equipment is greater than or equal to the target angle value; the target image is collected by a second camera of the first electronic device, and the view field of the second camera is larger than that of the first camera.
In one possible case, the target conditions are: the target image comprises a first image, wherein the target image is acquired by a second camera of the first electronic device, and the field of view of the second camera is larger than that of the first camera.
Illustratively, as shown in fig. 3, the first camera may be a main camera with a pan/tilt head, and the second camera may be a wide-angle camera, α1Is the field of view of the first camera, α2Is the field of view of the second camera.
Optionally, in this embodiment of the application, a timing for starting the second camera to acquire the image in the panoramic image shooting process is not limited. For example, the first electronic device may start the second camera at a time such as at the beginning of, during, or after a preset duration after starting the panoramic image capture, and detect whether the image captured by the second camera includes the first image.
It should be noted that, if the time for starting the second camera is relatively early, there may be a case where the image acquired by the second camera includes the first image for a plurality of times, and at this time, the target image is an image when the image acquired by the second camera includes the first image again after the image acquired by the second camera does not include the first image.
In another possible case, the target conditions are: the first electronic device is rotated by an angle greater than or equal to the target angle value. The value of the target angle value can be determined according to actual use requirements, and the embodiment of the application is not limited, for example, the target angle value can be 300 degrees.
In the embodiment of the application, in a scene of shooting a 360-degree panoramic image through a single electronic device, multiple target conditions are provided, wherein the similarity between a first frame image and an N frame image in the N frame images can be greater than or equal to a target threshold value, so that the shooting of the 360-degree panoramic image can be better realized, and the efficiency and the quality of the panoramic image shot by the electronic device are improved.
Illustratively, a user holds a first electronic device, when the first electronic device displays a panoramic image shooting interface, the user clicks a panoramic shooting control, and the handheld electronic device rotates to the right, the motion track is circular, in the motion process, a first cradle head closes the shake compensation in the motion direction (the first direction), opens the motion compensation in the direction perpendicular to the motion direction (the second direction), and if it is determined that the first electronic device generates target offset in the second direction, the first cradle head rotates a module of a first camera (in the third direction), performs picture compensation at a certain angle, and ensures that a picture is stable and does not shake. The first electronic equipment shoots N frames of images through the first camera, and the first electronic equipment stores a first frame of image (namely a first image) shot by the first camera. And simultaneously starting the wide-angle camera to acquire images in real time. The wide-angle camera matches the image collected in real time with the stored first image, after the image collected by the wide-angle camera does not include the first image (the content of the first image is not included in the view field of the wide-angle camera), if the first image completely appears in the view field of the wide-angle camera, the user can be prompted to stop moving the first electronic device, then the first electronic device controls the first camera to rotate through the first holder, the image collected by the first camera is automatically corrected (the view field of the first camera is corrected), so that the last frame of the collected image (the Nth frame of the image) is completely the same as the first image, and therefore, the problem that the user cannot accurately align to the initial image position when the user holds the camera to move in the final stage can be avoided. And the first pan-tilt rotates the first camera until the Nth frame image is matched with the initial image (namely the Nth frame image is completely registered with the first frame image), the shooting is stopped, the N frames of images shot by the first camera are spliced and synthesized into a panoramic image, and the panoramic image is output.
According to the embodiment of the application, the ultra-wide-angle camera with the larger view field is added as an assistant, so that one-man operation can be realized, the process of shooting panoramic images is simple to operate, and the user experience is good.
The following description is exemplarily made by applying the image capturing method provided by the embodiment of the present application to a scene in which a panoramic image is captured by two electronic devices together.
Optionally, before step 203, the image capturing method provided in the embodiment of the present application may further include step 204 described below, and step 203 may be specifically implemented by step 203a described below.
And step 204, the first electronic device receives the M frames of images sent by the second electronic device.
The second electronic device transmits the M-frame image to the first electronic device.
Step 203a, the first electronic device generates the panoramic image based on the N frames of images and the M frames of images.
The second electronic equipment comprises a second cloud deck and a third camera; the M frames of images are shot by the third camera in the process that the second electronic equipment moves along the fourth direction; the S frame second target image of the M frame images is: the second electronic equipment is obtained by controlling the third camera to rotate along the sixth direction through the second holder under the condition that the target offset exists in the fifth direction; the fourth direction is opposite to the first direction, the fifth direction and the fourth direction are mutually perpendicular, the sixth direction and the fifth direction are opposite, M is a positive integer, and S is a positive integer less than or equal to M.
It can be understood that, during the process that the user controls the second electronic device to translate or rotate along the fourth direction, the second electronic device captures M frames of images. Wherein the direction of movement of the second electronic device (fourth direction) is opposite to the direction of movement of the first electronic device (first direction). For the description of the fourth direction, reference may be made to the description of the first direction, for the description of the fifth direction, reference may be made to the description of the second direction, and for the description of the sixth direction, reference may be made to the description of the third direction, which is not repeated herein.
Optionally, in this embodiment of the present application, the fourth direction may also be the same as the first direction, that is, the first electronic device and the second electronic device do not start moving from the same starting point, for example, the first electronic device stops moving from the starting point of the first electronic device to the starting point of the second electronic device, and/or the second electronic device stops moving from the starting point of the second electronic device to the starting point of the first electronic device, so as to obtain the N frame image and the M frame image.
It can be understood that, before shooting each frame of image except the first frame of image in the M frames of images, in the case that the second electronic device has a target offset in the fifth direction, the second electronic device controls the third camera to rotate in the sixth direction through the second pan-tilt so as to correct the image frame offset caused by the target offset of the second electronic device in the fifth direction, and then shoots a frame of second target image in the S frames of second target images through the third camera; and in the case that the second electronic equipment has target offset in the fifth direction, the second electronic equipment shoots one frame of image except the S frame second target image in the M frame of image through the third camera.
For the description of the process of capturing M frames of images by the second electronic device, reference is made to the above description of the process of capturing N images by the first electronic device, which is not repeated herein.
In the embodiment of the application, the panoramic image is shot by controlling the two electronic devices to move in opposite directions, the panoramic image can be shot more quickly, and each electronic device controls the corresponding camera to rotate through the corresponding cradle head under the condition that the motion offset (target offset) exists, so as to correct the motion offset, thereby obtaining the N frame image and the M frame image which are basically positioned on the same horizontal plane by shooting, avoiding splicing and dislocation of image data, further avoiding discontinuity or fault phenomenon of the synthesized panoramic image, and improving the quality of the panoramic image shot by the electronic devices.
Optionally, the similarity of the stitched region of any two adjacent images in the M frames of images is greater than or equal to a third threshold, and the similarity of the stitched region of the third image and the fourth image is greater than or equal to the third threshold; wherein the third image is: the image spliced with the fourth image in the N frames of images; the fourth image is: an image of the M frame images.
The description of the third threshold may refer to the above description related to the first threshold, and is not repeated here. The third threshold may be the same as or different from the first threshold, and this embodiment of the present application is not limited.
Optionally, the stitching regions of any two adjacent images in the M frames of images completely coincide, and the stitching regions of the third image and the fourth image completely coincide.
Optionally, the similarity of the third image and the fourth image is greater than or equal to a fourth threshold. The description of the fourth threshold may refer to the above description related to the target threshold, and is not repeated here.
Optionally, the third image is completely coincident with the fourth image.
It can be understood that the third image may be a first frame image in N frame images captured by the first electronic device through the first camera, or may also be an nth frame image in N frame images captured by the first electronic device through the first camera, which may be determined specifically according to an actual situation, and the embodiment of the present application is not limited.
It can be understood that the fourth image may be a first frame image in the M frame images captured by the second electronic device through the third camera, or may be an M frame image in the M frame images captured by the second electronic device through the third camera, which may be determined specifically according to an actual situation, and the embodiment of the present application is not limited.
Illustratively, if the nth frame image of the N frame images is spliced with the first frame image of the M frame images, the third image is the nth frame image of the N frame images, and the fourth image is the first frame image of the M frame images.
Illustratively, if a first frame image of the N frame images is stitched with a first frame image of the M frame images, the third image is the first frame image of the N frame images, and the fourth image is the first frame image of the M frame images.
Illustratively, if the nth frame image of the N frame images and the mth frame image of the M frame images are stitched, the third image is the nth frame image of the N frame images, and the fourth image is the mth frame image of the M frame images.
In the embodiment of the application, in the process of synthesizing the panoramic image, the first electronic device needs to splice the head and the tail of any two adjacent images in the M frames of images, and splice the third image and the fourth image, if the similarity of the spliced area is greater than or equal to a third threshold, the small range of the spliced area is not overlapped, and the finally generated panoramic image cannot be discontinuous or faulted by cutting the image boundary (reducing the view field by an appropriate amount) by an appropriate amount (a small amount); if the splicing areas are completely overlapped, the finally generated panoramic image does not have discontinuity or fault phenomena, and the view field of the panoramic image can be kept unchanged.
Optionally, before step 204, the image capturing method provided in the embodiment of the present application may further include step 205 described below.
Step 205, the first electronic device sends a target message to the second electronic device, where the target message is used to trigger the second electronic device to capture the M frames of images.
After receiving an input that a user starts to photograph the panoramic image, the first electronic device may send a target message to the second electronic device to instruct the second electronic device to also start to photograph the panoramic image, so that the two electronic devices can photograph the panoramic image at approximately the same time.
In the embodiment of the application, the first electronic device controls the second electronic device to start shooting the panoramic image in a communication mode with the second electronic device, so that the two electronic devices can be better matched with each other, and compared with the mode that a user respectively controls the two electronic devices to start shooting, the control efficiency is higher, the panoramic image can be better shot, and the shooting efficiency and the shooting quality are improved.
Optionally, before capturing the third image, the image capturing method provided in the embodiment of the present application may further include step 206 described below, and the step 202 may be specifically implemented by step 102 described below.
Step 206, before the third image is shot, the first electronic device executes target processing under the condition that the similarity of the splicing area of the first preview image and the second preview image is smaller than a third threshold value.
Wherein the first preview image is: before the third image is shot, the preview image displayed by the first electronic device is as follows: and before the fourth image is shot, the preview image displayed by the second electronic equipment.
The target treatment includes at least one of: the first camera is controlled to rotate through the first holder, and a second message is sent to the second electronic device; and the second message is used for indicating the second electronic equipment to control the third camera to rotate through the second holder.
It should be noted that, in the embodiment of the present application, the third image may be a first frame image in the N frame images, and the fourth image may be a first frame image in the M frame images; when the panoramic image is a 360-degree panoramic image, the third image may be an nth frame image among the N frame images, and the fourth image may be an mth frame image among the M frame images.
And 102, the first electronic equipment shoots a third image and sends a first message to the second electronic equipment under the condition that the similarity of the splicing area of the first preview image and the second preview image is smaller than a third threshold value.
The first message is used for instructing the second electronic equipment to shoot a fourth image.
It is to be understood that the second electronic device takes a fourth image after receiving the first message.
In the embodiment of the application, before the third image is shot, through target processing (the target processing is at least one of the following items: the first electronic equipment controls the first camera to rotate through the first tripod head, and a second message used for indicating the second electronic equipment controls the third camera to rotate through the second tripod head is sent to the second electronic equipment), the similarity of the spliced area of the shot third image and the shot fourth image can be larger than or equal to a third threshold value, even the third image and the fourth image are completely overlapped, so that the third image and the fourth image can be basically positioned on the same horizontal plane, thereby the N frame image and the M frame image are basically positioned on the same horizontal plane, thus avoiding the splicing dislocation of the image data, the method can avoid the discontinuity or the fault phenomenon of the synthesized panoramic image, and can shoot the panoramic image with higher quality more accurately.
Exemplarily, as shown in fig. 4, a first electronic device (mark "1" indicates the first electronic device) and a second electronic device (mark "2" indicates the second electronic device) are placed side by side, and the two electronic devices are communicatively connected (for example, wifi interconnection), cameras of the two electronic devices are turned on, and the panoramic image shooting interfaces are respectively accessed, and at this time, the screens of the electronic devices can be seen to display preview interfaces. The two electronic devices respectively and automatically correct the view fields through respective holders, so that the first frame images shot by the two electronic devices are completely the same. The shooting button of one electronic device is clicked, the electronic device transmits a signal to the other electronic device through a network, the other electronic device can automatically click the shooting button to start image acquisition after receiving the signal, and the panoramic shooting motion directions prompted on the two electronic devices are opposite. Two users respectively hold one electronic device to perform semicircular motion and panoramic shooting. Two users respectively hold an electronic device to do semicircular movement in opposite directions. During the movement process, the first pan-tilt head closes the movement direction (the first direction)) And (3) starting motion compensation in a direction (second direction) perpendicular to the motion direction, and if it is determined that the first electronic equipment generates target offset in the second direction, the first cradle head performs picture compensation at a certain angle by rotating the module of the first camera (in the third direction), so that the picture is stable and does not shake. In the motion process, the second tripod head closes the shake compensation in the motion direction, opens the motion compensation in the direction perpendicular to the motion direction, and if the second electronic equipment is determined to generate target deviation, the second tripod head performs picture compensation at a certain angle by rotating the module of the third camera, so that the picture is stable and does not shake. After the two electronic devices perform semicircular motion, the two electronic devices return to the side-by-side position again, and at this time, the first pan tilt controls the first camera to rotate (and/or the second pan tilt controls the second camera to rotate), so that the nth frame image in the N frame images and the mth frame image in the M frame images are completely matched (as shown in fig. 5, that is, the fields of view of the first camera and the third camera are the same, wherein, β is1Field of view of the first camera, beta2Field of view of the third camera, beta1=β2. ) And correcting the deviation, outputting the panoramic photo at the moment, reducing the splicing fault, outputting the 360-degree panoramic photo and achieving the ideal effect.
In the embodiment of the application, the perfect 360-degree panoramic image can be shot through the linkage of the two electronic devices and the auxiliary function of the superposed holder, so that the operation difficulty is reduced, and the image quality and the shooting efficiency can be improved.
Optionally, after step 203, the image capturing method provided in the embodiment of the present application may further include step 207 described below.
And step 207, the first electronic device displays the prompt message under the condition that the deviation of the first electronic device in the second direction is determined to be greater than or equal to the target threshold.
The prompt message is used for prompting the user to move the first electronic device along the third direction.
It can be understood that the target threshold is determined according to the anti-shake range of the holder, and specifically may be determined according to the actual use condition, which is not limited in the embodiment of the present application.
It can be understood that when the offset of the first electronic device in the second direction is too large and exceeds the capability of the first pan/tilt control camera to rotate and correct the offset, the first electronic device displays prompt information on an image preview interface to prompt a user to move the mobile phone in the opposite direction of the offset, so that the situation that the picture is not matched due to the fact that the offset angle is too large and exceeds the pan/tilt anti-shake range can be avoided, and finally the panoramic image is discontinuous or has a fault phenomenon can be avoided.
Illustratively, as shown in fig. 6, the first electronic device displays "move offset level, please pan the electronic device up".
It should be noted that, in the image capturing method provided in the embodiment of the present application, the executing subject may be an image capturing apparatus, or a functional module and/or a functional entity for executing the image capturing method in the image capturing apparatus. In the embodiment of the present application, an image capturing apparatus executes an image capturing method as an example, and an apparatus of the image capturing method provided in the embodiment of the present application is described.
Fig. 7 shows a schematic diagram of a possible structure of an image capturing apparatus according to an embodiment of the present application. As shown in fig. 7, the image capturing apparatus 300 includes a first pan/tilt head and a first camera, and the image capturing apparatus 300 may include: a receiving module 301, a shooting module 302 and a generating module 303; the receiving module 301 is configured to receive a first input of a user, where the first input is used to control the first electronic device to move along a first direction; the shooting module 302 is configured to, in response to a first input, shoot N frames of images through a first camera, where T frames of first target images in the N frames of images are: the first electronic equipment is obtained by controlling the first camera to rotate along the third direction through the first holder and then shooting under the condition that the target offset exists in the second direction; the generating module 303 is configured to generate a panoramic image based on the N frames of images shot by the first camera; the second direction is perpendicular to the first direction, the third direction is opposite to the second direction, N is an integer larger than 1, and T is a positive integer smaller than N.
Optionally, the similarity of the splicing region of any two adjacent images in the N frames of images is greater than or equal to a first threshold; the target offset is greater than or equal to a second threshold.
Optionally, the first input is used to control the first electronic device to rotate in a first direction, and the panoramic image is a 360-degree panoramic image; the first image is obtained by shooting after the first camera is controlled to rotate by the first holder under the condition that a target condition is met; and the similarity between the first image and the second image is greater than or equal to a target threshold, the first image is the Nth image in the N frames of images, and the second image is the first image in the N frames of images.
Optionally, the target condition comprises any one of: the target image comprises a first image; the rotating angle of the first electronic equipment is greater than or equal to the target angle value; the target image is collected by a second camera of the first electronic device, and the view field of the second camera is larger than that of the first camera.
Optionally, the generating module 303 is specifically configured to receive an M-frame image sent by the second electronic device; generating the panoramic image based on the N frame images and the M frame images; the second electronic equipment comprises a second cloud deck and a third camera; the M frames of images are shot by the third camera in the process that the second electronic equipment moves along the fourth direction; the S frame second target image of the M frame images is: the second electronic equipment is obtained by controlling the third camera to rotate along the sixth direction through the second holder under the condition that the target offset exists in the fifth direction; the fourth direction is opposite to the first direction, the fifth direction and the fourth direction are mutually perpendicular, the sixth direction and the fifth direction are opposite, M is a positive integer, and S is a positive integer less than or equal to M.
Optionally, the similarity of the stitched region of any two adjacent images in the M frames of images is greater than or equal to a third threshold, and the similarity of the stitched region of the third image and the fourth image is greater than or equal to the third threshold; wherein the third image is: the image spliced with the fourth image in the N frames of images; the fourth image is: an image of the M frame images.
Optionally, the image capturing apparatus 300 further includes: an execution module 304; the executing module 304 is configured to, before shooting the third image, execute target processing when the similarity of the splicing area of the first preview image and the second preview image is smaller than a third threshold; the shooting module 302 is specifically configured to, when the similarity of the splicing area of the first preview image and the second preview image is smaller than a third threshold, shoot a third image and send a first message to the second electronic device, where the first message is used to instruct the second electronic device to shoot a fourth image; wherein the first preview image is: before the third image is shot, the preview image displayed by the first electronic device is as follows: before the fourth image is shot, the preview image displayed by the second electronic equipment, and the target processing comprises at least one of the following items: the first camera is controlled to rotate through the first holder, and a second message is sent to the second electronic device; the second message is used for indicating the second electronic equipment to control the third camera to rotate through the second holder.
Optionally, the image capturing apparatus 300 further includes: a sending module 305; the sending module 305 is configured to send a target message to the second electronic device before the receiving of the M-frame image sent by the second electronic device, where the target message is used to trigger the second electronic device to capture the M-frame image.
It should be noted that: as shown in fig. 7, the modules that are necessarily included in the image capturing apparatus 300 are illustrated by solid line boxes, such as a receiving module 301, a capturing module 302, and a generating module 303; the modules that may or may not be included in the image capturing apparatus 300 are indicated by dashed boxes, such as an execution module 304 and a transmission module 305.
The embodiment of the application provides an image shooting device, wherein first electronic equipment can receive a first input of a user, and the first input is used for controlling the first electronic equipment to move along a first direction; in response to a first input, capturing, by a first camera, N frame images, wherein T frame first target images of the N frame images are: the first electronic equipment is obtained by controlling the first camera to rotate along the third direction through the first holder and then shooting under the condition that the target offset exists in the second direction; generating a panoramic image based on the N frames of images shot by the first camera; the second direction is perpendicular to the first direction, the third direction is opposite to the second direction, N is an integer larger than 1, and T is a positive integer smaller than N. In the scheme, in the process of shooting N frames of images, if the first electronic equipment is determined to have target offset in the second direction (which is perpendicular to the first direction), the first camera is controlled by the first tripod head to rotate in the third direction (which is opposite to the second direction) so as to correct the target offset, and then images (T frames of first target images in the N frames of images) are shot, if the first electronic equipment is determined to have no target offset in the second direction (which is perpendicular to the first direction), the images (images in the N frames of images) can be shot directly, so that the target offset of the electronic equipment in the second direction can be corrected in real time (the problem that the electronic equipment generates motion offset in the direction perpendicular to the motion direction due to shaking in the process of moving the electronic equipment by a user can be solved), and the shot N frames of images can be basically positioned on the same horizontal plane, the splicing dislocation of the image data can be avoided, the discontinuity or the fault phenomenon of the synthesized panoramic image can be avoided, and the quality of the panoramic image shot by the electronic equipment is improved.
The image capturing apparatus in the embodiment of the present application may be an apparatus, and may also be an electronic device or a component, an integrated circuit, or a chip in the electronic device. The electronic device may be a mobile electronic device or a non-mobile electronic device. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The image capturing apparatus in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android operating system (Android), an iOS operating system, or other possible operating systems, which is not specifically limited in the embodiments of the present application.
The image capturing apparatus provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to 6, and is not described herein again to avoid repetition.
Optionally, as shown in fig. 8, an electronic device 400 is further provided in this embodiment of the present application, and includes a processor 401, a memory 402, and a program or an instruction stored in the memory 402 and executable on the processor 401, where the program or the instruction is executed by the processor 401 to implement each process of the above-mentioned embodiment of the image capturing method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 9 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application. The electronic device 500 includes, but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and the like.
In this embodiment, the input unit 504 includes a first camera, or the input unit 504 includes a first camera and a second camera. In the case where the input unit 504 includes a first camera and a second camera, the field of view of the first camera is smaller than that of the second camera.
Those skilled in the art will appreciate that the electronic device 500 may further include a power supply (e.g., a battery) for supplying power to various components, and the power supply may be logically connected to the processor 510 via a power management system, so as to implement functions of managing charging, discharging, and power consumption via 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.
The user input unit 507 is configured to receive a first input of a user, where the first input is used to control the first electronic device to move in a first direction; an input unit 504, which is a first camera in this embodiment, is configured to capture N frames of images in response to a first input, where T frames of a first target image in the N frames of images are: the first electronic equipment is obtained by controlling the first camera to rotate along the third direction through the first holder and then shooting under the condition that the target offset exists in the second direction; a processor 510, configured to generate a panoramic image based on the N frames of images captured by the first camera; the second direction is perpendicular to the first direction, the third direction is opposite to the second direction, N is an integer larger than 1, and T is a positive integer smaller than N.
The electronic device provided by the embodiment of the application is a first electronic device, and the first electronic device can receive a first input of a user, wherein the first input is used for controlling the first electronic device to move along a first direction; in response to a first input, capturing, by a first camera, N frame images, wherein T frame first target images of the N frame images are: the first electronic equipment is obtained by controlling the first camera to rotate along the third direction through the first holder and then shooting under the condition that the target offset exists in the second direction; generating a panoramic image based on the N frames of images shot by the first camera; the second direction is perpendicular to the first direction, the third direction is opposite to the second direction, N is an integer larger than 1, and T is a positive integer smaller than N. In the scheme, in the process of shooting N frames of images, if the first electronic equipment is determined to have target offset in the second direction (which is perpendicular to the first direction), the first camera is controlled by the first tripod head to rotate in the third direction (which is opposite to the second direction) so as to correct the target offset, and then images (T frames of first target images in the N frames of images) are shot, if the first electronic equipment is determined to have no target offset in the second direction (which is perpendicular to the first direction), the images (images in the N frames of images) can be shot directly, so that the target offset of the electronic equipment in the second direction can be corrected in real time (the problem that the electronic equipment generates motion offset in the direction perpendicular to the motion direction due to shaking in the process of moving the electronic equipment by a user can be solved), and the shot N frames of images can be basically positioned on the same horizontal plane, the splicing dislocation of the image data can be avoided, the discontinuity or the fault phenomenon of the synthesized panoramic image can be avoided, and the quality of the panoramic image shot by the electronic equipment is improved.
Optionally, the similarity of the splicing region of any two adjacent images in the N frames of images is greater than or equal to a first threshold; the target offset is greater than or equal to a second threshold.
In the embodiment of the application, in the process of synthesizing the panoramic image, the first electronic device needs to splice the head and the tail of any two adjacent images in the N frames of images, if the similarity of the spliced area is greater than or equal to a first threshold value, the small range of the spliced area does not overlap, and the finally generated panoramic image cannot have the phenomenon of discontinuity or fault through cutting the image boundary (reducing the view field by an appropriate amount) by an appropriate amount (a small amount); if the splicing areas are completely overlapped, the finally generated panoramic image does not have discontinuity or fault phenomena, and the view field of the panoramic image can be kept unchanged.
Optionally, the first input is used to control the first electronic device to rotate in a first direction, and the panoramic image is a 360-degree panoramic image; the first image is obtained by shooting after the first camera is controlled to rotate by the first holder under the condition that a target condition is met; and the similarity between the first image and the second image is greater than or equal to a target threshold, the first image is the Nth image in the N frames of images, and the second image is the first image in the N frames of images.
In the embodiment of the application, when the 360-degree panoramic image is shot, the similarity between the Nth frame image and the first frame image can be greater than or equal to the target threshold value and even completely matched, so that the problem that the initial image position cannot be accurately aligned in the last stage of shooting of the handheld electronic equipment in the related technology can be avoided, and the 360-degree panoramic image can be shot better.
Optionally, the target condition comprises any one of: the target image comprises a first image; the rotating angle of the first electronic equipment is greater than or equal to the target angle value; the target image is collected by a second camera of the first electronic device, and the view field of the second camera is larger than that of the first camera.
In the embodiment of the application, in a scene of shooting a 360-degree panoramic image through a single electronic device, multiple target conditions are provided, wherein the similarity between a first frame image and an N frame image in the N frame images can be greater than or equal to a target threshold value, so that the shooting of the 360-degree panoramic image can be better realized, and the efficiency and the quality of the panoramic image shot by the electronic device are improved.
Optionally, the processor 510 is specifically configured to receive an M-frame image sent by the second electronic device; generating the panoramic image based on the N frame images and the M frame images; the second electronic equipment comprises a second cloud deck and a third camera; the M frames of images are shot by the third camera in the process that the second electronic equipment moves along the fourth direction; the S frame second target image of the M frame images is: the second electronic equipment is obtained by controlling the third camera to rotate along the sixth direction through the second holder under the condition that the target offset exists in the fifth direction; the fourth direction is opposite to the first direction, the fifth direction and the fourth direction are mutually perpendicular, the sixth direction and the fifth direction are opposite, M is a positive integer, and S is a positive integer less than or equal to M.
In the embodiment of the application, the panoramic image is shot by controlling the two electronic devices to move in opposite directions, the panoramic image can be shot more quickly, and each electronic device controls the corresponding camera to rotate through the corresponding cradle head under the condition that the motion offset (target offset) exists, so as to correct the motion offset, thereby obtaining the N frame image and the M frame image which are basically positioned on the same horizontal plane by shooting, avoiding splicing and dislocation of image data, further avoiding discontinuity or fault phenomenon of the synthesized panoramic image, and improving the quality of the panoramic image shot by the electronic devices.
Optionally, the similarity of the stitched region of any two adjacent images in the M frames of images is greater than or equal to a third threshold, and the similarity of the stitched region of the third image and the fourth image is greater than or equal to the third threshold; wherein the third image is: the image spliced with the fourth image in the N frames of images; the fourth image is: an image of the M frame images.
In the embodiment of the application, in the process of synthesizing the panoramic image, the first electronic device needs to splice the head and the tail of any two adjacent images in the M frames of images, and splice the third image and the fourth image, if the similarity of the spliced area is greater than or equal to a third threshold, the small range of the spliced area is not overlapped, and the finally generated panoramic image cannot be discontinuous or faulted by cutting the image boundary (reducing the view field by an appropriate amount) by an appropriate amount (a small amount); if the splicing areas are completely overlapped, the finally generated panoramic image does not have discontinuity or fault phenomena, and the view field of the panoramic image can be kept unchanged.
Optionally, the processor 510 is further configured to, before capturing the third image, execute target processing in a case that the similarity of the spliced area of the first preview image and the second preview image is smaller than a third threshold; shooting a third image and sending a first message to the second electronic equipment under the condition that the similarity of the splicing area of the first preview image and the second preview image is smaller than a third threshold, wherein the first message is used for indicating the second electronic equipment to shoot a fourth image; wherein the first preview image is: before the third image is shot, the preview image displayed by the first electronic device is as follows: before the fourth image is shot, the preview image displayed by the second electronic equipment, and the target processing comprises at least one of the following items: the first camera is controlled to rotate through the first holder, and a second message is sent to the second electronic device; the second message is used for indicating the second electronic equipment to control the third camera to rotate through the second holder.
In the embodiment of the application, the first electronic device controls the second electronic device to start shooting the panoramic image in a communication mode with the second electronic device, so that the two electronic devices can be better matched with each other, and compared with the mode that a user respectively controls the two electronic devices to start shooting, the control efficiency is higher, the panoramic image can be better shot, and the shooting efficiency and the shooting quality are improved.
Optionally, the radio frequency unit 501 is configured to send, before the receiving of the M-frame image sent by the second electronic device, a target message to the second electronic device, where the target message is used to trigger the second electronic device to capture the M-frame image.
In the embodiment of the application, before the third image is shot, the first electronic device controls the first camera to rotate through the first holder, and/or the second electronic device controls the third camera to rotate through the second holder, so that the similarity of the spliced area of the shot third image and the spliced area of the shot fourth image is greater than or equal to a third threshold value, even the third image and the fourth image are completely overlapped, so that the third image and the fourth image can be basically located on the same horizontal plane, and further the N frame image and the M frame image can be basically located on the same horizontal plane, therefore, the splicing dislocation of image data can be avoided, the discontinuity or the fault phenomenon of the synthesized panoramic image can be avoided, and the panoramic image with higher quality can be shot more accurately.
It should be understood that, in the embodiment of the present application, the radio frequency unit 501 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 510; in addition, the uplink data is transmitted to the base station. In addition, the radio frequency unit 501 can also communicate with a network and other devices through a wireless communication system. The electronic device provides wireless broadband internet access to the user via the network module 502, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media. The audio output unit 503 may convert audio data received by the radio frequency unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output as sound. Also, the audio output unit 503 may also provide audio output related to a specific function performed by the electronic apparatus 500 (e.g., a call signal reception sound, a message reception sound, etc.). The input Unit 504 may include a Graphics Processing Unit (GPU) 5041 and a microphone 5042, and the Graphics processor 5041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 507 includes a touch panel 5071 and other input devices 5072. A touch panel 5071, also referred to as a touch screen. The touch panel 5071 may include two parts of a touch detection device and a touch controller. Other input devices 5072 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 further detail herein. The memory 509 may be used to store software programs as well as various data including, but not limited to, application programs and operating systems. Processor 510 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 510.
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-mentioned image capturing 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 Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
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 image capturing 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.
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 software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present 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 (14)

1. An image shooting method is applied to first electronic equipment comprising a first holder and a first camera, and is characterized by comprising the following steps:
receiving a first input of a user, wherein the first input is used for controlling the first electronic device to move along a first direction;
in response to the first input, capturing, by the first camera, N frame images, wherein T frame first target images of the N frame images are: the first electronic equipment is obtained by controlling the first camera to rotate along a third direction through the first holder and then shooting under the condition that target offset exists in the second direction;
generating a panoramic image based on the N frames of images shot by the first camera;
the second direction is perpendicular to the first direction, the third direction is opposite to the second direction, N is an integer larger than 1, and T is a positive integer smaller than N;
the first image is obtained by controlling the first camera to rotate through the first holder under the condition that a target condition is met;
the similarity between the first image and a second image is greater than or equal to a target threshold, the first image is an Nth image in the N frames of images, and the second image is a first image in the N frames of images;
the target condition includes any one of:
the target image comprises the first image;
the rotating angle of the first electronic equipment is greater than or equal to a target angle value;
the target image is acquired by a second camera of the first electronic device, and the field of view of the second camera is larger than that of the first camera.
2. The method according to claim 1, wherein the similarity of the splicing region of any two adjacent images in the N frames of images is greater than or equal to a first threshold value;
the target offset is greater than or equal to a second threshold.
3. The method of claim 1, wherein generating a panoramic image based on the N frames of images captured by the first camera comprises:
receiving an M frame image sent by second electronic equipment;
generating the panoramic image based on the N-frame image and the M-frame image;
the second electronic equipment comprises a second cloud deck and a third camera; the M frames of images are shot by the third camera in the process that the second electronic equipment moves along the fourth direction; the S-frame second target image of the M-frame images is: the second electronic equipment is obtained by controlling the third camera to rotate along the sixth direction through the second holder and then shooting under the condition that target deviation exists in the fifth direction; the fourth direction is opposite to the first direction, the fifth direction is perpendicular to the fourth direction, the sixth direction is opposite to the fifth direction, M is a positive integer, and S is a positive integer less than or equal to M.
4. The method according to claim 3, wherein the similarity of the stitched region of any two adjacent images in the M images is greater than or equal to a third threshold, and the similarity of the stitched region of the third image and the fourth image is greater than or equal to the third threshold;
wherein the third image is: an image spliced with the fourth image in the N frames of images; the fourth image is: an image of the M frame images.
5. The method of claim 4, further comprising:
before shooting the third image, executing target processing under the condition that the similarity of a splicing area of the first preview image and the second preview image is smaller than the third threshold value;
through first camera, shoot N frame image, include:
shooting the third image and sending a first message to the second electronic device under the condition that the similarity of the splicing area of the first preview image and the second preview image is smaller than the third threshold, wherein the first message is used for indicating the second electronic device to shoot the fourth image;
wherein the first preview image is: before shooting the third image, a preview image displayed by the first electronic equipment; the second preview image is: before the fourth image is shot, a preview image displayed by the second electronic equipment;
the target treatment comprises at least one of: controlling the first camera to rotate through the first holder, and sending a second message to the second electronic device;
and the second message is used for indicating the second electronic equipment to control the third camera to rotate through the second holder.
6. The method according to any one of claims 3 to 5, wherein before receiving the M frames of images transmitted by the second electronic device, the method further comprises:
and sending a target message to the second electronic equipment, wherein the target message is used for triggering the second electronic equipment to shoot the M frames of images.
7. An image capture device, the device including a first pan/tilt head and a first camera, the device comprising: the device comprises a receiving module, a shooting module and a generating module;
the receiving module is used for receiving a first input of a user, wherein the first input is used for controlling the first electronic equipment to move along a first direction;
the shooting module is configured to, in response to the first input, shoot N frames of images through the first camera, where T frames of first target images in the N frames of images are: the first electronic equipment is obtained by controlling the first camera to rotate along a third direction through the first holder and then shooting under the condition that target offset exists in the second direction;
the generating module is used for generating a panoramic image based on the N frames of images shot by the first camera;
the second direction is perpendicular to the first direction, the third direction is opposite to the second direction, N is an integer larger than 1, and T is a positive integer smaller than N;
the first image is obtained by controlling the first camera to rotate through the first holder under the condition that a target condition is met;
the similarity between the first image and a second image is greater than or equal to a target threshold, the first image is an Nth image in the N frames of images, and the second image is a first image in the N frames of images;
the target condition includes any one of:
the target image comprises the first image;
the rotating angle of the first electronic equipment is greater than or equal to a target angle value;
the target image is acquired by a second camera of the first electronic device, and the field of view of the second camera is larger than that of the first camera.
8. The apparatus according to claim 7, wherein the similarity of the stitching region of any two adjacent images in the N images is greater than or equal to a first threshold;
the target offset is greater than or equal to a second threshold.
9. The apparatus according to claim 7, wherein the generating module is specifically configured to receive M frames of images sent by the second electronic device; generating the panoramic image based on the N-frame image and the M-frame image;
the second electronic equipment comprises a second cloud deck and a third camera; the M frames of images are shot by the third camera in the process that the second electronic equipment moves along the fourth direction; the S-frame second target image of the M-frame images is: the second electronic equipment is obtained by controlling the third camera to rotate along the sixth direction through the second holder and then shooting under the condition that target deviation exists in the fifth direction; the fourth direction is opposite to the first direction, the fifth direction is perpendicular to the fourth direction, the sixth direction is opposite to the fifth direction, M is a positive integer, and S is a positive integer less than or equal to M.
10. The apparatus according to claim 9, wherein the similarity of the stitched region of any two adjacent images in the M frames of images is greater than or equal to a third threshold, and the similarity of the stitched region of the third image and the fourth image is greater than or equal to the third threshold;
wherein the third image is: an image spliced with the fourth image in the N frames of images; the fourth image is: an image of the M frame images.
11. The apparatus of claim 10, further comprising: an execution module;
the execution module is used for executing target processing under the condition that the similarity of a splicing area of the first preview image and the second preview image is smaller than the third threshold value before the third image is shot;
the shooting module is specifically configured to shoot the third image and send a first message to the second electronic device when the similarity of the spliced area of the first preview image and the second preview image is smaller than the third threshold, where the first message is used to instruct the second electronic device to shoot the fourth image;
wherein the first preview image is: before shooting the third image, a preview image displayed by the first electronic equipment; the second preview image is: before the fourth image is shot, a preview image displayed by the second electronic equipment;
the target treatment comprises at least one of: controlling the first camera to rotate through the first holder, and sending a second message to the second electronic device;
and the second message is used for indicating the second electronic equipment to control the third camera to rotate through the second holder.
12. The apparatus of any one of claims 9 to 11, further comprising: a sending module;
the sending module is configured to send a target message to the second electronic device before the receiving of the M-frame image sent by the second electronic device, where the target message is used to trigger the second electronic device to shoot the M-frame image.
13. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the image capturing method as claimed in any one of claims 1 to 6.
14. A readable storage medium, characterized in that it stores thereon a program or instructions which, when executed by a processor, implement the steps of the image capturing method as claimed in any one of claims 1 to 6.
CN202011412217.5A 2020-12-04 2020-12-04 Image shooting method and device and electronic equipment Active CN112492213B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011412217.5A CN112492213B (en) 2020-12-04 2020-12-04 Image shooting method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011412217.5A CN112492213B (en) 2020-12-04 2020-12-04 Image shooting method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112492213A CN112492213A (en) 2021-03-12
CN112492213B true CN112492213B (en) 2022-04-08

Family

ID=74939573

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011412217.5A Active CN112492213B (en) 2020-12-04 2020-12-04 Image shooting method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112492213B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107318009A (en) * 2016-04-27 2017-11-03 深圳看到科技有限公司 A kind of panoramic picture harvester and acquisition method
CN111107269A (en) * 2019-12-31 2020-05-05 维沃移动通信有限公司 Photographing method, electronic device and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8068693B2 (en) * 2007-07-18 2011-11-29 Samsung Electronics Co., Ltd. Method for constructing a composite image
CN105959565A (en) * 2016-06-15 2016-09-21 维沃移动通信有限公司 Panoramic photographing method and mobile terminal
CN107800945A (en) * 2016-08-31 2018-03-13 北京小米移动软件有限公司 Method and device that panorama is taken pictures, electronic equipment
CN109639975A (en) * 2018-12-24 2019-04-16 维沃移动通信有限公司 A kind of filming control method and mobile terminal
CN110072058B (en) * 2019-05-28 2021-05-25 珠海格力电器股份有限公司 Image shooting device and method and terminal
CN110493457B (en) * 2019-07-30 2021-10-15 维沃移动通信有限公司 Terminal device control method and terminal device
CN110445981B (en) * 2019-08-12 2020-09-04 珠海格力电器股份有限公司 Panoramic shooting method, mobile terminal and computer readable storage medium
CN111277760B (en) * 2020-02-28 2022-02-01 Oppo广东移动通信有限公司 Shooting composition method, terminal and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107318009A (en) * 2016-04-27 2017-11-03 深圳看到科技有限公司 A kind of panoramic picture harvester and acquisition method
CN111107269A (en) * 2019-12-31 2020-05-05 维沃移动通信有限公司 Photographing method, electronic device and storage medium

Also Published As

Publication number Publication date
CN112492213A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
KR102381713B1 (en) Photographic method, photographic apparatus, and mobile terminal
CN112492214B (en) Image shooting method and device, electronic equipment and readable storage medium
CN102207674A (en) Panorama image shooting apparatus and method
KR20140106333A (en) Image display positioning using image sensor location
CN110858873B (en) Electronic device and photographing method
CN112637500B (en) Image processing method and device
WO2022089285A1 (en) Image acquisition method and device, mobile terminal, and storage medium
CN113473004A (en) Shooting method and device
CN113329172B (en) Shooting method and device and electronic equipment
WO2022206499A1 (en) Image capture method and apparatus, electronic device and readable storage medium
CN113596294A (en) Shooting method and device and electronic equipment
CN110933297B (en) Photographing control method and device of intelligent photographing system, storage medium and system
CN105635568A (en) Image processing method in mobile terminal and mobile terminal
CN114125268A (en) Focusing method and device
CN114125179B (en) Shooting method and device
CN114040113A (en) Image processing method and device
CN112492213B (en) Image shooting method and device and electronic equipment
CN112738399B (en) Image processing method and device and electronic equipment
CN112261262B (en) Image calibration method and device, electronic equipment and readable storage medium
CN112653841B (en) Shooting method and device and electronic equipment
CN112672057B (en) Shooting method and device
CN114245018A (en) Image shooting method and device
CN112399092A (en) Shooting method and device and electronic equipment
CN112511744A (en) Image display method and device
CN111373729B (en) Panoramic shooting method and terminal

Legal Events

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