WO2022040951A1 - 图像矫正方法和装置、图像采集设备和存储介质 - Google Patents

图像矫正方法和装置、图像采集设备和存储介质 Download PDF

Info

Publication number
WO2022040951A1
WO2022040951A1 PCT/CN2020/111200 CN2020111200W WO2022040951A1 WO 2022040951 A1 WO2022040951 A1 WO 2022040951A1 CN 2020111200 W CN2020111200 W CN 2020111200W WO 2022040951 A1 WO2022040951 A1 WO 2022040951A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
correction
rotation
angle
strategy
Prior art date
Application number
PCT/CN2020/111200
Other languages
English (en)
French (fr)
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 CN202080035367.0A priority Critical patent/CN113841386A/zh
Priority to PCT/CN2020/111200 priority patent/WO2022040951A1/zh
Publication of WO2022040951A1 publication Critical patent/WO2022040951A1/zh

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
    • H04N5/2628Alteration of picture size, shape, position or orientation, e.g. zooming, rotation, rolling, perspective, translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/695Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects
    • 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

Definitions

  • the present disclosure relates to the field of image processing, and in particular, to an image correction method for an image acquisition device, an image correction device for an image acquisition device, an image acquisition device, and a computer-readable storage medium.
  • image acquisition devices are more and more used in people's work and life, for example, various types of cameras, mobile phones and tablet computers and other electronic devices with the function of taking pictures and videos.
  • the user When capturing images, the user generally makes the image capture device in a vertically upright posture to capture the object in front.
  • the user can also change the posture of the image capture device according to the characteristics of the object or the purpose of shooting. Clockwise or clockwise by a certain angle, the image capture device can be used for image capture in a non-vertical upright posture, or the image capture device can be flipped horizontally to take a selfie.
  • the image capture device after the image capture device captures the image in a non-vertical upright posture, the image is non-positive when the user is browsing, and after capturing the image in a self-portrait state, the image displayed by the user is not a real angle when browsing. It is beneficial for users to view images and affects user experience.
  • the present disclosure provides an image correction method for an image acquisition device, including: obtaining attitude information and/or shooting status when the image acquisition device collects an image; When the image is in an abnormal posture and/or when the photographing state indicates that the image acquisition device is in a self-portrait state when the image is acquired, at least perform rotation correction on the acquired image based on the posture information and/or perform rotation correction on the acquired image based on the photographing state.
  • the acquired image is subjected to mirror flip correction, wherein the attitude information includes a rotation angle of the image acquisition device rotated in a specific direction from a predetermined attitude; the abnormal attitude includes that the rotation angle exceeds a predetermined angle range.
  • the present disclosure also provides an image correction apparatus for a camera, comprising: a processor; a memory for storing one or more programs, wherein, when executed by the processor, the one or more programs cause The processor performs the following operations: obtaining attitude information and/or shooting status when the image acquisition device collects an image; and when the attitude information indicates that the image acquisition device is in an abnormal attitude and/or at any location when the image acquisition device collects an image.
  • the shooting state indicates that when the image collecting device is in a Selfie state when collecting an image, at least the collected image is rotated and corrected in a predetermined attitude based on the attitude information and/or the collected image is corrected by mirror flipping based on the shooting state,
  • the attitude information includes the rotation angle of the image acquisition device rotated in a specific direction;
  • the abnormal attitude includes that the rotation angle exceeds a predetermined angle range.
  • the present disclosure also provides an image acquisition device, comprising: a posture acquisition device for acquiring posture information and/or a shooting state when the image acquisition device acquires an image; a processor; and a memory for storing one or more A program, wherein when the one or more programs are executed by the processor, the processor is caused to perform the following operations: obtain the attitude information and/or the shooting state when the image capturing device captures the image;
  • the posture information indicates that the image capture device is in an abnormal posture when capturing an image and/or when the shooting state indicates that the image capture device is in a self-portrait state when the image capture device captures an image
  • the captured image is pre-determined at least based on the posture information.
  • Rotation correction of attitude line and/or mirror flip correction of the collected image based on the shooting state wherein the attitude information includes the rotation angle of the image acquisition device rotated in a specific direction; the abnormal attitude includes the rotation The angle exceeds the predetermined angle range.
  • the present disclosure also provides a computer-readable storage medium having executable instructions stored thereon, the instructions, when executed by a processor, cause the processor to perform the image correction method for an image capture device as described above.
  • a positive image can be obtained, so that the image is saved at a positive angle when it is saved, and it can be viewed by the user. It can also view the image from a positive angle, without the need for the user to manually flip the image or flip the device, so that the user can watch in a comfortable posture and improve user satisfaction. And in the state when the image is collected, by mirroring the image in the Selfie state, the user can browse the image from a real angle.
  • FIG. 1A and 1B schematically illustrate application scenarios to which the image correction method and apparatus according to the embodiments of the present disclosure may be applied.
  • FIG. 2A schematically shows a schematic diagram of image acquisition by an image acquisition device according to an embodiment of the present disclosure.
  • FIG. 2B schematically shows a schematic diagram of image acquisition by an image acquisition device according to another embodiment of the present disclosure.
  • FIG. 3 schematically shows a flowchart of an image correction method according to an embodiment of the present disclosure.
  • FIG. 4 schematically shows a schematic diagram of a rotation angle of an image capturing device according to an embodiment of the present disclosure.
  • FIG. 5 schematically shows a schematic diagram of image rotation correction according to an embodiment of the present disclosure.
  • FIG. 6 schematically shows a schematic diagram of image mirror flip correction according to an embodiment of the present disclosure.
  • FIG. 7 schematically shows a schematic diagram of image rotation correction and mirror flip correction according to an embodiment of the present disclosure.
  • FIG. 8 schematically shows a schematic diagram of image mirror flip correction according to another embodiment of the present disclosure.
  • FIG. 9 schematically shows a flow chart of rotation correction according to an embodiment of the present disclosure.
  • FIG. 10 schematically shows a block diagram of an image correction apparatus for an image acquisition device according to an embodiment of the present disclosure.
  • the computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the instructions, when executed by the processor, may be created to implement the functions illustrated in the block diagrams and/or flow diagrams /Operating the device.
  • the techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). Additionally, the techniques of the present disclosure may take the form of a computer program product on a computer-readable storage medium having stored instructions for use by or in conjunction with an instruction execution system.
  • Embodiments of the present disclosure provide an image correction method for an image capture device, the method comprising: obtaining posture information and/or a shooting state when the image capture device captures an image.
  • the posture information indicates that the image capture device is in an abnormal posture when collecting the image and/or the shooting state indicates that the image capture device is in a Selfie state when the image capture device captures the image
  • Mirror flip correction is performed on the acquired image.
  • the attitude information includes the rotation angle of the image acquisition device rotated along a specific direction by the predetermined attitude
  • the abnormal attitude includes that the rotation angle exceeds the predetermined angle range.
  • FIGS. 1A and 1B schematically illustrate application scenarios to which the image correction method and apparatus according to the embodiments of the present disclosure may be applied. It should be noted that FIGS. 1A and 1B are only examples of scenarios to which the embodiments of the present disclosure may be applied, so as to help those skilled in the art to understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used for Other devices, systems, environments or scenarios.
  • the image correction method and apparatus can be applied to, for example, a handheld pan-tilt camera 110 , wherein FIG. 1A shows a schematic front view of the pan-tilt camera 110 , and FIG. 1B shows a cloud Schematic illustration of the back and side of table camera 110 .
  • the PTZ camera 110 may include a main body part 101 , a PTZ part 102 and a capture part 103 , wherein the main body part 101 can be held by a user, and the main body part 101 can also be provided with a processor, a display screen and buttons.
  • the acquisition part 103 includes an image acquisition device 1031 (eg, a camera), which can be used to acquire external images, and the acquisition part 103 can be fixed on the pan/tilt part 102 .
  • the pan-tilt part 102 may include three rotating parts, and the three rotation axes (roll axis, yaw axis, pitch axis) corresponding to the three rotating parts are perpendicular to each other, so that the acquisition part 103 located on the pan-tilt part 102 can realize various angles
  • the gimbal unit 102 can be used as a stabilizer to ensure automatic stabilization and balance during the image capture process.
  • the gimbal unit 102 can adjust the state of the capture unit 103 and keep the capture unit 103 From a stable and balanced angle, the capture unit 103 will not shake with the hand, and the captured image will be more stable and smooth.
  • the handheld pan-tilt camera 110 can also be connected to an external device 120 such as a mobile phone, and transmit images to the external device 120 for display.
  • an external device 120 such as a mobile phone
  • FIG. 2A schematically shows a schematic diagram of image acquisition by an image acquisition device according to an embodiment of the present disclosure.
  • the hand-held pan-tilt camera 210 when the user wants to take a picture in front, the hand-held pan-tilt camera 210 is usually placed in a vertical upright posture, that is, the hand-held pan-tilt camera 210 is in a vertical posture and an upright posture, wherein , the vertical posture may refer to, for example, that the central axis of the hand-held pan-tilt camera 210 is approximately perpendicular to the horizontal plane, the upright posture may be a posture opposite to the inversion, and the upright posture, for example, refers to making the top of the hand-held pan-tilt camera 210 face up ( For example, toward the sky), bottom-down (for example, toward the ground) gestures, which are commonly used gestures by users when using the camera.
  • the vertical posture may refer to, for example, that the central axis of the hand-held pan-tilt camera 210 is approximately perpendicular to the horizontal plane
  • the upright posture may be a posture opposite to the inversion
  • the image captured by the hand-held pan-tilt camera 210 is positive, and the positive here can be understood as a relatively positive, and the relatively positive can mean that the image is positive relative to the camera , for example the top of the object in the image is approximately towards the top of the camera.
  • the image can be browsed normally, and there is no need to rotate the image or rotate the camera.
  • FIG. 2B schematically shows a schematic diagram of image acquisition by an image acquisition device according to another embodiment of the present disclosure.
  • the user may make the hand-held pan-tilt camera 210 in a non-vertical upright posture (hereinafter also referred to as an abnormal posture) to perform image acquisition.
  • a non-vertical upright posture hereinafter also referred to as an abnormal posture
  • the hand-held pan-tilt camera 210 is The vertical upright posture is rotated 90 degrees counterclockwise to shoot in a horizontal posture; or it can also be rotated 180 degrees counterclockwise from the vertical upright posture to shoot in a vertical upside-down posture.
  • the user can also flip the hand-held pan-tilt camera 210 horizontally, so that the camera faces toward the user side to take a selfie.
  • the hand-held pan-tilt camera 210 is in a non-vertical upright posture for image acquisition, the saved image is not relatively positive, and the user needs to rotate the image when viewing the image in a common vertical upright posture.
  • the applicable image correction method in the embodiment of the present disclosure can be used for the hand-held pan-tilt camera 210 to correct the captured image when the hand-held pan-tilt camera 210 is in a non-vertical upright posture, so that the image is saved in a relatively upright position. The angle is saved, and there is no need for subsequent correction by the user.
  • FIG. 3 schematically shows a flowchart of an image correction method according to an embodiment of the present disclosure.
  • the image correction method includes operations S310-S320.
  • the image capturing device may refer to an electronic device having an image capturing device such as a mobile phone, a tablet computer, or the like, or may refer to a camera, wherein the camera may include a hand-held pan-tilt camera.
  • the posture information includes a rotation angle by which the image capturing apparatus is rotated in a specific direction by a predetermined posture.
  • the predetermined posture may refer to the above-mentioned vertical upright posture, or may be understood as a common posture of a user when using an image capture device.
  • the specific direction may refer to, for example, a counterclockwise or clockwise direction
  • the posture information of the image capturing device may refer to the counterclockwise or clockwise rotation angle of the posture when capturing an image relative to the vertical upright posture. For example, if the posture of the image capture device shown in FIG.
  • the posture information may be rotated 90 degrees counterclockwise.
  • the expression of rotation from a predetermined attitude in a specific direction is only to illustrate the attitude of the image acquisition device, and the purpose is to describe the attitude of the device when shooting based on the predetermined attitude, not necessarily from the predetermined attitude.
  • the photographing posture those skilled in the art can understand that the device can be rotated to the photographing posture from any angle.
  • the shooting state may include a forward shooting state or a self-portrait state, wherein the forward shooting state may refer to, for example, that the orientation of the camera is approximately the same as the user's line of sight to shoot a picture in front of the user.
  • the self-portrait state may refer to a state in which the camera is directed toward the user, and the user and the screen behind the user are captured. These two states can be switched by flipping the image acquisition device back and forth.
  • FIG. 4 schematically shows a schematic diagram of a rotation angle of an image capturing device according to an embodiment of the present disclosure.
  • the abnormal posture may refer to the rotation angle exceeding a predetermined angle range
  • the predetermined angle range may be [0 ⁇ ], where ⁇ may be less than or equal to 45 degrees. That is to say, when the angle of rotation to both sides based on the predetermined attitude does not exceed ⁇ , it is considered that the predetermined angle range is not exceeded; when the angle of rotation to both sides based on the predetermined attitude exceeds ⁇ , it is considered to exceed the predetermined angle range. .
  • the acquisition part may not follow the main body to rotate under the action of the gimbal, that is, the camera may still maintain a vertical orientation.
  • the captured image is also relatively positive, and there is no need to correct the captured image; when the rotation angle of the camera body part exceeds the predetermined angle range, the capture part will follow the main body part to rotate, and the captured image is no longer Relatively positive, the acquired image needs to be corrected.
  • FIG. 5 schematically shows a schematic diagram of image rotation correction according to an embodiment of the present disclosure.
  • the image 501 can be rotated counterclockwise by ⁇ to Realize rotation correction.
  • the image acquisition device rotates ⁇ counterclockwise to shoot, the captured image rotates ⁇ relatively clockwise. Therefore, when correcting the image angle, it is necessary to rotate the image 501 counterclockwise to return to a relatively positive direction, and then make the image 501 rotate ⁇ counterclockwise. It can be saved in a relative positive angle.
  • the image is positive, and there is no need to perform a rotation operation.
  • FIG. 6 schematically shows a schematic diagram of image mirror flip correction according to an embodiment of the present disclosure.
  • the captured image 601 can be corrected by mirror flipping.
  • the mirror flipping correction can include horizontal flipping of the image 601 Flip along the vertical axis of image 601 .
  • FIG. 5 when the image acquisition device is in an abnormal posture but not in a self-portrait state, only rotation correction can be performed on the image.
  • FIG. 6 when the image acquisition device is in a Selfie state but not in an abnormal posture, only the image can be corrected by mirror image flipping.
  • operation S320 may include the following operations: determining whether the image capturing device is in an abnormal posture and taking a selfie when capturing an image; Before or after, mirror-flip correction is performed on the acquired image.
  • FIG. 7 schematically shows a schematic diagram of image rotation correction and image mirror flip correction according to an embodiment of the present disclosure.
  • the image 701 can be rotated and corrected for mirror image flipping.
  • This embodiment of the present disclosure does not limit the sequence of rotation correction and mirror flip correction.
  • a relatively positive image can be obtained by detecting the posture and state of the image acquisition device when the image is acquired, and correcting the image when it is in an abnormal posture and/or a self-portrait state.
  • the image is saved at a relatively positive angle when it is saved.
  • performing rotation correction on the image captured by the image capturing device in the foregoing operation S320 includes at least one of the following operations (1) to (4):
  • the photosensitive device may refer to an image acquisition device such as a camera, the photosensitive device can convert optical signals into electrical signals, and the photosensitive device can support the following direction conversion functions: 0°, 180°, Mirror, and Flip.
  • the electrical signal may correspond to an m ⁇ n matrix
  • the direction conversion by 180° may refer to rotating the electrical signal by 180°, that is, rotating the m ⁇ n matrix by 180°.
  • the Mirror operation may refer to mirror inversion of the electrical signal, that is, mirror inversion of the m ⁇ n matrix.
  • Flip operation can be equivalent to 180° rotation of the electrical signal and mirror flip.
  • the image can be controlled to be corrected in the acquisition stage, which belongs to the forward correction.
  • the forward correction may refer to the correction during the shooting and recording process, that is, the correction is performed during the image generation process, so that the image can be corrected.
  • Forward saving on the other hand, backward correction may refer to correction during playback.
  • the image processing apparatus may refer to, for example, a digital image processing device, such as a DSP (Digital Signal Processing) chip.
  • a digital image processing device such as a DSP (Digital Signal Processing) chip.
  • the image processing device may be provided on the main body of the camera.
  • the image processing device can receive the signal from the photosensitive device, and perform further processing on the signal, such as exposure processing, so as to obtain a high-quality image.
  • the photosensitive device can support the following orientation conversion functions: 0°, 90°, 180°, 270°, Mirror and Flip. Based on this operation (2), the image can be controlled to achieve correction in the image processing stage, which also belongs to forward correction.
  • the image display device may refer to a display screen, and the image display device may receive the image signal from the image processing device and display the image.
  • the image display device can support the following orientation conversion functions: 0°, 90°, 180°, 270°, Mirror, and Flip. Based on this operation (3), the image can be controlled to achieve correction in the image display stage.
  • a rotation indicator (eg, 0°, 90°, 270°) can be set for the image, so that when the image is transmitted to the external device, the external The device can rotate and store and display the image according to the rotation identification.
  • the image can be corrected in the image acquisition stage, the image processing stage, the image display stage or on the external device by controlling the photosensitive device, the image processing device, the image display device, or setting the rotation mark, respectively, and then the image can be corrected according to the Different needs are corrected at different stages to meet more diverse needs.
  • FIG. 8 schematically shows a schematic diagram of image mirror flip correction according to another embodiment of the present disclosure.
  • performing mirror inversion correction on the captured image 801 includes: performing mirror inversion on the captured image 801 along the horizontal axis of the image 801 .
  • the captured image 801 and the forward image are symmetrical up and down. Therefore, the mirror image can be flipped along the horizontal axis of the image 801, that is, the image 801 can be flipped upside down.
  • the above Flip operation may refer to mirror flipping the image along the horizontal axis, which is equivalent to performing 180° rotation and horizontal mirror flipping of the image.
  • FIG. 9 schematically shows a flow chart of rotation correction according to an embodiment of the present disclosure.
  • performing rotation correction on an image captured by an image capturing device based on at least the attitude information in operation S320 may include operations S921 to S923 .
  • the working mode of the image capturing device may include at least one of a preview mode, a photographing mode, and a video recording mode.
  • At least one target correction strategy matching the current working mode is determined from a plurality of preset target correction strategies.
  • different rectification strategies can be matched to each working mode in advance, and when the current working mode is detected, the rectification strategy matching the current working mode is used as the target rectification strategy.
  • rotation correction is performed on the acquired image based on at least one target correction strategy and attitude information.
  • different correction strategies are set for each working mode, which can adapt to and meet the characteristics and demands of different working modes.
  • performing rotation correction on the captured image includes: determining a target angle range corresponding to the rotation angle from a plurality of preset angle ranges; determining a target angle corresponding to the target angle The target correction angle corresponding to the range; and based on at least one target correction strategy and the target correction angle, the acquired image is rotated and corrected; wherein, each angle range in the multiple angle ranges corresponds to a correction angle, and the multiple angle ranges correspond to Multiple correction angles include 90°, 180° and 270°.
  • the image acquisition device is not exactly at standard angles such as 90°, 180°, etc., but may be at intermediate angles such as 120°, 200°, etc. For these intermediate angles, it can be summarized as close to standard angles .
  • the angle between (45° ⁇ 135°) can be summarized as 90°, and the correction is performed according to 90°; for another example, the angle between (135° ⁇ 225°) can be summarized as 180°, etc. , and correct it according to 180° when correcting.
  • the plurality of correction strategies include at least one of the following: at least one first correction strategy matching the preview mode; at least one second correction strategy matching the photographing mode; and at least one matching the video recording mode The third corrective strategy.
  • the at least one first correction strategy includes at least one of the following (1) to (2):
  • the preferred correction strategy is to lock the photosensitive device, image processing device and image display device of the image acquisition device.
  • the preferred correction strategy is to control the image display device to perform mirror flip correction on the acquired image.
  • the preview mode may refer to the stage of framing before shooting or between shooting.
  • the photosensitive device can continuously capture images and display them to the user through the image display device.
  • the images captured in this mode are only available for real-time users. Browse without saving images.
  • the image capture device with its own image display device in the preview mode, there is no need to perform rotation correction on the image, that is, the photosensitive device, the image processing device and the image display device that lock the image capture device do not rotate the image. As shown in Fig.
  • the image acquisition device when the image acquisition device is rotated to a certain angle, the photosensitive device and the image display device are both at the corresponding angle, and when the image captured by the photosensitive device is output in real time by the image display device, the top of the photographed object is always on the top of the photographed object for the user. It is approximately towards the sky, and the image displayed in this case can be understood as absolutely positive, that is, it is positive relative to the coordinate system established by the earth. Therefore, in the preview mode, there is no need to perform rotation correction on the image regardless of the posture of the image acquisition device. On the other hand, in the preview mode, if the image acquisition device is in the Selfie mode, the image can be mirrored and corrected, so that the user can see the image from the real angle.
  • the at least one second correction strategy includes at least one of the following manners (1) to (3):
  • the preferred correction strategy is to control the photosensitive device of the image acquisition device to rotate the acquired image by 180° in a specific direction.
  • the preferred correction strategy is to control the image processing device of the image acquisition device to rotate the acquired image by 90° or 270° along a specific direction.
  • a preferred correction strategy is to control the image display device of the image capture device to perform mirror flip correction on the captured image.
  • the photosensitive device in the photographing mode, when the image acquisition device is within the angular range corresponding to 180°, since the photosensitive device supports the 180° rotation function, the photosensitive device can be controlled to perform 180° rotation correction on the image during the image acquisition stage, and the subsequent After the image processing device performs image processing such as exposure, the image can be saved at a relatively positive angle.
  • the image processing can be controlled. The device performs 90° or 270° rotation correction on the image in the image processing stage, and then saves the processed image at a relatively positive angle.
  • the image can be corrected by mirror flipping.
  • the state of the image capture device can be obtained through a corresponding sensor, for example, the current attitude of the image capture device can be obtained through a gyroscope, thereby obtaining the current angle at which the image capture device is located.
  • the image is saved at a relatively positive angle, and the image can also be displayed at a relatively positive angle when the image display device displays the image.
  • the image acquisition device can be restored to a predetermined posture for viewing, and the image can also be displayed in a forward direction when the image is transmitted to an external device for display.
  • the at least one third correction strategy includes at least one of the following (1) to (3):
  • the preferred correction strategy is to set a rotation mark on the collected image, so as to rotate the collected image based on the rotation mark when the collected image is transmitted to an external device for display Correction.
  • the preferred correction strategy controls the photosensitive device of the image capture device to rotate the captured image by 180° in a specific direction, and controls the image display device of the image capture device to receive the data from the photosensitive device. The image is rotated 180° in a specific direction.
  • the preferred correction strategy controls the image display device to perform mirror flip correction on the acquired image.
  • a rotation flag can be set on the image to perform backward rectification later, so that, on the one hand, the image can be guaranteed to be absolutely positive during recording (similar to preview mode), and on the other hand
  • the image can be rectified frame by frame based on the rotation flag after the recording is completed, thereby enabling the image to be rectified to be relatively positive.
  • performing forward correction may cause a certain time delay and large power consumption, while video recording requires high real-time image quality and a large number of frames.
  • a corrective approach can reduce latency and power consumption.
  • the camera mode only one photo is taken at a time, so the real-time requirements for image display are low and the impact on power consumption is also small, and the forward correction method can be used.
  • the image in the recording mode, the image can also be forward-corrected and then the corrected image can be saved.
  • the image display device collects the image from the image. The device gets another raw image from the time of shooting. In this way, when the user is watching while recording, the image can be absolutely positive, and the video output after recording is relatively positive.
  • the image in the recording mode, can also be forward corrected and the corrected image can be saved.
  • the image display device needs to The image is rotated to restore the image to the angle before the forward correction is performed, so that when the user is watching while recording, the image can be absolutely positive, and the video output after recording is relatively positive.
  • performing rotation correction on the collected image based on at least one target correction strategy and attitude information includes: determining the attitude of the image acquisition device when collecting a predetermined number of frame images in a video recording mode based on the attitude information; In the third correction strategy, a third correction strategy corresponding to the posture is determined; based on the third correction strategy corresponding to the posture, the image collected in the video recording mode is rotated and corrected.
  • the posture information (n is an integer greater than or equal to 1) when the first n frames of images are collected after the recording starts can be obtained, and then based on the posture information of the first n frames of images, the Image frames of the entire video are forward or backward rectified.
  • each frame of the video is positive, and the image frames of the entire video all maintain a certain angle, and there is no effect of viewing angle conversion.
  • the posture information of the whole video is corrected (if the angle of the first n frames of images is 0°, no correction is required in the whole process), and the effect of viewing angle conversion can be retained.
  • the predetermined number of frames may be the first frame.
  • the first n frames may refer to the previous frame.
  • the attitude information of the image capture device may be acquired only when the first frame of image is captured, which may simplify the process of correcting the video image.
  • Another aspect of the embodiments of the present disclosure provides an image correction apparatus for an image acquisition device.
  • FIG. 10 schematically shows a block diagram of an image correction apparatus 1000 for an image acquisition device according to an embodiment of the present disclosure.
  • the control device 1000 of the removable carrier includes a processor 1010 and a memory 1020 .
  • the memory 1020 is used to store one or more programs 1021, wherein, when the one or more programs 1021 are executed by the processor, the processor 1010 is caused to perform the following operations:
  • attitude information and/or shooting state when the image acquisition device collects the image and when the attitude information represents the abnormal posture when the image acquisition device collects the image and/or when the shooting state represents the Selfie state when the image acquisition device collects the image, at least Based on the attitude information, the acquired image is rotated and corrected in a predetermined attitude and/or the acquired image is corrected by mirror flipping based on the shooting state.
  • the attitude information includes the rotation angle of the image acquisition device rotated along a specific direction; the abnormal attitude includes the rotation angle exceeding a predetermined angle range.
  • the processor 1010 may include, for example, a general purpose microprocessor, an instruction set processor and/or a related chipset and/or a special purpose microprocessor (eg, an application specific integrated circuit (ASIC)), and the like.
  • the processor 1010 may also include onboard memory for caching purposes.
  • the processor 1010 may be a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
  • the computer-readable storage medium 1020 can be, for example, a non-volatile computer-readable storage medium, and specific examples include but are not limited to: magnetic storage devices, such as magnetic tapes or hard disks (HDD); optical storage devices, such as compact disks (CD-ROMs) ; memory, such as random access memory (RAM) or flash memory; etc.
  • magnetic storage devices such as magnetic tapes or hard disks (HDD)
  • optical storage devices such as compact disks (CD-ROMs)
  • CD-ROMs compact disks
  • memory such as random access memory (RAM) or flash memory; etc.
  • the image acquisition device includes an attitude acquisition device, a processor and a memory, and the attitude acquisition device is used to acquire attitude information and/or a shooting state when the image acquisition device acquires an image.
  • the memory is used to store one or more programs, wherein, when executed by the processor, the one or more programs cause the processor to perform the following operations:
  • attitude information and/or shooting state when the image acquisition device collects the image and when the attitude information represents the abnormal posture when the image acquisition device collects the image and/or when the shooting state represents the Selfie state when the image acquisition device collects the image, at least Based on the attitude information, the acquired image is rotated and corrected in a predetermined attitude and/or the acquired image is corrected by mirror flipping based on the shooting state.
  • the attitude information includes the rotation angle of the image acquisition device rotated along a specific direction; the abnormal attitude includes the rotation angle exceeding a predetermined angle range.
  • performing rotation correction on an image captured by an image capture device based on at least attitude information includes: obtaining a current working mode of the image capturing device; at least one target correction strategy; and based on the at least one target correction strategy and the attitude information, performing rotation correction on the acquired image.
  • performing rotation correction on an image acquired by an image acquisition device includes at least one of the following: controlling the photosensitive device of the image acquisition device to perform rotation correction on the acquired image; controlling the image processing device of the image acquisition device to perform rotation correction on the acquired image The image is rotated and corrected; the image display device of the image acquisition device is controlled to perform rotation correction on the acquired image; and a rotation mark is set for the collected image, so that when the collected image is transmitted to an external device for display, the collected image is based on the rotation mark. Perform rotation correction.
  • performing rotation correction on the captured image based on at least one target correction strategy and attitude information includes: determining a target angle range corresponding to the rotation angle from a plurality of preset angle ranges; determining a target angle range corresponding to the target angle The target correction angle corresponding to the angle range; and based on at least one target correction strategy and the target correction angle, performing rotation correction on the collected image; wherein, each angle range in the multiple angle ranges corresponds to a correction angle, and the multiple angle ranges correspond to The multiple correction angles include 90°, 180° and 270°.
  • the working mode of the image capturing device includes at least one of a preview mode, a photographing mode, and a video recording mode.
  • the plurality of correction strategies include at least one of the following: at least one first correction strategy matching the preview mode; at least one second correction strategy matching the photographing mode; at least one third correction strategy matching the video recording mode.
  • the at least one second correction strategy includes at least one of the following: when the correction angle is 180°, the photosensitive device of the image acquisition device is controlled to rotate the acquired image by 180° in a specific direction; when the correction angle is 180°; In the case of 90° or 270°, the image processing device that controls the image capture device rotates the captured image by 90° or 270° in a specific direction; when the image capture device is in the Selfie state, it controls the image display of the image capture device. The device performs mirror flip correction on the captured image.
  • At least one third correction strategy includes at least one of the following: when the correction angle is 90° or 270°, setting a rotation flag for the captured image, so that the captured image is transmitted to an external device when the captured image is transmitted to an external device.
  • the captured image is rotated and corrected based on the rotation identifier; when the correction angle is 180°, the photosensitive device of the image capture device is controlled to rotate the captured image by 180° in a specific direction, and the image display of the image capture device is controlled.
  • the device rotates the image received from the photosensitive device by 180° along a specific direction; when the image capture device is in a Selfie state, the image display device is controlled to perform mirror flip correction on the captured image.
  • the at least one first correction strategy includes at least one of the following: when the correction angle is 90°, 180° or 270°, locking the photosensitive device, the image processing device, and the image display device of the image capture device ; When the image acquisition device is in a Selfie state, the image display device is controlled to perform mirror flip correction on the acquired image.
  • performing rotation correction on the collected image based on at least one target correction strategy and attitude information includes: determining the attitude of the image acquisition device when collecting a predetermined number of frame images in a video recording mode based on the attitude information; In the third correction strategy, a third correction strategy corresponding to the posture is determined; based on the third correction strategy corresponding to the posture, the image collected in the video recording mode is rotated and corrected.
  • the predetermined number of frames is the first frame.
  • performing mirror inversion correction on the captured image includes: performing mirror inversion on the captured image along a horizontal axis of the image.
  • the processor further performs the following operations: determining whether the image capturing device is in an abnormal posture and taking a selfie when capturing an image; Before or after, mirror-flip correction is performed on the acquired image.
  • another image correction device including an acquisition module and a correction module.
  • the acquisition module is used to acquire the posture information and/or the shooting state when the image acquisition device acquires the image.
  • the correction module is used to perform rotation correction on the collected image based on at least the attitude information when the attitude information indicates that the image acquisition device is in an abnormal posture and/or when the shooting state indicates that the image acquisition device is in a self-portrait state when the image is collected. And/or performing mirror flip correction on the captured image based on the shooting state, wherein the posture information includes the rotation angle of the image capturing device rotated along a specific direction, and the abnormal posture includes the rotation angle exceeding a predetermined angle range.
  • any of the modules according to the embodiments of the present disclosure, or at least part of the functions of any of the modules, may be implemented in one module. Any one or more of the modules according to the embodiments of the present disclosure may be split into multiple modules for implementation. Any one or more of the modules according to embodiments of the present disclosure may be implemented, at least in part, as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, A system-on-package, an application specific integrated circuit (ASIC), or any other reasonable hardware or firmware implementation that integrates or encapsulates a circuit, or in any one of software, hardware, and firmware implementations or It can be realized by any suitable combination of any of them. Alternatively, one or more of the modules according to embodiments of the present disclosure may be implemented, at least in part, as computer program modules that, when executed, may perform corresponding functions.
  • FPGAs field programmable gate arrays
  • PLAs programmable logic arrays
  • ASIC application
  • Embodiments of the present disclosure also provide a computer-readable storage medium, where the computer-readable storage medium may be included in the device/apparatus/system described in the foregoing embodiments; or may exist alone without being assembled into the computer-readable storage medium. equipment/device/system.
  • the above-mentioned computer-readable storage medium carries one or more programs, and when the above-mentioned one or more programs are executed, the image correction method according to the embodiment of the present disclosure is implemented.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as, but not limited to, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM) , erasable programmable read only memory (EPROM or flash memory), portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.

