WO2021098544A1 - 图像处理方法及装置、存储介质、电子设备 - Google Patents

图像处理方法及装置、存储介质、电子设备 Download PDF

Info

Publication number
WO2021098544A1
WO2021098544A1 PCT/CN2020/127605 CN2020127605W WO2021098544A1 WO 2021098544 A1 WO2021098544 A1 WO 2021098544A1 CN 2020127605 W CN2020127605 W CN 2020127605W WO 2021098544 A1 WO2021098544 A1 WO 2021098544A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
pixel
camera
pixel value
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2020/127605
Other languages
English (en)
French (fr)
Inventor
黄孝养
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Realme Chongqing Mobile Communications Co Ltd
Original Assignee
Realme Chongqing Mobile Communications Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Realme Chongqing Mobile Communications Co Ltd filed Critical Realme Chongqing Mobile Communications Co Ltd
Priority to EP20889082.2A priority Critical patent/EP4064176B1/en
Publication of WO2021098544A1 publication Critical patent/WO2021098544A1/zh
Priority to US17/750,005 priority patent/US20220279124A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • H—ELECTRICITY
    • H04—ELECTRIC COMMUNICATION TECHNIQUE
    • H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60—Control of cameras or camera modules
    • H04N23/68—Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/682—Vibration or motion blur correction
    • H04N23/683—Vibration or motion blur correction performed by a processor, e.g. controlling the readout of an image memory
    • H—ELECTRICITY
    • H04—ELECTRIC COMMUNICATION TECHNIQUE
    • H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80—Camera processing pipelines; Components thereof
    • H04N23/81—Camera processing pipelines; Components thereof for suppressing or minimising disturbance in the image signal generation
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00—Geometric image transformations in the plane of the image
    • G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00—Image enhancement or restoration
    • G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00—Image enhancement or restoration
    • G06T5/70—Denoising; Smoothing
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00—Image enhancement or restoration
    • G06T5/73—Deblurring; Sharpening
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00—Image enhancement or restoration
    • G06T5/80—Geometric correction
    • H—ELECTRICITY
    • H04—ELECTRIC COMMUNICATION TECHNIQUE
    • H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/45—Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from two or more image sensors being of different type or operating in different modes, e.g. with a CMOS sensor for moving images in combination with a charge-coupled device [CCD] for still images
    • H—ELECTRICITY
    • H04—ELECTRIC COMMUNICATION TECHNIQUE
    • H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60—Control of cameras or camera modules
    • H04N23/68—Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/681—Motion detection
    • H04N23/6812—Motion detection based on additional sensors, e.g. acceleration sensors
    • H—ELECTRICITY
    • H04—ELECTRIC COMMUNICATION TECHNIQUE
    • H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/90—Arrangement of cameras or camera modules, e.g. multiple cameras in TV studios or sports stadiums
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00—Indexing scheme for image analysis or image enhancement
    • G06T2207/20—Special algorithmic details
    • G06T2207/20112—Image segmentation details
    • G06T2207/20132—Image cropping
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00—Indexing scheme for image analysis or image enhancement
    • G06T2207/20—Special algorithmic details
    • G06T2207/20172—Image enhancement details
    • G06T2207/20201—Motion blur correction
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00—Indexing scheme for image analysis or image enhancement
    • G06T2207/20—Special algorithmic details
    • G06T2207/20212—Image combination
    • G06T2207/20221—Image fusion; Image merging
    • H—ELECTRICITY
    • H04—ELECTRIC COMMUNICATION TECHNIQUE
    • H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00—Details of television systems
    • H04N5/222—Studio circuitry; Studio devices; Studio equipment
    • H04N5/262—Studio 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/265—Mixing

