WO2023093274A1 - Photographing preview method, image fusion method, electronic device, and storage medium - Google Patents

Photographing preview method, image fusion method, electronic device, and storage medium Download PDF

Info

Publication number
WO2023093274A1
WO2023093274A1 PCT/CN2022/121449 CN2022121449W WO2023093274A1 WO 2023093274 A1 WO2023093274 A1 WO 2023093274A1 CN 2022121449 W CN2022121449 W CN 2022121449W WO 2023093274 A1 WO2023093274 A1 WO 2023093274A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
telephoto
main camera
lens
shooting
Prior art date
Application number
PCT/CN2022/121449
Other languages
French (fr)
Chinese (zh)
Inventor
张冬明
苟定勇
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2023093274A1 publication Critical patent/WO2023093274A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • 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/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations

Definitions

  • the present application relates to but not limited to the field of electronic technology, and in particular relates to a shooting preview method, image fusion method, device, electronic equipment and storage medium.
  • the telephoto lens is set to a high magnification. After the main camera lens captures the target scene and its background, the image taken by the telephoto lens is fused with the image taken by the main camera lens. Form a clear image.
  • Embodiments of the present application provide a shooting preview method, image fusion method, device, electronic equipment, and storage medium, which improve the anti-shake effect of shooting and improve user experience.
  • an embodiment of the present application provides a shooting preview method, including: setting the magnification of the telephoto lens to maximize the viewing range corresponding to the telephoto lens; acquiring the telephoto shot image of the telephoto lens and The main shot image of the main camera lens; acquire the target image in the telephoto shot image, and enlarge the target image; display and lock the enlarged target image to the preset position of the telephoto image preview window, so The telephoto image preview window is suspended and set on the main camera image preview window.
  • an embodiment of the present application provides an image fusion method, including: acquiring the enlarged target image obtained according to the shooting preview method described in the first aspect and the main shot image; fusing the enlarged The final target image is combined with the image captured by the main camera to obtain a final captured image.
  • an embodiment of the present application further provides a photographing device, the device including: a telephoto lens parameter setting unit, configured to set the magnification of the telephoto lens to maximize the viewing range corresponding to the telephoto lens
  • the image processing unit is configured to obtain the telephoto shot image of the telephoto lens and the main shot image of the main camera lens; the image processing unit is also configured to obtain the target image in the telephoto shot image and Enlarging the target image; an image display unit, including a main camera image preview window configured to display a main camera image and a telephoto image preview set to display a telephoto image suspended on the main camera preview window window, the image display unit is configured to display the locked enlarged target image to a preset position of the telephoto image preview window.
  • the embodiment of the present application also provides an electronic device, including: a telephoto lens, a main camera lens, a memory, a processor, and a computer program stored in the memory and operable on the processor, the processor When the computer program is executed, the shooting preview method described in the first aspect above, or the image fusion method described in the second aspect is realized.
  • the embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to execute the shooting preview method described in the first aspect above, or the second aspect The image fusion method described.
  • FIGS. 1A and 1B are schematic diagrams showing the effects of image processing in the related art
  • FIG. 2 is a flowchart of a shooting preview method provided by an embodiment of the present application
  • 3A to 3F are schematic diagrams showing the effect of the shooting preview method provided by an embodiment of the present application.
  • FIG. 4 is a flowchart of an image fusion method provided by an embodiment of the present application.
  • 5A to 5D are schematic diagrams of the effect of the image fusion method provided by an embodiment of the present application.
  • Fig. 6 is a flowchart of a complete shooting method provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a photographing device provided by an embodiment of the present application.
  • the application provides a shooting preview method, image fusion method, device, electronic equipment and storage medium, by setting the magnification of the telephoto lens as small as possible, and then making the viewing range of the telephoto lens as large as possible
  • the target image is enlarged and locked at the preset position, so that the user can shoot the target scene when moving the electronic device in a wide range, which improves the anti-shake effect in the shooting scene of the electronic device and improves the success rate of shooting.
  • the user has a better shooting experience.
  • FIGS. 1A and 1B are schematic diagrams of the effect of image processing in the related art, specifically a schematic diagram of the processing effect of the image of the moon.
  • Figure 1A it is a moon image taken with a high-magnification telephoto lens. Due to the high magnification, the target image of the moon is very large and is located in the upper right corner of the image.
  • the main camera is also shooting. Since the main camera lens has no magnification or a small magnification, it can capture a smaller moon and other surrounding landscapes. In order to facilitate users to observe the shooting situation, the telephoto lens The preview window is superimposed on the preview window of the main camera.
  • the telephoto image preview window is suspended in the upper right corner of the main image preview window. Since the moon image in the telephoto image has not been processed, the moon in the telephoto image is also located in the telephoto image preview window. In the upper right corner, the dotted frame is a reminder frame, which is set to remind the user that the telephoto moon can be captured in the main camera lens. It can be found that at this time, as long as the user shifts the viewfinder slightly to the right, the moon will float out of the viewfinder frame, causing the viewfinder failure of the telephoto lens, which eventually leads to the failure of shooting.
  • the optical magnification of the telephoto lens of a smartphone is relatively small (for example, 5x).
  • digital zoom is assisted.
  • the embodiment of the present application provides the following shooting preview method.
  • the shooting preview method provided by this application is not limited to the shooting preview of the moon. Any distant view, such as an airplane in the sky, a ship at sea, and any close-up view, such as people, plants, and display images, can be obtained through the embodiment of this application.
  • the provided scheme completes the shooting, and this application uses the moon as an example of a scene shooting preview.
  • Fig. 2 is the flowchart of the shooting preview method in the moon shooting process provided by an embodiment of the present application.
  • Fig. 3 provides a schematic diagram of the effect of the shooting preview method in the moon shooting process, and the shooting preview method at least includes the following steps:
  • Step S110 The main camera lens and the telephoto lens shoot at the same time.
  • the main camera lens and the telephoto lens are turned on at the same time for shooting, and the magnification of the telephoto lens is set to be as small as possible.
  • Step S121 Acquiring an image captured by the main camera.
  • Step S122 Acquiring a telephoto shot image.
  • the telephoto lens and the main camera lens will respectively generate a telephoto video stream and a main camera video stream during the shooting process, and in the embodiment of the application, the main camera takes images
  • the image captured with the telephoto is the telephoto video frame and the main camera video frame obtained based on the sampling of the telephoto video stream and the main camera video stream.
  • the main camera lens shoots to obtain the main camera shot image.
  • the telephoto lens shoots to obtain the telephoto shot image.
  • FIG. 3B since the magnification of the telephoto lens in the embodiment of the present application is small, The target image in the telephoto image is relatively small, that is, the moon is relatively small.
  • Step S130 Perform target image detection on the telephoto shot image.
  • the target image taken by the telephoto lens is recognized through the convolutional neural network of artificial intelligence.
  • the aspect ratio is set to be the same as that of the image captured by the telephoto lens, see FIG. 3D .
  • the target image is delineated and output using the smallest rectangular frame, but in practical applications, frames of other shapes can be used to delineate and output the target image; at the same time, in practical applications, the rectangular frame is also It is not necessarily the smallest rectangular frame that can delineate the target image, and the smallest rectangular frame is only an implementation manner, which is more conducive to effective zooming in of the image.
  • Step S140 Enlarging the target image.
  • the target image is enlarged. Since the target image is in the middle of the extraction frame, the target image can still be in the middle when zooming proportionally. Location.
  • Step S150 Preview the superimposed display.
  • the enlarged telephoto image is displayed in the telephoto image preview window.
  • the preview window is to help the user observe and determine whether the shooting conditions of the target image meet the shooting conditions or shooting requirements, it is suspended above the preview window of the main camera image as an auxiliary window, and the preview window of the telephoto image is smaller than the preview window of the main camera image. This is convenient for users to observe the shooting situation of the main camera image at any time.
  • the position of the floating setting can be at any position, but in order not to block the main camera image, it is generally set at the corner of the main camera image preview window.
  • the user when the user is shooting, he will continuously adjust the main camera lens and the telephoto lens according to the image display in the preview window to make the image displayed in the preview window satisfactory, and the shooting conditions are satisfied at this time.
  • the shooting conditions are preset by a program in the electronic device, and the electronic device will judge whether the currently captured image meets the requirements according to the preset shooting conditions, and then enter the subsequent image fusion stage.
  • the dotted frame in Figure 3F is a prompt frame, which is set to remind the user that the telephoto moon can be captured in the main camera lens. It can be found that, compared with the viewfinder range of the main camera lens in the related art in Figure 1, using the shooting preview method in the embodiment of the present application can significantly expand the viewfinder range of the main camera lens, and will not cause the moon to float due to the user's hand shaking. Outside the viewfinder frame, the anti-shake effect is greatly improved and the difficulty of shooting is reduced.
  • step S110 to step S150 in the preview stage is a cyclic process, that is, each of the above steps is performed for video frames in the real-time transmitted video stream, thus realizing real-time video-level preview.
  • the shooting preview method provided by the above-mentioned embodiments of the present application, by setting the magnification of the telephoto lens as small as possible, the viewing range of the telephoto lens is made as large as possible, so that the details of the telephoto shot image are clear, and then the telephoto lens The captured target image is enlarged and locked at the preset position of the telephoto preview window, achieving multiple anti-shake effects.
  • Fig. 4 is a flowchart of an image fusion method provided by an embodiment of the present application
  • Fig. 5 provides a schematic diagram of the effect of the image fusion method, and the image fusion method at least includes the following steps:
  • Step S210 Acquiring a captured image.
  • Step S221 Acquiring a telephoto image.
  • the magnification of the telephoto lens is small, so the target image in the telephoto shot image is relatively small, that is, the moon is relatively small.
  • Step S222 Acquiring an image captured by the main camera.
  • the shooting of the main camera lens in this embodiment is the same as that of a common main camera lens.
  • Step S230 Perform target image detection on the telephoto shot image.
  • the target image taken by the telephoto lens is identified through an artificial intelligence convolutional neural network, for example, the target image is identified by using a ResNet50 convolutional neural network trained on a large-scale image data set ImageNet,
  • the aspect ratio of the image extraction frame is set to be the same as the aspect ratio of the captured image of the telephoto lens.
  • Step S240 Enlarge the target image.
  • the target image is enlarged to obtain FIG. 5C .
  • Step S250 Fusing the image captured by the main camera and the enlarged target image to finally obtain the captured image.
  • the main camera image is fused with the enlarged target image to obtain a moon image with both overall environmental atmosphere and clear details, as shown in FIG. 5D .
  • the image fusion method is aimed at fusing the current telephoto image and the main camera image every time the user presses the shutter.
  • Figure 6 is a flowchart of the shooting method provided by the embodiment of the present application, at least including the following steps:
  • Step S310 Setting the magnification factor of the telephoto lens so that the viewing range corresponding to the telephoto lens is the largest.
  • the smart phone is the execution subject of the photographing method.
  • the Android platform when entering some shooting modes, the Android platform will provide a corresponding off-the-shelf interface with a magnification setting, which is set to control the magnification of the camera, but the shooting method provided by this application does not use the magnification of the off-the-shelf interface magnification, but set the magnification by yourself, and make the magnification the smallest, even if the telephoto lens corresponds to the largest viewfinder range.
  • the optical magnification of the telephoto lens of a smart phone is generally 5x, so in this embodiment, 5x is selected as the magnification of the telephoto lens, so that the viewfinder range corresponding to 1/5 of the viewfinder area of the main camera lens It can ensure that both the telephoto lens and the main camera lens can successfully find a view, which can make it more convenient and fast for users to complete the scene shooting.
  • Step S320 Obtain a telephoto shot image of the telephoto lens and a main shot image of the main camera lens.
  • the acquisition of the target image is carried out using the target detection technology of traditional artificial feature extraction, such as Viola-Jones detector, HOG (Histogram of Oriented Gradient, direction gradient histogram) detector, DPM (Deformable Part Model, can Deformed part model) detector, etc.
  • traditional artificial feature extraction such as Viola-Jones detector, HOG (Histogram of Oriented Gradient, direction gradient histogram) detector, DPM (Deformable Part Model, can Deformed part model) detector, etc.
  • a target detection technology based on an artificial intelligence model such as an R-CNN model, an SPPNet model, a Fast-RCNN model, a Faster-RCNN model, a Feature Pyramid Networks model, etc. is used.
  • the target image is surrounded by the minimum rectangular bounding box to complete the recognition of the target image, and then the center point of the minimum rectangular bounding box is obtained to form an image extraction frame containing the minimum rectangular bounding box, wherein the image extraction frame
  • the aspect ratio of the image is the same as that of the telephoto shot image; the aspect ratio of the image extraction frame is the same as that of the telephoto shot image, so that in the subsequent scaling steps, the target image can be guaranteed not to be deformed, and then Make the captured images more accurate and real.
  • Step S330 Acquiring a target image in the telephoto shot image, and zooming in on the target image.
  • the target image is enlarged using an interpolation method
  • the difference method may be a nearest neighbor interpolation method, a bilinear interpolation method, or a bicubic interpolation method.
  • Step S340 Display and lock the enlarged target image to the preset position of the telephoto image preview window, and the telephoto preview window is suspended on the main camera preview window.
  • the enlarged target image is displayed at the center of the telephoto image preview window
  • the telephoto image preview window is a small window much smaller than the main camera image preview window, located on the upper right of the main camera image preview window angle, and since the target image is extracted based on image detection, it is not affected by the position of the target image in the telephoto image, so the target image can be locked at the center of the telephoto image preview window, that is, for the preview state
  • Each frame of the video image can display the target image at the center position, which can solve the problem of the target image floating in the related technology.
  • the main camera image preview window has prompt lines, and these prompt lines mark the viewfinder range of the telephoto lens, that is, to remind the user not to let the target scene exceed the range of the prompt line when moving the main camera lens to change the viewfinder , otherwise it will cause the framing failure of the telephoto lens.
  • the existence of the prompt line can help the user better grasp the moving range of the lens framing, improve the success probability of scene shooting, and increase the freedom of framing.
  • the preset position may be other preset positions except the central position, and the preset position may be set in advance by the system, or may be set according to the user's usage habits or preferences.
  • Step S350 Fusing the enlarged target image and the image captured by the main camera to obtain a final captured image.
  • Fusion refers to the operation of generating a final image from multiple frames of images according to certain rules.
  • the electronic device can fuse multi-frame images through fusion methods such as linear weighting, nonlinear weighting fusion, multi-frame noise reduction algorithm, principal component analysis fusion, pyramid transformation, and wavelet transformation.
  • the final captured image refers to the final image obtained in one image capturing process.
  • the electronic device fuses the enlarged target image captured by the telephoto lens with the main camera image to obtain the final captured image
  • the final captured image can be stored in the memory of the electronic device, and can also be displayed on the display screen of the electronic device .
  • the user can move the electronic device within a wide range to shoot the target scene, improve the anti-shake effect in the scene shooting scene of the electronic device, and improve the success rate of shooting the scene. Make users have a better shooting experience.
  • the embodiment of the present application also provides a shooting device, as shown in FIG. 7, the device includes:
  • An input unit 100 the input unit 100 includes a main camera lens 1001 and a telephoto lens 1002, capable of taking pictures of external scenes.
  • the telephoto lens and the main camera lens are on the same side of the electronic device.
  • those skilled in the art should know that a shooting device can have multiple lens.
  • the telephoto lens parameter setting unit 200 is capable of setting the magnification of the telephoto lens to maximize the viewing range corresponding to the telephoto lens.
  • the image processing unit 300 can acquire the telephoto shot image of the telephoto lens and the main shot image of the main camera lens, and the image processing unit can also acquire the target image in the telephoto shot image and enlarge the target image.
  • the image display unit 400 includes a display 4001, and the display 4001 can display a main camera image preview window and a telephoto image preview window suspended on the main camera preview window. In order to facilitate the user to observe the preview image, the image display unit can display the enlarged target The image is displayed and locked at the preset position in the telephoto image preview window.
  • the image fusion unit 500 can fuse the enlarged target image and the main camera image to obtain the final image.
  • the memory 600 includes a computer application program, and the computer application program can execute the shooting preview method and the image fusion method provided in the above embodiments.
  • the processor 700 can run the shooting preview method and the image fusion method provided in the above embodiments.
  • the user can move the electronic device within a wide range to shoot the target scene, improve the anti-shake effect in the scene shooting scene of the electronic device, and improve the success rate of shooting the scene. Make users have a better shooting experience.
  • memory can be used to store non-transitory software programs and non-transitory computer-executable programs.
  • the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage devices.
  • the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the non-transitory software programs and instructions required to realize the information processing method of the above-mentioned embodiment are stored in the memory, and when executed by the processor, the information processing method in the above-mentioned embodiment is executed, for example, the above-described execution in FIG. 2 Method steps S110 to S150 , method steps S210 to 250 in FIG. 4 , method steps S310 to S350 in FIG. 6 .
  • the device embodiments or system embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units superior. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor or a controller, for example, by the above-mentioned network device Execution by a processor in the embodiment can make the processor execute the shooting preview method and the image fusion method in the above embodiment, for example, execute the method steps S110 to S150 in FIG. 2 described above, and the method step S210 in FIG. 4 To 250, steps S310 to S350 of the method in FIG. 6 .
  • the embodiment of the present application includes: setting the magnification factor of the telephoto lens to maximize the framing range corresponding to the telephoto lens; obtaining the telephoto shot image of the telephoto lens and the main shot image of the main camera lens; obtaining the The target image in the telephoto shooting image is enlarged, and the target image is enlarged; the enlarged target image is displayed and locked to the preset position of the telephoto preview window, and the telephoto preview window is suspended on the main camera preview window ; Fusing the amplified target image with the main shot image to obtain a final shot image.
  • the shooting scheme provided by the embodiment of the present application by setting the magnification of the telephoto lens as small as possible, the viewing range of the telephoto lens and the main camera lens is made as large as possible, and at the same time, the target scene is magnified and locked at the preset position , so that the user can shoot the target scene when moving the electronic device in a large range, which improves the anti-shake effect in the shooting scene of the electronic device and increases the success rate of shooting.
  • Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .
  • the electronic device in this embodiment of the present application may be a terminal device.
  • the terminal device may be a mobile terminal device or a non-mobile terminal device.
  • the mobile terminal device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle terminal device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant). assistant, PDA), etc.
  • the non-mobile terminal device may be a personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., which are not specifically limited in this embodiment of the present application.