Landscapes

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

Abstract

一种用于图像采集设备的图像矫正方法、一种用于图像采集设备的图像矫正装置、一种计算机可读存储介质和一种图像采集设备。该方法包括:获得图像采集设备采集图像时的姿态信息和/或拍摄状态;在姿态信息表征图像采集设备在采集图像时处于异常姿态时和/或在拍摄状态表征图像采集设备采集图像时处于自拍状态时,至少基于姿态信息对采集的图像进行旋转矫正和/或基于拍摄状态对采集的图像进行镜像翻转矫正。

Description

图像矫正方法和装置、图像采集设备和存储介质 技术领域
本公开涉及图像处理领域,尤其涉及一种用于图像采集设备的图像矫正方法、一种用于图像采集设备的图像矫正装置、一种图像采集设备和一种计算机可读存储介质。
背景技术
随着科学技术的快速发展,图像采集设备越来越多地被应用于人们的工作和生活中,例如,各种类型的相机、带有拍照录像功能的手机和平板电脑等电子设备。
用户在采集图像时一般使图像采集设备呈竖向正置的姿态拍摄前方的物体,用户也可以根据拍摄物的特点或者拍摄目的改变图像采集设备的姿态,例如可以由竖向正置姿态沿逆时针或顺时针方向旋转一定角度,使图像采集设备以非竖向正置的姿态进行图像采集,或者将图像采集设备水平翻转进行自拍。然而,在图像采集设备以非竖向正置姿态采集图像后,用户在浏览时图像是非正向的,并且在以自拍状态采集图像后,用户在浏览时图像展示的并非是真实的角度,不利于用户查看图像,影响用户体验。
公开内容
本公开提供了一种用于图像采集设备的图像矫正方法,包括:获得所述图像采集设备采集图像时的姿态信息和/或拍摄状态;以及在所述姿态信息表征所述图像采集设备在采集图像时处于异常姿态时和/或在所述拍摄状态表征所述图像采集设备采集图像时处于自拍状态时,至少基于所述姿态信息对采集的图像进行旋转矫正和/或基于所述拍摄状态对采集的图像进行镜像翻转矫正,其中,所述姿态信息包括所述图像采集设备由预定姿态沿特定方向旋转的旋转角度;所述异常姿态包括所述旋转角度超过预定角度范围。
本公开还提供了一种用于相机的图像矫正装置,包括:处理器;存储器,用于存储一个或多个程序,其中,当所述一个或多个程序被所述处理器执行时,使得所述处理器执行以下操作:获得所述图像采集设备采集图像时的姿态信息和/或拍摄状态;以及在所述姿态信息表征所述图像采集设备采集图像时处于异常姿态时和/或在所述拍摄状态表征所述图像采集设备采集图像时处于自拍状态时,至少基于所述姿态信息对采集的图像进预定姿态行旋转矫正和/或基于所述拍摄状态对采集的图像进行镜像翻转矫正,其中,所述姿态信息包括所述图像采集设备由沿特定方向旋转的旋转角度;所述异常姿态包括所述旋转角度超过预定角度范围。
本公开还提供了一种图像采集设备,包括:姿态获取装置,用于获得所述图像采集设备采集图像时的姿态信息和/或拍摄状态;处理器;以及存储器,用于存储一个或多个程序,其中,当所述一个或多个程序被所述处理器执行时,使得所述处理器执行以下操作:获得所述图像采集设备采集图像时的姿态信息和/或拍摄状态;以及在所述姿态信息表征所述图像采集设备采集图像时处于异常姿态时和/或在所述拍摄状态表征所述图像采集设备采集图像时处于自拍状态时,至少基于所述姿态信息对采集的图像进预定姿态行旋转矫正和/或基于所述拍摄状态对采集的图像进行镜像翻转矫正,其中,所述姿态信息包括所述图像采集设备由沿特定方向旋转的旋转角度;所述异常姿态包括所述旋转角度超过预定角度范围。
本公开还提供了一种计算机可读存储介质,其上存储有可执行指令,该指令被处理器执行时使处理器执行如上所述用于图像采集设备的图像矫正方法。
从上述技术方案可以看出,本公开实施例至少具有以下有益效果:
通过检测图像采集设备在采集图像时所处的姿态,并在处于异常姿态时对图像进行旋转矫正的方式,可以获得正向的图像,使图像在保存时以正向的角度保存,在用户查看时也能够以正向的角度查看图像,无需用户进行手动图像翻转或者设备翻转,使用户能够以舒适姿态观看,提高用户使用满意度。并且在采集图像时所处的状态,通过在自拍状态时对图像进行镜像翻转矫正,可以使用户以真实的角度浏览图像。
附图说明
附图是用来提供对本公开的进一步理解,并且构成说明书的一部分,与下面的具体实施方式一起用于解释本公开,但并不构成对本公开的限制。在附图中:
图1A和1B示意性示出了根据本公开实施例的可以应用图像矫正方法及装置的应用场景。
图2A示意性示出了根据本公开实施例的图像采集设备采集图像的示意图。
图2B示意性示出了根据本公开另一实施例的图像采集设备采集图像的示意图。
图3示意性示出了根据本公开实施例的图像矫正方法的流程图。
图4示意性示出了根据本公开实施例的图像采集设备的旋转角度的示意图。
图5示意性示出了根据本公开实施例的图像旋转矫正的示意图。
图6示意性示出了根据本公开实施例的图像镜像翻转矫正的示意图。
图7示意性示出了根据本公开实施例的图像旋转矫正以及镜像翻转矫正的示意图。
图8示意性示出了根据本公开另一实施例的图像镜像翻转矫正的示意图。
图9示意性示出了根据本公开实施例的旋转矫正的流程图。
图10示意性示出了根据本公开实施例的用于图像采集设备的图像矫正装置的框图。
具体实施方式
下面将结合实施例和实施例中的附图,对本公开技术方案进行清楚、完整的描述。显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。在下面的详细描述中,为便于解释,阐述了许多具体的细节以提供对本公开实施例的全面理解。然而,明显地,一个或多个实施例在没有这些具体 细节的情况下也可以被实施。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本公开的概念。
附图中示出了一些方框图和/或流程图。应理解,方框图和/或流程图中的一些方框或其组合可以由计算机程序指令来实现。这些计算机程序指令可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器,从而这些指令在由该处理器执行时可以创建用于实现这些方框图和/或流程图中所说明的功能/操作的装置。本公开的技术可以硬件和/或软件(包括固件、微代码等)的形式来实现。另外,本公开的技术可以采取存储有指令的计算机可读存储介质上的计算机程序产品的形式,该计算机程序产品可供指令执行系统使用或者结合指令执行系统使用。
本公开的实施例提供了一种用于图像采集设备的图像矫正方法,该方法包括:获得图像采集设备采集图像时的姿态信息和/或拍摄状态。在姿态信息表征图像采集设备在采集图像时处于异常姿态时和/或在拍摄状态表征图像采集设备采集图像时处于自拍状态时,至少基于姿态信息对采集的图像进行旋转矫正和/或基于拍摄状态对采集的图像进行镜像翻转矫正。其中,姿态信息包括图像采集设备由预定姿态沿特定方向旋转的旋转角度;异常姿态包括旋转角度超过预定角度范围。
图1A和1B示意性示出了根据本公开实施例的可以应用图像矫正方法及装置的应用场景。需要注意的是,图1A和1B所示仅为可以应用本公开实施例的场景的示例,以帮助本领域技术人员理解本公开的技术内容,但并不意味着本公开实施例不可以用于其他设备、系统、环境或场景。
如图1A和1B所示,本公开实施例的图像矫正方法和装置例如可以应用于手持式云台相机110,其中,图1A示出了云台相机110的正面示意图,图1B示出了云台相机110的背面和侧面的示意图。如图1A和1B所示,云台相机110可以包括主体部101、云台部102和采集部103,其中,主体部101可供用户握持,主体部101还可以设置有处理器、显示屏和按键等部件。采集部103包括图像采集装置1031(例如摄像头),可以用于采集外部图像,采集部103可以固定于云台部102上。云台部102可以包括三个旋转部件,三个旋转部件对应的三个转动轴(roll轴、yaw轴、pitch轴)相互垂直,可以使位于云台部102上的采集部103实现多种角度 的调整,云台部102作为稳定器可以保证图像采集过程中的自动稳定平衡,例如当握持相机的手部出现抖动时,云台部102可以调整采集部103的状态,将采集部103保持在稳定平衡的角度上,使采集部103不会随着手部出现抖动,拍摄出的画面更加稳定流畅。
此外,手持式云台相机110还可以连接手机等外部设备120,并将图像传输至外部设备120进行显示。
图2A示意性示出了根据本公开实施例的图像采集设备采集图像的示意图。
如图2A所示,用户想要拍摄前方的画面时,通常将手持式云台相机210置于竖向正置姿态,即,使手持式云台相机210处于竖直姿态以及正置姿态,其中,竖直姿态例如可以是指手持式云台相机210的中心轴线与水平面近似垂直,正置姿态可以是与倒置相对的姿态,正置姿态例如是指使手持式云台相机210的顶部朝上(例如朝向天空方向)、底部朝下(例如朝向地面方向)的姿态,该姿态是用户使用相机时常用的姿态。在该竖向正置姿态下,手持式云台相机210采集的图像为正向的,此处的正向可以理解为相对正向,相对正向可以是指图像相对于相机来说是正向的,例如图像中物体的顶部近似朝向相机的顶部。在用户以常用姿态使用相机时,能够正常浏览图像,无需再旋转图像或者旋转相机。
图2B示意性示出了根据本公开另一实施例的图像采集设备采集图像的示意图。
如图2B所示,用户在拍摄时,可能会使手持式云台相机210以非竖向正置的姿态(以下也可称为异常姿态)进行图像采集,例如将手持式云台相机210由竖向正置姿态沿逆时针方向旋转90度,呈横向姿态进行拍摄;或者还可以由竖向正置姿态沿逆时针方向旋转180度,呈竖向倒置姿态进行拍摄。此外,用户还可以将手持式云台相机210进行水平翻转,使摄像头朝向用户一侧进行自拍。在手持式云台相机210处于非竖向正置姿态进行图像采集时,保存的图像不是相对正向的,用户在以常用的竖向正置姿态查看图像时需要对图像进行旋转。
本公开实施例的可以应用图像矫正方法可以用于手持式云台相机210,在手持式云台相机210处于非竖向正置姿态时对采集的图像进行矫正,使 图像保存时以相对正向的角度进行保存,无需后续再由用户进行矫正。
图3示意性示出了根据本公开实施例的图像矫正方法的流程图。
如图3所示,该图像矫正方法包括操作S310~S320。
在操作S310,获得图像采集设备采集图像时的姿态信息和/或拍摄状态。
例如,图像采集设备可以是指手机、平板电脑等具有图像采集装置的电子设备或者可以是指相机,其中,相机可以包括手持式云台相机。
根据本公开的实施例,姿态信息包括图像采集设备由预定姿态沿特定方向旋转的旋转角度。预定姿态可以是指上述的竖向正置姿态,或者可以理解为用户使用图像采集设备时的常用姿势,例如用户使用相机时,通常将相机的摄像头朝向前方以及相机顶部朝向天空。特定方向例如可以是指逆时针或者顺时针方向,图像采集设备的姿态信息可以是指在拍摄图像时的姿态相对于竖向正置姿态沿逆时针或者顺时针方向的旋转角度。例如,图2B所示的图像采集设备的姿态为由图2A所示的竖向正置姿态沿逆时针方向旋转90度之后的姿态,则姿态信息可以为逆时针旋转90度。需要说明的是,由预定姿态沿特定方向旋转的表达方式仅是为了说明图像采集设备所处的姿态,目的是以预定姿态为基准来描述设备拍摄时的姿态,并非一定是从预定姿态旋转至拍摄时的姿态,本领域技术人员可以理解设备可以由任意角度旋转至该拍摄时的姿态。
根据本公开的实施例,拍摄状态可以包括前向拍摄状态或者自拍状态,其中,前向拍摄状态例如可以是指摄像头的朝向与用户视线方向近似一致,以拍摄用户前方的画面。自拍状态可以是指将摄像头朝向用户,拍摄用户以及用户后方画面的状态。这两种状态可以通过前后翻转图像采集设备实现切换。
在操作S320,在姿态信息表征图像采集设备在采集图像时处于异常姿态时和/或在拍摄状态表征图像采集设备采集图像时处于自拍状态时,至少基于姿态信息对采集的图像进行旋转矫正和/或基于拍摄状态对采集的图像进行镜像翻转矫正。
图4示意性示出了根据本公开实施例的图像采集设备的旋转角度的示意图。
如图4所示,根据本公开的实施例,异常姿态可以是指旋转角度超过了预定角度范围,例如,预定角度范围可以为[0~α],其中,α可以小于或等于45度。也就是说,当以预定姿态为基准向两侧旋转的角度不超过α时,认为未超出预定角度范围;当以预定姿态为基准向两侧旋转的角度超过α时,认为超出了预定角度范围。对于手持式云台相机,在相机主体部的旋转角度未超出预定角度范围的情况下,在云台部的作用下,采集部可能不会跟随主体部产生旋转,即摄像头可能仍然维持竖向正置拍摄姿态,拍摄的图像也是相对正向的,无需对采集的图像进行矫正;在相机主体部的旋转角度超出预定角度范围的情况下,采集部会跟随主体部产生旋转,拍摄的图像不再是相对正向的,需要对采集的图像进行矫正。
图5示意性示出了根据本公开实施例的图像旋转矫正的示意图。
如图5所示,若图像采集设备在采集图像时相对于预定姿态沿逆时针的旋转角度为β(β>α),β例如可以是90度,则可以将图像501沿逆时针旋转β来实现旋转矫正。当图像采集设备逆时针旋转β拍摄时,采集的图像相对地沿顺时针旋转了β,因此,在矫正图像角度时,需要再使图像501逆时针旋转β恢复为相对正向,进而使图像501能够以相对正向角度保存,用户以设备的预定姿态查看图像时图像是正向的,无需再进行旋转操作。
图6示意性示出了根据本公开实施例的图像镜像翻转矫正的示意图。
如图6所示,根据本公开的实施例,若图像采集设备在采集图像时处于自拍状态,可以对采集的图像601进行镜像翻转矫正,镜像翻转矫正例如可以包括将图像601进行水平翻转,即沿图像601的纵轴进行翻转。
根据本公开的实施例,如图5所示,在图像采集设备处于异常姿态但未处于自拍状态的情况下,可以仅对图像进行旋转矫正。如图6所示,在图像采集设备处于自拍状态但未处于异常姿态的情况下,可以仅对图像进行镜像翻转矫正。
根据本公开的实施例,操作S320可以包括以下操作:确定图像采集设备采集图像时是否处于异常姿态以及自拍状态;若是,在执行基于姿态信息对图像采集设备采集的图像进行旋转矫正操作的同时或之前或之后,对采集的图像进行镜像翻转矫正。
图7示意性示出了根据本公开实施例的图像旋转矫正以及图像镜像翻转矫正的示意图。
如图7所示,在图像采集设备处于异常姿态以及处于自拍状态的情况下,可以对图像701进行旋转矫正以及镜像翻转矫正。本公开实施例对旋转矫正和镜像翻转矫正的先后顺序不做限定。
根据本公开的实施例,通过检测图像采集设备在采集图像时所处的姿态和状态,并在处于异常姿态和/或自拍状态时对图像进行矫正的方式,可以获得相对正向的图像,使图像在保存时以相对正向的角度保存,在用户以相机的预定姿态查看图像时无需进行手动图像翻转或者设备翻转,使用户能够以舒适姿态观看,提高用户使用满意度。
根据本公开的实施例,上述操作S320中的对图像采集设备采集的图像进行旋转矫正包括以下操作(1)~(4)中的至少一种:
(1)控制图像采集设备的感光装置对采集的图像进行旋转矫正。
例如,感光装置可以是指摄像头等图像采集装置,感光装置可以将光信号转化为电信号,并且感光装置可以支持以下的方向转换功能:0°、180°、Mirror和Flip。例如,电信号可以对应一个m×n的矩阵,方向转换180°可以是指将电信号进行180°旋转,即,将该m×n矩阵进行180°旋转。Mirror操作可以是指将电信号进行镜像翻转,即将该m×n矩阵进行镜像翻转。Flip操作可以相当于将电信号进行180°旋转以及进行镜像翻转。基于该操作(1),可以控制图像在采集阶段实现矫正,属于前向矫正,其中,前向矫正可以是指在拍录过程中进行矫正,即在图像生成的过程中进行矫正,使得图像可以正向保存,相对地,后向矫正可以是指在播放时进行矫正。
(2)控制图像采集设备的图像处理装置对采集的图像进行旋转矫正。
例如,图像处理装置例如可以是指数字图像处理器件,例如DSP(Digital Signal Processing)芯片。对于手持式云台相机,图像处理装置可以设置于相机的主体部。图像处理装置可以接收来自感光装置的信号,并对信号进行进一步的处理,例如进行曝光处理,以得到高质量的图像。感光装置可以支持以下的方向转换功能:0°、90°、180°、270°、Mirror 和Flip。基于该操作(2),可以控制图像在图像处理阶段实现矫正,同样属于前向矫正。
(3)控制图像采集设备的图像显示装置对采集的图像进行旋转矫正。
例如,图像显示装置可以是指显示屏,图像显示装置可以接收来自图像处理装置的图像信号并对图像进行显示。图像显示装置可以支持以下的方向转换功能:0°、90°、180°、270°、Mirror和Flip。基于该操作(3),可以控制图像在图像显示阶段实现矫正。
(4)为采集的图像设置旋转标识,以在采集的图像被传输至外部设备进行显示时基于旋转标识对采集的图像进行旋转矫正。
例如,在图像采集设备将采集的图像传输至外部设备进行显示的情况下,可以为图像设置旋转标识(例如0°,90°,270°),这样,在图像被传输至外部设备时,外部设备可以根据旋转标识对图像进行旋转并存储和显示。
根据本公开的实施例,可以通过控制感光装置、图像处理装置、图像显示装置或者设置旋转标识分别使图像在图像采集阶段、图像处理阶段、图像显示阶段或者在外部设备上实现矫正,进而可以根据不同的需求在不同的阶段进行矫正,满足更多样化的需求。
图8示意性示出了根据本公开另一实施例的图像镜像翻转矫正的示意图。
如图8所示,根据本公开的实施例,对采集的图像801进行镜像翻转矫正包括:将采集的图像801沿图像801的横轴进行镜像翻转。例如,当图像采集设备处于旋转180°姿态并且翻转自拍时,拍摄的图像801与正向图像是上下对称的,因此,可以沿图像801的横轴进行镜像翻转,即,将图像801进行上下翻转。上述的Flip操作可以是指将图像沿横轴进行镜像翻转,相当于将图像进行了180°旋转以及水平镜像翻转。
图9示意性示出了根据本公开实施例的旋转矫正的流程图。
如图9所示,根据本公开的实施例,操作S320中的至少基于姿态信息对图像采集设备采集的图像进行旋转矫正可以包括操作S921~操作S923。
在操作S921,获得图像采集设备的当前工作模式。
例如,图像采集设备的工作模式可以包括预览模式、拍照模式和录像模式中的至少一种。
在操作S922,从预先设定的多个目标矫正策略中确定与当前工作模式匹配的至少一个目标矫正策略。
例如,可以预先对各个工作模式匹配不同的矫正策略,当检测到当前的工作模式时,将与当前工作模式相匹配的矫正策略作为目标矫正策略。
在操作S923,基于至少一个目标矫正策略和姿态信息,对采集的图像进行旋转矫正。
根据本公开的实施例,针对每种工作模式设置不同的矫正策略,可以适应和满足不同工作模式下的特点和需求。
根据本公开的实施例,基于至少一个目标矫正策略和姿态信息,对采集的图像进行旋转矫正包括:从预先设定的多个角度范围中确定与旋转角度对应的目标角度范围;确定与目标角度范围对应的目标矫正角度;以及基于至少一个目标矫正策略和目标矫正角度,对采集的图像进行旋转矫正;其中,多个角度范围中的每个角度范围对应一个矫正角度,多个角度范围对应的多个矫正角度包括90°、180°和270°。
例如,在一些情况下,图像采集设备并非正好处于90°、180°等标准角度,而可能是处于120°、200°等中间的角度,对于这些中间角度,可以将其归纳为接近的标准角度。例如,可以将(45°~135°]之间的角度归纳为90°,在矫正时按照90°进行矫正;再例如,可以将(135°~225°]之间的角度归纳为180°等,在矫正时按照180°进行矫正。
根据本公开的实施例,多个矫正策略包括以下中的至少一个:与预览模式匹配的至少一个第一矫正策略;与拍照模式匹配的至少一个第二矫正策略;以及与录像模式匹配的至少一个第三矫正策略。
根据本公开的实施例,至少一个第一矫正策略包括以下(1)~(2)中至少之一:
(1)在矫正角度为90°或者180°或者270°的情况下,优选的矫正策略为锁定图像采集设备的感光装置、图像处理装置和图像显示装置。
(2)在图像采集设备处于自拍状态的情况下,优选的矫正策略为控制图像显示装置对采集的图像进行镜像翻转矫正。
例如,预览模式可以是指在拍摄前或拍摄间隙进行取景的阶段,在预览模式下,感光装置可以持续地采集图像并通过图像显示装置展示给用户,在该模式下采集的图像仅供用户实时浏览,而无需保存图像。对于自带图像显示装置的图像采集设备,在预览模式下,无需对图像进行旋转矫正,即,锁定图像采集设备的感光装置、图像处理装置和图像显示装置均不对图像进行旋转。如图2B所示,当图像采集设备转动至某个角度时,感光装置和图像显示装置均处于相应角度,感光装置采集的图像由图像显示装置实时输出时,对于用户来说拍摄物体的顶部一直是近似朝向天空的,这种情况下展示的图像可以理解为是绝对正向的,即相对于以大地建立的坐标系来说是正向的。因此,在预览模式下无论图像采集设备处于什么姿态均无需对图像进行旋转矫正。另一方面,在预览模式下,若图像采集设备处于自拍模式,可以对图像进行镜像翻转矫正,以使用户看到真实角度下的图像。
根据本公开的实施例,至少一个第二矫正策略包括以下方式(1)~(3)中的至少一种:
(1)在矫正角度为180°的情况下,优选的矫正策略为控制图像采集设备的感光装置将采集的图像沿特定方向旋转180°。
(2)在矫正角度为90°或270°的情况下,优选的矫正策略为控制图像采集设备的图像处理装置将采集的图像沿特定方向旋转90°或270°。
(3)在图像采集设备处于自拍状态的情况下,优选的矫正策略为控制图像采集设备的图像显示装置对采集的图像进行镜像翻转矫正。
例如,在拍照模式下,对于图像采集设备处于180°对应的角度范围内的情况,由于感光装置支持180°旋转功能,因此可以控制感光装置在图像采集阶段对图像进行180°旋转矫正,后续再经过图像处理装置进行曝光等图像处理,然后可以将图像以相对正向的角度保存。对于图像采集设备处于90°或270°对应的角度范围内的情况,由于感光装置不支持90°或270°旋转功能,而图像处理装置支持90°或270°旋转功能,因此,可以控制图像处理装置在图像处理阶段对图像进行90°或270°旋转矫正,然后将处理后的图像以相对正向的角度保存。对于图像采集设备处于自拍状态的情况,可以对图像进行镜像翻转矫正。示例性地,图像采集设备的 状态可以通过相应的传感器获得,例如通过陀螺仪获取图像采集设备的当前姿态,进而得到图像采集设备所处的当前角度。
根据本公开的实施例,通过控制感光装置和图像处理装置对图像进行前向矫正,使图像以相对正向的角度保存,在图像显示装置展示图像时也能够以相对正向的角度展示,用户可以将图像采集设备恢复为预定姿态进行查看,在图像被传输至外部设备显示时也能够以正向显示。
根据本公开的实施例,至少一个第三矫正策略包括以下(1)~(3)至少之一:
(1)在矫正角度为90°或270°的情况下,优选的矫正策略为采集的图像设置旋转标识,以在采集的图像被传输至外部设备进行显示时基于旋转标识对采集的图像进行旋转矫正。
(2)在矫正角度为180°的情况下,优选的矫正策略控制图像采集设备的感光装置将采集的图像沿特定方向旋转180°,并且控制图像采集设备的图像显示装置将从感光装置接收的图像沿特定方向旋转180°。
(3)在图像采集设备处于自拍状态的情况下,优选的矫正策略控制图像显示装置对采集的图像进行镜像翻转矫正。
例如,在录像模式下,由于用户可能需要边录制图像边查看录制的效果,因此,需要保证在录像期间图像被展示时是绝对正向的。因此,可以不对图像进行前向矫正,而是对图像设置旋转标识以在之后进行后向矫正,这样,一方面,在录制过程中可以保证图像是绝对正向的(类似于预览模式),另一方面,可以在录制完成之后基于旋转标识逐帧矫正图像,进而使图像能够被矫正为相对正向的。
此外,进行前向矫正可能会造成一定的时间延迟并且功耗较大,而视频录制时对图像的实时性要求较高并且帧数较多,因此,通过在录制过程中设置旋转标识来代替前向矫正的方式可以降低延迟和功耗。而对于拍照模式,一次仅拍摄一张照片,因此对图像显示的实时性要求较低以及对功耗影响也较小,可以采用前向矫正的方式。
又例如,在录像模式下,也可以对图像进行前向矫正然后保存矫正后的图像,但是为了保证录制期间图像以绝对正向的角度展示,以便用户实时浏览录制效果,图像显示装置从图像采集设备拿到拍摄时的另一路原始 图像。这样,在用户边录制边观看时,图像能够是绝对正向的,而录制完成输出的视频为相对正向的。
又例如,在录像模式下,也可以对图像进行前向矫正然后保存矫正后的图像,但是为了保证录制期间图像以绝对正向的角度展示,以便用户实时浏览录制效果,图像显示装置需要再次对图像进行旋转,使图像恢复为未进行前向矫正前的角度,这样,在用户边录制边观看时,图像能够是绝对正向的,而录制完成输出的视频为相对正向的。
根据本公开的实施例,基于至少一个目标矫正策略和姿态信息,对采集的图像进行旋转矫正,包括:基于姿态信息确定图像采集设备在录像模式下采集预定数量帧图像时的姿态;从至少一个第三矫正策略中确定与姿态对应的第三矫正策略;基于与姿态对应的第三矫正策略,对录像模式下采集的图像进行旋转矫正。
例如,在录像模式下,对于每次录像,可以获取在录制开始后采集前n帧图像时的姿态信息(n为大于等于1的整数),并在之后根据该前n帧图像的姿态信息对整个视频的图像帧进行前向或后向矫正。
对于用户来说,在录制视频过程中,可能希望能够保留取景角度转换的效果。在录制过程中取景角度发生变化的情况下(例如前n帧保持0°,中间m帧保持90°,后p帧保持180°,m和p均为大于等于1的整数),若每次变化后均以变化后的姿态进行矫正,则视频的每帧图像均是正向的,整个视频的图像帧全部保持一种角度,没有取景角度转换的效果,因此,本公开实施例以前n帧图像对应的姿态信息对整个视频的图像进行矫正(若前n帧图像的角度为0°则全程无需进行矫正),可以保留下取景角度转换的效果。
根据本公开的实施例,预定数量帧可以是第一帧。例如,前n帧可以是指前一帧,这种情况下,可以仅在采集第一帧图像时获取图像采集设备的姿态信息,可以简化对视频图像的矫正过程。
本公开实施例的另一方面提供了一种用于图像采集设备的图像矫正装置。
图10示意性示出了根据本公开实施例的用于图像采集设备的图像矫正装置1000的框图。
如图10所示,可移动载体的控制装置1000包括处理器1010和存储器1020。
存储器1020用于存储一个或多个程序1021,其中,当一个或多个程序1021被处理器执行时,使得处理器1010执行以下操作:
获得图像采集设备采集图像时的姿态信息和/或拍摄状态;以及在姿态信息表征图像采集设备采集图像时处于异常姿态时和/或在拍摄状态表征图像采集设备采集图像时处于自拍状态时,至少基于姿态信息对采集的图像进预定姿态行旋转矫正和/或基于拍摄状态对采集的图像进行镜像翻转矫正。其中,姿态信息包括图像采集设备由沿特定方向旋转的旋转角度;异常姿态包括旋转角度超过预定角度范围。
具体地,处理器1010例如可以包括通用微处理器、指令集处理器和/或相关芯片组和/或专用微处理器(例如,专用集成电路(ASIC)),等等。处理器1010还可以包括用于缓存用途的板载存储器。处理器1010可以是用于执行根据本公开实施例的方法流程的不同动作的单一处理单元或者是多个处理单元。
计算机可读存储介质1020,例如可以是非易失性的计算机可读存储介质,具体示例包括但不限于:磁存储装置,如磁带或硬盘(HDD);光存储装置,如光盘(CD-ROM);存储器,如随机存取存储器(RAM)或闪存;等等。
本公开实施例的另一方面还提供了一种图像采集设备,图像采集设备例如可以是相机设备。该图像采集设备包括姿态获取装置、处理器和存储器,姿态获取装置用于获得所述图像采集设备采集图像时的姿态信息和/或拍摄状态。存储器用于存储一个或多个程序,其中,当一个或多个程序被处理器执行时,使得处理器执行以下操作:
获得图像采集设备采集图像时的姿态信息和/或拍摄状态;以及在姿态信息表征图像采集设备采集图像时处于异常姿态时和/或在拍摄状态表征图像采集设备采集图像时处于自拍状态时,至少基于姿态信息对采集的图像进预定姿态行旋转矫正和/或基于拍摄状态对采集的图像进行镜像翻转矫正。其中,姿态信息包括图像采集设备由沿特定方向旋转的旋转角度;异常姿态包括旋转角度超过预定角度范围。
根据本公开的实施例,至少基于姿态信息对图像采集设备采集的图像进行旋转矫正包括:获得图像采集设备的当前工作模式;从预先设定的多个目标矫正策略中确定与当前工作模式匹配的至少一个目标矫正策略;以及基于至少一个目标矫正策略和姿态信息,对采集的图像进行旋转矫正。
根据本公开的实施例,对图像采集设备采集的图像进行旋转矫正,包括以下至少之一:控制图像采集设备的感光装置对采集的图像进行旋转矫正;控制图像采集设备的图像处理装置对采集的图像进行旋转矫正;控制图像采集设备的图像显示装置对采集的图像进行旋转矫正;以及为采集的图像设置旋转标识,以在采集的图像被传输至外部设备进行显示时基于旋转标识对采集的图像进行旋转矫正。
根据本公开的实施例,基于至少一个目标矫正策略和姿态信息,对采集的图像进行旋转矫正,包括:从预先设定的多个角度范围中确定与旋转角度对应的目标角度范围;确定与目标角度范围对应的目标矫正角度;以及基于至少一个目标矫正策略和目标矫正角度,对采集的图像进行旋转矫正;其中,多个角度范围中的每个角度范围对应一个矫正角度,多个角度范围对应的多个矫正角度包括90°、180°和270°。
根据本公开的实施例,图像采集设备的工作模式包括预览模式、拍照模式和录像模式中的至少一个。多个矫正策略包括以下中的至少一个:与预览模式匹配的至少一个第一矫正策略;与拍照模式匹配的至少一个第二矫正策略;与录像模式匹配的至少一个第三矫正策略。
根据本公开的实施例,至少一个第二矫正策略包括以下至少之一:在矫正角度为180°的情况下,控制图像采集设备的感光装置将采集的图像沿特定方向旋转180°;在矫正角度为90°或270°的情况下,控制图像采集设备的图像处理装置将采集的图像沿特定方向旋转90°或270°;在图像采集设备处于自拍状态的情况下,控制图像采集设备的图像显示装置对采集的图像进行镜像翻转矫正。
根据本公开的实施例,至少一个第三矫正策略包括以下至少之一:在矫正角度为90°或270°的情况下,为采集的图像设置旋转标识,以在采集的图像被传输至外部设备进行显示时基于旋转标识对采集的图像进行旋转矫正;在矫正角度为180°的情况下,控制图像采集设备的感光装置 将采集的图像沿特定方向旋转180°,并且控制图像采集设备的图像显示装置将从感光装置接收的图像沿特定方向旋转180°;在图像采集设备处于自拍状态的情况下,控制图像显示装置对采集的图像进行镜像翻转矫正。
根据本公开的实施例,至少一个第一矫正策略包括以下至少之一:在矫正角度为90°或者180°或者270°的情况下,锁定图像采集设备的感光装置、图像处理装置和图像显示装置;在图像采集设备处于自拍状态的情况下,控制图像显示装置对采集的图像进行镜像翻转矫正。
根据本公开的实施例,基于至少一个目标矫正策略和姿态信息,对采集的图像进行旋转矫正,包括:基于姿态信息确定图像采集设备在录像模式下采集预定数量帧图像时的姿态;从至少一个第三矫正策略中确定与姿态对应的第三矫正策略;基于与姿态对应的第三矫正策略,对录像模式下采集的图像进行旋转矫正。
根据本公开的实施例,预定数量帧为第一帧。
根据本公开的实施例,对采集的图像进行镜像翻转矫正包括:将采集的图像沿图像的横轴进行镜像翻转。
根据本公开的实施例,处理器还执行以下操作:确定图像采集设备采集图像时是否处于异常姿态以及自拍状态;若是,在执行基于姿态信息对图像采集设备采集的图像进行旋转矫正操作的同时或之前或之后,对采集的图像进行镜像翻转矫正。
根据本公开的实施例,还提供了另一种图像矫正装置,包括获取模块、矫正模块。获取模块用于获得图像采集设备采集图像时的姿态信息和/或拍摄状态。矫正模块用于在姿态信息表征图像采集设备采集图像时处于异常姿态时和/或在拍摄状态表征图像采集设备采集图像时处于自拍状态时,至少基于姿态信息对采集的图像进预定姿态行旋转矫正和/或基于拍摄状态对采集的图像进行镜像翻转矫正,其中,姿态信息包括图像采集设备由沿特定方向旋转的旋转角度,异常姿态包括旋转角度超过预定角度范围。
根据本公开的实施例的模块中的任意多个、或其中任意多个的至少部分功能可以在一个模块中实现。根据本公开实施例的模块中的任意一个或多个可以被拆分成多个模块来实现。根据本公开实施例的模块中的任意一个或多个可以至少被部分地实现为硬件电路,例如现场可编程门阵列 (FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式的硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,根据本公开实施例的模块中的一个或多个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。
本公开实施例还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例中描述的设备/装置/系统中所包含的;也可以是单独存在,而未装配入该设备/装置/系统中。上述计算机可读存储介质承载有一个或者多个程序,当上述一个或者多个程序被执行时,实现根据本公开实施例的图像矫正方法。
根据本公开的实施例,计算机可读存储介质可以是非易失性的计算机可读存储介质,例如可以包括但不限于:便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功 能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
最后应说明的是:以上各实施例仅用以说明本公开的技术方案,而非对其限制;尽管参照前述各实施例对本公开进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;在不冲突的情况下,本公开实施例中的特征可以任意组合;而这些修改或者替换,并不使相应技术方案的本质脱离本公开各实施例技术方案的范围。

Claims (37)

  1. 一种用于图像采集设备的图像矫正方法,包括:
    获得所述图像采集设备采集图像时的姿态信息和/或拍摄状态;以及
    在所述姿态信息表征所述图像采集设备在采集图像时处于异常姿态时和/或在所述拍摄状态表征所述图像采集设备采集图像时处于自拍状态时,至少基于所述姿态信息对采集的图像进行旋转矫正和/或基于所述拍摄状态对采集的图像进行镜像翻转矫正,其中,
    所述姿态信息包括所述图像采集设备由预定姿态沿特定方向旋转的旋转角度;
    所述异常姿态包括所述旋转角度超过预定角度范围。
  2. 根据权利要求1所述的方法,其中,所述至少基于所述姿态信息对所述图像采集设备采集的图像进行旋转矫正包括:
    获得所述图像采集设备的当前工作模式;
    从预先设定的多个目标矫正策略中确定与所述当前工作模式匹配的至少一个目标矫正策略;以及
    基于所述至少一个目标矫正策略和所述姿态信息,对采集的图像进行旋转矫正。
  3. 根据权利要求1所述的方法,其中,所述对所述图像采集设备采集的图像进行旋转矫正包括以下至少之一:
    控制所述图像采集设备的感光装置对采集的图像进行旋转矫正;
    控制所述图像采集设备的图像处理装置对采集的图像进行旋转矫正;
    控制所述图像采集设备的图像显示装置对采集的图像进行旋转矫正;以及
    为采集的图像设置旋转标识,以在采集的图像被传输至外部设备进行显示时基于所述旋转标识对采集的图像进行旋转矫正。
  4. 根据权利要求2所述的方法,其中,所述基于所述至少一个目标矫正策略和所述姿态信息,对采集的图像进行旋转矫正,包括:
    从预先设定的多个角度范围中确定与所述旋转角度对应的目标角度范围;
    确定与所述目标角度范围对应的目标矫正角度;以及
    基于所述至少一个目标矫正策略和所述目标矫正角度,对采集的图像进行旋转矫正;
    其中,所述多个角度范围中的每个角度范围对应一个矫正角度,所述多个角度范围对应的多个矫正角度包括90°、180°和270°。
  5. 根据权利要求2或4所述的方法,其中,
    所述图像采集设备的工作模式包括预览模式、拍照模式和录像模式中的至少一个;
    所述多个矫正策略包括以下中的至少一个:
    与所述预览模式匹配的至少一个第一矫正策略;
    与所述拍照模式匹配的至少一个第二矫正策略;
    与所述录像模式匹配的至少一个第三矫正策略。
  6. 根据权利要求5所述的方法,其中,所述至少一个第二矫正策略包括以下至少之一:
    在矫正角度为180°的情况下,控制所述图像采集设备的感光装置将采集的图像沿所述特定方向旋转180°;
    在矫正角度为90°或270°的情况下,控制所述图像采集设备的图像处理装置将采集的图像沿所述特定方向旋转90°或270°;
    在所述图像采集设备处于自拍状态的情况下,控制所述图像采集设备的图像显示装置对采集的图像进行镜像翻转矫正。
  7. 根据权利要求5所述的方法,其中,所述至少一个第三矫正策略包括以下至少之一:
    在矫正角度为90°或270°的情况下,为采集的图像设置旋转标识,以在采集的图像被传输至外部设备进行显示时基于所述旋转标识对采集的图像进行旋转矫正;
    在矫正角度为180°的情况下,控制所述图像采集设备的感光装置将采集的图像沿所述特定方向旋转180°,并且控制所述图像采集设备的图像显示装置将从所述感光装置接收的图像沿所述特定方向旋转180°;
    在所述图像采集设备处于自拍状态的情况下,控制所述图像显示装置对采集的图像进行镜像翻转矫正。
  8. 根据权利要求5所述的方法,其中,所述至少一个第一矫正策略包括以下至少之一:
    在矫正角度为90°或者180°或者270°的情况下,锁定所述图像采集设备的感光装置、图像处理装置和图像显示装置;
    在所述图像采集设备处于自拍状态的情况下,控制所述图像显示装置对采集的图像进行镜像翻转矫正。
  9. 根据权利要求7所述的方法,其中,所述基于所述至少一个目标矫正策略和所述姿态信息,对采集的图像进行旋转矫正,包括:
    基于所述姿态信息确定所述图像采集设备在录像模式下采集预定数量帧图像时的姿态;
    从所述至少一个第三矫正策略中确定与所述姿态对应的第三矫正策略;
    基于所述与所述姿态对应的第三矫正策略,对录像模式下采集的图像进行旋转矫正。
  10. 根据权利要求9所述的方法,其中,所述预定数量帧为第一帧。
  11. 根据权利要求1所述的方法,其中,所述对采集的图像进行镜像翻转矫正包括:将采集的图像沿图像的横轴进行镜像翻转。
  12. 根据权利要求1所述的方法,其中,还包括:
    确定所述图像采集设备采集图像时是否处于异常姿态以及自拍状态;
    若是,在执行所述基于所述姿态信息对所述图像采集设备采集的图像进行旋转矫正操作的同时或之前或之后,对采集的图像进行镜像翻转矫正。
  13. 一种用于图像采集设备的图像矫正装置,包括:
    处理器;
    存储器,用于存储一个或多个程序,
    其中,当所述一个或多个程序被所述处理器执行时,使得所述处理器执行以下操作:
    获得所述图像采集设备采集图像时的姿态信息和/或拍摄状态;以及
    在所述姿态信息表征所述图像采集设备采集图像时处于异常姿态时和/或在所述拍摄状态表征所述图像采集设备采集图像时处于自拍状 态时,至少基于所述姿态信息对采集的图像进预定姿态行旋转矫正和/或基于所述拍摄状态对采集的图像进行镜像翻转矫正,其中,
    所述姿态信息包括所述图像采集设备由沿特定方向旋转的旋转角度;
    所述异常姿态包括所述旋转角度超过预定角度范围。
  14. 根据权利要求13所述的装置,其中,所述至少基于所述姿态信息对所述图像采集设备采集的图像进行旋转矫正,包括:
    获得所述图像采集设备的当前工作模式;
    从预先设定的多个目标矫正策略中确定与所述当前工作模式匹配的至少一个目标矫正策略;以及
    基于所述至少一个目标矫正策略和所述姿态信息,对采集的图像进行旋转矫正。
  15. 根据权利要求13所述的装置,其中,所述对所述图像采集设备采集的图像进行旋转矫正,包括以下至少之一:
    控制所述图像采集设备的感光装置对采集的图像进行旋转矫正;
    控制所述图像采集设备的图像处理装置对采集的图像进行旋转矫正;
    控制所述图像采集设备的图像显示装置对采集的图像进行旋转矫正;以及
    为采集的图像设置旋转标识,以在采集的图像被传输至外部设备进行显示时基于所述旋转标识对采集的图像进行旋转矫正。
  16. 根据权利要求14所述的装置,其中,所述基于所述至少一个目标矫正策略和所述姿态信息,对采集的图像进行旋转矫正,包括:
    从预先设定的多个角度范围中确定与所述旋转角度对应的目标角度范围;
    确定与所述目标角度范围对应的目标矫正角度;以及
    基于所述至少一个目标矫正策略和所述目标矫正角度,对采集的图像进行旋转矫正;
    其中,所述多个角度范围中的每个角度范围对应一个矫正角度,所述多个角度范围对应的多个矫正角度包括90°、180°和270°。
  17. 根据权利要求14或16所述的装置,其中,
    所述图像采集设备的工作模式包括预览模式、拍照模式和录像模式中的至少一个;
    所述多个矫正策略包括以下中的至少一个:
    与所述预览模式匹配的至少一个第一矫正策略;
    与所述拍照模式匹配的至少一个第二矫正策略;
    与所述录像模式匹配的至少一个第三矫正策略。
  18. 根据权利要求17所述的装置,其中,所述至少一个第二矫正策略包括以下至少之一:
    在矫正角度为180°的情况下,控制所述图像采集设备的感光装置将采集的图像沿所述特定方向旋转180°;
    在矫正角度为90°或270°的情况下,控制所述图像采集设备的图像处理装置将采集的图像沿所述特定方向旋转90°或270°;
    在所述图像采集设备处于自拍状态的情况下,控制所述图像采集设备的图像显示装置对采集的图像进行镜像翻转矫正。
  19. 根据权利要求17所述的装置,其中,所述至少一个第三矫正策略包括以下至少之一:
    在矫正角度为90°或270°的情况下,为采集的图像设置旋转标识,以在采集的图像被传输至外部设备进行显示时基于所述旋转标识对采集的图像进行旋转矫正;
    在矫正角度为180°的情况下,控制所述图像采集设备的感光装置将采集的图像沿所述特定方向旋转180°,并且控制所述图像采集设备的图像显示装置将从所述感光装置接收的图像沿所述特定方向旋转180°;
    在所述图像采集设备处于自拍状态的情况下,控制所述图像显示装置对采集的图像进行镜像翻转矫正。
  20. 根据权利要求17所述的装置,其中,所述至少一个第一矫正策略包括以下至少之一:
    在矫正角度为90°或者180°或者270°的情况下,锁定所述图像采集设备的感光装置、图像处理装置和图像显示装置;
    在所述图像采集设备处于自拍状态的情况下,控制所述图像显示装置对采集的图像进行镜像翻转矫正。
  21. 根据权利要求19所述的装置,其中,所述基于所述至少一个目标矫正策略和所述姿态信息,对采集的图像进行旋转矫正,包括:
    基于所述姿态信息确定所述图像采集设备在录像模式下采集预定数量帧图像时的姿态;
    从所述至少一个第三矫正策略中确定与所述姿态对应的第三矫正策略;
    基于所述与所述姿态对应的第三矫正策略,对录像模式下采集的图像进行旋转矫正。
  22. 根据权利要求21所述的装置,其中,所述预定数量帧为第一帧。
  23. 根据权利要求13所述的装置,其中,所述对采集的图像进行镜像翻转矫正包括:将采集的图像沿图像的横轴进行镜像翻转。
  24. 根据权利要求13所述的装置,其中,所述处理器还执行以下操作:
    确定所述图像采集设备采集图像时是否处于异常姿态以及自拍状态;
    若是,在执行所述基于所述姿态信息对所述图像采集设备采集的图像进行旋转矫正操作的同时或之前或之后,对采集的图像进行镜像翻转矫正。
  25. 一种图像采集设备,包括:
    姿态获取装置,用于获得所述图像采集设备采集图像时的姿态信息和/或拍摄状态;
    处理器;
    存储器,用于存储一个或多个程序,
    其中,当所述一个或多个程序被所述处理器执行时,使得所述处理器执行以下操作:
    获得所述图像采集设备采集图像时的姿态信息和/或拍摄状态;以及
    在所述姿态信息表征所述图像采集设备采集图像时处于异常姿态时和/或在所述拍摄状态表征所述图像采集设备采集图像时处于自拍状态时,至少基于所述姿态信息对采集的图像进预定姿态行旋转矫正和/或基于所述拍摄状态对采集的图像进行镜像翻转矫正,其中,
    所述姿态信息包括所述图像采集设备由沿特定方向旋转的旋转角度;
    所述异常姿态包括所述旋转角度超过预定角度范围。
  26. 根据权利要求25所述的设备,其中,所述至少基于所述姿态信息对所述图像采集设备采集的图像进行旋转矫正,包括:
    获得所述图像采集设备的当前工作模式;
    从预先设定的多个目标矫正策略中确定与所述当前工作模式匹配的至少一个目标矫正策略;以及
    基于所述至少一个目标矫正策略和所述姿态信息,对采集的图像进行旋转矫正。
  27. 根据权利要求25所述的设备,其中,所述对所述图像采集设备采集的图像进行旋转矫正,包括以下至少之一:
    控制所述图像采集设备的感光装置对采集的图像进行旋转矫正;
    控制所述图像采集设备的图像处理装置对采集的图像进行旋转矫正;
    控制所述图像采集设备的图像显示装置对采集的图像进行旋转矫正;以及
    为采集的图像设置旋转标识,以在采集的图像被传输至外部设备进行显示时基于所述旋转标识对采集的图像进行旋转矫正。
  28. 根据权利要求26所述的设备,其中,所述基于所述至少一个目标矫正策略和所述姿态信息,对采集的图像进行旋转矫正,包括:
    从预先设定的多个角度范围中确定与所述旋转角度对应的目标角度范围;
    确定与所述目标角度范围对应的目标矫正角度;以及
    基于所述至少一个目标矫正策略和所述目标矫正角度,对采集的图像进行旋转矫正;
    其中,所述多个角度范围中的每个角度范围对应一个矫正角度,所述多个角度范围对应的多个矫正角度包括90°、180°和270°。
  29. 根据权利要求26或28所述的设备,其中,
    所述图像采集设备的工作模式包括预览模式、拍照模式和录像模式中的至少一个;
    所述多个矫正策略包括以下中的至少一个:
    与所述预览模式匹配的至少一个第一矫正策略;
    与所述拍照模式匹配的至少一个第二矫正策略;
    与所述录像模式匹配的至少一个第三矫正策略。
  30. 根据权利要求29所述的设备,其中,所述至少一个第二矫正策略包括以下至少之一:
    在矫正角度为180°的情况下,控制所述图像采集设备的感光装置将采集的图像沿所述特定方向旋转180°;
    在矫正角度为90°或270°的情况下,控制所述图像采集设备的图像处理装置将采集的图像沿所述特定方向旋转90°或270°;
    在所述图像采集设备处于自拍状态的情况下,控制所述图像采集设备的图像显示装置对采集的图像进行镜像翻转矫正。
  31. 根据权利要求29所述的设备,其中,所述至少一个第三矫正策略包括以下至少之一:
    在矫正角度为90°或270°的情况下,为采集的图像设置旋转标识,以在采集的图像被传输至外部设备进行显示时基于所述旋转标识对采集的图像进行旋转矫正;
    在矫正角度为180°的情况下,控制所述图像采集设备的感光装置将采集的图像沿所述特定方向旋转180°,并且控制所述图像采集设备的图像显示装置将从所述感光装置接收的图像沿所述特定方向旋转180°;
    在所述图像采集设备处于自拍状态的情况下,控制所述图像显示装置对采集的图像进行镜像翻转矫正。
  32. 根据权利要求29所述的设备,其中,所述至少一个第一矫正策略包括以下至少之一:
    在矫正角度为90°或者180°或者270°的情况下,锁定所述图像采集设备的感光装置、图像处理装置和图像显示装置;
    在所述图像采集设备处于自拍状态的情况下,控制所述图像显示装置对采集的图像进行镜像翻转矫正。
  33. 根据权利要求31所述的设备,其中,所述基于所述至少一个目标矫正策略和所述姿态信息,对采集的图像进行旋转矫正,包括:
    基于所述姿态信息确定所述图像采集设备在录像模式下采集预定数量帧图像时的姿态;
    从所述至少一个第三矫正策略中确定与所述姿态对应的第三矫正策略;
    基于所述与所述姿态对应的第三矫正策略,对录像模式下采集的图像进行旋转矫正。
  34. 根据权利要求33所述的设备,其中,所述预定数量帧为第一帧。
  35. 根据权利要求25所述的设备,其中,所述对采集的图像进行镜像翻转矫正包括:将采集的图像沿图像的横轴进行镜像翻转。
  36. 根据权利要求25所述的设备,其中,所述处理器还执行以下操作:
    确定所述图像采集设备采集图像时是否处于异常姿态以及自拍状态;
    若是,在执行所述基于所述姿态信息对所述图像采集设备采集的图像进行旋转矫正操作的同时或之前或之后,对采集的图像进行镜像翻转矫正。
  37. 一种计算机可读存储介质,其上存储有可执行指令,该指令被处理器执行时使处理器执行权利要求1至12中任一项所述的图像矫正方法。
PCT/CN2020/111200 2020-08-26 2020-08-26 图像矫正方法和装置、图像采集设备和存储介质 WO2022040951A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080035367.0A CN113841386A (zh) 2020-08-26 2020-08-26 图像矫正方法和装置、图像采集设备和存储介质
PCT/CN2020/111200 WO2022040951A1 (zh) 2020-08-26 2020-08-26 图像矫正方法和装置、图像采集设备和存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/111200 WO2022040951A1 (zh) 2020-08-26 2020-08-26 图像矫正方法和装置、图像采集设备和存储介质

Publications (1)

Publication Number Publication Date
WO2022040951A1 true WO2022040951A1 (zh) 2022-03-03

Family

ID=78963299

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/111200 WO2022040951A1 (zh) 2020-08-26 2020-08-26 图像矫正方法和装置、图像采集设备和存储介质

Country Status (2)

Country Link
CN (1) CN113841386A (zh)
WO (1) WO2022040951A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116887036A (zh) * 2023-08-04 2023-10-13 深圳市卓锐通电子有限公司 图像自动水平矫正的拍照方法及相关设备

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023201574A1 (zh) * 2022-04-20 2023-10-26 深圳市大疆创新科技有限公司 无人机的控制方法、图像显示方法、无人机及控制终端
CN115297260A (zh) * 2022-07-29 2022-11-04 维沃移动通信有限公司 图像处理方法及其装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101507261A (zh) * 2006-08-18 2009-08-12 索尼爱立信移动通讯股份有限公司 用于相机的角度校正
CN103152489A (zh) * 2013-03-25 2013-06-12 锤子科技(北京)有限公司 一种自拍图像的展现方法及装置
CN107563960A (zh) * 2017-08-30 2018-01-09 惠州Tcl移动通信有限公司 一种自拍图片的处理方法、存储介质及移动终端
CN108229410A (zh) * 2018-01-12 2018-06-29 深圳市商汤科技有限公司 图像处理方法和设备
CN108401115A (zh) * 2018-04-28 2018-08-14 北京心领神绘科技有限公司 一种便携图像采集终端的自动修正采集装置及方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6518069B2 (ja) * 2015-01-09 2019-05-22 キヤノン株式会社 表示装置、撮像システム、表示装置の制御方法、プログラム、及び記録媒体

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101507261A (zh) * 2006-08-18 2009-08-12 索尼爱立信移动通讯股份有限公司 用于相机的角度校正
CN103152489A (zh) * 2013-03-25 2013-06-12 锤子科技(北京)有限公司 一种自拍图像的展现方法及装置
CN105163017A (zh) * 2013-03-25 2015-12-16 锤子科技(北京)有限公司 一种自拍图像的展现方法及装置
CN107563960A (zh) * 2017-08-30 2018-01-09 惠州Tcl移动通信有限公司 一种自拍图片的处理方法、存储介质及移动终端
CN108229410A (zh) * 2018-01-12 2018-06-29 深圳市商汤科技有限公司 图像处理方法和设备
CN108401115A (zh) * 2018-04-28 2018-08-14 北京心领神绘科技有限公司 一种便携图像采集终端的自动修正采集装置及方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116887036A (zh) * 2023-08-04 2023-10-13 深圳市卓锐通电子有限公司 图像自动水平矫正的拍照方法及相关设备

Also Published As

Publication number Publication date
CN113841386A (zh) 2021-12-24

Similar Documents

Publication Publication Date Title
WO2022040951A1 (zh) 图像矫正方法和装置、图像采集设备和存储介质
WO2017067520A1 (zh) 具有双目摄像头的移动终端及其拍照方法
JP6263623B2 (ja) 画像生成方法及びデュアルレンズ装置
WO2021012855A1 (zh) 一种全景图像生成系统及全景图像生成方法
US11323621B2 (en) Image communication system, image capturing device, communication terminal, and mode switching method
US10404915B1 (en) Method and system for panoramic video image stabilization
CN107197137B (zh) 图像处理装置、图像处理方法以及记录介质
JP6135848B2 (ja) 撮像装置、画像処理装置および画像処理方法
WO2013181889A1 (zh) 拍摄装置、拍摄图像的处理方法及装置
US8823814B2 (en) Imaging apparatus
JP2019082768A (ja) 画像処理装置、表示装置、画像処理方法、プログラム
JP6128458B2 (ja) 撮像装置および画像処理方法
KR102399513B1 (ko) 광각 촬영장치 및 이를 포함하는 모바일 기기
US9344630B2 (en) Imaging apparatus, imaging method and recording medium
JP6312426B2 (ja) 撮像装置およびその制御方法
US11128814B2 (en) Image processing apparatus, image capturing apparatus, video reproducing system, method and program
WO2023241495A1 (zh) 拍摄方法及其装置
TW201536050A (zh) 可修正偏移視角的影像擷取方法、電腦程式產品暨其影像擷取裝置
JP2003219239A (ja) デジタルカメラ
JP2007333929A (ja) 映像表示システム
US10051192B1 (en) System and apparatus for adjusting luminance levels of multiple channels of panoramic video signals
CN112492213B (zh) 图像拍摄方法、装置和电子设备
CN111541850A (zh) 一种全景电子云台矫正方法及装置
JP5742301B2 (ja) 画像投影装置、デジタルカメラ及び光学機器
CN110875998A (zh) 全景照相装置及其影像映射结合方法

Legal Events

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

Ref document number: 20950624

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

Country of ref document: EP

Kind code of ref document: A1