Definitions

  • the present disclosure relates to the field of image processing technology, and in particular, to an image processing method, an image processing device, an electronic device, and a computer-readable storage medium.
  • the video capture device usually shakes to a certain degree, which causes the recorded video image to be unstable and affects the video shooting effect.
  • the effect of video anti-shake can be achieved through image anti-shake technology.
  • related methods lead to reduced image sharpness and frame reduction.
  • the purpose of the present disclosure is to provide an image processing method, an image processing device, an electronic device, and a computer-readable storage medium, so as to overcome to a certain extent the limitations and defects of the related technology caused by the image shake correction.
  • the problem of reduced sharpness and reduced frame size is to provide an image processing method, an image processing device, an electronic device, and a computer-readable storage medium, so as to overcome to a certain extent the limitations and defects of the related technology caused by the image shake correction.
  • an image processing method including:
  • an image processing device including:
  • An image acquisition module for respectively acquiring a first image taken by a first camera and a second image taken by a second camera, the first camera and the second camera have different field angles;
  • An image fusion module configured to determine a fusion image according to the first image and the second image
  • the image shake correction module is used to perform image shake correction on the fused image to obtain an output image.
  • an electronic device including:
  • the first camera is used to shoot the first image
  • a second camera for shooting a second image and the first camera and the second camera have different field angles;
  • a processor and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the above-mentioned image processing method by executing the executable instructions.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the foregoing image processing method is implemented.
  • the images taken by two cameras with different angles of view are merged, so that the larger image can compensate for the image jitter of the smaller image.
  • the frame loss during correction so as to preserve the frame of the image as much as possible.
  • image fusion can improve the clarity of the image. For example, when the field of view of the first camera is larger and the definition of the second camera is higher, it is possible to reduce the loss of the image frame while increasing the clarity of the image, thereby achieving a better anti-shake effect and improving The user’s shooting experience.
  • Figure 1 shows a schematic diagram of a cropped image in the image plane when the camera is stationary and the camera is rotating;
  • FIG. 2 shows a flowchart of an image processing method according to an embodiment of the present disclosure
  • Figure 3 shows a schematic diagram of the calibration checkerboard
  • Fig. 4 shows a flow chart of a method for determining a fusion image in an embodiment of the present disclosure
  • FIG. 5 shows a schematic diagram of the stitching area of the third image and the second image
  • FIG. 6 shows a schematic structural diagram of an image processing device according to an embodiment of the present disclosure
  • FIG. 7 shows a schematic structural diagram of a computer system suitable for implementing an electronic device of an embodiment of the present disclosure.
  • image stabilization technologies include: optical image stabilization algorithms and electronic image stabilization algorithms.
  • the optical image stabilization algorithm is usually used in high-end cameras or terminal equipment due to complex design structures and high costs.
  • the electronic image stabilization algorithm does not require additional device structure design, and only needs to be equipped with the terminal equipment's own gyroscope to achieve a better video anti-shake effect from the software algorithm, and is widely used in terminal equipment.
  • the angular velocity of the three axes of the video capture device can be detected in real time through the gyroscope, and the edge cropping area can be used for reverse compensation to stabilize the picture pixels within a certain range to achieve image stabilization.
  • Figure 1 shows a schematic diagram of a cropped image in the image plane when the camera is stationary and the camera is rotating.
  • the larger the preset cropping area the smaller the cropped image obtained, and the stronger the anti-shake ability.
  • it also leads to the lower the sharpness of the image and the smaller the frame size.
  • the present disclosure provides an image processing method, image processing device, electronic equipment, and computer-readable storage medium, which can perform image shake correction At the same time, improve the sharpness of the image and enlarge the frame of the image.
  • FIG. 2 shows a flowchart of an image processing method according to an embodiment of the present disclosure, which may include the following steps:
  • step S210 a first image taken by the first camera and a second image taken by the second camera are respectively acquired, and the field of view angles of the first camera and the second camera are different.
  • Step S220 Determine a fusion image according to the first image and the second image.
  • Step S230 Perform image shake correction on the fused image to obtain an output image.
  • the images taken by the two cameras with different angles of view are merged, so that the larger image can make up for the loss of the smaller image during image shake correction. Keep the frame of the image as much as possible. And, image fusion can improve the clarity of the image. For example, when the field of view of the first camera is larger and the definition of the second camera is higher, it is possible to reduce the loss of the image frame while increasing the clarity of the image, thereby achieving a better anti-shake effect and improving The user’s shooting experience.
  • step S210 a first image taken by the first camera and a second image taken by the second camera are respectively acquired.
  • the execution subject of the embodiments of the present disclosure may be a video capture device, for example, a smart phone, a tablet computer, a camera, etc.
  • the video capture device may be configured with two cameras, of course, it may also be configured with more cameras.
  • two cameras for example, the first camera and the second camera
  • the first camera and the second camera can shoot the same content at the same time to generate the first image and the second image respectively, and the first camera and the second camera have different field angles.
  • the first camera when the field of view of the first camera is greater than the field of view of the second camera, the first camera can be a wide-angle camera.
  • the wide-angle camera has a shorter focal length and a larger field of view, which allows you to shoot at a shorter distance. Wide scenery.
  • the first camera in order to make the field of view of the first camera as large as possible, the first camera may also be an ultra-wide-angle camera.
  • the second camera may be a high-definition camera.
  • the angle of view of the second camera when the angle of view of the second camera is greater than the angle of view of the first camera, the second camera may be a wide-angle camera or an ultra-wide-angle camera, and the first camera may be a high-definition camera.
  • the wide-angle camera can be a device with a photosensitive area or a resolution lower than that of a high-definition camera.
  • the present disclosure is described by taking an example in which the angle of view of the first camera is greater than the angle of view of the second camera.
  • step S220 a fusion image is determined based on the first image and the second image.
  • the angle of view of the first camera is greater than the angle of view of the second camera
  • the resulting fused image is compared with the second image. Will increase. In this way, when performing image shake correction on the fused image, the loss of the angle of view can be compensated.
  • the larger the field of view of the camera the more likely the captured image is to be distorted.
  • distortion correction and image scaling can be performed sequentially on the first image to obtain a third image.
  • the first camera can be calibrated for distortion.
  • the distortion of the image includes radial distortion and tangential distortion.
  • the distortion coefficient can be obtained from the captured checkerboard image. Refer to Figure 3 for a schematic diagram of the checkerboard calibration.
  • r 2 u 2 +v 2
  • (u,v) are ideal coordinates
  • (u',v') are coordinates after radial distortion
  • (u′′,v′′) are coordinates after tangential distortion.
  • cx, cy, fx, fy are camera internal parameters, which can also be obtained through checkerboard calibration
  • (u 0 ,v 0 ) are the pixel coordinates after distortion correction
  • (u 1 ,v 1 ) are (u 0 ,v 0 )
  • Corresponding pixel coordinates before distortion correction The pixel values of the (u 1 , v 1 ) coordinate points in the image before the distortion correction are sequentially filled into the (u 0 , v 0 ) coordinates of the image after the distortion correction, and the image distortion correction process is completed.
  • the image scaling formula can be used:
  • (x',y') is the coordinate of the pixel after zooming
  • (x,y) is the coordinate of the pixel before zooming
  • p 1 and w 1 respectively represent the physical size of the effective photosensitive area of the image sensor in the first camera
  • p 2 and w 2 respectively represent the width of the physical size of the effective photosensitive area of the image sensor in the second camera and the number of pixels in the horizontal direction.
  • Image scaling refers to the process of adjusting the size of the image.
  • the image scaling in the embodiments of the present disclosure refers to increasing the size of the image, so that the enlarged image (that is, the third image) has the same pixel ratio as the second image.
  • the image can be spliced directly with the second image.
  • a mapping relationship between the coordinates of the pixel points in the second image and the coordinates of the pixel points in the third image can be generated.
  • the distortion correction formula, and the image scaling formula, the third image and the second image can be fused to obtain a fused image.
  • the process of determining the fusion image can be seen in Figure 4, which may include the following steps:
  • Step S410 stitching the third image and the second image, and determining the stitching area of the third image and the second image.
  • the third image and the second image can be stitched through the Stitching module in Opencv (open source computer vision library), and the mapping between the coordinates of the pixels in the second image and the coordinates of the pixels in the third image can be obtained relationship.
  • Opencv can implement many general algorithms in image processing and computer vision.
  • the Stitching module can implement image stitching.
  • step S420 smoothing is performed on the pixel values of the pixels in the splicing area to obtain a smoothed pixel value.
  • FIG. 5 shows a schematic diagram of the stitching area of the third image and the second image. It can be seen that the third image can be used as the background, the second image can be used as the foreground, and the stitching area is the shadow area.
  • the splicing area can be smoothed.
  • the pixel value of the pixel can be compared with the target corresponding to the pixel in the third image.
  • the pixel value of the pixel is weighted and averaged to obtain the smoothed pixel value.
  • the pixel value of the pixel in the second image can be directly obtained, and the pixel value of the target pixel in the third image can be determined in the following way:
  • the coordinates of any pixel in the splicing area in the second image can be obtained first, and the coordinates of the target pixel can be determined according to the mapping relationship between the coordinates and the coordinates obtained when the previous image is spliced.
  • the initial pixel point corresponding to the target pixel point in the first image is determined.
  • the third image is obtained by performing distortion correction and image scaling processing on the first image. Therefore, according to the coordinates of the target pixel, through the aforementioned The distortion correction formula and the image scaling formula are obtained to obtain the initial pixel point corresponding to the target pixel point in the first image.
  • the pixel value of the initial pixel is taken as the pixel value of the target pixel.
  • the coordinates of any pixel in the splicing area in the third image can also be directly determined, and the corresponding pixel in the second image can be determined according to the mapping relationship between the coordinates. coordinate of.
  • the pixel value of the pixel and the pixel value of the target pixel corresponding to the pixel in the second image are weighted and averaged to obtain a smoothed pixel value.
  • the weighted smoothing algorithm can quickly and simply deal with the problem of splicing seams.
  • d1+d2 w
  • w represents the width of the splicing area
  • d1, d2 respectively represent the distance from the pixels in the splicing area to the left and right borders of the splicing area
  • d1, d2 Respectively represent the distances from the pixels in the splicing area to the upper and lower borders of the splicing area.
  • the shaded part (ie, the splicing area) in Figure 5 can be divided into four areas, top, bottom, left, and right. The left and right areas are left and right splicing, and the upper and lower areas are top and bottom splicing.
  • step S430 the smoothed pixel value is used as the pixel value of the pixel in the splicing area.
  • the pixel value of the pixel in the area may be the pixel value of the pixel in the second image; for the non-spliced area outside the spliced area, the pixel in the area The pixel value of the dot may be the pixel value of the pixel in the third image. At this point, the pixel values of the pixels in all areas can be determined, that is, the fused image can be obtained.
  • step S230 image shake correction is performed on the fused image to obtain an output image.
  • the image shake correction of the fused image can be performed through the electronic image stabilization algorithm.
  • the angular velocity of the three axes of the video capture device can be detected in real time by the gyroscope, and the edge cropping area can be used for reverse compensation to stabilize the picture pixels within a certain range and achieve the effect of image stabilization.
  • the larger the cropping area the smaller the cropped image, the stronger the anti-shake ability, and the lower the sharpness and frame of the image.
  • the frame of the cropped image obtained is greater than or equal to the frame of the second image.
  • the cropping area can be the edge area of the third image, and the edge area of the third image is used as anti-shake compensation without cropping the area where the second image is located.
  • An image with a larger image frame can compensate for the loss of field of view and increase the image frame.
  • the image processing method of the embodiment of the present disclosure can provide the user with a wide-angle ultra-definition video mode. It is also possible to obtain a video with a larger frame and higher definition, which can enhance the user's shooting experience.
  • image processing method of the embodiment of the present disclosure two images with different angles of view are merged, so that the image with a larger angle of view can compensate for the difference of the angle of view of the image with a smaller angle of view during image shake correction. Loss, so as to maximize the preservation of the image frame.
  • image fusion can improve the definition of the image, and the quality of the image can be improved by smoothing the spliced area of the fused image. For example, when the field of view of the first camera is larger and the resolution of the second camera is higher, even if the resolution of the first camera is poor, the sharpness of the image edge will only be slightly lower than that of the main frame when the image is shaken. However, users are usually insensitive to edge images. Therefore, the present disclosure can improve image clarity while reducing image frame loss, so as to achieve a better anti-shake effect and improve the user's shooting experience.
  • an image processing device 600 is also provided, as shown in FIG. 6, including:
  • the image acquisition module 610 is configured to respectively acquire a first image taken by a first camera and a second image taken by a second camera, and the first camera and the second camera have different field angles;
  • the image fusion module 620 is configured to determine a fusion image according to the first image and the second image;
  • the image shake correction module 630 is used to perform image shake correction on the fused image to obtain an output image.
  • the image fusion module includes:
  • the preprocessing unit is configured to sequentially perform distortion correction and image scaling processing on the first image to obtain a third image, wherein the field angle of the first camera is greater than the field angle of the second camera;
  • the fusion unit is used for fusing the third image and the second image to obtain a fused image.
  • the fusion unit is specifically configured to splice the third image and the second image to determine the splicing area of the third image and the second image; perform smoothing processing on the pixel values of the pixels in the splicing area to obtain smoothed pixels Value; use the smoothed pixel value as the pixel value of the pixel in the splicing area.
  • the fusion unit implements smoothing processing on the pixel values of pixels in the splicing area through the following steps to obtain smoothed pixel values:
  • the pixel value of the pixel and the pixel value of the target pixel in the third image corresponding to the pixel are weighted and averaged to obtain the smoothed pixel value .
  • the fusion unit is also used to determine the coordinates of the target pixel; according to the coordinates of the target pixel, determine the initial pixel corresponding to the target pixel in the first image; take the pixel value of the initial pixel as the target pixel's Pixel values.
  • an image shake correction module is used to perform image shake correction on the fused image through an electronic image stabilization algorithm.
  • the frame of the cropped image obtained is greater than or equal to the frame of the second image.
  • modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory.
  • the features and functions of two or more modules or units described above may be embodied in one module or unit.
  • the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.
  • an electronic device including: a first camera for shooting a first image; a second camera for shooting a second image, the view of the first camera and the second camera The field angles are different; a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to execute all or part of the steps of the image processing method in this exemplary embodiment.
  • Fig. 7 shows a schematic structural diagram of a computer system used to implement an electronic device of an embodiment of the present disclosure. It should be noted that the computer system 700 of the electronic device shown in FIG. 7 is only an example, and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
  • the computer system 700 includes a central processing unit (CPU) 701, which can be based on a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703 And perform various appropriate actions and processing.
  • CPU 701 the ROM 702
  • RAM 703 random access memory
  • various programs and data required for system operation are also stored.
  • the CPU 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704.
  • An input/output (I/O) interface 705 is also connected to the bus 704.
  • the following components are connected to the I/O interface 705: an input part 706 including a keyboard, a mouse, a first camera, a second camera, etc.; an output part 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and speakers, etc.
  • the communication section 709 performs communication processing via a network such as the Internet.
  • the drive 710 is also connected to the I/O interface 705 as needed.
  • a removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that the computer program read therefrom is installed into the storage section 708 as needed.
  • an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication part 709, and/or installed from the removable medium 711.
  • CPU central processing unit
  • a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to implement the method described in any one of the above items.
  • the computer-readable storage medium shown in the present disclosure may be, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above, for example. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable removable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
  • the computer-readable medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wireless, wire, optical cable, radio frequency, etc., or any suitable combination of the above.

