WO2021134183A1 - Image processing method and device, mobile platform, camera device, and storage medium - Google Patents

Image processing method and device, mobile platform, camera device, and storage medium Download PDF

Info

Publication number
WO2021134183A1
WO2021134183A1 PCT/CN2019/129860 CN2019129860W WO2021134183A1 WO 2021134183 A1 WO2021134183 A1 WO 2021134183A1 CN 2019129860 W CN2019129860 W CN 2019129860W WO 2021134183 A1 WO2021134183 A1 WO 2021134183A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
image frame
target
plane
frame
Prior art date
Application number
PCT/CN2019/129860
Other languages
French (fr)
Chinese (zh)
Inventor
屈信超
李琛
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to CN201980050290.1A priority Critical patent/CN112616325A/en
Priority to PCT/CN2019/129860 priority patent/WO2021134183A1/en
Publication of WO2021134183A1 publication Critical patent/WO2021134183A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B64AIRCRAFT; AVIATION; COSMONAUTICS
    • B64CAEROPLANES; HELICOPTERS
    • B64C39/00Aircraft not otherwise provided for
    • B64C39/02Aircraft not otherwise provided for characterised by special use
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B64AIRCRAFT; AVIATION; COSMONAUTICS
    • B64DEQUIPMENT FOR FITTING IN OR TO AIRCRAFT; FLIGHT SUITS; PARACHUTES; ARRANGEMENTS OR MOUNTING OF POWER PLANTS OR PROPULSION TRANSMISSIONS IN AIRCRAFT
    • B64D47/00Equipment not otherwise provided for
    • B64D47/08Arrangements of cameras
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B64AIRCRAFT; AVIATION; COSMONAUTICS
    • B64UUNMANNED AERIAL VEHICLES [UAV]; EQUIPMENT THEREFOR
    • B64U10/00Type of UAV
    • B64U10/10Rotorcrafts
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • H04N23/51Housings
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • H04N23/55Optical parts specially adapted for electronic image sensors; Mounting thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/01Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level
    • H04N7/0135Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level involving interpolation processes