Abstract

Embodiments of the present application provide a photographing preview method, an image fusion method, an apparatus, an electronic device, and a storage medium. An amplification factor of a telephoto lens is set, such that a field of view corresponding to the telephoto lens is the maximum (S310); a telephoto photographed image of the telephoto lens and a main photographed image of a main camera are obtained (S320); a target image in the telephoto photographed image is then obtained and the target image is amplified (S330); the amplified target image is displayed and locked to a preset position of a telephoto preview window, wherein the telephoto preview window is suspended on a main camera preview window (S340); and finally, the amplified target image and the main photographed image are fused to obtain a final photographed image (S350).

Description

拍摄预览方法、图像融合方法、电子设备及存储介质Shooting preview method, image fusion method, electronic device and storage medium
相关申请的交叉引用Cross References to Related Applications
本申请基于申请号为202111473660.8、申请日为2021年11月29日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on a Chinese patent application with application number 202111473660.8 and a filing date of November 29, 2021, and claims the priority of this Chinese patent application. The entire content of this Chinese patent application is hereby incorporated by reference into this application.
技术领域technical field
本申请涉及但不限于电子技术领域,尤其涉及一种拍摄预览方法、图像融合方法、装置、电子设备及存储介质。The present application relates to but not limited to the field of electronic technology, and in particular relates to a shooting preview method, image fusion method, device, electronic equipment and storage medium.
背景技术Background technique
随着智能终端的普及,用户更多地使用智能终端的拍摄功能记录生活和工作。对于一些景象的拍摄,如月亮的拍摄,往往需要长焦镜头与主摄镜头共同配合完成拍摄。其中,为了拍摄出景物的清晰影像,长焦镜头被设置成高放大倍数,主摄镜头对目标景物及其背景拍摄后,再将长焦镜头的拍摄影像与主摄镜头的拍摄影像进行融合,形成清晰的影像。然而,由于长焦镜头与主摄镜头相距很近,两个摄像头的视角高度相似,用户在拍摄过程中,依据主摄镜头的拍摄预览进行调整时,轻微地晃动就可能导致长焦镜头中的景象消失,造成拍摄失败。With the popularity of smart terminals, users are more likely to use the shooting function of smart terminals to record their life and work. For the shooting of some scenes, such as the shooting of the moon, it is often necessary to cooperate with the telephoto lens and the main camera lens to complete the shooting. Among them, in order to capture a clear image of the scene, the telephoto lens is set to a high magnification. After the main camera lens captures the target scene and its background, the image taken by the telephoto lens is fused with the image taken by the main camera lens. Form a clear image. However, because the distance between the telephoto lens and the main camera lens is very close, and the viewing angles of the two cameras are highly similar, when the user adjusts according to the shooting preview of the main camera lens during shooting, a slight shake may cause blurring in the telephoto lens. The scene disappears, causing the shooting to fail.
发明内容Contents of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics described in detail in this article. This summary is not intended to limit the scope of the claims.
本申请实施例提供了一种拍摄预览方法、图像融合方法、装置、电子设备及存储介质,提高了拍摄的防抖效果,提高了用户的使用感受。Embodiments of the present application provide a shooting preview method, image fusion method, device, electronic equipment, and storage medium, which improve the anti-shake effect of shooting and improve user experience.
第一方面,本申请实施例提供了一种拍摄预览方法,包括:设置长焦镜头的放大倍数,使所述长焦镜头对应的取景范围最大;获取所述长焦镜头的长焦拍摄图像与主摄镜头的主摄拍摄图像;获取所述长焦拍摄图像中的目标图像,并放大所述目标图像;显示并锁定所述放大后的目标图像至长焦图像预览窗口的预设位置,所述长焦图像预览窗口悬浮设置于主摄图像预览窗口上。In the first aspect, an embodiment of the present application provides a shooting preview method, including: setting the magnification of the telephoto lens to maximize the viewing range corresponding to the telephoto lens; acquiring the telephoto shot image of the telephoto lens and The main shot image of the main camera lens; acquire the target image in the telephoto shot image, and enlarge the target image; display and lock the enlarged target image to the preset position of the telephoto image preview window, so The telephoto image preview window is suspended and set on the main camera image preview window.
第二方面,本申请实施例提供了一种图像融合方法,包括:获取根据第一方面所述的拍摄预览方法得到的所述放大后的目标图像与所述主摄拍摄图像;融合所述放大后的目标图像与所述主摄拍摄图像,获得最终拍摄图像。In a second aspect, an embodiment of the present application provides an image fusion method, including: acquiring the enlarged target image obtained according to the shooting preview method described in the first aspect and the main shot image; fusing the enlarged The final target image is combined with the image captured by the main camera to obtain a final captured image.
第三方面,本申请实施例还提供了一种拍摄装置,所述装置包括:长焦镜头参数设置单元,被设置为设置长焦镜头的放大倍数,使所述长焦镜头对应的取景范围最大;图像处理单元,被设置为获取所述长焦镜头的长焦拍摄图像与主摄镜头的主摄拍摄图像;所述图像处理单元还被设置为获取所述长焦拍摄图像中的目标图像以及放大所述目标图像;图像显示单元,包括被设置为显示主摄拍摄图像的主摄图像预览窗口与悬浮设置在所述主摄预览窗口上的被设置为显示长焦拍摄图像的长焦图像预览窗口,所述图像显示单元被设置为显示被锁定的所述放大后的目标图像至长焦图像预览窗口的预设位置。In a third aspect, an embodiment of the present application further provides a photographing device, the device including: a telephoto lens parameter setting unit, configured to set the magnification of the telephoto lens to maximize the viewing range corresponding to the telephoto lens The image processing unit is configured to obtain the telephoto shot image of the telephoto lens and the main shot image of the main camera lens; the image processing unit is also configured to obtain the target image in the telephoto shot image and Enlarging the target image; an image display unit, including a main camera image preview window configured to display a main camera image and a telephoto image preview set to display a telephoto image suspended on the main camera preview window window, the image display unit is configured to display the locked enlarged target image to a preset position of the telephoto image preview window.
第四方面,本申请实施例还提供了一种电子设备,包括:长焦镜头、主摄镜头、存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程 序时实现如上第一方面所述的拍摄预览方法,或第二方面所述的图像融合方法。In the fourth aspect, the embodiment of the present application also provides an electronic device, including: a telephoto lens, a main camera lens, a memory, a processor, and a computer program stored in the memory and operable on the processor, the processor When the computer program is executed, the shooting preview method described in the first aspect above, or the image fusion method described in the second aspect is realized.
第五方面,本申请实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行如上第一方面所述的拍摄预览方法,或第二方面所述的图像融合方法。In the fifth aspect, the embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to execute the shooting preview method described in the first aspect above, or the second aspect The image fusion method described.
本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the application will be set forth in the description which follows, and, in part, will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
附图说明Description of drawings
附图用来提供对本申请技术方案的进一步理解,并且构成说明书的一部分,与本申请实施例一起用于解释本申请技术方案,并不构成对本申请技术方案的限制。The accompanying drawings are used to provide a further understanding of the technical solution of the present application, and constitute a part of the specification, and are used together with the embodiments of the present application to explain the technical solution of the present application, and do not constitute a limitation to the technical solution of the present application.
图1A和1B是相关技术中拍摄图像处理的效果示意图;1A and 1B are schematic diagrams showing the effects of image processing in the related art;
图2是本申请一实施例提供的拍摄预览方法的流程图;FIG. 2 is a flowchart of a shooting preview method provided by an embodiment of the present application;
图3A至3F是本申请一实施例提供的拍摄预览方法的效果示意图;3A to 3F are schematic diagrams showing the effect of the shooting preview method provided by an embodiment of the present application;
图4是本申请一实施例提供的图像融合方法的流程图;FIG. 4 is a flowchart of an image fusion method provided by an embodiment of the present application;
图5A至5D是本申请一实施例提供的图像融合方法的效果示意图;5A to 5D are schematic diagrams of the effect of the image fusion method provided by an embodiment of the present application;
图6是本申请一实施例提供的完整拍摄方法的流程图;Fig. 6 is a flowchart of a complete shooting method provided by an embodiment of the present application;
图7是本申请一实施例提供的拍摄装置的结构示意图。FIG. 7 is a schematic structural diagram of a photographing device provided by an embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, not to limit the present application.
需要说明的是,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于流程图中的顺序执行所示出或描述的步骤。说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than in the flowchart. The terms "first", "second" and the like in the specification and claims and the above drawings are used to distinguish similar objects, and not necessarily used to describe a specific sequence or sequence.
随着电子设备的发展,具有拍摄功能的电子设备越来越多,这些电子设备由于集成了多种镜头于一身,因此不再局限于近景拍摄的单一模式,而是发展了远景拍摄等其他模式。以智能手机这种电子设备为例,用户常常使用手机拍近处或远处的景观,最常见的远处景物的拍摄就是拍月亮。现有技术中,往往采用高倍的长焦镜头进行拍摄,以获得清晰的景物图像,再将景物图像与主摄镜头拍摄的整体景观图像进行融合,形成既有整体环境氛围又具有清晰细节的月亮图像。然而,由于长焦镜头倍数非常高,可以达到30x放大,用户轻微手抖造成的取景偏移,都会导致月亮飘出到取景范围外,造成拍摄的失败。With the development of electronic devices, there are more and more electronic devices with shooting functions. Because these electronic devices integrate a variety of lenses, they are no longer limited to a single mode of close-up shooting, but have developed other modes such as long-range shooting. . Taking electronic devices such as smart phones as an example, users often use mobile phones to take pictures of nearby or distant landscapes. The most common way to take pictures of distant scenery is to take pictures of the moon. In the existing technology, a high-power telephoto lens is often used for shooting to obtain a clear scene image, and then the scene image is fused with the overall landscape image captured by the main camera lens to form a moon with both the overall environmental atmosphere and clear details image. However, due to the very high magnification of the telephoto lens, which can reach 30x magnification, the viewfinder shift caused by the user's slight hand shake will cause the moon to float out of the viewfinder range, resulting in the failure of shooting.
基于此,本申请提供了一种拍摄预览方法、图像融合方法、装置、电子设备及存储介质,通过设置使长焦镜头的放大倍数尽可能的小,进而使长焦镜头的取景范围尽可能大,同时将目标图像放大后锁定在预设位置,使用户在较大范围内移动电子设备均能拍摄到目标景物,提升了电子设备拍摄场景下的防抖效果,提高了拍摄的成功率,使用户具有更加良好的拍摄感受。Based on this, the application provides a shooting preview method, image fusion method, device, electronic equipment and storage medium, by setting the magnification of the telephoto lens as small as possible, and then making the viewing range of the telephoto lens as large as possible At the same time, the target image is enlarged and locked at the preset position, so that the user can shoot the target scene when moving the electronic device in a wide range, which improves the anti-shake effect in the shooting scene of the electronic device and improves the success rate of shooting. The user has a better shooting experience.
下面结合附图,对本申请实施例作进一步阐述。The embodiments of the present application will be further described below in conjunction with the accompanying drawings.
图1A和1B是相关技术中拍摄图像处理的效果示意图,具体为拍摄月亮图像的处理效果示意图。如图1A所示,是采用高放大倍数的长焦镜头拍摄的月亮图像,由于是高放大倍数, 所以月亮这个目标图像很大,且位于图像的右上角。与此同时,主摄像头也在拍摄,由于主摄镜头无放大倍数或放大倍数较小,因此可以拍摄到较小的月亮及其周围的其他景观,为了便于用户观察拍摄情况,将长焦镜头的预览窗口叠加在主摄镜头的预览窗口之上。如图1B所示,长焦图像预览窗口悬浮在主摄图像预览窗口的右上角,由于未对长焦图像中的月亮图像做任何处理,因此长焦图像中月亮也位于长焦图像预览窗口的右上角,虚线框为一种提示线框,被设置为提示用户在主摄镜头中,能够拍摄到长焦月亮的取景范围。可以发现,此时用户只要稍微向右偏移取景,则月亮将飘出取景框外,造成长焦镜头的取景失败,最终导致拍摄失败。1A and 1B are schematic diagrams of the effect of image processing in the related art, specifically a schematic diagram of the processing effect of the image of the moon. As shown in Figure 1A, it is a moon image taken with a high-magnification telephoto lens. Due to the high magnification, the target image of the moon is very large and is located in the upper right corner of the image. At the same time, the main camera is also shooting. Since the main camera lens has no magnification or a small magnification, it can capture a smaller moon and other surrounding landscapes. In order to facilitate users to observe the shooting situation, the telephoto lens The preview window is superimposed on the preview window of the main camera. As shown in Figure 1B, the telephoto image preview window is suspended in the upper right corner of the main image preview window. Since the moon image in the telephoto image has not been processed, the moon in the telephoto image is also located in the telephoto image preview window. In the upper right corner, the dotted frame is a reminder frame, which is set to remind the user that the telephoto moon can be captured in the main camera lens. It can be found that at this time, as long as the user shifts the viewfinder slightly to the right, the moon will float out of the viewfinder frame, causing the viewfinder failure of the telephoto lens, which eventually leads to the failure of shooting.
需要说明的是,智能手机的长焦镜头的光学放大倍数相对较小(例如是5x),为了获得更大的放大倍数,会辅助以数字变焦,当具有6倍的数字变焦时,长焦镜头的整体放大倍数为5x*6=30x,这意味着只有在主摄镜头取景面积的1/30对应的取景范围内,才能在长焦镜头和主摄镜头中均出现月亮,用户稍微手抖,就可能会造成拍摄失败。It should be noted that the optical magnification of the telephoto lens of a smartphone is relatively small (for example, 5x). In order to obtain a larger magnification, digital zoom is assisted. When the digital zoom is 6 times, the telephoto lens The overall magnification factor is 5x*6=30x, which means that the moon can appear in both the telephoto lens and the main camera lens only within the framing area corresponding to 1/30 of the main camera lens’ framing area. It may cause the shooting to fail.
为了解决相关技术中用户拍摄困难的问题,本申请实施例提供了如下的拍摄预览方法。本领域技术人员应当知晓,本申请提供的拍摄预览方法不局限于对月亮的拍摄预览,任何远景,如天上飞机、海上船舶,任何近景,如人物、植物、显示器图像都可以通过本申请实施例提供的方案完成拍摄,而本申请采用月亮作为景象拍摄预览的一种示例。In order to solve the problem that the user is difficult to take pictures in the related art, the embodiment of the present application provides the following shooting preview method. Those skilled in the art should know that the shooting preview method provided by this application is not limited to the shooting preview of the moon. Any distant view, such as an airplane in the sky, a ship at sea, and any close-up view, such as people, plants, and display images, can be obtained through the embodiment of this application. The provided scheme completes the shooting, and this application uses the moon as an example of a scene shooting preview.
图2是本申请一实施例提供的月亮拍摄过程中拍摄预览方法的流程图,图3提供了月亮拍摄过程中拍摄预览方法的效果示意图,拍摄预览方法至少包括以下步骤:Fig. 2 is the flowchart of the shooting preview method in the moon shooting process provided by an embodiment of the present application. Fig. 3 provides a schematic diagram of the effect of the shooting preview method in the moon shooting process, and the shooting preview method at least includes the following steps:
步骤S110:主摄镜头与长焦镜头同时拍摄。Step S110: The main camera lens and the telephoto lens shoot at the same time.
在一个实施方式中,主摄镜头与长焦镜头同时开启进行拍摄,长焦镜头的放大倍数设置成尽可能小。In one embodiment, the main camera lens and the telephoto lens are turned on at the same time for shooting, and the magnification of the telephoto lens is set to be as small as possible.
步骤S121:获取主摄拍摄图像。Step S121: Acquiring an image captured by the main camera.
步骤S122:获取长焦拍摄图像。Step S122: Acquiring a telephoto shot image.
由于用户在拍摄时,是对目标景物的持续拍摄,因此长焦镜头与主摄镜头在拍摄过程中,会分别生成长焦视频流与主摄视频流,而本申请实施例中主摄拍摄图像与长焦拍摄图像就是基于长焦视频流与主摄视频流采样获得的长焦视频帧与主摄视频帧。Since the user is continuously shooting the target scene when shooting, the telephoto lens and the main camera lens will respectively generate a telephoto video stream and a main camera video stream during the shooting process, and in the embodiment of the application, the main camera takes images The image captured with the telephoto is the telephoto video frame and the main camera video frame obtained based on the sampling of the telephoto video stream and the main camera video stream.
在一个实施方式中,主摄镜头拍摄获得主摄拍摄图像,参考图3A,长焦镜头拍摄获得长焦拍摄图像,参考图3B,由于本申请实施例中长焦镜头的放大倍数较小,因此长焦拍摄图像中目标图像相对较小,即月亮相对较小。In one embodiment, the main camera lens shoots to obtain the main camera shot image. Referring to FIG. 3A, the telephoto lens shoots to obtain the telephoto shot image. Referring to FIG. 3B, since the magnification of the telephoto lens in the embodiment of the present application is small, The target image in the telephoto image is relatively small, that is, the moon is relatively small.
步骤S130:对长焦拍摄图像进行目标图像的检测。Step S130: Perform target image detection on the telephoto shot image.
在一个实施方式中,如图3C所示,长焦镜头拍摄的目标图像通过人工智能的卷积神经网络被识别出来,同时,为了在步骤S140中的放大不产生形变,将图像提取框的长宽比设置成与长焦镜头的拍摄图像的长宽比相同,参见图3D。In one embodiment, as shown in FIG. 3C , the target image taken by the telephoto lens is recognized through the convolutional neural network of artificial intelligence. The aspect ratio is set to be the same as that of the image captured by the telephoto lens, see FIG. 3D .
值得注意的是,图3C采用了最小矩形框对目标图像进行了圈定并输出,但是在实际应用中,可以采用其他形状的框对目标图像进行圈定并输出;同时,实际应用中,矩形框也不一定是能够圈定目标图像的最小矩形框,最小矩形框仅是一种实施方式,更有利于图像的有效放大。It is worth noting that in Figure 3C, the target image is delineated and output using the smallest rectangular frame, but in practical applications, frames of other shapes can be used to delineate and output the target image; at the same time, in practical applications, the rectangular frame is also It is not necessarily the smallest rectangular frame that can delineate the target image, and the smallest rectangular frame is only an implementation manner, which is more conducive to effective zooming in of the image.
步骤S140:放大目标图像。Step S140: Enlarging the target image.
在一个实施方式中,如图3E所示,根据上一步骤中获得的提取框,将目标图像放大,由 于目标图像处于提取框的中间位置,因此在等比例缩放时,目标图像仍然可以处于中间位置。In one embodiment, as shown in FIG. 3E , according to the extraction frame obtained in the previous step, the target image is enlarged. Since the target image is in the middle of the extraction frame, the target image can still be in the middle when zooming proportionally. Location.
步骤S150:预览叠加显示。Step S150 : Preview the superimposed display.
在一个实施方式中,如图3F所示,放大的长焦拍摄图像显示在长焦图像预览窗口中。由于该预览窗口是帮助用户观察确定目标图像的拍摄情况是否满足拍摄条件或拍摄要求,因此作为辅助窗口悬浮设置在主摄图像预览窗口的上方,且长焦图像预览窗口小于主摄图像预览窗口,这样方便用户随时观察主摄图像的拍摄情况,悬浮设置的位置可以在任何位置,但是为了不遮挡主摄图像,一般设置在主摄图像预览窗口的角落。In one embodiment, as shown in FIG. 3F , the enlarged telephoto image is displayed in the telephoto image preview window. Since the preview window is to help the user observe and determine whether the shooting conditions of the target image meet the shooting conditions or shooting requirements, it is suspended above the preview window of the main camera image as an auxiliary window, and the preview window of the telephoto image is smaller than the preview window of the main camera image. This is convenient for users to observe the shooting situation of the main camera image at any time. The position of the floating setting can be at any position, but in order not to block the main camera image, it is generally set at the corner of the main camera image preview window.
在一个实施方式中,用户拍摄时,会根据预览窗口中的图像显示,持续调整主摄镜头及长焦镜头,使预览窗口中显示的图像满意,此时为满足拍摄条件。In one embodiment, when the user is shooting, he will continuously adjust the main camera lens and the telephoto lens according to the image display in the preview window to make the image displayed in the preview window satisfactory, and the shooting conditions are satisfied at this time.
在另一个实施方式中,拍摄条件为电子设备中程序预设,电子设备会根据预设的拍摄条件,判断当前拍摄的图像是否满足要求,进而进入后续的图像融合阶段。In another embodiment, the shooting conditions are preset by a program in the electronic device, and the electronic device will judge whether the currently captured image meets the requirements according to the preset shooting conditions, and then enter the subsequent image fusion stage.
值得注意的是,图3F中的虚线框为一种提示线框,被设置为提示用户在主摄镜头中,能够拍摄到长焦月亮的取景范围。可以发现,对比于图1相关技术中的主摄镜头的取景范围,使用本申请实施例中的拍摄预览方法能够使主摄镜头的取景范围明显扩大,不会因为用户的手抖而导致月亮飘出取景框外,极大地提升了防抖效果,降低了拍摄难度。It is worth noting that the dotted frame in Figure 3F is a prompt frame, which is set to remind the user that the telephoto moon can be captured in the main camera lens. It can be found that, compared with the viewfinder range of the main camera lens in the related art in Figure 1, using the shooting preview method in the embodiment of the present application can significantly expand the viewfinder range of the main camera lens, and will not cause the moon to float due to the user's hand shaking. Outside the viewfinder frame, the anti-shake effect is greatly improved and the difficulty of shooting is reduced.
值得注意的是,预览阶段中步骤S110至步骤S150是循环过程,即上述步骤中的每一步都是针对实时传输的视频流中的视频帧进行的,因此实现了实时的视频级的预览。It is worth noting that step S110 to step S150 in the preview stage is a cyclic process, that is, each of the above steps is performed for video frames in the real-time transmitted video stream, thus realizing real-time video-level preview.
通过本申请上述实施例提供的拍摄预览方法,通过将长焦镜头的放大倍数设置的尽可能小,使长焦镜头的取景范围尽可能大,使长焦拍摄图像细节清晰,再将长焦镜头拍摄的目标图像放大后锁定在长焦预览窗口的预设位置,实现了多重的防抖效果。Through the shooting preview method provided by the above-mentioned embodiments of the present application, by setting the magnification of the telephoto lens as small as possible, the viewing range of the telephoto lens is made as large as possible, so that the details of the telephoto shot image are clear, and then the telephoto lens The captured target image is enlarged and locked at the preset position of the telephoto preview window, achieving multiple anti-shake effects.
图4是本申请一实施例提供的图像融合方法的流程图,图5提供了图像融合方法的效果示意图,图像融合方法至少包括以下步骤:Fig. 4 is a flowchart of an image fusion method provided by an embodiment of the present application, and Fig. 5 provides a schematic diagram of the effect of the image fusion method, and the image fusion method at least includes the following steps:
步骤S210:获取拍摄图像。Step S210: Acquiring a captured image.
步骤S221:获取长焦拍摄图像。Step S221: Acquiring a telephoto image.
在一个实施方式中,如图5A所示,长焦镜头的放大倍数较小,因此长焦拍摄图像中目标图像相对较小,即月亮相对较小。In one embodiment, as shown in FIG. 5A , the magnification of the telephoto lens is small, so the target image in the telephoto shot image is relatively small, that is, the moon is relatively small.
步骤S222:获取主摄拍摄图像。Step S222: Acquiring an image captured by the main camera.
在一个实施方式中,如图5B所示,本实施方式中的主摄镜头的拍摄与普通主摄镜头的拍摄相同。In one embodiment, as shown in FIG. 5B , the shooting of the main camera lens in this embodiment is the same as that of a common main camera lens.
步骤S230:对长焦拍摄图像进行目标图像的检测。Step S230: Perform target image detection on the telephoto shot image.
在一个实施方式中,长焦镜头拍摄的目标图像通过人工智能的卷积神经网络被识别出来,例如,采用在大规模图像数据集ImageNet上训练过的ResNet50卷积神经网络对目标图像进行识别,同时,为了在下一步骤中对目标图像的放大不产生形变,将图像提取框的长宽比设置成与长焦镜头的拍摄图像的长宽比相同。In one embodiment, the target image taken by the telephoto lens is identified through an artificial intelligence convolutional neural network, for example, the target image is identified by using a ResNet50 convolutional neural network trained on a large-scale image data set ImageNet, At the same time, in order to avoid distortion in the enlargement of the target image in the next step, the aspect ratio of the image extraction frame is set to be the same as the aspect ratio of the captured image of the telephoto lens.
步骤S240:放大目标图像。Step S240: Enlarge the target image.
在一个实施方式中,将目标图像的检测完成之后,对目标图像进行放大,得到图5C。In one embodiment, after the detection of the target image is completed, the target image is enlarged to obtain FIG. 5C .
步骤S250:融合主摄拍摄图像与放大后的目标图像,最终获得拍摄图像。Step S250: Fusing the image captured by the main camera and the enlarged target image to finally obtain the captured image.
在一个实施方式中,将主摄图像与放大后的目标图像进行融合,得到既有整体环境氛围又具有清晰细节的月亮图像,如图5D所示。In one embodiment, the main camera image is fused with the enlarged target image to obtain a moon image with both overall environmental atmosphere and clear details, as shown in FIG. 5D .
值得注意的是,区别于拍摄预览方法是循环进行的,图像融合方法是针对每一次用户按下快门后的对当前长焦图像和主摄图像的融合。It is worth noting that, unlike the shooting preview method, which is performed in a loop, the image fusion method is aimed at fusing the current telephoto image and the main camera image every time the user presses the shutter.
为了能够展现应用本申请实施例提供的拍摄预览方法与图像融合方法而进行拍摄的全流程,即预览阶段用户按下快门后进入图像融合阶段,对两个方法共同作用后完成了拍摄过程进行流程展示。In order to be able to show the whole process of shooting by applying the shooting preview method and image fusion method provided by the embodiment of the present application, that is, the user presses the shutter in the preview stage and then enters the image fusion stage, and the shooting process is completed after the two methods work together. exhibit.
如图6所示,图6是本申请实施例提供的拍摄方法的流程图,至少包括以下步骤:As shown in Figure 6, Figure 6 is a flowchart of the shooting method provided by the embodiment of the present application, at least including the following steps:
步骤S310:设置长焦镜头的放大倍数,使长焦镜头对应的取景范围最大。Step S310: Setting the magnification factor of the telephoto lens so that the viewing range corresponding to the telephoto lens is the largest.
在一个实施方式中,智能手机为拍摄方法的执行主体。以安卓手机为例,在进入一些拍摄模式时,Android平台会提供对应的设置好放大倍数的现成接口,被设置为控制摄像头的放大倍数,但是本申请提供的拍摄方法,不使用现成接口的放大倍数,而是自行设置放大倍数,且使放大倍数最小,即使长焦镜头对应的取景范围最大。例如,智能手机的长焦镜头的光学放大倍数一般是5x,那么在本实施例中,就选取5x作为长焦镜头的放大倍数,这样可以使主摄镜头取景面积的1/5对应的取景范围内就能够保证长焦镜头与主摄镜头均能成功取景,能够使用户更加方便快速的完成景物拍摄。In one embodiment, the smart phone is the execution subject of the photographing method. Taking an Android mobile phone as an example, when entering some shooting modes, the Android platform will provide a corresponding off-the-shelf interface with a magnification setting, which is set to control the magnification of the camera, but the shooting method provided by this application does not use the magnification of the off-the-shelf interface magnification, but set the magnification by yourself, and make the magnification the smallest, even if the telephoto lens corresponds to the largest viewfinder range. For example, the optical magnification of the telephoto lens of a smart phone is generally 5x, so in this embodiment, 5x is selected as the magnification of the telephoto lens, so that the viewfinder range corresponding to 1/5 of the viewfinder area of the main camera lens It can ensure that both the telephoto lens and the main camera lens can successfully find a view, which can make it more convenient and fast for users to complete the scene shooting.
步骤S320:获取长焦镜头的长焦拍摄图像与主摄镜头的主摄拍摄图像。Step S320: Obtain a telephoto shot image of the telephoto lens and a main shot image of the main camera lens.
在一个实施方式中,采用传统人工特征提取的目标检测技术进行目标图像的获取,例如Viola-Jones检测器、HOG(Histogram of Oriented Gradient,方向梯度直方图)检测器、DPM(Deformable Part Model,可变形部件模型)检测器等。In one embodiment, the acquisition of the target image is carried out using the target detection technology of traditional artificial feature extraction, such as Viola-Jones detector, HOG (Histogram of Oriented Gradient, direction gradient histogram) detector, DPM (Deformable Part Model, can Deformed part model) detector, etc.
在另一个实施方式中,采用基于人工智能模型的目标检测技术,例如R-CNN模型、SPPNet模型、Fast-RCNN模型、Faster-RCNN模型、Feature Pyramid Networks模型等。In another embodiment, a target detection technology based on an artificial intelligence model, such as an R-CNN model, an SPPNet model, a Fast-RCNN model, a Faster-RCNN model, a Feature Pyramid Networks model, etc. is used.
在一个拍月亮的实施例中,通过最小矩形包围框包围目标图像,完成目标图像的识别,然后获取最小矩形包围框的中心点,并形成包含最小矩形包围框的图像提取框,其中图像提取框的长宽比与长焦拍摄图像的长宽比相同;图像提取框的长宽比与长焦拍摄图像的长宽比相同,这样在后续缩放的步骤中,能够保证目标图像不发生形变,进而使拍摄出的图像更加准确真实。In an embodiment of shooting the moon, the target image is surrounded by the minimum rectangular bounding box to complete the recognition of the target image, and then the center point of the minimum rectangular bounding box is obtained to form an image extraction frame containing the minimum rectangular bounding box, wherein the image extraction frame The aspect ratio of the image is the same as that of the telephoto shot image; the aspect ratio of the image extraction frame is the same as that of the telephoto shot image, so that in the subsequent scaling steps, the target image can be guaranteed not to be deformed, and then Make the captured images more accurate and real.
需要说明的是,任何一种能够实现目标检测与识别的算法均可以被应用到此步骤中,由于目标检测不是本申请所要阐述的重点内容,因此在此不作过多赘述。It should be noted that any algorithm that can realize target detection and recognition can be applied to this step. Since target detection is not the focus of this application, it will not be described in detail here.
步骤S330:获取长焦拍摄图像中的目标图像,并放大目标图像。Step S330: Acquiring a target image in the telephoto shot image, and zooming in on the target image.
在一个实施方式中,采用插值法放大目标图像,差值法可以为最近邻插值法、双线性插值法、双三次插值法。In one embodiment, the target image is enlarged using an interpolation method, and the difference method may be a nearest neighbor interpolation method, a bilinear interpolation method, or a bicubic interpolation method.
需要说明的是,任何一种能够实现目标图像放大的算法均可以被应用到此步骤中,由于图像缩放不是本申请所要阐述的重点内容,因此在此不作过多赘述。It should be noted that any algorithm that can realize target image zooming can be applied to this step. Since image zooming is not the focus of this application, it will not be described in detail here.
步骤S340:显示并锁定放大后的目标图像至长焦图像预览窗口的预设位置,长焦预览窗口悬浮设置于主摄预览窗口上。Step S340: Display and lock the enlarged target image to the preset position of the telephoto image preview window, and the telephoto preview window is suspended on the main camera preview window.
在一个实施方式中,将放大后的目标图像显示在长焦图像预览窗口的中心位置,而长焦图像预览窗口是一个远小于主摄图像预览窗口的小窗口,位于主摄图像预览窗口的右上角,而由于目标图像是基于图像检测提取出来的图像,不受目标图像在长焦图像中的位置影响,因此,可以将目标图像锁定在长焦图像预览窗口的中心位置,即对于预览状态下的每一帧视频图像,都能将目标图像显示在中心位置,能够解决相关技术中目标图像飘动的问题,用户 在实际拍摄时,只要保证镜头移动下,主摄图像预览窗口中的目标图像位置合适,且长焦图像预览窗口中存在目标图像,就能够实现景物的成功拍摄。In one embodiment, the enlarged target image is displayed at the center of the telephoto image preview window, and the telephoto image preview window is a small window much smaller than the main camera image preview window, located on the upper right of the main camera image preview window angle, and since the target image is extracted based on image detection, it is not affected by the position of the target image in the telephoto image, so the target image can be locked at the center of the telephoto image preview window, that is, for the preview state Each frame of the video image can display the target image at the center position, which can solve the problem of the target image floating in the related technology. When the user is actually shooting, as long as the camera is moved, the target image position in the main camera image preview window If it is suitable, and there is a target image in the telephoto image preview window, the successful shooting of the scene can be realized.
在一些其他的实施方式中,主摄图像预览窗口具有提示线,这些提示线标定了长焦镜头的取景范围,即提示用户在移动主摄镜头变换取景时,不要让目标景物超出提示线的范围,否则会造成长焦镜头的取景失败。提示线的存在能够帮助用户更好的把握镜头取景的移动范围,提高景物拍摄的成功概率,增加取景的自由度。In some other implementations, the main camera image preview window has prompt lines, and these prompt lines mark the viewfinder range of the telephoto lens, that is, to remind the user not to let the target scene exceed the range of the prompt line when moving the main camera lens to change the viewfinder , otherwise it will cause the framing failure of the telephoto lens. The existence of the prompt line can help the user better grasp the moving range of the lens framing, improve the success probability of scene shooting, and increase the freedom of framing.
在一些其他的实施方式中,预设位置可以为除中心位置的其他预设位置,此预设位置可以是系统提前设定,也可以根据用户的使用习惯或喜好自行设定。In some other embodiments, the preset position may be other preset positions except the central position, and the preset position may be set in advance by the system, or may be set according to the user's usage habits or preferences.
步骤S350:融合放大后的目标图像与主摄拍摄图像,获得最终拍摄图像。Step S350: Fusing the enlarged target image and the image captured by the main camera to obtain a final captured image.
融合是指将多帧图像按照一定规则生成最终的图像的操作。在一些实施例中,电子设备可以通过线性加权、非线性加权融合、多帧降噪算法、主成分分析的融合、金字塔变化、小波变化等融合方法将多帧图像融合。Fusion refers to the operation of generating a final image from multiple frames of images according to certain rules. In some embodiments, the electronic device can fuse multi-frame images through fusion methods such as linear weighting, nonlinear weighting fusion, multi-frame noise reduction algorithm, principal component analysis fusion, pyramid transformation, and wavelet transformation.
在一个实施方式中,最终拍摄图像是指在一次图像拍摄过程获得的最终的图像。电子设备通过将长焦镜头拍摄的放大后的目标图像和主摄拍摄图像融合,得到最终拍摄图像时,可以将最终拍摄图像存储至电子设备的存储器中,还可以展示在电子设备的显示屏上。In one embodiment, the final captured image refers to the final image obtained in one image capturing process. When the electronic device fuses the enlarged target image captured by the telephoto lens with the main camera image to obtain the final captured image, the final captured image can be stored in the memory of the electronic device, and can also be displayed on the display screen of the electronic device .
基于本申请上述实施例提供的拍摄方案,能够使用户在较大范围内移动电子设备均能拍摄到目标景物,提升了电子设备景物拍摄场景下的防抖效果,提高了景物拍摄的成功率,使用户具有更加良好的拍摄感受。Based on the shooting scheme provided by the above-mentioned embodiments of the present application, the user can move the electronic device within a wide range to shoot the target scene, improve the anti-shake effect in the scene shooting scene of the electronic device, and improve the success rate of shooting the scene. Make users have a better shooting experience.
另外,本申请实施例还提供了一种拍摄装置,如图7所示,所述装置包括:In addition, the embodiment of the present application also provides a shooting device, as shown in FIG. 7, the device includes:
输入单元100,输入单元100包括主摄镜头1001与长焦镜头1002,能够对外界的景物进行拍摄。An input unit 100, the input unit 100 includes a main camera lens 1001 and a telephoto lens 1002, capable of taking pictures of external scenes.
值得说明的是,为了能够拍摄具有重叠区域的图像,长焦镜头与主摄镜头在电子设备的同一侧,同时,本领域技术人员应当知晓,一个拍摄装置可以有多个长焦镜头或主摄镜头。It is worth noting that in order to be able to capture images with overlapping areas, the telephoto lens and the main camera lens are on the same side of the electronic device. At the same time, those skilled in the art should know that a shooting device can have multiple lens.
长焦镜头参数设置单元200,能够设置长焦镜头的放大倍数,使长焦镜头对应的取景范围最大。The telephoto lens parameter setting unit 200 is capable of setting the magnification of the telephoto lens to maximize the viewing range corresponding to the telephoto lens.
图像处理单元300,能够获取长焦镜头的长焦拍摄图像与主摄镜头的主摄拍摄图像,图像处理单元还能获取长焦拍摄图像中的目标图像,并放大目标图像。The image processing unit 300 can acquire the telephoto shot image of the telephoto lens and the main shot image of the main camera lens, and the image processing unit can also acquire the target image in the telephoto shot image and enlarge the target image.
图像显示单元400,包括显示器4001,显示器4001能够显示主摄图像预览窗口与悬浮设置在主摄预览窗口上的长焦图像预览窗口,为了方便用户观察预览图像,图像显示单元能够将放大后的目标图像显示并锁定在长焦图像预览窗口的预设位置。The image display unit 400 includes a display 4001, and the display 4001 can display a main camera image preview window and a telephoto image preview window suspended on the main camera preview window. In order to facilitate the user to observe the preview image, the image display unit can display the enlarged target The image is displayed and locked at the preset position in the telephoto image preview window.
图像融合单元500,能够融合放大后的目标图像与主摄拍摄图像,获得最终拍摄图像。The image fusion unit 500 can fuse the enlarged target image and the main camera image to obtain the final image.
存储器600,存储器600包括计算机应用程序,计算机应用程序能够执行上述实施例提供的拍摄预览方法以及图像融合方法。The memory 600, the memory 600 includes a computer application program, and the computer application program can execute the shooting preview method and the image fusion method provided in the above embodiments.
处理器700,能够运行上述实施例提供的拍摄预览方法以及图像融合方法。The processor 700 can run the shooting preview method and the image fusion method provided in the above embodiments.
基于本申请上述实施例提供的拍摄装置,能够使用户在较大范围内移动电子设备均能拍摄到目标景物,提升了电子设备景物拍摄场景下的防抖效果,提高了景物拍摄的成功率,使用户具有更加良好的拍摄感受。Based on the shooting device provided by the above-mentioned embodiments of the present application, the user can move the electronic device within a wide range to shoot the target scene, improve the anti-shake effect in the scene shooting scene of the electronic device, and improve the success rate of shooting the scene. Make users have a better shooting experience.
存储器作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器可以包括高速随机存取存储器,还可以包括非暂态存储器, 例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施方式中,存储器可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至该处理器。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。As a non-transitory computer-readable storage medium, memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
实现上述实施例的信息处理方法所需的非暂态软件程序以及指令存储在存储器中,当被处理器执行时,执行上述实施例中的信息处理方法,例如,执行以上描述的图2中的方法步骤S110至S150,图4的方法步骤S210至250,图6的方法步骤S310至S350。The non-transitory software programs and instructions required to realize the information processing method of the above-mentioned embodiment are stored in the memory, and when executed by the processor, the information processing method in the above-mentioned embodiment is executed, for example, the above-described execution in FIG. 2 Method steps S110 to S150 , method steps S210 to 250 in FIG. 4 , method steps S310 to S350 in FIG. 6 .
以上所描述的设备实施例或者系统实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device embodiments or system embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units superior. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
此外,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个处理器或控制器执行,例如,被上述网络设备实施例中的一个处理器执行,可使得上述处理器执行上述实施例中的拍摄预览方法与图像融合方法,例如,执行以上描述的图2中的方法步骤S110至S150,图4的方法步骤S210至250,图6的方法步骤S310至S350。In addition, the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor or a controller, for example, by the above-mentioned network device Execution by a processor in the embodiment can make the processor execute the shooting preview method and the image fusion method in the above embodiment, for example, execute the method steps S110 to S150 in FIG. 2 described above, and the method step S210 in FIG. 4 To 250, steps S310 to S350 of the method in FIG. 6 .
本申请实施例包括:设置长焦镜头的放大倍数,使所述长焦镜头对应的取景范围最大;获取所述长焦镜头的长焦拍摄图像与主摄镜头的主摄拍摄图像;获取所述长焦拍摄图像中的目标图像,并放大所述目标图像;显示并锁定所述放大后的目标图像至长焦预览窗口的预设位置,所述长焦预览窗口悬浮设置于主摄预览窗口上;融合所述放大后的目标图像与所述主摄拍摄图像,获得最终拍摄图像。根据本申请实施例提供的拍摄方案,通过设置使长焦镜头的放大倍数尽可能的小,使长焦镜头与主摄镜头的取景范围尽可能大,同时将目标景物放大后锁定在预设位置,使用户在较大范围内移动电子设备均能拍摄到目标景物,提升了电子设备拍摄场景下的防抖效果,增加了拍摄的成功率。The embodiment of the present application includes: setting the magnification factor of the telephoto lens to maximize the framing range corresponding to the telephoto lens; obtaining the telephoto shot image of the telephoto lens and the main shot image of the main camera lens; obtaining the The target image in the telephoto shooting image is enlarged, and the target image is enlarged; the enlarged target image is displayed and locked to the preset position of the telephoto preview window, and the telephoto preview window is suspended on the main camera preview window ; Fusing the amplified target image with the main shot image to obtain a final shot image. According to the shooting scheme provided by the embodiment of the present application, by setting the magnification of the telephoto lens as small as possible, the viewing range of the telephoto lens and the main camera lens is made as large as possible, and at the same time, the target scene is magnified and locked at the preset position , so that the user can shoot the target scene when moving the electronic device in a large range, which improves the anti-shake effect in the shooting scene of the electronic device and increases the success rate of shooting.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统可以被实施为软件、固件、硬件及其适当的组合。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。本申请实施例中的电子设备可以为终端设备。该终端设备可以为移动终端设备,也可以为非移动终端设备。示例性的,移动终端设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载终端设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动终端设备可以为个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申 请实施例不作具体限定。Those skilled in the art can understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware and an appropriate combination thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit . Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those of ordinary skill in the art, the term computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media . The electronic device in this embodiment of the present application may be a terminal device. The terminal device may be a mobile terminal device or a non-mobile terminal device. Exemplarily, the mobile terminal device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle terminal device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant). assistant, PDA), etc., and the non-mobile terminal device may be a personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., which are not specifically limited in this embodiment of the present application.
以上是对本申请若干实施进行了具体说明,但本申请并不局限于上述实施方式,熟悉本领域的技术人员在不违背本申请本质的前提下还可作出种种的等同变形或替换,这些等同的变形或替换均包含在本申请权利要求所限定的范围内。The above is a specific description of several implementations of the present application, but the application is not limited to the above-mentioned implementations. Those skilled in the art can also make various equivalent deformations or replacements without violating the essence of the application. These equivalent Any modification or substitution is within the scope defined by the claims of the present application.