Landscapes

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

Abstract

一种图像处理方法及装置、电子设备、存储介质,涉及图像处理技术领域。所述方法包括:分别获取第一摄像头拍摄的第一图像和第二摄像头拍摄的第二图像,第一摄像头和所述第二摄像头的视场角不同(S210);根据第一图像和第二图像,确定融合图像(S220);对融合图像进行图像抖动校正,得到输出图像(S230)。该方法可以提高图像的清晰度,增大图像的画幅。

Description

图像处理方法及装置、存储介质、电子设备
交叉引用
本公开要求于2019年11月20日提交的申请号为201911144463.4,名称为“图像处理方法及装置、存储介质、电子设备”的中国专利申请的优先权,该中国专利申请的全部内容通过引用全部并入本文。
技术领域
本公开涉及图像处理技术领域,具体而言,涉及一种图像处理方法、图像处理装置、电子设备以及计算机可读存储介质。
背景技术
在视频拍摄过程中,视频采集设备通常会出现一定程度的抖动,导致录制的视频画面不稳,影响视频拍摄效果。目前,可以通过图像防抖技术达到视频防抖的效果。然而,相关方法导致图像的清晰度降低、画幅减小。
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。
公开内容
本公开的目的在于提供一种图像处理方法、图像处理装置、电子设备以及计算机可读存储介质,进而在一定程度上克服由于相关技术的限制和缺陷而导致的,在进行图像抖动校正时图像的清晰度降低和画幅减小的问题。
根据本公开的第一方面,提供一种图像处理方法,包括:
分别获取第一摄像头拍摄的第一图像和第二摄像头拍摄的第二图像,所述第一摄像头和所述第二摄像头的视场角不同;
根据所述第一图像和所述第二图像,确定融合图像;
对所述融合图像进行图像抖动校正,得到输出图像。
根据本公开的第二方面,提供一种图像处理装置,包括:
图像获取模块,用于分别获取第一摄像头拍摄的第一图像和第二摄像头拍摄的第二图像,所述第一摄像头和所述第二摄像头的视场角不同;
图像融合模块,用于根据所述第一图像和所述第二图像,确定融合图像;
图像抖动校正模块,用于对所述融合图像进行图像抖动校正,得到输出图像。
根据本公开的第三方面,提供一种电子设备,包括:
第一摄像头,用于拍摄第一图像;
第二摄像头,用于拍摄第二图像,所述第一摄像头和所述第二摄像头的视场角不同;
处理器;以及存储器,用于存储所述处理器的可执行指令;其中,所述处理器配置为经由执行所述可执行指令来执行上述图像处理方法。
根据本公开的第四方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述图像处理方法。
本公开示例性实施例可以具有以下部分或全部有益效果:
在本公开的一示例实施方式所提供的图像处理方法中,通过将视场角不同的两个摄像头拍摄的图像进行融合,这样,画幅较大的图像可以弥补画幅较小的图像在进行图像抖动校正时画幅的损失,从而最大限度地保留图像的画幅。并且,图像融合可以提高图像的清晰度。例如,在第一摄像头的视场角较大,第二摄像头的清晰度较高的情况下,可以在降低图像画幅损失的同时,提高图像的清晰度,从而达到更好的防抖效果,提升用户的拍摄体验。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了相机静止和相机转动时裁剪图像在图像平面中的示意图;
图2示出了本公开实施例的图像处理方法的一种流程图;
图3示出了标定棋盘格的示意图;
图4示出了本公开实施例中融合图像的确定方法的一种流程图;
图5示出了第三图像和第二图像的拼接区域的示意图;
图6示出了本公开实施例的图像处理装置的结构示意图;
图7示出了适于用来实现本公开实施例的电子设备的计算机系统的结构示意图。
具体实施方式
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结 构或特性可以以任何合适的方式结合在一个或更多实施方式中。在下面的描述中,提供许多具体细节从而给出对本公开的实施方式的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而省略所述特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知技术方案以避免喧宾夺主而使得本公开的各方面变得模糊。
此外,附图仅为本公开的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
目前,图像防抖技术包括:光学图像增稳算法和电子图像增稳算法等。其中,光学图像增稳算法由于设计结构复杂、成本较高等原因,通常用于高端相机或终端设备。而电子图像增稳算法由于无需额外的器件结构设计,仅需搭配终端设备自带的陀螺仪便可从软件算法上实现较好的视频防抖效果,而广泛应用于终端设备中。
例如,在电子图像增稳算法中,可以通过陀螺仪实时检测视频采集设备三个轴的运动角速度,通过边缘裁剪区域做反向补偿,使画面像素点在一定范围内稳定,达到图像增稳的效果。参见图1,图1示出了相机静止和相机转动时裁剪图像在图像平面中的示意图,预设的裁剪区域越大,得到的裁剪图像越小,防抖能力越强。但是,也导致图像的清晰度越低、画幅越小。
为了解决相关技术中进行图像抖动校正时图像清晰度降低和画幅减小的问题,本公开提供了一种图像处理方法、图像处理装置、电子设备以及计算机可读存储介质,可以在进行图像抖动校正时,提高图像的清晰度、增大图像的画幅。
参见图2,图2示出了本公开实施例的图像处理方法的一种流程图,可以包括以下步骤:
步骤S210,分别获取第一摄像头拍摄的第一图像和第二摄像头拍摄的第二图像,第一摄像头和第二摄像头的视场角不同。
步骤S220,根据第一图像和第二图像,确定融合图像。
步骤S230,对融合图像进行图像抖动校正,得到输出图像。
本公开实施例的图像处理方法中,将视场角不同的两个摄像头拍摄的图像进行融合,这样,画幅较大的图像可以弥补画幅较小的图像在进行图像抖动校正时画幅的损失,从而最大限度地保留图像的画幅。并且,图像融合可以提高图像的清晰度。例如,在第一摄像头的视场角较大,第二摄像头的清晰度较高的情况下,可以在降低图像画幅损失的同时,提高图像的清晰度,从而达到更好的防抖效果,提升用户的拍摄体验。
以下对本公开实施例的图像处理方法进行更加详细的介绍。
在步骤S210中,分别获取第一摄像头拍摄的第一图像和第二摄像头拍摄的第二图像。
本公开实施例的执行主体可以是视频采集设备,例如,可以是智能手机、平板电脑、 相机等,该视频采集设备可以配置有两个摄像头,当然,也可以配置有更多个摄像头。在此,以两个摄像头(例如第一摄像头和第二摄像头)为例进行说明。其中,第一摄像和第二摄像头可以同时拍摄相同的内容,分别生成第一图像和第二图像,第一摄像头和第二摄像头的视场角不同。
可选的,在第一摄像头的视场角大于第二摄像头的视场角时,第一摄像头可以为广角摄像头,广角摄像头的焦距较短,视场角较大,可于较近距离拍摄范围宽阔的景物。当然,为了使第一摄像头的视场角尽可能大,第一摄像头也可以为超广角摄像头。为了提高第二图像的清晰度,第二摄像头可以为高清摄像头。相反地,在第二摄像头的视场角大于第一摄像头的视场角时,第二摄像头可以为广角摄像头,或者为超广角摄像头,第一摄像头可以为高清摄像头。广角摄像头可以是感光面积或分辨率低于高清摄像头的器件。本公开以第一摄像头的视场角大于第二摄像头的视场角为例进行说明。
在步骤S220中,根据第一图像和第二图像,确定融合图像。
本公开实施例中,在第一摄像头的视场角大于第二摄像头的视场角时,将第一图像和第二图像进行融合之后,得到的融合图像与第二图像相比,视场角将增大。这样,在对融合图像进行图像抖动校正时,可以弥补视场角的损失。
可以理解的是,摄像头的视场角越大,拍摄的图像越容易发生畸变。那么,对于视场角较大的第一摄像头拍摄的第一图像,可以对其依次进行畸变校正及图像缩放处理,得到第三图像。具体的,首先可以对第一摄像头做畸变标定,图像的畸变包括:径向畸变和切向畸变,可以通过拍摄的棋盘格图像求得畸变系数,标定棋盘格的示意图可参见图3。
其中,径向畸变的数学模型为:
Figure PCTCN2020127605-appb-000001
切向畸变的数学模型为:
Figure PCTCN2020127605-appb-000002
其中,r 2=u 2+v 2,(u,v)是理想坐标,(u′,v′)是径向畸变后的坐标,(u″,v″)是切向畸变后的坐标。通过棋盘格标定可以得到畸变参数k 1、k 2、k 3、p 1、p 2的值。
之后,可以根据以下畸变校正公式:
Figure PCTCN2020127605-appb-000003
计算得到(u 0,v 0)对应的(u 1,v 1)。
其中,cx、cy、fx、fy为相机内参,也可以通过棋盘格标定得到,(u 0,v 0)是畸变校正之后的像素点坐标,(u 1,v 1)是(u 0,v 0)对应的畸变校正之前的像素点坐标。依次将畸变校正之前图像中(u 1,v 1)坐标点的像素值填充到畸变校正后图像(u 0,v 0)坐标中,即完成了图像畸变校正过程。
在对第一图像进行畸变校正之后,可以根据图像缩放公式:
Figure PCTCN2020127605-appb-000004
对畸变校正后的图像进行图像缩放处理。
其中,(x′,y′)是缩放后的像素点坐标,(x,y)是缩放前的像素点坐标,p 1和w 1分别表示第一摄像机中图像传感器的有效感光面积的物理尺寸的宽度和水平方向像素点的数量,p 2和w 2分别表示第二摄像机中图像传感器的有效感光面积的物理尺寸的宽度和水平方向像素点的数量。
图像缩放是指对图像的大小进行调整的过程,本公开实施例中的图像缩放指的是调大图像,这样,调大后的图像(即第三图像)与第二图像的像素比例相同,可以直接与第二图像进行图像的拼接。在将第三图像和第二图像进行拼接时,可以生成第二图像中像素点的坐标和第三图像中像素点的坐标之间的映射关系。根据该映射关系、畸变校正公式以及图像缩放公式,可以将第三图像和第二图像进行融合,得到融合图像。融合图像的确定过程可参见图4,可以包括以下步骤:
步骤S410,将第三图像和第二图像进行拼接,确定第三图像和第二图像的拼接区域。
具体的,可以通过Opencv(开源计算机视觉库)中的Stitching模块对第三图像和第二图像进行拼接,可以得到第二图像中像素点的坐标和第三图像中像素点的坐标之间的映射关系。其中,Opencv可以实现图像处理和计算机视觉方面的很多通用算法,例如,Stitching模块可以实现图像拼接等。
步骤S420,对拼接区域中像素点的像素值进行平滑处理,得到平滑后的像素值。
可以理解的是,由于第一摄像头的视场角较大,第一图像的画幅也较大,那么,对第一图像进行畸变校正及图像缩放处理之后,第一图像被调大,得到的第三图像和第二图像的拼接区域为第二图像的外侧环行区域。参见图5,图5示出了第三图像和第二图像的拼接区域的示意图,可以看出,第三图像可以作为背景,第二图像可以作为前景,拼接区域即为阴影区域。
在进行图像拼接之后,由于输入的第三图像和第二图像之间存在一定的亮度差异,导致拼接后的图像缝合线(即图5中阴影区域的外侧环线)两端出现明显的明暗变化。因此,可以对拼接区域做平滑处理,可选的,针对第二图像中在拼接区域中的任一像素点,可以将该像素点的像素值,和第三图像中与该像素点对应的目标像素点的像素值进行加权平均,得到平滑后的像素值。其中,第二图像中像素点的像素值可以直接获取,第三图像中的目标像素点的像素值可以通过以下方式确定:
首先,确定目标像素点的坐标。
本公开实施例中,可以先获取第二图像中在拼接区域中的任一像素点的坐标,根据该坐标以及前面图像拼接时得到的坐标之间的映射关系,可以确定目标像素点的坐标。
其次,根据目标像素点的坐标,确定第一图像中与目标像素点对应的初始像素点。
本公开实施例中,由于目标像素点是第三图像中的像素点,第三图像是对第一图像进行畸变校正和图像缩放处理后得到的,因此,可以根据目标像素点的坐标,通过前述的畸变校正公式以及图像缩放公式,得到第一图像中与目标像素点对应的初始像素点。
最后,将初始像素点的像素值作为目标像素点的像素值。
当然,本公开实施例中,也可以根据第三图像中在拼接区域中的任一像素点,直接确定该像素点的坐标,根据坐标之间的映射关系,确定第二图像中对应的像素点的坐标。将该像素点的像素值,和第二图像中与该像素点对应的目标像素点的像素值进行加权平均,得到平滑后的像素值。
本公开实施例中的加权平均公式可以为:H=d×H W+(1-d)×H M,其中,d是可调因子,0≤d≤1,沿第三图像向第二图像的方向,d由1渐变为0,H表示平滑后的像素值,H W表示第三图像中像素点的像素值,H M表示第二图像中像素点的像素值。其中,加权平滑算法可以快速简单的处理拼接缝问题。
在本公开的一种实现方式中,为使图像拼接区域中的像素点与第三图像以及第二图像建立更大的相关性,可以令d=d1/(d1+d2),即加权平均公式还可以为:
Figure PCTCN2020127605-appb-000005
Figure PCTCN2020127605-appb-000006
通过该公式进行加权平均,可以计算得到拼接区域中每个像素点的像素值。
其中,d1+d2=w,w表示拼接区域的宽度,若是左右拼接,d1,d2分别表示拼接区域中的像素点到拼接区域的左边界和右边界的距离;若是上下拼接,则d1,d2分别表示拼接区域中的像素点到拼接区域的上边界和下边界的距离。例如,可以将图5中阴影部分(即拼接区域)分成上下左右四个区域,左边区域和右边区域即为左右拼接,上边区域和下边 区域即为上下拼接。
步骤S430,将平滑后的像素值作为拼接区域中像素点的像素值。
需要说明的是,对于拼接区域以内的非拼接区域,该区域中的像素点的像素值可以是第二图像中该像素点的像素值;对于拼接区域以外的非拼接区域,该区域中的像素点的像素值可以是第三图像中该像素点的像素值。至此,可以确定所有区域中像素点的像素值,即得到融合图像。
在步骤S230中,对融合图像进行图像抖动校正,得到输出图像。
本公开实施例中,可以通过电子图像增稳算法对融合图像进行图像抖动校正。具体可以通过陀螺仪实时检测视频采集设备三个轴的运动角速度,通过边缘裁剪区域做反向补偿,使画面像素点在一定范围内稳定,达到图像增稳的效果。裁剪区域越大,裁剪图像越小,防抖能力越强,图像的清晰度和画幅就越低。可选的,在电子图像增稳算法中,对融合图像裁剪后,得到的裁剪图像的画幅大于或等于第二图像的画幅。也就是说,对融合图像裁剪时,裁剪区域可以是第三图像的边缘区域,利用第三图像的边缘区域作为防抖补偿,而不裁剪第二图像所在的区域,因此,可以得到比第二图像画幅更大的图像,从而可以弥补视场角的损失,增大图像的画幅。
可以理解的是,如果用户在稳定的环境下拍摄视频,可以不用开启电子图像增稳功能,在此情况下,本公开实施例的图像处理方法可以为用户提供一种广角超清视频模式,用户同样可以得到具有较大画幅及较高清晰度的视频,可以提升用户的拍摄体验。
本公开实施例的图像处理方法中,将视场角不同的两个图像进行融合,这样,视场角较大的图像可以弥补视场角较小的图像在进行图像抖动校正时视场角的损失,从而最大限度地保留图像的画幅。并且,图像融合可以提高图像的清晰度,并且,通过对融合图像的拼接区域进行平滑处理,可以提高图像的质量。例如,在第一摄像头的视场角较大,第二摄像头的清晰度较高的情况下,即使第一摄像头的分辨率较差,也仅仅使画面抖动时图像边缘清晰度稍低于主画幅清晰度,而用户对边缘图像通常是不敏感的,因此,本公开可以在降低图像画幅损失的同时,提高图像的清晰度,从而达到更好的防抖效果,提升用户的拍摄体验。
应当注意,尽管在附图中以特定顺序描述了本公开中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。
进一步的,本示例实施方式中,还提供了一种图像处理装置600,如图6所示,包括:
图像获取模块610,用于分别获取第一摄像头拍摄的第一图像和第二摄像头拍摄的第二图像,第一摄像头和第二摄像头的视场角不同;
图像融合模块620,用于根据第一图像和第二图像,确定融合图像;
图像抖动校正模块630,用于对融合图像进行图像抖动校正,得到输出图像。
可选的,图像融合模块,包括:
预处理单元,用于对第一图像依次进行畸变校正及图像缩放处理,得到第三图像,其中,第一摄像头的视场角大于第二摄像头的视场角;
融合单元,用于将第三图像和第二图像进行融合,得到融合图像。
可选的,融合单元具体用于将第三图像和第二图像进行拼接,确定第三图像和第二图像的拼接区域;对拼接区域中像素点的像素值进行平滑处理,得到平滑后的像素值;将平滑后的像素值作为拼接区域中像素点的像素值。
可选的,融合单元通过以下步骤实现对拼接区域中像素点的像素值进行平滑处理,得到平滑后的像素值:
针对第二图像中在拼接区域中的任一像素点,将该像素点的像素值,和第三图像中与该像素点对应的目标像素点的像素值进行加权平均,得到平滑后的像素值。
可选的,融合单元还用于确定目标像素点的坐标;根据目标像素点的坐标,确定第一图像中与目标像素点对应的初始像素点;将初始像素点的像素值作为目标像素点的像素值。
可选的,图像抖动校正模块,用于通过电子图像增稳算法对融合图像进行图像抖动校正。
可选的,在电子图像增稳算法中,对融合图像裁剪后,得到的裁剪图像的画幅大于或等于第二图像的画幅。
上述装置中各模块或单元的具体细节已经在对应的图像处理方法中进行了详细的描述,因此此处不再赘述。
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。
在本公开的示例性实施例中,还提供一种电子设备,包括:第一摄像头,用于拍摄第一图像;第二摄像头,用于拍摄第二图像,第一摄像头和第二摄像头的视场角不同;处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为执行本示例实施方式中的图像处理方法的全部或者部分步骤。
图7示出了用于实现本公开实施例的电子设备的计算机系统的结构示意图。需要说明的是,图7示出的电子设备的计算机系统700仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图7所示,计算机系统700包括中央处理单元(CPU)701,其可以根据存储在只读存储器(ROM)702中的程序或者从存储部分708加载到随机访问存储器(RAM)703中的程序而执行各种适当的动作和处理。在RAM 703中,还存储有系统操作所需的各种程序和数据。CPU 701、ROM 702以及RAM 703通过总线704彼此相连。输入/输出(I/O)接口705也连接至总线704。
以下部件连接至I/O接口705:包括键盘、鼠标、第一摄像头和第二摄像头等的输入部分706;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分707;包括硬盘等的存储部分708;以及包括诸如局域网(LAN)卡、调制解调器等的网络接口卡的通信部分709。通信部分709经由诸如因特网的网络执行通信处理。驱动器710也根据需要连接至I/O接口705。可拆卸介质711,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器710上,以便于从其上读出的计算机程序根据需要被安装入存储部分708。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分709从网络上被下载和安装,和/或从可拆卸介质711被安装。在该计算机程序被中央处理单元(CPU)701执行时,执行本申请的装置中限定的各种功能。
在本公开的示例性实施例中,还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任意一项所述的方法。
需要说明的是,本公开所示的计算机可读存储介质例如可以是—但不限于—电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、射频等等,或者上述的任意合适的组合。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可 以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。