Definitions

  • the present invention relates to the field of image technology, in particular to an image processing method, device, movable platform, camera device and storage medium.
  • scenes of different images may change too quickly.
  • the overall playback screen will be blurred and affect the user's viewing experience.
  • the scene change of the image too fast may be because different imaging devices collect images from different viewing angles; it may also be because the viewing angle changes too fast when the imaging device changes different viewing angles to collect images.
  • the invention provides an image processing method, a device, a movable platform, a camera device and a storage medium, which can solve the problem of excessively fast scene changes.
  • an image processing method including:
  • the target image is determined according to the first image frame and the second image frame, and both the first image frame and the second image frame include a scene in the target image.
  • an image processing device including a memory and a processor
  • the memory is used to store program code
  • the processor is used to call the program code, and when the program code is executed, it is used to implement the image processing method described in the foregoing embodiment.
  • a movable platform including:
  • a power system arranged in the body, and the power system is used to provide power for the movable platform;
  • An image acquisition device which is provided in the body, and is used to acquire image frames
  • the processor is used to call the program code, and when the program code is executed, it is used to implement the image processing method described in the foregoing embodiment.
  • a camera device including:
  • the lens assembly is arranged inside the housing;
  • the processor is used to call the program code, and when the program code is executed, it is used to implement the image processing method described in the foregoing embodiment.
  • a computer-readable storage medium is provided.
  • the computer-readable storage medium stores program code, and when the program code is executed, the image processing method as described in the foregoing embodiment is implemented.
  • the target image when the first image frame and the second image frame with different viewing angle directions are acquired, the target image can be determined according to the two image frames, and the first image frame and the second image frame are both The scene in the target image is included. In other words, the scene in the target image is included in the first image frame and the second image frame. Then, when the target image is inserted between the first image frame and the second image frame for playback, Or, inserting the target image into the first image frame and the second image frame to play between the processed images, can play the role of scene transition, slow down the speed of scene changes during playback, and solve the problem of excessive scene changes .
  • FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of the relationship between the first plane and the second plane according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of the relationship between the first plane, the second plane and the target plane according to an embodiment of the present invention
  • Fig. 4 is a structural block diagram of an image processing apparatus according to an embodiment of the present invention.
  • first, second, third, etc. may be used in the present invention to describe various information, the information should not be limited to these terms. These terms are used to distinguish the same type of information from each other.
  • first information may also be referred to as second information, and similarly, the second information may also be referred to as first information.
  • word "if” used can be interpreted as "when", or "when”, or "in response to certainty.”
  • an image processing method may include the following steps:
  • S100 Acquire a first image frame and a second image frame, where the viewing angle directions of the first image frame and the second image frame are different;
  • S200 Determine a target image according to the first image frame and the second image frame, where both the first image frame and the second image frame include a scene in the target image.
  • the execution subject of the image processing method may be an electronic device.
  • the electronic device may be an imaging device, for example, a camera device, or a movable film platform equipped with a camera device, such as a drone, a vehicle, and the like.
  • the electronic device can also be other devices, as long as it has a certain image processing capability.
  • the viewing angle direction of the image frame may refer to the direction from the bisector of the lens viewing angle to the captured scene when the image frame is captured.
  • step S100 a first image frame and a second image frame are acquired.
  • the first image frame and the second image frame may be acquired by the same imaging device, or may be acquired by different imaging devices.
  • the first image frame and the second image frame may be collected by an external imaging device; or, in the case where the executing main electronic device is an imaging device, the first image frame and the second image frame may be collected by the electronic device itself.
  • the viewing angles of the first image frame and the second image frame are different. In other words, the viewing angles of the first image frame and the second image frame are different by a certain angle. Therefore, the scenes in the first image frame and the second image frame will also be different. different.
  • the first image frame and the second image frame may be two image frames collected at the same location but different viewing angle directions, or may also be two image frames collected at different locations and different viewing angle directions.
  • the embodiment of the present invention solves this problem through subsequent steps.
  • step S200 is further executed: determining the target image according to the first image frame and the second image frame.
  • Both the first image frame and the second image frame include a scene in the target image.
  • some scenes in the first image frame and the second image frame are the same, and the scene in the target image is the partial scene or a part of the partial scene.
  • the angle between the viewing angles of the first image frame and the second image frame needs to ensure that there is an intersection of the field of view when the first image frame and the second image frame are collected. In this way, the first image frame and the second image There are some scenes in the frame that are the same.
  • the FOV field of view, angle of view
  • the same scene in the first image frame and the second image frame (hereinafter referred to as the first scene, the first scene is a part of the first image frame) Scene, which is also a part of the scene in the second image frame) to determine the target image.
  • the first image area where the first scene is located in the first image frame and the second image area where the first scene is located in the second image frame may be determined, based on the first image area and the second image area
  • the two image regions may be subjected to affine transformation first, and then fusion processing is performed after the affine transformation to generate the target image.
  • the target image can also be determined in other ways, as long as it is ensured that the scene in the target image exists in the first image frame and the second image frame.
  • the determined target image may be one or more.
  • the field of view corresponding to different target images may be different.
  • the scenes in different target images may be different, but they all exist in the first image frame and the second image frame.
  • the target image when the first image frame and the second image frame with different viewing angle directions are acquired, the target image can be determined according to the two image frames, and the first image frame and the second image frame both contain the target image. In other words, the scene in the target image is contained in the first image frame and the second image frame. Then, when the target image is inserted between the first image frame and the second image frame, or the target image When inserted between the processed images of the first image frame and the second image frame, it can play the role of scene transition, slow down the speed of scene changes during playback, and solve the problem of excessive scene changes.
  • the speed of the screen playback can be controlled by the above methods, so as to avoid excessive changes in the speed of the drone, which may cause the video to be blurred and sometimes clear.
  • the phenomenon
  • step S200 determining the target image according to the first image frame and the second image frame includes:
  • the first image frame and the second image frame are projected onto the same target plane to generate the target image; wherein the viewing angle direction corresponding to the target plane is different from the viewing angle direction of the first image frame and the second image frame .
  • the same scene (ie, the first scene) in the first image frame and the second image frame is presented in the first image frame and the second image frame at different angles
  • projecting the first image frame and the second image frame onto the same target plane can make the angles of the scenes (including the first scene) in the two image frames obtained by the projection consistent, so as to generate the desired target image.
  • the viewing angle direction corresponding to the target plane is different from the viewing angle directions of the first image frame and the second image frame, which can ensure that when the target image is inserted between the first image frame and the second image frame, or the target image is inserted
  • the angle of the scene can be gradually adjusted to make the transition of the scene change smoother and avoid sudden scene changes.
  • first image frame and the second image frame can be directly projected onto the target plane respectively, or the first image frame and the second image frame can be respectively projected onto the target plane.
  • the frame is projected onto the curved surface, and then projected from the curved surface onto the target plane, and the specific method is not limited.
  • step S200 projecting the first image frame and the second image frame onto the same target plane to generate the target image includes:
  • the first image frame and the second image frame are projected onto the same target plane and then subjected to fusion processing to generate the target image.
  • the two obtained image frames can be fused to obtain a target image that meets the requirements.
  • image processing methods such as image interception, can also be included, which are not specifically limited.
  • step S200 the first image frame and the second image frame are projected onto the same target plane and then merged to generate the target image, which may include the following steps:
  • S201 Acquire a projection relationship corresponding to the target plane, where the projection relationship includes a first projection relationship for projecting a first image frame and a second projection relationship for projecting a second image frame;
  • S202 Project the first image frame from the first plane where it is located to the target plane according to the first projection relationship to obtain a third image frame;
  • S203 Project the second image frame from the second plane where it is located to the target plane according to the second projection relationship to obtain a fourth image frame;
  • S204 Perform fusion processing on the third image frame and the fourth image frame to obtain a target image in the target plane;
  • first plane, the second plane and the target plane are imaging planes in different viewing angle directions.
  • the first projection relationship may be determined according to the relationship between the first plane and the target plane, or the relationship between the viewing angle direction corresponding to the first plane and the viewing angle direction corresponding to the target plane, and may be used to convert the image frame on the first plane Project to the target plane.
  • the first image frame is projected from the first plane where it is located to the target plane to obtain the third image frame.
  • the third image frame has the same scene, but the angle of the scene in the image frame is different.
  • the second projection relationship can be determined according to the relationship between the second plane and the target plane, or the relationship between the viewing angle direction corresponding to the second plane and the viewing angle direction corresponding to the target plane, and can be used to convert the image on the second plane
  • the frame is projected onto the target plane.
  • the second image frame is projected from the second plane where it is located to the target plane according to the second projection relationship to obtain the fourth image frame.
  • the fourth image frame has the same scene, but the angle of the scene in the image frame is different.
  • the third image frame and the fourth image frame are fused to obtain the target image in the target plane.
  • the first image frame and the second image frame are acquired by the same imaging device during rotation, and the first plane is the imaging plane of the imaging device at a first rotation angle
  • the second plane is the imaging plane of the imaging device at a second rotation angle
  • the target plane corresponds to the imaging plane of the imaging device at a third rotation angle.
  • the first image frame and the second image frame are collected by the same imaging device during the rotation process, so the viewing angle direction at the time of collection changes with the rotation angle of the imaging device.
  • the imaging device collects an image at the first rotation angle to obtain a first image frame imaged on the first plane.
  • the imaging device collects an image at a second rotation angle to obtain a second image frame imaged on the second plane.
  • the first rotation angle and the second rotation angle are different, and correspondingly, the viewing angle directions of the first image frame and the second image frame are also different.
  • the target image is not a captured image, but an image generated based on the first and second captured image frames.
  • the target image is an image in the target plane, which corresponds to the imaging device at the third rotation angle Therefore, assuming the image frame acquired by the imaging device at the third rotation angle, at least part of the scene in the image frame is the same as the scene in the target image, and the angle of the scene is also the same.
  • the third rotation angle is between the first rotation angle and the second rotation angle.
  • the target image may serve as an image frame or a partial image area in the image frame acquired by the imaging device after the first image frame and before the second image frame during the rotation process.
  • the first projection relationship is determined based on the angle difference between the first rotation angle and the third rotation angle
  • the second projection relationship is determined based on the second rotation angle and the The angle difference between the third rotation angles is determined.
  • the first rotation angle and the second rotation angle may be obtained from an imaging device.
  • an inertial sensor is provided in the imaging device, and the first rotation angle and the second rotation angle may be obtained from the inertial sensor.
  • the angle difference between the first rotation angle and the third rotation angle may be preset. In the case where the angle difference and the first rotation angle are determined, the third rotation angle can be calculated, and then the second rotation angle can be calculated The angle difference from the third angle of rotation.
  • the determination method of the angle difference between the first rotation angle and the third rotation angle, and the angle difference between the second rotation angle and the third rotation angle is not limited to this.
  • the projection transformation matrix from the first plane corresponding to the first rotation angle to the target plane corresponding to the third rotation angle can be calculated, and the projection The transformation matrix is determined as the first projection relationship.
  • the projection transformation matrix from the second plane corresponding to the second rotation angle to the target plane corresponding to the third rotation angle can be calculated, and the projection The transformation matrix is determined as the second projection relationship.
  • the first image frame and the second image frame may also be acquired by different imaging devices with different viewing angle directions.
  • the two imaging devices can collect the first image frame and the second image frame in different viewing angle directions when they are at the same position or when the positions are not far apart.
  • the method of determining the target image in the foregoing embodiment is still applicable to this situation, but when determining the first projection relationship and the second projection relationship, the rotation angle of the two imaging devices is considered.
  • the positional relationship between two imaging devices can also be considered.
  • step S204 the fusion processing of the third image frame and the fourth image frame to generate a target image in the target plane may include the following steps:
  • S2041 Cut out a first image from the third image frame, and cut out a second image from the fourth image frame, where the first image is the same as the scene in the second image;
  • S2042 Fuse the first image and the second image to obtain the target image.
  • Part of the scene (ie, the first scene) in the first image frame and the second image frame is the same, so the first scene in the third image frame and the fourth image frame projected to the target plane is still the same, but this The angle of the first scene presented in the image frame has undergone some changes.
  • the image area where the first scene is located in the third image frame may be intercepted, or a part of the area from the image area may be intercepted as the first image.
  • the image area where the first scene is located in the fourth image frame may be cut out, or a part of the area in the image area may be cut out as the second image.
  • the specific interception method and the interception size are not limited, as long as the scenes in the first image and the second image are the same.
  • the first image and the second image can be fused according to a preset image fusion algorithm to obtain the target image.
  • the image fusion algorithm may include, for example, a pyramid fusion algorithm, of course, it may also be other image fusion algorithms, and the details are not limited.
  • the position of the first image on the target plane is the same as the position of the second image on the target plane.
  • the third image frame and the fourth image frame have an intersection area in the target plane, and the scenes of the third image frame and the fourth image frame in the intersection area are the same. Therefore, the image area at the same position can be respectively intercepted from the intersection area of the third image frame and the fourth image frame as the first image and the second image, ensuring the position of the first image on the target plane and the position of the second image on the target plane. Same, then the scenes in the first image and the second image are also the same.
  • the intersection area is generally at the center position of the field of view corresponding to the target plane in the target plane.
  • the position of the target area required for interception can be determined in advance according to the center position of the field of view, and the third image frame and the first image frame in the target plane are obtained by projection.
  • the area corresponding to the position of the target area can be intercepted from the third image frame and the fourth image frame, respectively, as the first image and the second image.
  • the plane where a1b1 is located is the imaging plane when the imaging device collects the first image frame, that is, the first plane, ⁇ a1Ob1 is the angle of view corresponding to the first plane, the direction of the bisector of ⁇ a1Ob1 to the scene is the direction of the angle of view corresponding to the first plane, and a1b1 is The field of view corresponding to the first plane.
  • the plane where a2b2 is located is the imaging plane when the imaging device collects the second image frame, that is, the second plane, ⁇ a2Ob2 is the viewing angle corresponding to the second plane, the direction of the bisector of ⁇ a2Ob2 to the scene is the viewing angle direction corresponding to the second plane, a2b2 is The field of view corresponding to the first plane.
  • the plane where a3b3 is located is the target plane
  • ⁇ a3Ob3 is the view angle corresponding to the target plane
  • the direction of the bisector of ⁇ a3Ob3 to the scene is the view angle direction corresponding to the target plane
  • a3b3 is the field of view corresponding to the target plane.
  • the viewing angle direction corresponding to the plane where a1b1 and a2b2 are located is different, and the angle difference is ⁇ ; the viewing angle direction corresponding to the plane where a3b3 is located is different from the viewing angle direction corresponding to the plane where a1b1 is located and the plane where a2b2 is located.
  • the angle difference between the viewing angle directions corresponding to the plane where a1b1 is located is ⁇ , and correspondingly, the angle difference between the viewing angle direction corresponding to the plane where a3b3 is located and the viewing angle direction corresponding to the plane where a2b2 is located is ⁇ - ⁇ .
  • the first projection relationship between the plane of a1b1 and the plane of a3b3 can be determined, and the second projection relationship between the plane of a2b2 and the plane of a3b3 can be determined according to ⁇ - ⁇ .
  • the first projection relationship project the first image frame from the plane of a1b1 to the plane of a3b3 to obtain the third image frame; according to the second projection relationship, project the second image frame from the plane of a2b2 to the plane of a3b3 to obtain the fourth image frame.
  • the target area position is an area position centered on the target plane, that is, the center position of the field of view a3b3 corresponding to the plane where a3b3 is located.
  • a preset fusion algorithm is used to fuse the first image and the second image to obtain the target image.
  • the imaging device After the imaging device collects the first image frame, it rotates by a certain angle ⁇ , and then collects the second image frame.
  • the rotation speed is faster, the ⁇ is larger, and the scene changes in the first image frame and the second image frame are also greater, but the two fields of view have an intersection, so there are parts in the first image frame and the second image frame
  • the scene (that is, the first scene) is the same.
  • a target image including the first scene or a part of the first scene is generated according to the first image frame and the second image frame, and the scene in the target image can be used as the first image frame and the second image frame The transition of the middle scene, slow down the scene change between images.
  • the method further includes the following steps:
  • S300 Determine an image sequence in which a third image and a fourth image are located, the third image is an image intercepted from the first image frame, and the fourth image is an image intercepted from the second image frame ;
  • S400 Insert the target image between the third image and the fourth image of the image sequence to generate a video stream for playback.
  • the central area of the first image frame may be cut out as the third image.
  • the central area of the second image frame may be cut out as the fourth image.
  • the specific intercepting position is not limited, and it is only a preferred way here.
  • the images in the image sequence where the third image and the fourth image are located are used for playback, and the size of all images in the image sequence may be the same, and the specific size may be determined according to playback requirements.
  • the target image is inserted into the third image and the fourth image of the image sequence, and the obtained image sequence is played as a video stream.
  • the size of the target image can be the same as the size of each image in the image sequence.
  • the third image, target image, and fourth image are played in sequence, or the fourth image, target image, and third image are played in sequence.
  • the scenes in the target image are used as the third image and the fourth image.
  • the transition of scenes can make the video stream play more smoothly, and avoid the problem of too fast scene switching between video frames, which causes the naked eye to look blurry.
  • the scene change speed when playing the video stream is only 1/2 of the scene change speed of the captured image frame, which greatly slows down the scene. Speed of change.
  • the first image frame and the second image frame are two image frames collected by the imaging device during rotation.
  • the first image frame and the second image frame are two adjacent image frames collected by the imaging device during rotation.
  • the intersection range of the fields of view of adjacent image frames is larger, which is more conducive to obtaining the target image.
  • first image frame and the second image frame may also be two frames of images separated by one or several frames, as long as it is ensured that the fields of view of the first image frame and the second image frame overlap.
  • obtaining the first image frame and the second image frame may include the following:
  • the rotation of the imaging device is usually triggered by an instruction. When triggered by the instruction, it can be determined that the imaging device is rotating.
  • the specific method for determining the rotation of the imaging device is not limited to this.
  • the first image frame collected by the imaging device can be buffered first, and then when collecting, the current image frame currently collected can be used as the second image frame, and the previous historical image frame of the current image frame can be used as the first image frame.
  • the imaging device can perform the above steps of determining and inserting the target image every time an image frame is collected, thereby slowing down the scene change speed of the entire video stream.
  • the method further includes:
  • the determining the current image frame as the second image frame includes:
  • the current image frame after the distortion correction is determined as the second image frame.
  • the captured image frame may be deformed, such as stretching at the edge of the image frame.
  • the current image frame is corrected for distortion. Correct the distortion of the scene in the current image frame.
  • the distortion correction can be realized according to the principle of pinhole imaging and the camera parameters of the imaging device.
  • the specific distortion correction method is not limited, as long as the scene distortion generated in the current image frame can be corrected.
  • the acquired historical image frames may be image frames that have undergone distortion correction. If the historical image frame has not undergone distortion correction, then the historical image frame may also be subjected to distortion correction to correct the scene deformation generated in the historical image frame.
  • the current image frame After performing distortion correction on the current image frame, the current image frame can also be buffered and used as the previous historical image frame of the image frame when the next image frame is collected.
  • the imaging device that collects the first image frame and the second image frame has jitter
  • electronic image stabilization, optical image stabilization, and other technologies can be used to achieve image stabilization to reduce the first plane and target plane, and the second plane and target. The error between the planes.
  • the present invention also provides an image processing device.
  • the image processing device 100 may include a processor 102 and a memory 101.
  • the memory 101 is used to store program codes
  • the processor 102 is configured to call the program code, and when the program code is executed, it is configured to implement the image processing method described in the foregoing embodiment.
  • the present invention also provides a movable platform, which may include:
  • a power system arranged in the body, and the power system is used to provide power for the movable platform;
  • An image acquisition device which is provided in the body, and is used to acquire image frames
  • the processor is used to call the program code, and when the program code is executed, it is used to implement the image processing method described in the foregoing embodiment.
  • the movable platform is a drone.
  • an imaging device which may include:
  • the lens assembly is arranged inside the housing;
  • the processor is used to call the program code, and when the program code is executed, it is used to implement the image processing method described in the foregoing embodiment.
  • an embodiment of the present invention also provides a computer-readable storage medium with program code stored on it, and when the program code is executed (for example, the program code is executed by a processor), it can be realized The image processing method described in Figure 1.
  • a typical implementation device is a computer.
  • the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email receiving and sending device, and a game control A console, a tablet computer, a wearable device, or a combination of any of these devices.
  • the embodiments of the present invention may be provided as a method, a system, or a computer program product. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may adopt the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device,
  • the instruction device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded into a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, thereby executing instructions on the computer or other programmable equipment Provides steps for realizing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Abstract