Claims (15)

  1. 一种拍摄预览方法,应用于电子设备,所述方法包括:A shooting preview method applied to electronic equipment, the method comprising:
    设置长焦镜头的放大倍数,使所述长焦镜头对应的取景范围最大;Setting the magnification of the telephoto lens, so that the viewing range corresponding to the telephoto lens is the largest;
    获取所述长焦镜头的长焦拍摄图像与主摄镜头的主摄拍摄图像;Obtain the telephoto shot image of the telephoto lens and the main shot image of the main camera lens;
    获取所述长焦拍摄图像中的目标图像,并放大所述目标图像;Acquiring a target image in the telephoto shot image, and zooming in on the target image;
    显示并锁定所述放大后的目标图像至长焦图像预览窗口的预设位置,所述长焦图像预览窗口悬浮设置于主摄图像预览窗口上。The enlarged target image is displayed and locked to a preset position of a telephoto image preview window, and the telephoto image preview window is suspended on the main camera image preview window.
  2. 根据权利要求1所述的方法,其中,所述设置长焦镜头的放大倍数,使所述长焦镜头对应的取景范围最大包括:The method according to claim 1, wherein said setting the magnification of the telephoto lens so that the maximum viewing range corresponding to the telephoto lens includes:
    设置长焦镜头的放大倍数为所述电子设备的最小光学放大倍数。The magnification of the telephoto lens is set to be the minimum optical magnification of the electronic device.
  3. 根据权利要求1所述的方法,其中,循环执行所述拍摄预览方法中的步骤,直至满足拍摄条件;其中,所述拍摄条件包括预设拍摄条件或用户实际使用的拍摄条件。The method according to claim 1, wherein the steps in the shooting preview method are executed in a loop until a shooting condition is satisfied; wherein the shooting condition includes a preset shooting condition or a shooting condition actually used by a user.
  4. 根据权利要求1所述的方法,其中,所述长焦镜头实时拍摄得到长焦视频流,所述主摄镜头实时拍摄得到主摄视频流;The method according to claim 1, wherein the telephoto lens shoots in real time to obtain a telephoto video stream, and the main camera lens shoots in real time to obtain a main camera video stream;
    所述获取所述长焦镜头的长焦拍摄图像与主摄镜头的主摄拍摄图像,包括:The acquisition of the telephoto shot image of the telephoto lens and the main shot image of the main camera lens includes:
    根据所述长焦视频流获得长焦视频帧,确定所述长焦视频帧为所述长焦拍摄图像;Obtaining a telephoto video frame according to the telephoto video stream, and determining that the telephoto video frame is the telephoto captured image;
    根据所述主摄视频流获得主摄视频帧,确定所述主摄视频帧为所述主摄拍摄图像。A main camera video frame is obtained according to the main camera video stream, and the main camera video frame is determined to be the image captured by the main camera.
  5. 根据权利要求1所述的方法,其中,所述获取所述长焦拍摄图像中的目标图像包括:The method according to claim 1, wherein said obtaining the target image in the telephoto shot image comprises:
    根据图像处理中的目标检测技术,获得能够包围所述目标图像的矩形包围框;Obtain a rectangular bounding box capable of enclosing the target image according to the target detection technology in image processing;
    根据所述矩形包围框,获得所述目标图像。Obtain the target image according to the rectangular bounding box.
    其中,所述目标检测技术至少包括以下之一:基于传统人工特征提取的目标检测技术,或基于人工智能模型的目标检测技术。Wherein, the target detection technology includes at least one of the following: target detection technology based on traditional manual feature extraction, or target detection technology based on artificial intelligence model.
  6. 根据权利要求5所述的方法,其中,所述根据所述矩形包围框,获得所述目标图像,包括:The method according to claim 5, wherein said obtaining said target image according to said rectangular bounding box comprises:
    获取所述矩形包围框的中心点;Obtain the center point of the rectangular bounding box;
    基于所述中心点,形成包含所述矩形包围框的图像提取框,其中所述图像提取框的长宽比与所述长焦拍摄图像的长宽比相同。Based on the central point, an image extraction frame including the rectangular bounding frame is formed, wherein the aspect ratio of the image extraction frame is the same as that of the telephoto captured image.
  7. 根据权利要求1所述的方法,其中,所述预设位置包括所述长焦图像预览窗口的中心位置。The method according to claim 1, wherein the preset position comprises a center position of the telephoto image preview window.
  8. 根据权利要求1所述的方法,其中,所述放大所述目标图像包括:The method according to claim 1, wherein said enlarging said target image comprises:
    采用插值法对所述目标图像进行放大。The target image is enlarged by an interpolation method.
  9. 根据权利要求1所述的方法,其中,所述主摄图像预览窗口中显示有提示线,所述提示线被设置为标定所述长焦镜头的取景范围。The method according to claim 1, wherein a prompt line is displayed in the preview window of the main camera image, and the prompt line is set to mark a viewfinder range of the telephoto lens.
  10. 一种图像融合方法,应用于电子设备,所述方法包括:An image fusion method applied to electronic equipment, the method comprising:
    获取根据权利要求1至9任一项所述的拍摄预览方法得到的所述放大后的目标图像与所述主摄拍摄图像;Acquiring the enlarged target image and the main shot image obtained according to the shooting preview method according to any one of claims 1 to 9;
    融合所述放大后的目标图像与所述主摄拍摄图像,获得最终拍摄图像。Fusing the enlarged target image and the main camera image to obtain a final image.
  11. 一种拍摄装置,所述装置包括:A photographing device, the device comprising:
    长焦镜头参数设置单元,被设置为设置长焦镜头的放大倍数,使所述长焦镜头对应的取景范围最大;The telephoto lens parameter setting unit is configured to set the magnification of the telephoto lens, so that the viewing range corresponding to the telephoto lens is the largest;
    图像处理单元,被设置为获取所述长焦镜头的长焦拍摄图像与主摄镜头的主摄拍摄图像;所述图像处理单元还被设置为获取所述长焦拍摄图像中的目标图像以及放大所述目标图像;The image processing unit is configured to obtain the telephoto shot image of the telephoto lens and the main shot image of the main camera lens; the image processing unit is also configured to obtain the target image in the telephoto shot image and zoom in said target image;
    图像显示单元,包括被设置为显示主摄拍摄图像的主摄图像预览窗口与悬浮设置在所述主摄预览窗口上的被设置为显示长焦拍摄图像的长焦图像预览窗口,所述图像显示单元被设置为显示被锁定的所述放大后的目标图像至长焦图像预览窗口的预设位置。The image display unit includes a main camera image preview window configured to display a main camera image and a telephoto image preview window suspended on the main camera preview window and configured to display a telephoto image, the image display The unit is configured to display the locked enlarged target image at a preset position of the telephoto image preview window.
  12. 根据权利要求11所述的装置,其中,所述长焦镜头参数设置单元被设置为设置长焦镜头的放大倍数为最小光学放大倍数。The device according to claim 11, wherein the telephoto lens parameter setting unit is configured to set the magnification of the telephoto lens to a minimum optical magnification.
  13. 根据权利要求11所述的装置,其中,所述图像处理单元被设置为根据图像处理中的目标检测技术,获得能够包围所述目标图像的矩形包围框;所述图像处理单元还被设置为获取所述矩形包围框的中心点,并形成包含所述矩形包围框的图像提取框,其中所述图像提取框的长宽比与所述长焦拍摄图像的长宽比相同。The device according to claim 11, wherein the image processing unit is configured to obtain a rectangular bounding box capable of enclosing the target image according to a target detection technique in image processing; the image processing unit is also configured to obtain The central point of the rectangular bounding frame, and form an image extraction frame containing the rectangular bounding frame, wherein the aspect ratio of the image extraction frame is the same as the aspect ratio of the telephoto captured image.
  14. 一种电子设备,包括:长焦镜头、主摄镜头、显示器、存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如权利要求1至9任意一项所述的拍摄预览方法,或如权利要求10所述的图像融合方法。An electronic device, comprising: a telephoto lens, a main camera lens, a display, a memory, a processor, and a computer program stored in the memory and operable on the processor, wherein the computer program is implemented when the processor executes the computer program The shooting preview method according to any one of claims 1 to 9, or the image fusion method according to claim 10.
  15. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至9任意一项所述的拍摄预览方法,或如权利要求10所述的图像融合方法。A computer-readable storage medium, storing computer-executable instructions, the computer-executable instructions are used to execute the shooting preview method according to any one of claims 1 to 9, or the image fusion method according to claim 10 .