Claims (20)

  1. 一种图像处理方法,其特征在于,所述方法包括:
    分别获取第一摄像头拍摄的第一图像和第二摄像头拍摄的第二图像,所述第一摄像头和所述第二摄像头的视场角不同;
    根据所述第一图像和所述第二图像,确定融合图像;
    对所述融合图像进行图像抖动校正,得到输出图像。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述第一图像和所述第二图像,确定融合图像,包括:
    对所述第一图像依次进行畸变校正及图像缩放处理,得到第三图像,其中,所述第一摄像头的视场角大于所述第二摄像头的视场角;
    将所述第三图像和所述第二图像进行融合,得到融合图像。
  3. 根据权利要求2所述的方法,其特征在于,所述将所述第三图像和所述第二图像进行融合,得到融合图像,包括:
    将所述第三图像和所述第二图像进行拼接,确定所述第三图像和所述第二图像的拼接区域;
    对所述拼接区域中像素点的像素值进行平滑处理,得到平滑后的像素值;
    将所述平滑后的像素值作为所述拼接区域中像素点的像素值。
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    根据所述第二图像确定所述拼接区域包围的非拼接区域的像素值,以及根据所述第三图像确定所述拼接区域以外的非拼接区域的像素值。
  5. 根据权利要求3所述的方法,其特征在于,所述对所述拼接区域中像素点的像素值进行平滑处理,得到平滑后的像素值,包括:
    针对所述第二图像中在所述拼接区域中的任一像素点,将该像素点的像素值,和所述第三图像中与该像素点对应的目标像素点的像素值进行加权平均,得到平滑后的像素值。
  6. 根据权利要求5所述的方法,其特征在于,所述第三图像中与该像素点对应的目标像素点的像素值的确定方式,包括:
    确定所述目标像素点的坐标;
    根据所述目标像素点的坐标,确定所述第一图像中与所述目标像素点对应的初始像素点;
    将所述初始像素点的像素值作为所述目标像素点的像素值。
  7. 根据权利要求5所述的方法,其特征在于,所述将该像素点的像素值,和所述第三图像中与该像素点对应的目标像素点的像素值进行加权平均,包括:
    根据该像素点在所述拼接区域中的坐标确定所述目标像素点的像素值对应的权重;
    基于所述目标像素点的像素值对应的权重,将该像素点的像素值和所述目标像素点的 像素值进行加权平均。
  8. 根据权利要求1所述的方法,其特征在于,所述对所述融合图像进行图像抖动校正,包括:
    通过电子图像增稳算法对所述融合图像进行图像抖动校正。
  9. 根据权利要求8所述的方法,其特征在于,在所述电子图像增稳算法中,对所述融合图像裁剪后,得到的裁剪图像的画幅大于或等于所述第二图像的画幅。
  10. 一种图像处理装置,其特征在于,所述装置包括:
    图像获取模块,用于分别获取第一摄像头拍摄的第一图像和第二摄像头拍摄的第二图像,所述第一摄像头和所述第二摄像头的视场角不同;
    图像融合模块,用于根据所述第一图像和所述第二图像,确定融合图像;
    图像抖动校正模块,用于对所述融合图像进行图像抖动校正,得到输出图像。
  11. 根据权利要求10所述的装置,其特征在于,所述图像融合模块还用于对所述第一图像依次进行畸变校正及图像缩放处理,得到第三图像,其中,所述第一摄像头的视场角大于所述第二摄像头的视场角;将所述第三图像和所述第二图像进行融合,得到融合图像。
  12. 根据权利要求11所述的装置,其特征在于,所述图像融合模块还用于将所述第三图像和所述第二图像进行拼接,确定所述第三图像和所述第二图像的拼接区域;对所述拼接区域中像素点的像素值进行平滑处理,得到平滑后的像素值;将所述平滑后的像素值作为所述拼接区域中像素点的像素值。
  13. 根据权利要求12所述的装置,其特征在于,所述图像融合模块还用于根据所述第二图像确定所述拼接区域包围的非拼接区域的像素值,以及根据所述第三图像确定所述拼接区域以外的非拼接区域的像素值。
  14. 根据权利要求12所述的装置,其特征在于,所述图像融合模块还用于针对所述第二图像中在所述拼接区域中的任一像素点,将该像素点的像素值,和所述第三图像中与该像素点对应的目标像素点的像素值进行加权平均,得到平滑后的像素值。
  15. 根据权利要求14所述的装置,其特征在于,所述图像融合模块还用于确定所述目标像素点的坐标;根据所述目标像素点的坐标,确定所述第一图像中与所述目标像素点对应的初始像素点;将所述初始像素点的像素值作为所述目标像素点的像素值。
  16. 根据权利要求14所述的装置,其特征在于,所述图像融合模块还用于根据该像素点在所述拼接区域中的坐标确定所述目标像素点的像素值对应的权重;基于所述目标像素点的像素值对应的权重,将该像素点的像素值和所述目标像素点的像素值进行加权平均。
  17. 根据权利要求10所述的装置,其特征在于,所述图像抖动校正模块还用于通过电子图像增稳算法对所述融合图像进行图像抖动校正。
  18. 根据权利要求17所述的装置,其特征在于,所述图像抖动校正模块还用于在所述电子图像增稳算法中,对所述融合图像裁剪后,得到的裁剪图像的画幅大于或等于所述第二图像的画幅。
  19. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1~9任一项所述的方法。
  20. 一种电子设备,其特征在于,包括:
    第一摄像头,用于拍摄第一图像;
    第二摄像头,用于拍摄第二图像,所述第一摄像头和所述第二摄像头的视场角不同;
    处理器;以及
    存储器,用于存储所述处理器的可执行指令;
    其中,所述处理器配置为经由执行所述可执行指令来执行权利要求1~9任一项所述的方法。