An image processing method and device, a mobile platform, a camera device, and a storage medium, which can solve the problem of a scene changing too fast. The image processing method comprises: acquiring a first frame and a second frame, a viewing angle direction of the first frame being different from that of the second frame (S100); and determining a target image according to the first frame and the second frame, the first frame and the second frame both containing a scene in the target image (S200).

Description

图像处理方法、装置、可移动平台、摄像装置及存储介质Image processing method, device, movable platform, camera device and storage medium 技术领域Technical field
本发明涉及图像技术领域,尤其是涉及一种图像处理方法、装置、可移动平台、摄像装置及存储介质。The present invention relates to the field of image technology, in particular to an image processing method, device, movable platform, camera device and storage medium.
背景技术Background technique
在图像播放时,有可能出现不同图像的场景变化过快的情况,这种情况下,播放画面整体会比较模糊影响用户的观看体验。图像的场景变化过快有可能是由于不同成像设备从不同视角方向采集的;也有可能是由于成像设备变换不同视角方向采集图像时,视角方向变换过快。During image playback, scenes of different images may change too quickly. In this case, the overall playback screen will be blurred and affect the user's viewing experience. The scene change of the image too fast may be because different imaging devices collect images from different viewing angles; it may also be because the viewing angle changes too fast when the imaging device changes different viewing angles to collect images.
比如,无人机在航拍过程中,经常需要通过旋转来转换视角方向,如果无人机的旋转速度较大,采集图像时视角方向变化也会很快,那么,后续在播放图像时,可能出现播放画面中的场景变化较快的情况。For example, in the process of aerial photography, drones often need to rotate to change the direction of view. If the rotation speed of the drone is large, the direction of the viewing angle will change quickly when images are collected. Then, subsequent images may appear when the image is played. The scene in the playback screen changes quickly.
发明内容Summary of the invention
本发明提供一种图像处理方法、装置、可移动平台、摄像装置及存储介质,可解决场景变化过快的问题。The invention provides an image processing method, a device, a movable platform, a camera device and a storage medium, which can solve the problem of excessively fast scene changes.
本发明实施例第一方面,提供一种图像处理方法,包括:In a first aspect of the embodiments of the present invention, an image processing method is provided, including:
获取第一图像帧和第二图像帧,所述第一图像帧与第二图像帧的视角方向不同;Acquiring a first image frame and a second image frame, where the viewing angle directions of the first image frame and the second image frame are different;
依据所述第一图像帧和第二图像帧确定目标图像,所述第一图像帧和所述第二图像帧均包含所述目标图像中的场景。The target image is determined according to the first image frame and the second image frame, and both the first image frame and the second image frame include a scene in the target image.
本发明实施例第二方面,提供一种图像处理装置,包括存储器和处理器;In a second aspect of the embodiments of the present invention, an image processing device is provided, including a memory and a processor;
所述存储器,用于存储程序代码;The memory is used to store program code;
所述处理器,用于调用所述程序代码,当程序代码被执行时,用于实现 如前述实施例所述的图像处理方法。The processor is used to call the program code, and when the program code is executed, it is used to implement the image processing method described in the foregoing embodiment.
本发明实施例第三方面,提供一种可移动平台,包括:In a third aspect of the embodiments of the present invention, a movable platform is provided, including:
机体;Body
动力系统,设于所述机体,所述动力系统用于为所述可移动平台提供动力;A power system, arranged in the body, and the power system is used to provide power for the movable platform;
图像采集装置,设于所述机体,用于采集图像帧;An image acquisition device, which is provided in the body, and is used to acquire image frames;
存储器,用于存储程序代码;以及Memory for storing program codes; and
处理器,用于调用所述程序代码,当程序代码被执行时,用于实现如前述实施例所述的图像处理方法。The processor is used to call the program code, and when the program code is executed, it is used to implement the image processing method described in the foregoing embodiment.
本发明实施例第四方面,提供一种摄像装置,包括:In a fourth aspect of the embodiments of the present invention, a camera device is provided, including:
外壳;shell;
镜头组件,设于所述外壳内部;The lens assembly is arranged inside the housing;
存储器,用于存储程序代码;以及Memory for storing program codes; and
处理器,用于调用所述程序代码,当程序代码被执行时,用于实现如前述实施例所述的图像处理方法。The processor is used to call the program code, and when the program code is executed, it is used to implement the image processing method described in the foregoing embodiment.
本发明实施例第五方面,提供一种计算机可读存储介质,In a fifth aspect of the embodiments of the present invention, a computer-readable storage medium is provided,
所述计算机可读存储介质上存储有程序代码,所述程序代码被执行时,实现如前述实施例所述的图像处理方法。The computer-readable storage medium stores program code, and when the program code is executed, the image processing method as described in the foregoing embodiment is implemented.
基于上述技术方案,本发明实施例中,在获取到视角方向不同的第一图像帧和第二图像帧时,可以根据这两个图像帧确定目标图像,第一图像帧和第二图像帧均包含该目标图像中的场景,换言之,目标图像中的场景被包含在第一图像帧和第二图像帧中,那么,在将目标图像插入到第一图像帧和第二图像帧间播放时,或者,将目标图像插入到第一图像帧和第二图像帧分别经处理后的图像间播放时,可以起到场景过渡的作用,减缓了播放时场景变化的速度,解决场景变化过快的问题。Based on the above technical solution, in the embodiment of the present invention, when the first image frame and the second image frame with different viewing angle directions are acquired, the target image can be determined according to the two image frames, and the first image frame and the second image frame are both The scene in the target image is included. In other words, the scene in the target image is included in the first image frame and the second image frame. Then, when the target image is inserted between the first image frame and the second image frame for playback, Or, inserting the target image into the first image frame and the second image frame to play between the processed images, can play the role of scene transition, slow down the speed of scene changes during playback, and solve the problem of excessive scene changes .
附图说明Description of the drawings
为了更加清楚地说明本发明实施例中的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据本发明实施例的这些附图获得其它的附图。In order to explain the technical solutions in the embodiments of the present invention more clearly, the following will briefly introduce the drawings that need to be used in the embodiments of the present invention. Obviously, the drawings in the following description are only some of the implementations recorded in the present invention. For example, for those of ordinary skill in the art, other drawings can be obtained based on these drawings of the embodiments of the present invention.
图1是本发明一实施例的图像处理方法的流程示意图;FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention;
图2是本发明一实施例的第一平面与第二平面的关系示意图;2 is a schematic diagram of the relationship between the first plane and the second plane according to an embodiment of the present invention;
图3是本发明一实施例的第一平面、第二平面与目标平面的关系示意图;3 is a schematic diagram of the relationship between the first plane, the second plane and the target plane according to an embodiment of the present invention;
图4是本发明一实施例的图像处理装置的结构框图。Fig. 4 is a structural block diagram of an image processing apparatus according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。另外,在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention. In addition, if there is no conflict, the following embodiments and features in the embodiments can be combined with each other.
本发明使用的术语仅仅是出于描述特定实施例的目的,而非限制本发明。本发明和权利要求书所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其它含义。应当理解的是,本文中使用的术语“和/或”是指包含一个或多个相关联的列出项目的任何或所有可能组合。The terms used in the present invention are only for the purpose of describing specific embodiments, rather than limiting the present invention. The singular forms of "a", "said" and "the" used in the present invention and claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should be understood that the term "and/or" as used herein refers to any or all possible combinations of one or more associated listed items.
尽管在本发明可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语用来将同一类型的信息彼此区分开。例如,在不脱离本发明范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,此外,所使用的词语“如果”可以被解释成为“在……时”,或者,“当……时”,或者,“响应于确定”。Although the terms first, second, third, etc. may be used in the present invention to describe various information, the information should not be limited to these terms. These terms are used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information. Depending on the context, in addition, the word "if" used can be interpreted as "when", or "when", or "in response to certainty."
下面对本发明实施例的图像处理方法进行详细描述,但不应以此作为限制。The image processing method of the embodiment of the present invention will be described in detail below, but this should not be used as a limitation.
在一个实施例中,参看图1,一种图像处理方法,可以包括以下步骤:In an embodiment, referring to FIG. 1, an image processing method may include the following steps:
S100:获取第一图像帧和第二图像帧,所述第一图像帧与第二图像帧的视角方向不同;S100: Acquire a first image frame and a second image frame, where the viewing angle directions of the first image frame and the second image frame are different;
S200:依据所述第一图像帧和第二图像帧确定目标图像,所述第一图像帧和所述第二图像帧均包含所述目标图像中的场景。S200: Determine a target image according to the first image frame and the second image frame, where both the first image frame and the second image frame include a scene in the target image.
本发明实施例中,图像处理方法的执行主体可以为电子设备。电子设备可以为成像设备,比如可以为摄像装置,或者搭载有摄像装置的可移动片平台比如无人机、车辆等。当然,电子设备也可以为其他设备,只要具有一定的图像处理能力即可。In the embodiment of the present invention, the execution subject of the image processing method may be an electronic device. The electronic device may be an imaging device, for example, a camera device, or a movable film platform equipped with a camera device, such as a drone, a vehicle, and the like. Of course, the electronic device can also be other devices, as long as it has a certain image processing capability.
本发明实施例中,图像帧的视角方向可以指:采集图像帧时镜头视角的平分线往被采集场景的方向。In the embodiment of the present invention, the viewing angle direction of the image frame may refer to the direction from the bisector of the lens viewing angle to the captured scene when the image frame is captured.
步骤S100中,获取第一图像帧和第二图像帧。In step S100, a first image frame and a second image frame are acquired.
第一图像帧和第二图像帧可以是同一成像设备采集的,也可以是不同成像设备采集的。第一图像帧和第二图像帧可以是由外部的成像设备采集的;或者,在执行主体电子设备为成像设备的情况下,第一图像帧和第二图像帧可以由电子设备自身采集获得。The first image frame and the second image frame may be acquired by the same imaging device, or may be acquired by different imaging devices. The first image frame and the second image frame may be collected by an external imaging device; or, in the case where the executing main electronic device is an imaging device, the first image frame and the second image frame may be collected by the electronic device itself.
第一图像帧与第二图像帧的视角方向不同,换言之,第一图像帧和第二图像帧的视角方向相差一定角度,所以,第一图像帧和第二图像帧中的场景也会有所不同。The viewing angles of the first image frame and the second image frame are different. In other words, the viewing angles of the first image frame and the second image frame are different by a certain angle. Therefore, the scenes in the first image frame and the second image frame will also be different. different.
第一图像帧和第二图像帧可以是在同一位置但不同视角方向下采集的两个图像帧,或者,也可以是在不同位置且不同视角方向下采集的两个图像帧。The first image frame and the second image frame may be two image frames collected at the same location but different viewing angle directions, or may also be two image frames collected at different locations and different viewing angle directions.
由于第一图像帧和第二图像帧的视角方向不同,如果第一图像帧和第二图像帧被连续播放、且播放速度较快(两帧播放时间间隔较短)时,就会发生场景变化较快的问题。本发明实施例通过后续步骤解决该问题。Since the viewing angles of the first image frame and the second image frame are different, if the first image frame and the second image frame are played continuously and the playing speed is fast (the time interval between the two frames is short), the scene change will occur Faster question. The embodiment of the present invention solves this problem through subsequent steps.
为解决该问题,本发明实施例中,在获取第一图像帧和第二图像帧的基 础上,还执行步骤S200:依据所述第一图像帧和第二图像帧确定目标图像。To solve this problem, in the embodiment of the present invention, after acquiring the first image frame and the second image frame, step S200 is further executed: determining the target image according to the first image frame and the second image frame.
第一图像帧和所述第二图像帧均包含所述目标图像中的场景。换言之,第一图像帧和第二图像帧中有部分场景是相同的,目标图像中的场景为该部分场景、或者该部分场景的一部分。Both the first image frame and the second image frame include a scene in the target image. In other words, some scenes in the first image frame and the second image frame are the same, and the scene in the target image is the partial scene or a part of the partial scene.
第一图像帧和第二图像帧的视角方向之间的夹角,需要保证采集第一图像帧和第二图像帧时的视场存在交集,如此,便可使得第一图像帧和第二图像帧中存在部分场景是相同的。The angle between the viewing angles of the first image frame and the second image frame needs to ensure that there is an intersection of the field of view when the first image frame and the second image frame are collected. In this way, the first image frame and the second image There are some scenes in the frame that are the same.
为了保证在第一图像帧和第二图像帧的视角方向之间的夹角较大的情况下,采集第一图像帧和第二图像帧时的视场仍存在较大的交集,可以采用大FOV(field of view,视角)的镜头来采集得到第一图像帧和第二图像帧。In order to ensure that when the angle between the viewing angles of the first image frame and the second image frame is large, there is still a large intersection in the field of view when the first image frame and the second image frame are collected. The FOV (field of view, angle of view) lens is used to collect the first image frame and the second image frame.
依据所述第一图像帧和第二图像帧确定目标图像时,可以根据第一图像帧和第二图像帧中相同的场景(下面简称第一场景,第一场景是第一图像帧中的一部分场景,也是第二图像帧中的一部分场景)来确定目标图像。可选的,可以确定第一图像帧中该第一场景所在的第一图像区域、与第二图像帧中该第一场景所在的第二图像区域,根据该第一图像区域和第二图像区域生成目标图像,比如可以先将两个图像区域进行仿射变换,在仿射变换后再进行融合处理,生成目标图像。When determining the target image according to the first image frame and the second image frame, the same scene in the first image frame and the second image frame (hereinafter referred to as the first scene, the first scene is a part of the first image frame) Scene, which is also a part of the scene in the second image frame) to determine the target image. Optionally, the first image area where the first scene is located in the first image frame and the second image area where the first scene is located in the second image frame may be determined, based on the first image area and the second image area To generate the target image, for example, the two image regions may be subjected to affine transformation first, and then fusion processing is performed after the affine transformation to generate the target image.
可以理解,上述仅是确定目标图像的一个例子,并不作为限制,还可以通过其他方式确定目标图像,只要保证目标图像中的场景存在于第一图像帧和第二图像帧中即可。It can be understood that the foregoing is only an example of determining the target image and is not meant as a limitation. The target image can also be determined in other ways, as long as it is ensured that the scene in the target image exists in the first image frame and the second image frame.
确定出的目标图像可以为一个或者多个。在多个的情况下,不同目标图像对应的视场可以不同,相应的,不同目标图像中的场景可以有所不同、但都存在于第一图像帧和第二图像帧中。The determined target image may be one or more. In the case of multiple, the field of view corresponding to different target images may be different. Correspondingly, the scenes in different target images may be different, but they all exist in the first image frame and the second image frame.
本发明实施例中,在获取到视角方向不同的第一图像帧和第二图像帧时,可以根据这两个图像帧确定目标图像,第一图像帧和第二图像帧均包含该目标图像中的场景,换言之,目标图像中的场景被包含在第一图像帧和第二图像帧中,那么,在将目标图像插入到第一图像帧和第二图像帧间播放时,或 者,将目标图像插入到第一图像帧和第二图像帧分别经处理后的图像间播放时,可以起到场景过渡的作用,减缓了播放时场景变化的速度,解决场景变化过快的问题。In the embodiment of the present invention, when the first image frame and the second image frame with different viewing angle directions are acquired, the target image can be determined according to the two image frames, and the first image frame and the second image frame both contain the target image. In other words, the scene in the target image is contained in the first image frame and the second image frame. Then, when the target image is inserted between the first image frame and the second image frame, or the target image When inserted between the processed images of the first image frame and the second image frame, it can play the role of scene transition, slow down the speed of scene changes during playback, and solve the problem of excessive scene changes.
在无人机的航拍场景中,例如,当需要通过旋转或倾斜的方式转换视角时,可以通过以上方式控制画面播放的速度,从而可以避免无人机速度变化过大而导致视频时而模糊时而清晰的现象。In the drone's aerial scene, for example, when the angle of view needs to be changed by rotating or tilting, the speed of the screen playback can be controlled by the above methods, so as to avoid excessive changes in the speed of the drone, which may cause the video to be blurred and sometimes clear. The phenomenon.
在一个实施例中,步骤S200中,依据所述第一图像帧和第二图像帧确定目标图像,包括:In one embodiment, in step S200, determining the target image according to the first image frame and the second image frame includes:
将第一图像帧和第二图像帧投影至同一目标平面上,生成所述目标图像;其中,所述目标平面所对应的视角方向不同于所述第一图像帧与第二图像帧的视角方向。The first image frame and the second image frame are projected onto the same target plane to generate the target image; wherein the viewing angle direction corresponding to the target plane is different from the viewing angle direction of the first image frame and the second image frame .
由于第一图像帧和第二图像帧的视角方向不同,所以第一图像帧和第二图像帧中相同的场景(即第一场景)是以不同角度呈现在第一图像帧和第二图像帧中的,将第一图像帧和第二图像帧投影到同一目标平面上,可以使得投影所得的两个图像帧中场景(包括第一场景)的角度一致,以便于生成所需的目标图像。Since the perspective directions of the first image frame and the second image frame are different, the same scene (ie, the first scene) in the first image frame and the second image frame is presented in the first image frame and the second image frame at different angles Wherein, projecting the first image frame and the second image frame onto the same target plane can make the angles of the scenes (including the first scene) in the two image frames obtained by the projection consistent, so as to generate the desired target image.
而目标平面对应的视角方向与第一图像帧和第二图像帧的视角方向均不同,可以保证在将目标图像插入到第一图像帧和第二图像帧间播放时,或者,将目标图像插入到第一图像帧和第二图像帧分别经处理后的图像间播放时,在减缓场景变化的同时,可以逐渐调整场景的角度,以使得场景变化的过渡更平滑,避免突兀的场景变化。The viewing angle direction corresponding to the target plane is different from the viewing angle directions of the first image frame and the second image frame, which can ensure that when the target image is inserted between the first image frame and the second image frame, or the target image is inserted When the first image frame and the second image frame are played between the processed images, while slowing down the scene change, the angle of the scene can be gradually adjusted to make the transition of the scene change smoother and avoid sudden scene changes.
将第一图像帧和第二图像帧投影至同一目标平面上,可以是分别将第一图像帧和第二图像帧直接投影目标平面上,也可以是先分别将第一图像帧和第二图像帧投影至曲面上、再从曲面投影到目标平面上,具体方式不限。To project the first image frame and the second image frame onto the same target plane, either the first image frame and the second image frame can be directly projected onto the target plane respectively, or the first image frame and the second image frame can be respectively projected onto the target plane. The frame is projected onto the curved surface, and then projected from the curved surface onto the target plane, and the specific method is not limited.
在一个实施例中,步骤S200中,将第一图像帧和第二图像帧投影至同一目标平面上,生成所述目标图像,包括:In one embodiment, in step S200, projecting the first image frame and the second image frame onto the same target plane to generate the target image includes:
将第一图像帧和第二图像帧投影至同一目标平面后进行融合处理,生成 所述目标图像。The first image frame and the second image frame are projected onto the same target plane and then subjected to fusion processing to generate the target image.
将第一图像帧和第二图像帧投影至同一目标平面后,可以将所得的两个图像帧进行融合处理,以得到更满足要求的目标图像。After the first image frame and the second image frame are projected onto the same target plane, the two obtained image frames can be fused to obtain a target image that meets the requirements.
当然,投影之后除了融合处理,还可以包含其他图像处理方式,比如图像截取等,具体不做限制。Of course, in addition to fusion processing after projection, other image processing methods, such as image interception, can also be included, which are not specifically limited.
在一个实施例中,步骤S200中,将第一图像帧和第二图像帧投影至同一目标平面后进行融合处理,生成所述目标图像,可以包括以下步骤:In one embodiment, in step S200, the first image frame and the second image frame are projected onto the same target plane and then merged to generate the target image, which may include the following steps:
S201:获取目标平面对应的投影关系,所述投影关系包括用于投影第一图像帧的第一投影关系、及用于投影第二图像帧的第二投影关系;S201: Acquire a projection relationship corresponding to the target plane, where the projection relationship includes a first projection relationship for projecting a first image frame and a second projection relationship for projecting a second image frame;
S202:按照所述第一投影关系将所述第一图像帧从所处的第一平面投影到所述目标平面,得到第三图像帧;S202: Project the first image frame from the first plane where it is located to the target plane according to the first projection relationship to obtain a third image frame;
S203:按照所述第二投影关系将所述第二图像帧从所处的第二平面投影到所述目标平面,得到第四图像帧;S203: Project the second image frame from the second plane where it is located to the target plane according to the second projection relationship to obtain a fourth image frame;
S204:将所述第三图像帧和第四图像帧进行融合处理,得到处于所述目标平面的目标图像;S204: Perform fusion processing on the third image frame and the fourth image frame to obtain a target image in the target plane;
其中,所述第一平面、第二平面和目标平面是不同视角方向下的成像平面。Wherein, the first plane, the second plane and the target plane are imaging planes in different viewing angle directions.
第一投影关系可以根据第一平面与目标平面之间的关系、或者第一平面对应的视角方向与目标平面对应的视角方向之间的关系来确定,可以用于将第一平面上的图像帧投影到目标平面上。The first projection relationship may be determined according to the relationship between the first plane and the target plane, or the relationship between the viewing angle direction corresponding to the first plane and the viewing angle direction corresponding to the target plane, and may be used to convert the image frame on the first plane Project to the target plane.
按照第一投影关系将第一图像帧从所处的第一平面投影到目标平面,得到第三图像帧。第三图像帧相比于第一图像帧而言,场景不变,但是场景在图像帧中呈现的角度有所不同。According to the first projection relationship, the first image frame is projected from the first plane where it is located to the target plane to obtain the third image frame. Compared with the first image frame, the third image frame has the same scene, but the angle of the scene in the image frame is different.
第二投影关系可以根据第二平面与目标平面之间的关系、或者第二平面所对应的视角方向与目标平面对应的视角方向之间的关系来确定,可以用于将第二平面上的图像帧投影到目标平面上。The second projection relationship can be determined according to the relationship between the second plane and the target plane, or the relationship between the viewing angle direction corresponding to the second plane and the viewing angle direction corresponding to the target plane, and can be used to convert the image on the second plane The frame is projected onto the target plane.
按照第二投影关系将第二图像帧从所处的第二平面投影到目标平面,得 到第四图像帧。第四图像帧相比于第二图像帧而言,场景不变,但是场景在图像帧中呈现的角度有所不同。The second image frame is projected from the second plane where it is located to the target plane according to the second projection relationship to obtain the fourth image frame. Compared with the second image frame, the fourth image frame has the same scene, but the angle of the scene in the image frame is different.
投影完成后,将第三图像帧和第四图像帧进行融合处理,得到处于目标平面的目标图像。After the projection is completed, the third image frame and the fourth image frame are fused to obtain the target image in the target plane.
在一个实施例中,所述第一图像帧和所述第二图像帧是由同一成像设备在旋转过程中采集的,所述第一平面是所述成像设备在第一旋转角度下的成像平面,所述第二平面是所述成像设备在第二旋转角度下的成像平面,所述目标平面对应于所述成像设备在第三旋转角度下的成像平面。In one embodiment, the first image frame and the second image frame are acquired by the same imaging device during rotation, and the first plane is the imaging plane of the imaging device at a first rotation angle The second plane is the imaging plane of the imaging device at a second rotation angle, and the target plane corresponds to the imaging plane of the imaging device at a third rotation angle.
第一图像帧和第二图像帧是由同一成像设备在旋转过程中采集的,所以采集时的视角方向是在随成像设备的旋转角度的变化而变化的。成像设备在第一旋转角度下采集图像得到成像在第一平面的第一图像帧。成像设备在第二旋转角度下采集图像得到成像在第二平面的第二图像帧。第一旋转角度和第二旋转角度不同,相应的,第一图像帧和第二图像帧的视角方向也不同。The first image frame and the second image frame are collected by the same imaging device during the rotation process, so the viewing angle direction at the time of collection changes with the rotation angle of the imaging device. The imaging device collects an image at the first rotation angle to obtain a first image frame imaged on the first plane. The imaging device collects an image at a second rotation angle to obtain a second image frame imaged on the second plane. The first rotation angle and the second rotation angle are different, and correspondingly, the viewing angle directions of the first image frame and the second image frame are also different.
目标图像并非是采集所得的图像,而是根据采集的第一图像帧和第二图像帧生成的图像,但是,目标图像是处于目标平面的图像,该目标平面对应于成像设备在第三旋转角度下的成像平面,所以,假设成像设备在第三旋转角度下采集的图像帧,那么该图像帧中至少部分场景与目标图像中的场景相同,并且场景呈现的角度也相同。The target image is not a captured image, but an image generated based on the first and second captured image frames. However, the target image is an image in the target plane, which corresponds to the imaging device at the third rotation angle Therefore, assuming the image frame acquired by the imaging device at the third rotation angle, at least part of the scene in the image frame is the same as the scene in the target image, and the angle of the scene is also the same.
优选来说,所述第三旋转角度处于所述第一旋转角度与第二旋转角度之间。目标图像可以充当成像设备在旋转过程中在第一图像帧之后、第二图像帧之前采集的图像帧或图像帧中的部分图像区域。Preferably, the third rotation angle is between the first rotation angle and the second rotation angle. The target image may serve as an image frame or a partial image area in the image frame acquired by the imaging device after the first image frame and before the second image frame during the rotation process.
如此,可以实现在将目标图像插入到第一图像帧和第二图像帧间播放时,或者,将目标图像插入到第一图像帧和第二图像帧分别经处理后的图像间播放时,在减缓场景变化的同时,场景的角度也可以逐渐变化。In this way, it can be realized that when the target image is inserted into the first image frame and the second image frame for playback, or the target image is inserted into the first image frame and the second image frame to be played between the processed images, While slowing down changes in the scene, the angle of the scene can also be gradually changed.
在一个实施例中,所述第一投影关系是依据所述第一旋转角度与所述第三旋转角度之间的角度差确定的,所述第二投影关系是依据所述第二旋转角度与所述第三旋转角度之间的角度差确定的。In one embodiment, the first projection relationship is determined based on the angle difference between the first rotation angle and the third rotation angle, and the second projection relationship is determined based on the second rotation angle and the The angle difference between the third rotation angles is determined.
第一旋转角度和第二旋转角度可以从成像设备中获取,比如,成像设备中设置有惯性传感器,可以从该惯性传感器中获取第一旋转角度和第二旋转角度。The first rotation angle and the second rotation angle may be obtained from an imaging device. For example, an inertial sensor is provided in the imaging device, and the first rotation angle and the second rotation angle may be obtained from the inertial sensor.
第一旋转角度与第三旋转角度之间的角度差可以是预设的,在该角度差与第一旋转角度确定的情况下,可以计算出第三旋转角度,进而可以计算出第二旋转角度与第三旋转角度之间的角度差。当然,第一旋转角度与第三旋转角度之间的角度差、第二旋转角度与第三旋转角度之间的角度差的确定方式也不限于此。The angle difference between the first rotation angle and the third rotation angle may be preset. In the case where the angle difference and the first rotation angle are determined, the third rotation angle can be calculated, and then the second rotation angle can be calculated The angle difference from the third angle of rotation. Of course, the determination method of the angle difference between the first rotation angle and the third rotation angle, and the angle difference between the second rotation angle and the third rotation angle is not limited to this.
在第一旋转角度与第三旋转角度之间的角度差被确定的情况下,可以计算出第一旋转角度对应的第一平面到第三旋转角度对应的目标平面的投影变换矩阵,将该投影变换矩阵确定为第一投影关系。When the angle difference between the first rotation angle and the third rotation angle is determined, the projection transformation matrix from the first plane corresponding to the first rotation angle to the target plane corresponding to the third rotation angle can be calculated, and the projection The transformation matrix is determined as the first projection relationship.
在第二旋转角度与第三旋转角度之间的角度差被确定的情况下,可以计算出第二旋转角度对应的第二平面到第三旋转角度对应的目标平面的投影变换矩阵,将该投影变换矩阵确定为第二投影关系。When the angle difference between the second rotation angle and the third rotation angle is determined, the projection transformation matrix from the second plane corresponding to the second rotation angle to the target plane corresponding to the third rotation angle can be calculated, and the projection The transformation matrix is determined as the second projection relationship.
在一个实施例中,所述第一图像帧和所述第二图像帧也可以是不同的成像设备以不同的视角方向采集的。In an embodiment, the first image frame and the second image frame may also be acquired by different imaging devices with different viewing angle directions.
两个成像设备可以在处于同一位置、或者所处位置相差不远时,以不同的视角方向分别采集第一图像帧和第二图像帧。The two imaging devices can collect the first image frame and the second image frame in different viewing angle directions when they are at the same position or when the positions are not far apart.
前述实施例中确定目标图像的方式对于此情况而言,仍是适用的,只是在确定第一投影关系和第二投影关系时,考虑的是两个成像设备的旋转角度,当然如果有需要,还可以考虑两个成像设备的位置关系。The method of determining the target image in the foregoing embodiment is still applicable to this situation, but when determining the first projection relationship and the second projection relationship, the rotation angle of the two imaging devices is considered. Of course, if necessary, The positional relationship between two imaging devices can also be considered.
在一个实施例中,步骤S204中,所述将所述第三图像帧和第四图像帧进行融合处理,生成处于所述目标平面的目标图像,可以包括以下步骤:In an embodiment, in step S204, the fusion processing of the third image frame and the fourth image frame to generate a target image in the target plane may include the following steps:
S2041:从所述第三图像帧中截取出第一图像,从所述第四图像帧中截取出第二图像,所述第一图像与所述第二图像中的场景相同;S2041: Cut out a first image from the third image frame, and cut out a second image from the fourth image frame, where the first image is the same as the scene in the second image;
S2042:融合所述第一图像和第二图像,得到所述目标图像。S2042: Fuse the first image and the second image to obtain the target image.
第一图像帧和第二图像帧中部分场景(即第一场景)是相同的,所以投 影到目标平面的第三图像帧和第四图像帧中的该第一场景仍是相同的,只是这第一场景呈现在图像帧中的角度发生了一些变化。Part of the scene (ie, the first scene) in the first image frame and the second image frame is the same, so the first scene in the third image frame and the fourth image frame projected to the target plane is still the same, but this The angle of the first scene presented in the image frame has undergone some changes.
从第三图像帧中截取出第一图像时,可以截取第三图像帧中该第一场景所在图像区域、或者从该图像区域中截取出一部分区域作为第一图像。从第四图像帧中截取出第二图像时,可以截取第四图像帧中该第一场景所在图像区域、或者从该图像区域中截取出一部分区域作为第二图像。When the first image is intercepted from the third image frame, the image area where the first scene is located in the third image frame may be intercepted, or a part of the area from the image area may be intercepted as the first image. When the second image is cut out from the fourth image frame, the image area where the first scene is located in the fourth image frame may be cut out, or a part of the area in the image area may be cut out as the second image.
当然,具体截取方式及截取尺寸不限,只要保证第一图像和第二图像中的场景相同即可。Of course, the specific interception method and the interception size are not limited, as long as the scenes in the first image and the second image are the same.
得到第一图像和第二图像后,可以按照预设的图像融合算法融合第一图像和第二图像,得到目标图像。图像融合算法比如可以包括金字塔融合算法,当然也可以为其他图像融合算法,具体不限。After the first image and the second image are obtained, the first image and the second image can be fused according to a preset image fusion algorithm to obtain the target image. The image fusion algorithm may include, for example, a pyramid fusion algorithm, of course, it may also be other image fusion algorithms, and the details are not limited.
在一个实施例中,所述第一图像在所述目标平面的位置与所述第二图像在所述目标平面的位置相同。In one embodiment, the position of the first image on the target plane is the same as the position of the second image on the target plane.
第三图像帧和第四图像帧在目标平面存在交集区域,第三图像帧和第四图像帧在交集区域的场景是相同的。所以,可以分别从第三图像帧和第四图像帧的交集区域截取同一位置的图像区域作为第一图像和第二图像,保证第一图像在目标平面的位置与第二图像在目标平面的位置相同,那么,第一图像和第二图像中的场景也是相同的。The third image frame and the fourth image frame have an intersection area in the target plane, and the scenes of the third image frame and the fourth image frame in the intersection area are the same. Therefore, the image area at the same position can be respectively intercepted from the intersection area of the third image frame and the fourth image frame as the first image and the second image, ensuring the position of the first image on the target plane and the position of the second image on the target plane. Same, then the scenes in the first image and the second image are also the same.
交集区域一般处于目标平面中与目标平面对应的视场的中心位置处,可以预先根据该视场的中心位置确定截取所需的目标区域位置,在投影得到处于目标平面的第三图像帧和第四图像帧时,可以分别从第三图像帧和第四图像帧中截取目标区域位置对应的区域,作为第一图像和第二图像。The intersection area is generally at the center position of the field of view corresponding to the target plane in the target plane. The position of the target area required for interception can be determined in advance according to the center position of the field of view, and the third image frame and the first image frame in the target plane are obtained by projection. In the case of four image frames, the area corresponding to the position of the target area can be intercepted from the third image frame and the fourth image frame, respectively, as the first image and the second image.
下面结合图2和图3,举例说明一下本发明实施例生成目标图像的方式。In the following, with reference to FIG. 2 and FIG. 3, an example is given to illustrate the method of generating a target image in an embodiment of the present invention.
a1b1所在平面为成像设备采集第一图像帧时的成像平面即第一平面,∠a1Ob1为第一平面对应的视角,∠a1Ob1的平分线往场景的方向为第一平面对应的视角方向,a1b1为第一平面对应的视场。The plane where a1b1 is located is the imaging plane when the imaging device collects the first image frame, that is, the first plane, ∠a1Ob1 is the angle of view corresponding to the first plane, the direction of the bisector of ∠a1Ob1 to the scene is the direction of the angle of view corresponding to the first plane, and a1b1 is The field of view corresponding to the first plane.
a2b2所在平面为成像设备采集第二图像帧时的成像平面即第二平面,∠ a2Ob2为第二平面对应的视角,∠a2Ob2的平分线往场景的方向为第二平面对应的视角方向,a2b2为第一平面对应的视场。The plane where a2b2 is located is the imaging plane when the imaging device collects the second image frame, that is, the second plane, ∠ a2Ob2 is the viewing angle corresponding to the second plane, the direction of the bisector of ∠a2Ob2 to the scene is the viewing angle direction corresponding to the second plane, a2b2 is The field of view corresponding to the first plane.
a3b3所在平面为目标平面,∠a3Ob3为目标平面对应的视角,∠a3Ob3的平分线往场景的方向为目标平面对应的视角方向,a3b3为目标平面对应的视场。The plane where a3b3 is located is the target plane, ∠a3Ob3 is the view angle corresponding to the target plane, the direction of the bisector of ∠a3Ob3 to the scene is the view angle direction corresponding to the target plane, and a3b3 is the field of view corresponding to the target plane.
a1b1所在平面、a2b2所在平面对应的视角方向不同,角度差为β;a3b3所在平面对应的视角方向与a1b1所在平面、a2b2所在平面对应的视角方向均不同,其中,a3b3所在平面对应的视角方向与a1b1所在平面对应的视角方向之间的角度差为α,相应的,a3b3所在平面对应的视角方向与a2b2所在平面对应的视角方向之间的角度差为β-α。The viewing angle direction corresponding to the plane where a1b1 and a2b2 are located is different, and the angle difference is β; the viewing angle direction corresponding to the plane where a3b3 is located is different from the viewing angle direction corresponding to the plane where a1b1 is located and the plane where a2b2 is located. The angle difference between the viewing angle directions corresponding to the plane where a1b1 is located is α, and correspondingly, the angle difference between the viewing angle direction corresponding to the plane where a3b3 is located and the viewing angle direction corresponding to the plane where a2b2 is located is β-α.
根据α可以确定a1b1所在平面与a3b3所在平面之间的第一投影关系,根据β-α可以确定a2b2所在平面与a3b3所在平面之间的第二投影关系。According to α, the first projection relationship between the plane of a1b1 and the plane of a3b3 can be determined, and the second projection relationship between the plane of a2b2 and the plane of a3b3 can be determined according to β-α.
按照第一投影关系将第一图像帧从a1b1所在平面投影到a3b3所在平面,得到第三图像帧;按照第二投影关系将第二图像帧从a2b2所在平面投影到a3b3所在平面,得到第四图像帧。According to the first projection relationship, project the first image frame from the plane of a1b1 to the plane of a3b3 to obtain the third image frame; according to the second projection relationship, project the second image frame from the plane of a2b2 to the plane of a3b3 to obtain the fourth image frame.
接着,从第三图像帧中截取出与预设的目标区域位置对应的区域作为第一图像,从第四图像帧中截取出与预设的目标区域位置对应的区域作为第二图像,其中,该目标区域位置为以目标平面即a3b3所在平面对应的视场a3b3的中心位置为中心的一块区域位置。Then, the area corresponding to the preset target area position is cut out from the third image frame as the first image, and the area corresponding to the preset target area position is cut out from the fourth image frame as the second image, where, The target area position is an area position centered on the target plane, that is, the center position of the field of view a3b3 corresponding to the plane where a3b3 is located.
然后,采用预设的融合算法将第一图像和第二图像融合,得到目标图像。Then, a preset fusion algorithm is used to fuse the first image and the second image to obtain the target image.
上述例子中,成像设备采集第一图像帧后,旋转了一定角度β,再采集第二图像帧。在旋转速度较快时,β较大,那么第一图像帧和第二图像帧中场景的变化也较大,但是两个视场存在交集,所以第一图像帧和第二图像帧中存在部分场景(即第一场景)相同。本发明实施例中,根据第一图像帧和第二图像帧生成包含该第一场景、或该第一场景的一部分的目标图像,目标图像中的场景可作为第一图像帧、第二图像帧中场景的过渡,减缓图像间的场景变化。In the above example, after the imaging device collects the first image frame, it rotates by a certain angle β, and then collects the second image frame. When the rotation speed is faster, the β is larger, and the scene changes in the first image frame and the second image frame are also greater, but the two fields of view have an intersection, so there are parts in the first image frame and the second image frame The scene (that is, the first scene) is the same. In the embodiment of the present invention, a target image including the first scene or a part of the first scene is generated according to the first image frame and the second image frame, and the scene in the target image can be used as the first image frame and the second image frame The transition of the middle scene, slow down the scene change between images.
在一个实施例中,依据所述第一图像帧和第二图像帧确定目标图像之后,该方法还包括以下步骤:In an embodiment, after the target image is determined according to the first image frame and the second image frame, the method further includes the following steps:
S300:确定第三图像和第四图像所在的图像序列,所述第三图像是从所述第一图像帧中截取的图像,所述第四图像是从所述第二图像帧中截取的图像;S300: Determine an image sequence in which a third image and a fourth image are located, the third image is an image intercepted from the first image frame, and the fourth image is an image intercepted from the second image frame ;
S400:将所述目标图像插入至所述图像序列的所述第三图像和第四图像之间,以生成视频流进行播放。S400: Insert the target image between the third image and the fourth image of the image sequence to generate a video stream for playback.
在从第一图像帧中截取出第三图像时,可以截取出第一图像帧的中心区域作为第三图像。在从第二图像帧中截取出第四图像时,可以截取出第二图像帧的中心区域作为第四图像。当然,具体截取的位置不限,此处只是优选的方式。When the third image is cut out from the first image frame, the central area of the first image frame may be cut out as the third image. When the fourth image is cut out from the second image frame, the central area of the second image frame may be cut out as the fourth image. Of course, the specific intercepting position is not limited, and it is only a preferred way here.
第三图像和第四图像所在的图像序列中的图像是用于播放的,图像序列中所有图像的尺寸可以是相同的,具体大小可以根据播放需要而定。The images in the image sequence where the third image and the fourth image are located are used for playback, and the size of all images in the image sequence may be the same, and the specific size may be determined according to playback requirements.
将目标图像插入至图像序列的第三图像和第四图像中,得到的图像序列作为视频流进行播放。目标图像的尺寸可以与图像序列中各图像的尺寸相同。The target image is inserted into the third image and the fourth image of the image sequence, and the obtained image sequence is played as a video stream. The size of the target image can be the same as the size of each image in the image sequence.
如此,视频流被播放时,会依次播放第三图像、目标图像、第四图像,或者依次播放第四图像、目标图像、第三图像,目标图像中的场景作为第三图像和第四图像中场景的过渡,可以使得视频流播放时更为流畅,避免视频帧间的场景切换过快,导致肉眼看起来很模糊的问题。In this way, when the video stream is played, the third image, target image, and fourth image are played in sequence, or the fourth image, target image, and third image are played in sequence. The scenes in the target image are used as the third image and the fourth image. The transition of scenes can make the video stream play more smoothly, and avoid the problem of too fast scene switching between video frames, which causes the naked eye to look blurry.
当然,被播放的视频流中,还可以有其他图像是通过本发明实施例的上述方式插入的。Of course, in the video stream being played, there may also be other images inserted in the above-mentioned manner in the embodiment of the present invention.
比如,视频流中有一半的图像是从采集的图像帧中截取的,而另一半的图像是通过上述方式插入的,且每两个从采集的图像帧中截取的图像间插入一个通过上述方式确定的目标图像。在此情况下,假设以播放帧率f1播放该视频流,播放该视频流时的场景变化速度,是仅播放采集的图像帧中截取的图像的场景变化速度的1/2,大大减缓了场景变化速度。For example, half of the images in the video stream are intercepted from the captured image frames, and the other half of the images are inserted through the above method, and every two images intercepted from the captured image frames are inserted through the above method Determine the target image. In this case, assuming that the video stream is played at the playback frame rate f1, the scene change speed when playing the video stream is only 1/2 of the scene change speed of the captured image frame, which greatly slows down the scene. Speed of change.
在一个实施例中,所述第一图像帧和第二图像帧是成像设备在旋转过程 中采集的两个图像帧。In one embodiment, the first image frame and the second image frame are two image frames collected by the imaging device during rotation.
优选的,第一图像帧和第二图像帧是成像设备在旋转过程中采集的两个相邻图像帧。相邻图像帧的视场交集范围更大,更利于得到目标图像。Preferably, the first image frame and the second image frame are two adjacent image frames collected by the imaging device during rotation. The intersection range of the fields of view of adjacent image frames is larger, which is more conducive to obtaining the target image.
当然,第一图像帧和第二图像帧也可以是中间相隔一帧或几帧的两帧图像,只要保证第一图像帧和第二图像帧的视场存在交集即可。Of course, the first image frame and the second image frame may also be two frames of images separated by one or several frames, as long as it is ensured that the fields of view of the first image frame and the second image frame overlap.
在一个实施例中,步骤S100中,获取第一图像帧和第二图像帧,可以包括以下:In an embodiment, in step S100, obtaining the first image frame and the second image frame may include the following:
当确定成像设备在旋转时,获取成像设备采集的当前图像帧并获取当前图像帧的前一个历史图像帧,将当前图像帧确定为所述第二图像帧并将该历史图像帧确定为所述第一图像帧。When it is determined that the imaging device is rotating, obtain the current image frame collected by the imaging device and obtain the previous historical image frame of the current image frame, determine the current image frame as the second image frame and determine the historical image frame as the The first image frame.
成像设备的旋转通常会有指令触发,可以在被指令触发时,确定成像设备在旋转,当然,具体确定成像设备在旋转的方式不限于此。The rotation of the imaging device is usually triggered by an instruction. When triggered by the instruction, it can be determined that the imaging device is rotating. Of course, the specific method for determining the rotation of the imaging device is not limited to this.
成像设备采集的第一个图像帧可以先缓存,之后采集时,可以将当前采集的当前图像帧作为第二图像帧,并将当前图像帧的前一个历史图像帧作为第一图像帧。The first image frame collected by the imaging device can be buffered first, and then when collecting, the current image frame currently collected can be used as the second image frame, and the previous historical image frame of the current image frame can be used as the first image frame.
如此,可以使得成像设备每采集一个图像帧,便可执行一遍上述确定并插入目标图像的步骤,减缓整个视频流的场景变化速度。In this way, the imaging device can perform the above steps of determining and inserting the target image every time an image frame is collected, thereby slowing down the scene change speed of the entire video stream.
在一个实施例中,获取成像设备采集的当前图像帧之后,该方法还进一步包括:In an embodiment, after acquiring the current image frame collected by the imaging device, the method further includes:
对获取的所述当前图像帧进行畸变校正,以校正所述当前图像帧中产生的场景变形;Performing distortion correction on the acquired current image frame to correct scene distortion generated in the current image frame;
所述将当前图像帧确定为所述第二图像帧,包括:The determining the current image frame as the second image frame includes:
将畸变校正后的当前图像帧确定为所述第二图像帧。The current image frame after the distortion correction is determined as the second image frame.
由于成像设备的硬件原因等,采集的图像帧可能会存在变形,比如在图像帧的边缘处会有拉伸的情况,为了避免得到的目标图像受畸变影响,对当前图像帧进行畸变校正,以校正当前图像帧中产生的场景变形。Due to the hardware of the imaging device, etc., the captured image frame may be deformed, such as stretching at the edge of the image frame. In order to avoid the obtained target image from being affected by the distortion, the current image frame is corrected for distortion. Correct the distortion of the scene in the current image frame.
在对当前图像帧进行畸变校正时,可以按照小孔成像原理并根据成像设 备的相机参数来实现畸变校正,具体畸变校正方式不限,只要能够校正当前图像帧中产生的场景变形即可。When performing distortion correction on the current image frame, the distortion correction can be realized according to the principle of pinhole imaging and the camera parameters of the imaging device. The specific distortion correction method is not limited, as long as the scene distortion generated in the current image frame can be corrected.
可选的,获取的历史图像帧可以是已经经过畸变校正后的图像帧。如果该历史图像帧未经过畸变校正,那么也可以对该历史图像帧进行畸变校正,以校正历史图像帧中产生的场景变形。Optionally, the acquired historical image frames may be image frames that have undergone distortion correction. If the historical image frame has not undergone distortion correction, then the historical image frame may also be subjected to distortion correction to correct the scene deformation generated in the historical image frame.
对当前图像帧进行畸变校正后,还可以将当前图像帧进行缓存,在采集到下一个图像帧时作为该图像帧的前一个历史图像帧。After performing distortion correction on the current image frame, the current image frame can also be buffered and used as the previous historical image frame of the image frame when the next image frame is collected.
可选的,如果采集第一图像帧、第二图像帧的成像设备存在抖动,可以采用电子防抖、光学防抖等技术实现防抖,以减少第一平面与目标平面、第二平面与目标平面之间的误差。Optionally, if the imaging device that collects the first image frame and the second image frame has jitter, electronic image stabilization, optical image stabilization, and other technologies can be used to achieve image stabilization to reduce the first plane and target plane, and the second plane and target. The error between the planes.
基于与上述方法同样的发明构思,本发明还提供一种图像处理装置,参看图4,该图像处理装置100可以包括:处理器102和存储器101。Based on the same inventive concept as the above method, the present invention also provides an image processing device. Referring to FIG. 4, the image processing device 100 may include a processor 102 and a memory 101.
在一个实施例中,继续参看图4,所述存储器101,用于存储程序代码;In one embodiment, continuing to refer to FIG. 4, the memory 101 is used to store program codes;
所述处理器102,用于调用所述程序代码,当程序代码被执行时,用于实现如前述实施例所述的图像处理方法。The processor 102 is configured to call the program code, and when the program code is executed, it is configured to implement the image processing method described in the foregoing embodiment.
基于与上述方法同样的发明构思,本发明还提供一种可移动平台,该可移动平台可以包括:Based on the same inventive concept as the above method, the present invention also provides a movable platform, which may include:
机体;Body
动力系统,设于所述机体,所述动力系统用于为所述可移动平台提供动力;A power system, arranged in the body, and the power system is used to provide power for the movable platform;
图像采集装置,设于所述机体,用于采集图像帧;An image acquisition device, which is provided in the body, and is used to acquire image frames;
存储器,用于存储程序代码;以及Memory for storing program codes; and
处理器,用于调用所述程序代码,当程序代码被执行时,用于实现如前述实施例所述的图像处理方法。The processor is used to call the program code, and when the program code is executed, it is used to implement the image processing method described in the foregoing embodiment.
在一个实施例中,所述可移动平台为无人机。In one embodiment, the movable platform is a drone.
基于与上述方法同样的发明构思,本发明还提供一种摄像装置,该摄像装置可以包括:Based on the same inventive concept as the above method, the present invention also provides an imaging device, which may include:
外壳;shell;
镜头组件,设于所述外壳内部;The lens assembly is arranged inside the housing;
存储器,用于存储程序代码;以及Memory for storing program codes; and
处理器,用于调用所述程序代码,当程序代码被执行时,用于实现如前述实施例所述的图像处理方法。The processor is used to call the program code, and when the program code is executed, it is used to implement the image processing method described in the foregoing embodiment.
基于与上述方法同样的发明构思,本发明实施例中还提供一种计算机可读存储介质上存储有程序代码,所述程序代码被执行(如所述程序代码被处理器执行)时,可以实现图1所述的图像处理方法。Based on the same inventive concept as the above method, an embodiment of the present invention also provides a computer-readable storage medium with program code stored on it, and when the program code is executed (for example, the program code is executed by a processor), it can be realized The image processing method described in Figure 1.
上述实施例阐明的系统、装置、模块或单元,可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。The systems, devices, modules, or units explained in the above embodiments may be implemented by computer chips or entities, or implemented by products with certain functions. A typical implementation device is a computer. The specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email receiving and sending device, and a game control A console, a tablet computer, a wearable device, or a combination of any of these devices.
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本发明时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, when describing the above device, the functions are divided into various units and described separately. Of course, when implementing the present invention, the functions of each unit can be implemented in the same one or more software and/or hardware.
本领域内的技术人员应明白,本发明实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as a method, a system, or a computer program product. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may adopt the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可以由计算机程序指令实现流程图 和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其它可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其它可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated for use. It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
而且,这些计算机程序指令也可以存储在能引导计算机或其它可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或者多个流程和/或方框图一个方框或者多个方框中指定的功能。Moreover, these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device, The instruction device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其它可编程数据处理设备,使得在计算机或者其它可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其它可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded into a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, thereby executing instructions on the computer or other programmable equipment Provides steps for realizing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
以上所述仅为本发明实施例而已,并不用于限制本发明。对于本领域技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原理之内所作的任何修改、等同替换、改进,均应包含在本发明的权利要求范围之内。The foregoing descriptions are merely embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention can have various modifications and changes. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims (20)

  1. 一种图像处理方法,其特征在于,包括:An image processing method, characterized in that it comprises:
    获取第一图像帧和第二图像帧,所述第一图像帧与第二图像帧的视角方向不同;Acquiring a first image frame and a second image frame, where the viewing angle directions of the first image frame and the second image frame are different;
    依据所述第一图像帧和第二图像帧确定目标图像,所述第一图像帧和所述第二图像帧均包含所述目标图像中的场景。The target image is determined according to the first image frame and the second image frame, and both the first image frame and the second image frame include a scene in the target image.
  2. 如权利要求1所述的图像处理方法,其特征在于,依据所述第一图像帧和第二图像帧确定目标图像,包括:8. The image processing method of claim 1, wherein determining the target image according to the first image frame and the second image frame comprises:
    将第一图像帧和第二图像帧投影至同一目标平面上,生成所述目标图像;其中,所述目标平面所对应的视角方向不同于所述第一图像帧与第二图像帧的视角方向。The first image frame and the second image frame are projected onto the same target plane to generate the target image; wherein the viewing angle direction corresponding to the target plane is different from the viewing angle direction of the first image frame and the second image frame .
  3. 如权利要求2所述的图像处理方法,其特征在于,将第一图像帧和第二图像帧投影至同一目标平面上,生成所述目标图像,包括:3. The image processing method of claim 2, wherein projecting the first image frame and the second image frame onto the same target plane to generate the target image comprises:
    将第一图像帧和第二图像帧投影至同一目标平面后进行融合处理,生成所述目标图像。The first image frame and the second image frame are projected onto the same target plane and then subjected to fusion processing to generate the target image.
  4. 如权利要求3所述的图像处理方法,其特征在于,将第一图像帧和第二图像帧投影至同一目标平面后进行融合处理,生成所述目标图像,包括:8. The image processing method of claim 3, wherein the first image frame and the second image frame are projected onto the same target plane and then fused to generate the target image, comprising:
    获取目标平面对应的投影关系,所述投影关系包括用于投影第一图像帧的第一投影关系、及用于投影第二图像帧的第二投影关系;Acquiring a projection relationship corresponding to the target plane, the projection relationship including a first projection relationship for projecting a first image frame and a second projection relationship for projecting a second image frame;
    按照所述第一投影关系将所述第一图像帧从所处的第一平面投影到所述目标平面,得到第三图像帧;Project the first image frame from the first plane where it is located to the target plane according to the first projection relationship to obtain a third image frame;
    按照所述第二投影关系将所述第二图像帧从所处的第二平面投影到所述目标平面,得到第四图像帧;Project the second image frame from the second plane where it is located to the target plane according to the second projection relationship to obtain a fourth image frame;
    将所述第三图像帧和第四图像帧进行融合处理,得到处于所述目标平面的目标图像;Performing fusion processing on the third image frame and the fourth image frame to obtain a target image in the target plane;
    其中,所述第一平面、第二平面和目标平面是不同视角方向下的成像平面。Wherein, the first plane, the second plane and the target plane are imaging planes in different viewing angle directions.
  5. 如权利要求4所述的图像处理方法,其特征在于,The image processing method according to claim 4, wherein:
    所述第一图像帧和所述第二图像帧是由同一成像设备在旋转过程中采集的,所述第一平面是所述成像设备在第一旋转角度下的成像平面,所述第二平面是所述成像设备在第二旋转角度下的成像平面,所述目标平面对应于所述成像设备在第三旋转角度下的成像平面。The first image frame and the second image frame are acquired by the same imaging device during rotation, the first plane is the imaging plane of the imaging device at a first angle of rotation, and the second plane Is the imaging plane of the imaging device at the second rotation angle, and the target plane corresponds to the imaging plane of the imaging device at the third rotation angle.
  6. 如权利要求5所述的图像处理方法,其特征在于,The image processing method according to claim 5, wherein:
    所述第三旋转角度处于所述第一旋转角度与第二旋转角度之间。The third rotation angle is between the first rotation angle and the second rotation angle.
  7. 如权利要求5所述的图像处理方法,其特征在于,所述第一投影关系是依据所述第一旋转角度与所述第三旋转角度之间的角度差确定的,所述第二投影关系是依据所述第二旋转角度与所述第三旋转角度之间的角度差确定的。5. The image processing method of claim 5, wherein the first projection relationship is determined based on the angle difference between the first rotation angle and the third rotation angle, and the second projection relationship It is determined based on the angle difference between the second rotation angle and the third rotation angle.
  8. 如权利要求4所述的图像处理方法,其特征在于,The image processing method according to claim 4, wherein:
    所述第一图像帧和所述第二图像帧是不同的成像设备以不同的视角方向采集的。The first image frame and the second image frame are acquired by different imaging devices with different viewing angle directions.
  9. 如权利要求4所述的图像处理方法,其特征在于,所述将所述第三图像帧和第四图像帧进行融合处理,生成处于所述目标平面的目标图像,包括:5. The image processing method according to claim 4, wherein the fusion processing of the third image frame and the fourth image frame to generate a target image in the target plane comprises:
    从所述第三图像帧中截取出第一图像,从所述第四图像帧中截取出第二图像,所述第一图像与所述第二图像中的场景相同;Intercepting a first image from the third image frame, and intercepting a second image from the fourth image frame, where the first image is the same as the scene in the second image;
    融合所述第一图像和第二图像,得到所述目标图像。The first image and the second image are merged to obtain the target image.
  10. 如权利要求9所述的图像处理方法,其特征在于,所述第一图像在所述目标平面的位置与所述第二图像在所述目标平面的位置相同。9. The image processing method of claim 9, wherein the position of the first image on the target plane is the same as the position of the second image on the target plane.
  11. 如权利要求1所述的图像处理方法,其特征在于,依据所述第一图像帧和第二图像帧确定目标图像之后,该方法还包括:8. The image processing method of claim 1, wherein after determining the target image according to the first image frame and the second image frame, the method further comprises:
    确定第三图像和第四图像所在的图像序列,所述第三图像是从所述第一图像帧中截取的图像,所述第四图像是从所述第二图像帧中截取的图像;Determining an image sequence in which a third image and a fourth image are located, the third image is an image intercepted from the first image frame, and the fourth image is an image intercepted from the second image frame;
    将所述目标图像插入至所述图像序列的所述第三图像和第四图像之间,以生成视频流进行播放。The target image is inserted between the third image and the fourth image of the image sequence to generate a video stream for playback.
  12. 如权利要求1-11中任一项所述的图像处理方法,其特征在于,所述第一图像帧和第二图像帧是成像设备在旋转过程中采集的两个图像帧。11. The image processing method according to any one of claims 1-11, wherein the first image frame and the second image frame are two image frames collected by the imaging device during rotation.
  13. 如权利要求12所述的图像处理方法,其特征在于,所述第一图像帧和第二图像帧是成像设备在旋转过程中采集的两个相邻图像帧。The image processing method according to claim 12, wherein the first image frame and the second image frame are two adjacent image frames collected by the imaging device during the rotation process.
  14. 如权利要求1-11中任一项所述的图像处理方法,其特征在于,获取第一图像帧和第二图像帧,包括:11. The image processing method according to any one of claims 1-11, wherein acquiring the first image frame and the second image frame comprises:
    当确定成像设备在旋转时,获取成像设备采集的当前图像帧并获取当前图像帧的前一个历史图像帧,将当前图像帧确定为所述第二图像帧并将该历史图像帧确定为所述第一图像帧。When it is determined that the imaging device is rotating, obtain the current image frame collected by the imaging device and obtain the previous historical image frame of the current image frame, determine the current image frame as the second image frame and determine the historical image frame as the The first image frame.
  15. 如权利要求14所述的图像处理方法,其特征在于,获取成像设备采集的当前图像帧之后,该方法还进一步包括:15. The image processing method of claim 14, wherein after acquiring the current image frame collected by the imaging device, the method further comprises:
    对获取的所述当前图像帧进行畸变校正,以校正所述当前图像帧中产生的场景变形;Performing distortion correction on the acquired current image frame to correct scene distortion generated in the current image frame;
    所述将当前图像帧确定为所述第二图像帧,包括:The determining the current image frame as the second image frame includes:
    将畸变校正后的当前图像帧确定为所述第二图像帧。The current image frame after the distortion correction is determined as the second image frame.
  16. 一种图像处理装置,其特征在于,包括存储器和处理器;An image processing device, characterized in that it comprises a memory and a processor;
    所述存储器,用于存储程序代码;The memory is used to store program code;
    所述处理器,用于调用所述程序代码,当程序代码被执行时,用于实现如权利要求1-15中任一项所述的图像处理方法。The processor is configured to call the program code, and when the program code is executed, it is configured to implement the image processing method according to any one of claims 1-15.
  17. 一种可移动平台,其特征在于,包括:A movable platform, characterized in that it comprises:
    机体;Body
    动力系统,设于所述机体,所述动力系统用于为所述可移动平台提供动力;A power system, arranged in the body, and the power system is used to provide power for the movable platform;
    图像采集装置,设于所述机体,用于采集图像帧;An image acquisition device, which is provided in the body, and is used to acquire image frames;
    存储器,用于存储程序代码;以及Memory for storing program codes; and
    处理器,用于调用所述程序代码,当程序代码被执行时,用于实现如权利要求1-15中任一项所述的图像处理方法。The processor is used to call the program code, and when the program code is executed, it is used to implement the image processing method according to any one of claims 1-15.
  18. 如权利要求17所述的可移动平台,其特征在于,所述可移动平台为无人机。The movable platform of claim 17, wherein the movable platform is an unmanned aerial vehicle.
  19. 一种摄像装置,其特征在于,包括:A camera device, characterized in that it comprises:
    外壳;shell;
    镜头组件,设于所述外壳内部;The lens assembly is arranged inside the housing;
    存储器,用于存储程序代码;以及Memory for storing program codes; and
    处理器,用于调用所述程序代码,当程序代码被执行时,用于实现如权利要求1-15中任一项所述的图像处理方法。The processor is used to call the program code, and when the program code is executed, it is used to implement the image processing method according to any one of claims 1-15.
  20. 一种计算机可读存储介质,其特征在于,A computer-readable storage medium, characterized in that:
    所述计算机可读存储介质上存储有程序代码,所述程序代码被执行时,实现如权利要求1-15中任一项所述的图像处理方法。The computer-readable storage medium stores program code, and when the program code is executed, the image processing method according to any one of claims 1-15 is realized.