PCT/CN2022/121449 2021-11-29 2022-09-26 Photographing preview method, image fusion method, electronic device, and storage medium WO2023093274A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111473660.8A CN116208846A (en) 2021-11-29 2021-11-29 Shooting preview method, image fusion method, electronic device and storage medium
CN202111473660.8 2021-11-29

Publications (1)

Publication Number Publication Date
WO2023093274A1 true WO2023093274A1 (en) 2023-06-01

Family

ID=86506543

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/121449 WO2023093274A1 (en) 2021-11-29 2022-09-26 Photographing preview method, image fusion method, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN116208846A (en)
WO (1) WO2023093274A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180288310A1 (en) * 2015-10-19 2018-10-04 Corephotonics Ltd. Dual-aperture zoom digital camera user interface
CN111541845A (en) * 2020-04-30 2020-08-14 维沃移动通信(杭州)有限公司 Image processing method and device and electronic equipment
CN113037995A (en) * 2019-12-25 2021-06-25 华为技术有限公司 Shooting method and terminal in long-focus scene
CN113473007A (en) * 2021-06-24 2021-10-01 维沃移动通信(杭州)有限公司 Shooting method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180288310A1 (en) * 2015-10-19 2018-10-04 Corephotonics Ltd. Dual-aperture zoom digital camera user interface
CN113037995A (en) * 2019-12-25 2021-06-25 华为技术有限公司 Shooting method and terminal in long-focus scene
CN111541845A (en) * 2020-04-30 2020-08-14 维沃移动通信(杭州)有限公司 Image processing method and device and electronic equipment
CN113473007A (en) * 2021-06-24 2021-10-01 维沃移动通信(杭州)有限公司 Shooting method and device