PCT/CN2020/127605 2019-11-20 2020-11-09 图像处理方法及装置、存储介质、电子设备 Ceased WO2021098544A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20889082.2A EP4064176B1 (en) 2019-11-20 2020-11-09 Image processing method and apparatus, storage medium and electronic device
US17/750,005 US20220279124A1 (en) 2019-11-20 2022-05-20 Image processing method, electronic device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911144463.4 2019-11-20
CN201911144463.4A CN111062881A (zh) 2019-11-20 2019-11-20 图像处理方法及装置、存储介质、电子设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/750,005 Continuation US20220279124A1 (en) 2019-11-20 2022-05-20 Image processing method, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021098544A1 true WO2021098544A1 (zh) 2021-05-27

Family

ID=70298726

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/127605 Ceased WO2021098544A1 (zh) 2019-11-20 2020-11-09 图像处理方法及装置、存储介质、电子设备

Country Status (4)

Country Link
US (1) US20220279124A1 (zh)
EP (1) EP4064176B1 (zh)
CN (1) CN111062881A (zh)
WO (1) WO2021098544A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113592777A (zh) * 2021-06-30 2021-11-02 北京旷视科技有限公司 双摄拍照的图像融合方法、装置和电子系统
CN116051435A (zh) * 2022-08-23 2023-05-02 荣耀终端有限公司 图像融合方法和电子设备

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111062881A (zh) * 2019-11-20 2020-04-24 RealMe重庆移动通信有限公司 图像处理方法及装置、存储介质、电子设备
CN111798374B (zh) * 2020-06-24 2024-08-06 浙江大华技术股份有限公司 一种图像拼接方法、装置、设备及介质
CN112118438B (zh) * 2020-06-30 2022-04-05 中兴通讯股份有限公司 摄像系统、移动终端以及三维图像获取方法
CN111815531B (zh) * 2020-07-09 2024-03-01 Oppo广东移动通信有限公司 图像处理方法、装置、终端设备及计算机可读存储介质
US11778322B2 (en) * 2020-08-17 2023-10-03 Mediatek Inc. Method and apparatus for performing electronic image stabilization with dynamic margin
CN112995467A (zh) * 2021-02-05 2021-06-18 深圳传音控股股份有限公司 图像处理方法、移动终端及存储介质
CN113364975B (zh) * 2021-05-10 2022-05-20 荣耀终端有限公司 一种图像的融合方法及电子设备
CN113411498B (zh) * 2021-06-17 2023-04-28 深圳传音控股股份有限公司 图像拍摄方法、移动终端及存储介质
CN113538462B (zh) * 2021-07-15 2024-11-01 Oppo广东移动通信有限公司 图像处理方法及装置、计算机可读存储介质和电子设备
CN114820314A (zh) * 2022-04-27 2022-07-29 Oppo广东移动通信有限公司 图像处理方法及装置、计算机可读存储介质和电子设备
CN115209191A (zh) * 2022-06-14 2022-10-18 海信视像科技股份有限公司 显示设备、终端设备和设备间共享摄像头的方法
CN115829896B (zh) * 2022-12-09 2026-07-07 杭州微影软件有限公司 一种图像融合方法、装置、电子设备
US20240420348A1 (en) * 2023-06-13 2024-12-19 Ford Global Technologies, Llc Calibration for real-time blind registration of disparate video image streams
CN116503815B (zh) * 2023-06-21 2024-01-30 宝德计算机系统股份有限公司 一种基于大数据的计算机视觉处理系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924874A (zh) * 2010-08-20 2010-12-22 北京航空航天大学 一种匹配块分级的实时电子稳像方法
US20190020821A1 (en) * 2013-07-12 2019-01-17 Hanwha Techwin Co., Ltd. Image stabilizing method and apparatus
CN109379522A (zh) * 2018-12-06 2019-02-22 Oppo广东移动通信有限公司 成像方法、成像装置、电子装置及介质
CN109688329A (zh) * 2018-12-24 2019-04-26 天津天地伟业信息系统集成有限公司 一种针对高精度全景视频的防抖方法
CN111062881A (zh) * 2019-11-20 2020-04-24 RealMe重庆移动通信有限公司 图像处理方法及装置、存储介质、电子设备

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080030592A1 (en) * 2006-08-01 2008-02-07 Eastman Kodak Company Producing digital image with different resolution portions
JP4825093B2 (ja) * 2006-09-20 2011-11-30 富士通株式会社 手ぶれ補正機能付き撮像装置、手ぶれ補正方法、および、手ぶれ補正処理プログラム
CN102081796B (zh) * 2009-11-26 2014-05-07 日电(中国)有限公司 图像拼接方法和装置
WO2014160819A1 (en) * 2013-03-27 2014-10-02 Bae Systems Information And Electronic Systems Integration Inc. Multi field-of-view multi sensor electro-optical fusion-zoom camera
CN104318517A (zh) * 2014-11-19 2015-01-28 北京奇虎科技有限公司 一种图像拼接处理方法、装置及客户端
CN105025222A (zh) * 2015-07-03 2015-11-04 广东欧珀移动通信有限公司 一种拍摄方法及移动终端
CN105096329B (zh) * 2015-08-20 2020-05-12 厦门雅迅网络股份有限公司 一种精确校正超广角摄像头图像畸变的方法
KR102520225B1 (ko) * 2016-06-30 2023-04-11 삼성전자주식회사 전자 장치 및 전자 장치의 이미지 촬영 방법
CN106303283A (zh) * 2016-08-15 2017-01-04 Tcl集团股份有限公司 一种基于鱼眼摄像头的全景图像合成方法及系统
CN109639969B (zh) * 2018-12-12 2021-01-26 维沃移动通信(杭州)有限公司 一种图像处理方法、终端及服务器
CN110072058B (zh) * 2019-05-28 2021-05-25 珠海格力电器股份有限公司 图像拍摄装置、方法及终端
CN110177212B (zh) * 2019-06-26 2021-01-26 Oppo广东移动通信有限公司 图像处理方法和装置、电子设备、计算机可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924874A (zh) * 2010-08-20 2010-12-22 北京航空航天大学 一种匹配块分级的实时电子稳像方法
US20190020821A1 (en) * 2013-07-12 2019-01-17 Hanwha Techwin Co., Ltd. Image stabilizing method and apparatus
CN109379522A (zh) * 2018-12-06 2019-02-22 Oppo广东移动通信有限公司 成像方法、成像装置、电子装置及介质
CN109688329A (zh) * 2018-12-24 2019-04-26 天津天地伟业信息系统集成有限公司 一种针对高精度全景视频的防抖方法
CN111062881A (zh) * 2019-11-20 2020-04-24 RealMe重庆移动通信有限公司 图像处理方法及装置、存储介质、电子设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4064176A4 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113592777A (zh) * 2021-06-30 2021-11-02 北京旷视科技有限公司 双摄拍照的图像融合方法、装置和电子系统
CN113592777B (zh) * 2021-06-30 2024-07-12 北京旷视科技有限公司 双摄拍照的图像融合方法、装置和电子系统
CN116051435A (zh) * 2022-08-23 2023-05-02 荣耀终端有限公司 图像融合方法和电子设备
CN116051435B (zh) * 2022-08-23 2023-11-07 荣耀终端有限公司 图像融合方法和电子设备