PCT/CN2019/129860 2019-12-30 2019-12-30 Image processing method and device, mobile platform, camera device, and storage medium WO2021134183A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980050290.1A CN112616325A (en) 2019-12-30 2019-12-30 Image processing method, image processing apparatus, movable platform, image pickup apparatus, and storage medium
PCT/CN2019/129860 WO2021134183A1 (en) 2019-12-30 2019-12-30 Image processing method and device, mobile platform, camera device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/129860 WO2021134183A1 (en) 2019-12-30 2019-12-30 Image processing method and device, mobile platform, camera device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021134183A1 true WO2021134183A1 (en) 2021-07-08

Family

ID=75225802

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/129860 WO2021134183A1 (en) 2019-12-30 2019-12-30 Image processing method and device, mobile platform, camera device, and storage medium

Country Status (2)

Country Link
CN (1) CN112616325A (en)
WO (1) WO2021134183A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107615756A (en) * 2015-07-10 2018-01-19 华为技术有限公司 Realize the multi-view point video Streaming Media of quick and smooth viewpoint switch
CN108012155A (en) * 2016-10-27 2018-05-08 联发科技股份有限公司 Method for video coding, video encoding/decoding method and the relevant device of pre-splicing image
CN108298101A (en) * 2017-12-25 2018-07-20 上海歌尔泰克机器人有限公司 The control method and device of holder rotation, unmanned plane
CN108320304A (en) * 2017-12-18 2018-07-24 广州亿航智能技术有限公司 A kind of automatic edit methods and system of unmanned plane video media
CN110177211A (en) * 2012-06-06 2019-08-27 索尼公司 Image processing apparatus, image processing method and program
CN110495166A (en) * 2017-12-15 2019-11-22 斯纳普公司 Spherical video editing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10284835B2 (en) * 2015-09-04 2019-05-07 Apple Inc. Photo-realistic shallow depth-of-field rendering from focal stacks

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110177211A (en) * 2012-06-06 2019-08-27 索尼公司 Image processing apparatus, image processing method and program
CN107615756A (en) * 2015-07-10 2018-01-19 华为技术有限公司 Realize the multi-view point video Streaming Media of quick and smooth viewpoint switch
CN108012155A (en) * 2016-10-27 2018-05-08 联发科技股份有限公司 Method for video coding, video encoding/decoding method and the relevant device of pre-splicing image
CN110495166A (en) * 2017-12-15 2019-11-22 斯纳普公司 Spherical video editing
CN108320304A (en) * 2017-12-18 2018-07-24 广州亿航智能技术有限公司 A kind of automatic edit methods and system of unmanned plane video media
CN108298101A (en) * 2017-12-25 2018-07-20 上海歌尔泰克机器人有限公司 The control method and device of holder rotation, unmanned plane