Also Published As

Publication number Publication date
CN116208846A (en) 2023-06-02

Similar Documents

Publication Publication Date Title
US9813607B2 (en) Method and apparatus for image capture targeting
CN105991915B (en) Photographing method and device and terminal
WO2015161698A1 (en) Image shooting terminal and image shooting method
WO2017045558A1 (en) Depth-of-field adjustment method and apparatus, and terminal
WO2017088678A1 (en) Long-exposure panoramic image shooting apparatus and method
EP4044579A1 (en) Main body detection method and apparatus, and electronic device and computer readable storage medium
US9386229B2 (en) Image processing system and method for object-tracing
CN108259770B (en) Image processing method, image processing device, storage medium and electronic equipment
JP2012065173A (en) Imaging apparatus
JP2018157479A (en) Image pickup apparatus, control method of the same, and program
CN106412421A (en) System and method for rapidly generating large-size multi-focused image
CN107071277B (en) Optical drawing shooting device and method and mobile terminal
KR20210053121A (en) Method and apparatus for training image processing model, and storage medium
JP2006166396A (en) Camera, method for notifying camera shaking state and program
WO2018196854A1 (en) Photographing method, photographing apparatus and mobile terminal
WO2018103371A1 (en) Processing method in video recording and apparatus
WO2023093274A1 (en) Photographing preview method, image fusion method, electronic device, and storage medium
CN115496664A (en) Model training method and device, electronic equipment and readable storage medium
CN106488128B (en) Automatic photographing method and device
CN112640420B (en) Control method, device, equipment and system of electronic device
WO2020238312A1 (en) Photographing method and apparatus, storage medium and electronic device
WO2017092261A1 (en) Camera module, mobile terminal, and image shooting method and apparatus therefor
KR100734847B1 (en) Apparatus and method for taking a clear image in slow shutter speed
WO2022227040A1 (en) Video stability augmentation method, imaging apparatus, handheld gimbal, movable platform and storage medium
US20230088309A1 (en) Device and method for capturing images or video