Also Published As

Publication number Publication date
EP4064176B1 (en) 2025-08-27
EP4064176A4 (en) 2023-05-24
CN111062881A (zh) 2020-04-24
EP4064176A1 (en) 2022-09-28
US20220279124A1 (en) 2022-09-01

Similar Documents

Publication Publication Date Title
US20220279124A1 (en) Image processing method, electronic device, and storage medium
CN110622497B (zh) 具备具有不同焦距的相机的设备及实现相机的方法
CN104680501B (zh) 图像拼接的方法及装置
WO2021227360A1 (zh) 一种交互式视频投影方法、装置、设备及存储介质
TWI720445B (zh) 攝像機裝置中圖像融合的方法及相關裝置
CN103942754B (zh) 全景图像补全方法及装置
CN113965664B (zh) 一种图像虚化方法、存储介质以及终端设备
WO2019052534A1 (zh) 图像拼接方法及装置、存储介质
CN113875220B (zh) 拍摄防抖方法、装置、终端及存储介质
CN110324532A (zh) 一种图像虚化方法、装置、存储介质及电子设备
CN105100615A (zh) 一种图像的预览方法、装置及终端
WO2022116397A1 (zh) 虚拟视点深度图处理方法、设备、装置及存储介质
CN113947768A (zh) 一种基于单目3d目标检测的数据增强方法和装置
CN106412458A (zh) 一种图像处理方法和装置
WO2018210318A1 (zh) 图像虚化处理方法、装置、存储介质及电子设备
CN109685721B (zh) 全景画面拼接方法、装置、终端及对应的存储介质
CN107231524A (zh) 拍摄方法及装置、计算机装置和计算机可读存储介质
KR20220073824A (ko) 이미지 처리 방법, 이미지 처리 장치 및 이를 적용한 전자기기
CN106231200A (zh) 一种拍照方法及装置
CN113344789B (zh) 图像拼接方法及装置、电子设备、计算机可读存储介质
CN115174878A (zh) 投影画面校正方法、装置和存储介质
JP7827879B2 (ja) 画像処理方法及び装置、並びにデバイス
JP7799865B2 (ja) 画像処理方法、装置、機器及び媒体
CN114157848A (zh) 投影设备校正方法、装置、存储介质以及投影设备
CN113395434A (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: 20889082

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020889082

Country of ref document: EP

Effective date: 20220620

WWG Wipo information: grant in national office

Ref document number: 2020889082

Country of ref document: EP