Also Published As

Publication number Publication date
CN112616325A (en) 2021-04-06

Similar Documents

Publication Publication Date Title
CN109064397B (en) Image stitching method and system based on camera earphone
CN107801045B (en) Method, device and system for automatically zooming when playing augmented reality scene
CN108335323B (en) Blurring method of image background and mobile terminal
US10547790B2 (en) Camera area locking
US10297285B2 (en) Video data processing method and electronic apparatus
US11244423B2 (en) Image processing apparatus, image processing method, and storage medium for generating a panoramic image
JP2012068380A (en) Image processor, imaging apparatus, image processing method, and program
US11902660B2 (en) Image processing device, image processing method, and program
US20190266802A1 (en) Display of Visual Data with a Virtual Reality Headset
US20130093839A1 (en) Apparatus and method of generating three-dimensional (3d) panoramic image
WO2021139731A1 (en) Panoramic video clip method, apparatus and device, and storage medium
WO2019128400A1 (en) Method for controlling movement of photographing view angle of smart glasses
KR20190062794A (en) Image merging method and system using viewpoint transformation
CN107809576A (en) A kind of multi-cam module
KR20180106549A (en) 360 degree panorama multimedia contents processing apparatus and control method thereof
JP2019193209A (en) Control apparatus and photographing method
WO2021134183A1 (en) Image processing method and device, mobile platform, camera device, and storage medium
CN109889736B (en) Image acquisition method, device and equipment based on double cameras and multiple cameras
WO2021031210A1 (en) Video processing method and apparatus, storage medium, and electronic device
JP2017021430A (en) Panoramic video data processing device, processing method, and program
CN113424515A (en) Information processing apparatus, information processing method, and program
CN112843732B (en) Method and device for shooting image, electronic equipment and storage medium
CN108965859B (en) Projection mode identification method, video playing method and device and electronic equipment
US11044464B2 (en) Dynamic content modification of image and video based multi-view interactive digital media representations
CN108319295B (en) Obstacle avoidance control method, equipment and computer readable storage medium

Legal Events

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

Ref document number: 19958673

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19958673

Country of ref document: EP

Kind code of ref document: A1