WO2021169669A1 - Photography composition method, terminal, and storage medium - Google Patents

Photography composition method, terminal, and storage medium Download PDF

Info

Publication number
WO2021169669A1
WO2021169669A1 PCT/CN2021/072503 CN2021072503W WO2021169669A1 WO 2021169669 A1 WO2021169669 A1 WO 2021169669A1 CN 2021072503 W CN2021072503 W CN 2021072503W WO 2021169669 A1 WO2021169669 A1 WO 2021169669A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
camera
composition
preview
terminal
Prior art date
Application number
PCT/CN2021/072503
Other languages
French (fr)
Chinese (zh)
Inventor
黄海东
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2021169669A1 publication Critical patent/WO2021169669A1/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
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image

Definitions

  • This application relates to the field of electronic applications, and in particular to a method, terminal, and storage medium for photographing composition.
  • composition technology in the camera technology is a relatively professional skill. Many ordinary photographers do not have the skills to shoot composition, do not know how to adjust the lens orientation or the lens orientation adjustment is inaccurate, resulting in poor visual effects of the image and low shooting intelligence. problem.
  • the embodiments of the present application provide a photographing composition method, a terminal, and a storage medium, which can improve the visual effect of an image and improve the intelligence of photographing.
  • An embodiment of the present application provides a method for photographing composition, which is applied to a terminal, the terminal includes a first camera and a second camera, the viewing angle range of the first camera is larger than the viewing angle range of the second camera, and the method includes:
  • the second camera is used to capture the suggested composition image in the suggested composition frame.
  • An embodiment of the present application provides a terminal, the terminal includes a first camera and a second camera, the first camera has a larger viewing angle range than the second camera, and the terminal includes:
  • the acquisition part is configured to use the first camera to acquire a first preview image when the shooting composition function is triggered;
  • the display part is configured to display the first preview image on the shooting preview interface, and display a suggested composition frame corresponding to the suggested composition image on the first preview image, and the suggested composition image is from the first preview image
  • the photographing part is configured to use the second camera to photograph the suggested composition image in the suggested composition frame when it is detected that the image acquisition area corresponding to the second camera moves to the suggested composition frame.
  • An embodiment of the present application provides a terminal, which includes: a processor, a display, a memory, and a communication bus; when the processor executes an operating program stored in the memory, the method according to any one of the above is implemented.
  • the embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the method according to any one of the above is implemented.
  • the embodiment of the present application provides a photographing composition method, a terminal, and a storage medium, which are applied to a terminal.
  • the terminal includes a first camera and a second camera.
  • the viewing angle range of the first camera is larger than the viewing angle range of the second camera.
  • the method includes: When the shooting composition function is triggered, the first camera is used to collect the first preview image; the first preview image is displayed on the shooting preview interface, and the recommended composition frame corresponding to the recommended composition image is displayed on the first preview image.
  • the recommended composition image is from the first preview image.
  • An image determined in the preview image when it is detected that the image capture area corresponding to the second camera has moved to the recommended composition frame, the second camera is used to shoot the recommended composition image in the recommended composition frame.
  • the terminal uses the first camera to capture the first preview image, and uses the preset target detection model to determine from the first preview image that the capture size of the second camera is the same Therefore, the photographer can move the image capture frame of the second camera to the recommended composition frame corresponding to the recommended composition image, so that the visual effect of the captured image is good, and the intelligence of shooting is improved.
  • FIG. 1 is a flowchart of a method for shooting composition according to an embodiment of the application
  • FIG. 2 is an exemplary interface display diagram for displaying the preview frame and suggested composition frame of the main camera in the first preview image according to an embodiment of the application;
  • FIG. 3 is an exemplary interface display diagram of a recommended composition image taken by a main camera of a terminal according to an embodiment of the application
  • FIG. 4 is a schematic flowchart of an exemplary terminal automatic composition composition provided by an embodiment of the application.
  • FIG. 5 is a first structural diagram of a terminal 1 provided by an embodiment of the application.
  • FIG. 6 is a second structural diagram of a terminal 1 provided by an embodiment of this application.
  • the embodiment of the application provides a method for shooting composition, which is applied to a terminal.
  • the terminal includes a first camera and a second camera.
  • the viewing angle range of the first camera is larger than the viewing angle range of the second camera.
  • the method may include:
  • the terminal for shooting and composing may be any device with shooting and storage functions, such as tablet computers, mobile phones, personal computers (PC), notebook computers, cameras, wearable devices and other photographing devices.
  • the terminal when shooting on the terminal, the terminal is set with different shooting options, such as panoramic shooting, portrait shooting, time-lapse shooting, etc., including shooting composition options.
  • shooting composition option When the user clicks on the shooting composition option, the terminal is triggered Shooting composition function, at this time, the terminal needs to determine the optimal composition strategy.
  • the terminal starts the first camera, and uses the first camera to collect the first preview image.
  • the first camera is the camera with the largest viewing angle in the terminal, and the first camera may be a wide-angle lens.
  • the wide-angle lens is a photographic lens with a focal length shorter than a standard lens, a viewing angle larger than a standard lens, a focal length longer than a fisheye lens, and a viewing angle smaller than a fisheye lens.
  • Wide-angle lenses are divided into two types: ordinary wide-angle lenses and ultra-wide-angle lenses, which are specifically selected according to actual conditions, and the embodiments of the present application do not make specific limitations.
  • the focal length of an ordinary wide-angle lens is generally 38-24 mm, and the angle of view is 60-84 degrees; the focal length of an ultra-wide-angle lens is 20-13 mm, and the angle of view is 94-118 degrees.
  • the wide-angle lens can capture a larger area of scenery in a shorter shooting distance range than other lenses.
  • the terminal when the terminal uses the second camera to collect images when triggering the shooting composition function, the terminal first switches from the second camera to the first camera, and then uses the first camera to collect the first preview image.
  • the second camera may be a standard lens, a telephoto lens, a main camera, etc. of the terminal, which is specifically selected according to actual conditions, and the embodiment of the present application does not make specific limitations.
  • the viewing angle range of the second camera is smaller than the viewing angle range of the second camera.
  • the terminal After the terminal uses the first camera to collect the first preview image, the terminal displays the first preview image on the shooting preview interface, and displays the recommended composition frame corresponding to the recommended composition image on the first preview image.
  • the terminal uses a preset target detection model to determine the recommended composition image from the first preview image.
  • the terminal annotates the recommended composition training image containing the target training object from the wide-angle training image; after that, the terminal uses the wide-angle training image and the recommended composition training image in the wide-angle training image to train the initial target detection model to obtain the preset Target detection model.
  • the terminal obtains a large number of wide-angle training images, and in each wide-angle training image, annotates a recommended composition training image containing the target training object, and then the terminal uses the wide-angle training image and the recommended composition training in the wide-angle training image
  • the image trains an improved single target detection model based on Single Shot MultiBox Detector (SSD) to obtain a preset target detection model.
  • SSD Single Shot MultiBox Detector
  • the size of the composition training image is the same as the collection size of the second camera, where the ratio of the collection size of the second camera can be 16:9, 4:3, 1:1, etc., specifically The selection is made according to the actual situation.
  • the embodiment of this application does not make specific limitations. Taking the ratio of the collection size of the second camera to 16:9 as an example, when the size of the wide-angle training image is 4000 pixels ⁇ 3000 pixels, the terminal is in In the wide-angle training image, a suggested composition training image with a collection size of 2400 pixels ⁇ 1350 pixels is marked, and the terminal marks a 16:9 suggested composition training image in the 4:3 wide-angle training image.
  • the terminal may mark the recommended composition training images of multiple sizes in each wide-angle training image, and the preset target detection model trained from this may be suitable for shooting operations of multiple acquisition sizes. .
  • the terminal inputs the collected first preview image into the preset target detection model, and the preset target detection model returns from the first preview image a suggested composition image with the same size as the second camera's collection size. And output the suggested composition image.
  • the second camera in the terminal may be a rotatable lens. After the terminal determines the recommended composition frame, the terminal rotates the second camera until the preview frame of the second camera overlaps the recommended composition frame. At this time, the image acquired by the terminal using the second camera is the recommended composition image.
  • the terminal determines the image collection area corresponding to the second camera, where the area size of the image collection area is the same as the collection size of the second camera; a preview frame corresponding to the image collection area is displayed on the first preview image.
  • the terminal displays the first preview image collected by the wide-angle lens on the shooting preview interface, and marks the suggested composition frame and the preview frame of the main camera in the first preview image.
  • the terminal marking the recommended composition frame and the second camera preview frame on the first preview image can guide the user to move the terminal and then move the second camera of the terminal so that the preview frame of the second camera coincides with the recommended composition frame ,
  • the image captured by the second camera is the suggested composition image framed by the suggested composition frame.
  • the terminal After the terminal displays the first preview image and the recommended composition frame on the shooting preview interface, the terminal detects the movement displacement of the second camera. When the terminal detects that the image collection area corresponding to the second camera moves to the recommended composition frame, the terminal uses the second The camera captures the recommended composition image in the recommended frame.
  • the terminal detects the movement displacement of the second camera in real time, and maps the movement displacement of the second camera to the movement displacement of the preview frame on the first preview image, and then the terminal moves the displacement on the first preview image according to the movement displacement Move the preview box.
  • the terminal when the terminal detects that the image capture area corresponding to the second camera moves to the recommended composition image, that is, when the preview frame in the shooting preview interface overlaps with the recommended composition frame, the terminal switches from the first camera to the second camera , And use the second camera to collect the recommended composition image. After that, the terminal switches the first preview image displayed in the shooting preview interface to the recommended composition image; at this time, the user clicks the shooting button to trigger the shooting instruction of the terminal, and the terminal uses the second camera Take the recommended composition image of the shooting preview interface.
  • the terminal uses the main camera to obtain the suggested composition image in the suggested composition frame.
  • the process of the terminal automatically composing a picture during shooting includes:
  • the terminal When the automatic composition function is turned on, the terminal will switch the preview to the wide-angle lens.
  • the terminal captures the scene picture taken by the wide-angle lens, and inputs the scene picture into the recommended composition network.
  • composition network output an optimal suggested composition frame and display the suggested composition frame in the scene picture of the current wide-angle preview interface.
  • the terminal displays the preview frame of the main camera in the scene picture.
  • the terminal guides the user to move the terminal so that the recommended composition frame coincides with the preview frame of the main camera.
  • the terminal switches to the main camera and displays the recommended composition image taken by the main camera in the preview interface.
  • the terminal uses the wide-angle lens to collect the first preview image, and uses the preset target detection model to determine from the first preview image a suggested composition image with the same size as the main camera's collection size.
  • the photographer can move the image capture frame of the main camera to the recommended composition frame corresponding to the recommended composition image, so that the visual effect of the captured image is good, and the intelligence of shooting is improved.
  • An embodiment of the present application provides a terminal.
  • the terminal includes a first camera and a second camera.
  • the viewing angle range of the first camera is larger than the viewing angle range of the second camera.
  • the terminal 1 includes:
  • the collecting part 10 is configured to use the first camera to collect a first preview image when the shooting composition function is triggered;
  • the display part 11 is configured to display the first preview image on the shooting preview interface, and display a suggested composition frame corresponding to the suggested composition image on the first preview image, and the suggested composition image is from the first preview The image identified in the image;
  • the photographing part 12 is configured to use the second camera to photograph the suggested composition image in the suggested composition frame when it is detected that the image capture area corresponding to the second camera moves to the suggested composition frame.
  • the terminal further includes: a determining part
  • the determining part is configured to determine an image acquisition area corresponding to the second camera, and the area size of the image acquisition area is the same as the acquisition size of the second camera;
  • the display part 11 is further configured to display a preview frame corresponding to the image acquisition area on the first preview image.
  • the terminal further includes: a handover part
  • the switching part is configured to switch from the first camera to the second camera, and switch the first preview image displayed in the shooting preview interface to the suggested composition image;
  • the photographing part 12 is further configured to photograph the suggested composition image of the photographing preview interface when a photographing instruction is triggered.
  • the determining part is further configured to determine the suggested composition image from the first preview image by using a preset target detection model.
  • the terminal further includes: a labeling part and a training part;
  • the labeling part is configured to label the recommended composition training image containing the target training object from the wide-angle training image;
  • the training part is configured to use the wide-angle training image and the suggested composition training image in the wide-angle training image to train an initial target detection model to obtain the preset target detection model.
  • the area size of the suggested composition image is the same as the collection size of the second camera, and the suggested composition image includes the target object to be photographed.
  • the first camera is a wide-angle lens
  • the second camera is a main camera
  • An embodiment of the present application provides a terminal.
  • the terminal includes a first camera and a second camera.
  • the angle of view of the first camera is larger than that of the second camera.
  • the first camera is used to collect the first preview image.
  • the first preview image is displayed on the shooting preview interface, and the recommended composition frame corresponding to the recommended composition image is displayed on the first preview image.
  • the recommended composition image is the image determined from the first preview image; when the second camera is detected When the corresponding image capture area moves to the recommended composition frame, the second camera is used to capture the recommended composition image in the recommended composition frame.
  • the terminal since the first camera captures a wider range, the terminal uses the first camera to collect the first preview image, and uses the preset target detection model to determine the first preview image from the first preview image.
  • the two cameras capture the same recommended composition image, so the photographer can move the second camera’s image capture frame to the recommended composition frame corresponding to the recommended composition image, so that the visual effect of the captured image is good, and the shooting is improved.
  • the intelligence since the first camera captures a wider range, the terminal uses the first camera to collect the first preview image, and uses the preset target detection model to determine the first preview image from the first preview image.
  • the two cameras capture the same recommended composition image, so the photographer can move the second camera’s image capture frame to the recommended composition frame corresponding to the recommended composition image, so that the visual effect of the captured image is good, and the shooting is improved.
  • the intelligence since the first camera captures a wider range, the terminal uses the first camera to collect the first preview image, and uses the preset target detection model to determine the first preview image from the first preview image.
  • FIG. 6 is a second schematic diagram of the composition structure of a terminal 1 provided by an embodiment of this application.
  • the terminal 1 of this embodiment includes: a display 13 , Processor 14, memory 15, and communication bus 16.
  • the above-mentioned collection part 10, shooting part 12, determining part, switching part, labeling part, training part, detecting part, and moving part may be implemented by the processor 14 located on the terminal 1, and the above-mentioned display part 11 It can be implemented by a display 13 located on the terminal 1.
  • the processor 14 can be an Application Specific Integrated Circuit (ASIC), a digital signal processor (DSP, Digital Signal Processor), and a digital signal processing image processing device (DSPD, At least one of Digital Signal Processing Device, Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA, Field Programmable Gate Array), CPU, controller, microcontroller, and microprocessor kind. It can be understood that, for different devices, the electronic devices used to implement the above-mentioned processor functions may also be other, which is not specifically limited in this embodiment.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processor
  • DSPD digital signal processing image processing device
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • CPU controller
  • the above-mentioned communication bus 16 is used to realize the connection and communication between the display 13, the processor 14 and the memory 15.
  • the above-mentioned display 13 is used to display the first preview image on the shooting preview interface, and in the first
  • the recommended composition frame corresponding to the recommended composition image is displayed on the preview image, and the recommended composition image is an image determined from the first preview image; when the processor 14 executes the operating program stored in the memory 15, the following state detection method is implemented:
  • the first camera When the shooting composition function is triggered, the first camera is used to collect the first preview image; when it is detected that the image collection area corresponding to the second camera has moved to the suggested composition frame, the second camera is used to shoot the suggested composition image in the suggested composition frame.
  • the processor 14 is further configured to determine an image acquisition area corresponding to the second camera, and the area size of the image acquisition area is the same as the acquisition size of the second camera;
  • the display 13 is also used to display a preview frame corresponding to the image collection area on the first preview image.
  • the processor 14 is further configured to switch from the first camera to the second camera, and switch the first preview image displayed in the shooting preview interface to the suggested composition Image; when a shooting instruction is triggered, use the second camera to shoot the suggested composition image of the shooting preview interface.
  • the processor 14 is further configured to use a preset target detection model to determine the suggested composition image from the first preview image.
  • the processor 14 is also used to annotate the recommended composition training image containing the target training object from the wide-angle training image; use the wide-angle training image and the recommended composition training image in the wide-angle training image to train the initial target A detection model to obtain the preset target detection model.
  • the area size of the suggested composition image is the same as the collection size of the second camera, and the suggested composition image includes the target object to be photographed.
  • the first camera is a wide-angle lens
  • the second camera is the main camera
  • the embodiment of the present application provides a storage medium on which a computer program is stored, and the above-mentioned computer-readable storage medium stores one or more programs, and the above-mentioned one or more programs can be executed by one or more processors and applied to a terminal
  • the computer program implements the shooting composition method as described in the first embodiment.
  • the technical solution of the present disclosure essentially or the part that contributes to the related technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk). ) Includes several instructions to make an image display device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present disclosure.
  • the embodiment of the present application provides a photographing composition method, a terminal, and a storage medium, which are applied to a terminal.
  • the terminal includes a first camera and a second camera.
  • the viewing angle range of the first camera is larger than the viewing angle range of the second camera.
  • the method includes: When the shooting composition function is triggered, the first camera is used to collect the first preview image; the first preview image is displayed on the shooting preview interface, and the recommended composition frame corresponding to the recommended composition image is displayed on the first preview image.
  • the recommended composition image is from the first preview image.
  • An image determined in the preview image when it is detected that the image capture area corresponding to the second camera has moved to the recommended composition frame, the second camera is used to shoot the recommended composition image in the recommended composition frame.
  • the terminal uses the first camera to capture the first preview image, and uses the preset target detection model to determine from the first preview image that the capture size of the second camera is the same Therefore, the photographer can move the image capture frame of the second camera to the recommended composition frame corresponding to the recommended composition image, so that the visual effect of the captured image is good, and the intelligence of shooting is improved.

Abstract

Provided are a photography composition method, a terminal, and a storage medium. The method is applied to the terminal. The terminal comprises a first camera and a second camera, wherein the view angle range of the first camera is larger than the view angle range of the second camera. The method comprises: when a photography composition function is triggered, collecting a first preview image by using a first camera; displaying the first preview image on a photography preview interface, and displaying, on the first preview image, a recommended composition frame corresponding to a recommended composition image, wherein the recommended composition image is an image determined from the first preview image; and when it is detected that an image collection area corresponding to a second camera moves to the recommended composition frame, photographing the recommended composition image in the recommended composition frame by using the second camera.

Description

一种拍摄构图方法及终端、存储介质Photographing composition method, terminal and storage medium
相关申请的交叉引用Cross-references to related applications
本申请基于申请号为202010129110.3、申请日为2020年02月28日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。This application is based on a Chinese patent application with an application number of 202010129110.3 and an application date of February 28, 2020, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated into this application by way of introduction.
技术领域Technical field
本申请涉及电子应用领域,尤其涉及一种拍摄构图方法及终端、存储介质。This application relates to the field of electronic applications, and in particular to a method, terminal, and storage medium for photographing composition.
背景技术Background technique
摄像技术中的构图技术属于比较专业的技能,很多普通的拍摄者都不具备拍摄构图的技能,不知道如何调整镜头朝向或者镜头朝向调整不准确,导致图像的视觉效果差,拍摄智能性低的问题。The composition technology in the camera technology is a relatively professional skill. Many ordinary photographers do not have the skills to shoot composition, do not know how to adjust the lens orientation or the lens orientation adjustment is inaccurate, resulting in poor visual effects of the image and low shooting intelligence. problem.
发明内容Summary of the invention
本申请实施例提供一种拍摄构图方法及终端、存储介质,能够提高图像的视觉效果,提高拍摄的智能性。The embodiments of the present application provide a photographing composition method, a terminal, and a storage medium, which can improve the visual effect of an image and improve the intelligence of photographing.
本申请的技术方案是这样实现的:The technical solution of this application is realized as follows:
本申请实施例提供一种拍摄构图方法,应用于终端,所述终端包括第一摄像头和第二摄像头,所述第一摄像头的视角范围大于所述第二摄像头的视角范围,所述方法包括:An embodiment of the present application provides a method for photographing composition, which is applied to a terminal, the terminal includes a first camera and a second camera, the viewing angle range of the first camera is larger than the viewing angle range of the second camera, and the method includes:
当触发拍摄构图功能时,利用第一摄像头采集第一预览图像;When the shooting composition function is triggered, use the first camera to collect the first preview image;
在拍摄预览界面上显示所述第一预览图像,并在所述第一预览图像上显示建议构图图像对应的建议构图框,所述建议构图图像为从所述第一预览图像中确定出的图像;Display the first preview image on the shooting preview interface, and display the recommended composition frame corresponding to the recommended composition image on the first preview image, and the recommended composition image is an image determined from the first preview image ;
当检测到第二摄像头对应的图像采集区域移动至所述建议构图框时,利用所述第二摄像头拍摄所述建议构图框中的所述建议构图图像。When it is detected that the image capture area corresponding to the second camera moves to the suggested composition frame, the second camera is used to capture the suggested composition image in the suggested composition frame.
本申请实施例提供一种终端,所述终端包括第一摄像头和第二摄像头,所述第一摄像头的视角范围大于所述第二摄像头的视角范围,所述终端包括:An embodiment of the present application provides a terminal, the terminal includes a first camera and a second camera, the first camera has a larger viewing angle range than the second camera, and the terminal includes:
采集部分,配置为当触发拍摄构图功能时,利用所述第一摄像头采集第一预览图像;The acquisition part is configured to use the first camera to acquire a first preview image when the shooting composition function is triggered;
显示部分,配置为在拍摄预览界面上显示所述第一预览图像,并在所述第一预览图像上显示建议构图图像对应的建议构图框,所述建议构图图像为从所述第一预览图像中确定出的图像;The display part is configured to display the first preview image on the shooting preview interface, and display a suggested composition frame corresponding to the suggested composition image on the first preview image, and the suggested composition image is from the first preview image The image identified in
拍摄部分,配置为当检测到所述第二摄像头对应的图像采集区域移动至所述建议构图框时,利用所述第二摄像头拍摄所述建议构图框中的所述建议构图图像。The photographing part is configured to use the second camera to photograph the suggested composition image in the suggested composition frame when it is detected that the image acquisition area corresponding to the second camera moves to the suggested composition frame.
本申请实施例提供一种终端,所述中的包括:处理器、显示器、存储器及通信总线;所述处理器执行存储器存储的运行程序时实现如上述任一项所述的方法。An embodiment of the present application provides a terminal, which includes: a processor, a display, a memory, and a communication bus; when the processor executes an operating program stored in the memory, the method according to any one of the above is implemented.
本申请实施例提供一种存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一项所述的方法。The embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the method according to any one of the above is implemented.
本申请实施例提供了一种拍摄构图方法及终端、存储介质,应用于终端,终端包括第一摄像头和第二摄像头,第一摄像头的视角范围大于第二摄像头的视角范围,该方法包括:当触发拍摄构图功能时,利用第一摄像头采集第一预览图像;在拍摄预览界面上显示第一预览图像,并在第一预览图像上显示建议构图图像对应的建议构图框,建议构图图像为从第一预览图像中确定出的图像;当检测到第二摄像头对应的图像采集区域移动至建议构图框时,利用第二摄像头拍摄建议构图框中的建议构图图像。采用上述实现方案,由于第一摄像头所拍摄的范围更广,终端利用第一摄像头采集第一预览图像,并利用预设目标检测模型从第一预览图像中确定出与第二摄像头的采集尺寸相同的建议构图图像,由此,拍摄者可以将第二摄像头的图像采集框移动至建议构图图像对应的建议构图框,使得拍摄得到的图像的视觉效果好,且提高了拍摄的智能性。The embodiment of the present application provides a photographing composition method, a terminal, and a storage medium, which are applied to a terminal. The terminal includes a first camera and a second camera. The viewing angle range of the first camera is larger than the viewing angle range of the second camera. The method includes: When the shooting composition function is triggered, the first camera is used to collect the first preview image; the first preview image is displayed on the shooting preview interface, and the recommended composition frame corresponding to the recommended composition image is displayed on the first preview image. The recommended composition image is from the first preview image. An image determined in the preview image; when it is detected that the image capture area corresponding to the second camera has moved to the recommended composition frame, the second camera is used to shoot the recommended composition image in the recommended composition frame. With the above implementation scheme, since the first camera captures a wider range, the terminal uses the first camera to capture the first preview image, and uses the preset target detection model to determine from the first preview image that the capture size of the second camera is the same Therefore, the photographer can move the image capture frame of the second camera to the recommended composition frame corresponding to the recommended composition image, so that the visual effect of the captured image is good, and the intelligence of shooting is improved.
附图说明Description of the drawings
图1为本申请实施例提供的一种拍摄构图方法的流程图;FIG. 1 is a flowchart of a method for shooting composition according to an embodiment of the application;
图2为本申请实施例提供的一种示例性的在第一预览图像中显示主摄像头的预览框和建议构图框的界面显示图;2 is an exemplary interface display diagram for displaying the preview frame and suggested composition frame of the main camera in the first preview image according to an embodiment of the application;
图3为本申请实施例提供的一种示例性的终端利用主摄像头拍摄的建议构图图像的界面显示图;FIG. 3 is an exemplary interface display diagram of a recommended composition image taken by a main camera of a terminal according to an embodiment of the application; FIG.
图4为本申请实施例提供的一种示例性的终端自动构图的流程示意图;FIG. 4 is a schematic flowchart of an exemplary terminal automatic composition composition provided by an embodiment of the application;
图5为本申请实施例提供的一种终端1的结构示意图一;FIG. 5 is a first structural diagram of a terminal 1 provided by an embodiment of the application;
图6为本申请实施例提供的一种终端1的结构示意图二。FIG. 6 is a second structural diagram of a terminal 1 provided by an embodiment of this application.
具体实施方式Detailed ways
实施例一Example one
本申请实施例提供一种拍摄构图方法,应用于终端,终端包括第一摄 像头和第二摄像头,第一摄像头的视角范围大于第二摄像头的视角范围,如图1所示,该方法可以包括:The embodiment of the application provides a method for shooting composition, which is applied to a terminal. The terminal includes a first camera and a second camera. The viewing angle range of the first camera is larger than the viewing angle range of the second camera. As shown in FIG. 1, the method may include:
S101、当触发拍摄构图功能时,利用第一摄像头采集第一预览图像。S101: When the shooting composition function is triggered, use the first camera to collect a first preview image.
本申请实施例中,进行拍摄构图的终端可以为任何具备拍摄和存储功能的设备,例如:平板电脑、手机、个人计算机(Personal Computer,PC)、笔记本电脑、相机、可穿戴设备等拍照设备。In the embodiment of the present application, the terminal for shooting and composing may be any device with shooting and storage functions, such as tablet computers, mobile phones, personal computers (PC), notebook computers, cameras, wearable devices and other photographing devices.
在本申请实施例中,在进行终端拍摄时,终端设置有不同的拍摄选项,如全景拍摄、人像拍摄、延时拍摄等,其中包括拍摄构图选项,当用户点击拍摄构图选项时,触发了终端拍摄构图功能,此时,终端需要确定出最优构图策略。首先终端启动第一摄像头,并利用第一摄像头采集第一预览图像。In the embodiment of this application, when shooting on the terminal, the terminal is set with different shooting options, such as panoramic shooting, portrait shooting, time-lapse shooting, etc., including shooting composition options. When the user clicks on the shooting composition option, the terminal is triggered Shooting composition function, at this time, the terminal needs to determine the optimal composition strategy. First, the terminal starts the first camera, and uses the first camera to collect the first preview image.
本申请实施例中,第一摄像头为终端中视角范围最大的摄像头,第一摄像头可以为广角镜头。In the embodiment of the present application, the first camera is the camera with the largest viewing angle in the terminal, and the first camera may be a wide-angle lens.
本申请实施例中,广角镜头是一种焦距短于标准镜头、视角大于标准镜头、焦距长于鱼眼镜头、视角小于鱼眼镜头的摄影镜头。广角镜头分为普通广角镜头和超广角镜头两种,具体的根据实际情况进行选择,本申请实施例不做具体的限定。其中。普通广角镜头的焦距一般为38-24毫米,视角为60-84度;超广角镜头的焦距为20-13毫米,视角为94-118度。In the embodiments of the present application, the wide-angle lens is a photographic lens with a focal length shorter than a standard lens, a viewing angle larger than a standard lens, a focal length longer than a fisheye lens, and a viewing angle smaller than a fisheye lens. Wide-angle lenses are divided into two types: ordinary wide-angle lenses and ultra-wide-angle lenses, which are specifically selected according to actual conditions, and the embodiments of the present application do not make specific limitations. in. The focal length of an ordinary wide-angle lens is generally 38-24 mm, and the angle of view is 60-84 degrees; the focal length of an ultra-wide-angle lens is 20-13 mm, and the angle of view is 94-118 degrees.
可以理解的是,由于广角镜头的焦距短,视角大,故,广角镜头在较短的拍摄距离范围内,相较于其他镜头而言能拍摄到较大面积的景物。It is understandable that, due to the short focal length of the wide-angle lens and the large viewing angle, the wide-angle lens can capture a larger area of scenery in a shorter shooting distance range than other lenses.
本申请实施例中,当终端在触发拍摄构图功能时是利用第二摄像头采集图像时,终端先从第二摄像头切换至第一摄像头,之后再利用第一摄像头采集第一预览图像。In this embodiment of the application, when the terminal uses the second camera to collect images when triggering the shooting composition function, the terminal first switches from the second camera to the first camera, and then uses the first camera to collect the first preview image.
本申请实施例中,第二摄像头可以为终端的标准镜头、长焦镜头、主摄像头等,具体的根据实际情况进行选择,本申请实施例不做具体的限定。In the embodiment of the present application, the second camera may be a standard lens, a telephoto lens, a main camera, etc. of the terminal, which is specifically selected according to actual conditions, and the embodiment of the present application does not make specific limitations.
本申请实施例中,在同一拍摄场景下,第二摄像头的视角范围小于第二摄像头的视角范围。In the embodiment of the present application, in the same shooting scene, the viewing angle range of the second camera is smaller than the viewing angle range of the second camera.
S102、在拍摄预览界面上显示第一预览图像,并在第一预览图像上显示建议构图图像对应的建议构图框,建议构图图像为从第一预览图像中确定出的图像。S102. Display a first preview image on the shooting preview interface, and display a suggested composition frame corresponding to the suggested composition image on the first preview image, where the suggested composition image is an image determined from the first preview image.
当终端利用第一摄像头采集到第一预览图像之后,终端在拍摄预览界面上显示第一预览图像,并在第一预览图像上显示建议构图图像对应的建议构图框。After the terminal uses the first camera to collect the first preview image, the terminal displays the first preview image on the shooting preview interface, and displays the recommended composition frame corresponding to the recommended composition image on the first preview image.
本申请实施例中,终端利用预设目标检测模型,从第一预览图像中确定出建议构图图像。In the embodiment of the present application, the terminal uses a preset target detection model to determine the recommended composition image from the first preview image.
本申请实施例中,终端从广角训练图像中标注包含目标训练对象的建议构图训练图像;之后,终端利用广角训练图像和广角训练图像中的建议构图训练图像,训练初始目标检测模型,得到预设目标检测模型。In the embodiment of this application, the terminal annotates the recommended composition training image containing the target training object from the wide-angle training image; after that, the terminal uses the wide-angle training image and the recommended composition training image in the wide-angle training image to train the initial target detection model to obtain the preset Target detection model.
本申请实施例中,终端获取大量广角训练图像,并在每张广角训练图像中,标注一个包含目标训练对象的建议构图训练图像,之后,终端利用广角训练图像和广角训练图像中的建议构图训练图像训练一个基于单点多核探测器(Single Shot MultiBox Detector,SSD)改进的单目标检测模型,得到预设目标检测模型。In the embodiment of this application, the terminal obtains a large number of wide-angle training images, and in each wide-angle training image, annotates a recommended composition training image containing the target training object, and then the terminal uses the wide-angle training image and the recommended composition training in the wide-angle training image The image trains an improved single target detection model based on Single Shot MultiBox Detector (SSD) to obtain a preset target detection model.
本申请实施例中,建议构图训练图像的尺寸与第二摄像头的采集尺寸相同,其中,第二摄像头采集图像的采集尺寸的比例可以为16:9,4:3,1:1等,具体的根据实际情况进行选择,本申请实施例不做具体的限定,以第二摄像头的采集尺寸的比例为16:9为例,当广角训练图像的尺寸为4000个像素×3000个像素时,终端在广角训练图像中标注一个采集尺寸为2400个像素×1350个像素的建议构图训练图像,则终端在4:3的广角训练图像中标注出了一个16:9的建议构图训练图像。In the embodiment of this application, it is recommended that the size of the composition training image is the same as the collection size of the second camera, where the ratio of the collection size of the second camera can be 16:9, 4:3, 1:1, etc., specifically The selection is made according to the actual situation. The embodiment of this application does not make specific limitations. Taking the ratio of the collection size of the second camera to 16:9 as an example, when the size of the wide-angle training image is 4000 pixels×3000 pixels, the terminal is in In the wide-angle training image, a suggested composition training image with a collection size of 2400 pixels×1350 pixels is marked, and the terminal marks a 16:9 suggested composition training image in the 4:3 wide-angle training image.
在一种可选的实施例中,终端可以在每张广角训练图像中,标注多个尺寸的建议构图训练图像,由此训练出的预设目标检测模型可以适用于多个采集尺寸的拍摄操作。In an optional embodiment, the terminal may mark the recommended composition training images of multiple sizes in each wide-angle training image, and the preset target detection model trained from this may be suitable for shooting operations of multiple acquisition sizes. .
本申请实施例中,终端将采集到的第一预览图像输入预设目标检测模型中,预设目标检测模型从第一预览图像中回归出一个与第二摄像头的采集尺寸相同的建议构图图像,并输出该建议构图图像。In this embodiment of the application, the terminal inputs the collected first preview image into the preset target detection model, and the preset target detection model returns from the first preview image a suggested composition image with the same size as the second camera's collection size. And output the suggested composition image.
在一种可选的实施例中,终端中的第二摄像头可以为可旋转镜头,终端在确定出建议构图框之后,终端旋转第二摄像头,直至第二摄像头的预览框与建议构图框重叠,此时,终端利用第二摄像头获取到的图像即为建议构图图像。In an optional embodiment, the second camera in the terminal may be a rotatable lens. After the terminal determines the recommended composition frame, the terminal rotates the second camera until the preview frame of the second camera overlaps the recommended composition frame. At this time, the image acquired by the terminal using the second camera is the recommended composition image.
本申请实施例中,终端确定第二摄像头对应的图像采集区域,其中,图像采集区域的区域大小与第二摄像头的采集尺寸相同;在第一预览图像上显示图像采集区域对应的预览框。In this embodiment of the application, the terminal determines the image collection area corresponding to the second camera, where the area size of the image collection area is the same as the collection size of the second camera; a preview frame corresponding to the image collection area is displayed on the first preview image.
本申请实施例中,如图2所示,终端在拍摄预览界面上显示广角镜头采集到的第一预览图像,并在第一预览图像中标注建议构图框和主摄像头的预览框。In the embodiment of the application, as shown in FIG. 2, the terminal displays the first preview image collected by the wide-angle lens on the shooting preview interface, and marks the suggested composition frame and the preview frame of the main camera in the first preview image.
可以理解的是,终端在第一预览图像上标注建议构图框和第二摄像头的预览框,能够引导用户移动终端,进而移动终端的第二摄像头,使得第二摄像头的预览框与建议构图框重合,由此利用第二摄像头拍摄得到的图像即为建议构图框框定的建议构图图像。It is understandable that the terminal marking the recommended composition frame and the second camera preview frame on the first preview image can guide the user to move the terminal and then move the second camera of the terminal so that the preview frame of the second camera coincides with the recommended composition frame , The image captured by the second camera is the suggested composition image framed by the suggested composition frame.
S103、当检测到第二摄像头对应的图像采集区域移动至建议构图框时,利用第二摄像头拍摄建议构图框中的建议构图图像。S103: When it is detected that the image capture area corresponding to the second camera moves to the recommended composition frame, use the second camera to shoot the recommended composition image in the recommended composition frame.
当终端在拍摄预览界面上显示第一预览图像和建议构图框之后,终端检测第二摄像头的移动位移,当终端检测到第二摄像头对应的图像采集区域移动至建议构图框时,终端利用第二摄像头拍摄建议图框中的建议构图图像。After the terminal displays the first preview image and the recommended composition frame on the shooting preview interface, the terminal detects the movement displacement of the second camera. When the terminal detects that the image collection area corresponding to the second camera moves to the recommended composition frame, the terminal uses the second The camera captures the recommended composition image in the recommended frame.
本申请实施例中,终端实时检测第二摄像头的移动位移,并将第二摄像头的移动位移映射为预览框在第一预览图像上的移动位移,之后终端在第一预览图像上按照该移动位移移动预览框。In the embodiment of this application, the terminal detects the movement displacement of the second camera in real time, and maps the movement displacement of the second camera to the movement displacement of the preview frame on the first preview image, and then the terminal moves the displacement on the first preview image according to the movement displacement Move the preview box.
本申请实施例中,当终端检测到第二摄像头对应的图像采集区域移动至建议构图图像时,即拍摄预览界面中的预览框与建议构图框重合时,终端从第一摄像头切换至第二摄像头,并利用第二摄像头采集建议构图图像,之后,终端将拍摄预览界面中显示的第一预览图像切换成建议构图图像;此时,用户点击拍摄按钮,触发终端的拍摄指令,终端利用第二摄像头拍摄拍摄预览界面的建议构图图像。In this embodiment of the application, when the terminal detects that the image capture area corresponding to the second camera moves to the recommended composition image, that is, when the preview frame in the shooting preview interface overlaps with the recommended composition frame, the terminal switches from the first camera to the second camera , And use the second camera to collect the recommended composition image. After that, the terminal switches the first preview image displayed in the shooting preview interface to the recommended composition image; at this time, the user clicks the shooting button to trigger the shooting instruction of the terminal, and the terminal uses the second camera Take the recommended composition image of the shooting preview interface.
示例性的,如图3所示,终端利用主摄像头获取建议构图框中的建议构图图像。Exemplarily, as shown in FIG. 3, the terminal uses the main camera to obtain the suggested composition image in the suggested composition frame.
示例性的,如图4所示,终端在拍摄时进行自动构图的过程包括:Exemplarily, as shown in FIG. 4, the process of the terminal automatically composing a picture during shooting includes:
1、在开启自动构图功能时,终端将预览切换到广角镜头。1. When the automatic composition function is turned on, the terminal will switch the preview to the wide-angle lens.
2、终端抓取广角镜头拍摄的场景图片,并将该场景图片输入建议构图网络中。2. The terminal captures the scene picture taken by the wide-angle lens, and inputs the scene picture into the recommended composition network.
3、建议构图网络输出一个最优的建议构图框,并将该建议构图框显示在当前广角预览界面的场景图片中。3. It is recommended that the composition network output an optimal suggested composition frame and display the suggested composition frame in the scene picture of the current wide-angle preview interface.
4、终端将主摄像头的预览框显示在场景图片中。4. The terminal displays the preview frame of the main camera in the scene picture.
5、终端引导用户移动终端,使得建议构图框和主摄像头的预览框重合。5. The terminal guides the user to move the terminal so that the recommended composition frame coincides with the preview frame of the main camera.
6、当建议构图框和主摄像头的预览框重合时,终端切换为主摄像头,并将主摄像头拍摄的建议构图图像显示在预览界面中。6. When the recommended composition frame and the preview frame of the main camera overlap, the terminal switches to the main camera and displays the recommended composition image taken by the main camera in the preview interface.
可以理解的是,由于广角镜头所拍摄的范围更广,终端利用广角镜头采集第一预览图像,并利用预设目标检测模型从第一预览图像中确定出与主摄像头的采集尺寸相同的建议构图图像,由此,拍摄者可以将主摄像头的图像采集框移动至建议构图图像对应的建议构图框,使得拍摄得到的图像的视觉效果好,且提高了拍摄的智能性。It is understandable that because the wide-angle lens captures a wider range, the terminal uses the wide-angle lens to collect the first preview image, and uses the preset target detection model to determine from the first preview image a suggested composition image with the same size as the main camera's collection size. Thus, the photographer can move the image capture frame of the main camera to the recommended composition frame corresponding to the recommended composition image, so that the visual effect of the captured image is good, and the intelligence of shooting is improved.
实施例二Example two
本申请实施例提供一种终端,所述终端包括第一摄像头和第二摄像头,所述第一摄像头的视角范围大于所述第二摄像头的视角范围,如图5所示,该终端1包括:An embodiment of the present application provides a terminal. The terminal includes a first camera and a second camera. The viewing angle range of the first camera is larger than the viewing angle range of the second camera. As shown in FIG. 5, the terminal 1 includes:
采集部分10,配置为当触发拍摄构图功能时,利用所述第一摄像头采集第一预览图像;The collecting part 10 is configured to use the first camera to collect a first preview image when the shooting composition function is triggered;
显示部分11,配置为在拍摄预览界面上显示所述第一预览图像,并在所述第一预览图像上显示建议构图图像对应的建议构图框,所述建议构图图像为从所述第一预览图像中确定出的图像;The display part 11 is configured to display the first preview image on the shooting preview interface, and display a suggested composition frame corresponding to the suggested composition image on the first preview image, and the suggested composition image is from the first preview The image identified in the image;
拍摄部分12,配置为当检测到所述第二摄像头对应的图像采集区域移动至所述建议构图框时,利用所述第二摄像头拍摄所述建议构图框中的所述建议构图图像。The photographing part 12 is configured to use the second camera to photograph the suggested composition image in the suggested composition frame when it is detected that the image capture area corresponding to the second camera moves to the suggested composition frame.
可选的,所述终端还包括:确定部分;Optionally, the terminal further includes: a determining part;
所述确定部分,配置为确定所述第二摄像头对应的图像采集区域,所述图像采集区域的区域大小与所述第二摄像头的采集尺寸相同;The determining part is configured to determine an image acquisition area corresponding to the second camera, and the area size of the image acquisition area is the same as the acquisition size of the second camera;
所述显示部分11,还配置为在所述第一预览图像上显示所述图像采集区域对应的预览框。The display part 11 is further configured to display a preview frame corresponding to the image acquisition area on the first preview image.
可选的,所述终端还包括:切换部分;Optionally, the terminal further includes: a handover part;
所述切换部分,配置为从所述第一摄像头切换至所述第二摄像头,并将所述拍摄预览界面中显示的所述第一预览图像切换成所述建议构图图像;The switching part is configured to switch from the first camera to the second camera, and switch the first preview image displayed in the shooting preview interface to the suggested composition image;
所述拍摄部分12,还配置为当触发拍摄指令时,拍摄所述拍摄预览界面的所述建议构图图像。The photographing part 12 is further configured to photograph the suggested composition image of the photographing preview interface when a photographing instruction is triggered.
可选的,所述确定部分,还配置为利用预设目标检测模型,从所述第一预览图像中确定出所述建议构图图像。Optionally, the determining part is further configured to determine the suggested composition image from the first preview image by using a preset target detection model.
可选的,所述终端还包括:标注部分和训练部分;Optionally, the terminal further includes: a labeling part and a training part;
所述标注部分,配置为从广角训练图像中标注包含目标训练对象的建议构图训练图像;The labeling part is configured to label the recommended composition training image containing the target training object from the wide-angle training image;
所述训练部分,配置为利用广角训练图像和所述广角训练图像中的建议构图训练图像,训练初始目标检测模型,得到所述预设目标检测模型。The training part is configured to use the wide-angle training image and the suggested composition training image in the wide-angle training image to train an initial target detection model to obtain the preset target detection model.
可选的,所述建议构图图像的区域大小与所述第二摄像头的采集尺寸相同,所述建议构图图像中包括待拍摄的目标对象。Optionally, the area size of the suggested composition image is the same as the collection size of the second camera, and the suggested composition image includes the target object to be photographed.
可选的,所述第一摄像头为广角镜头,所述第二摄像头为主摄像头。Optionally, the first camera is a wide-angle lens, and the second camera is a main camera.
本申请实施例提供的一种终端,终端包括第一摄像头和第二摄像头,第一摄像头的视角范围大于第二摄像头的视角范围,当触发拍摄构图功能时,利用第一摄像头采集第一预览图像;在拍摄预览界面上显示第一预览图像,并在第一预览图像上显示建议构图图像对应的建议构图框,建议构图图像为从第一预览图像中确定出的图像;当检测到第二摄像头对应的图像采集区域移动至建议构图框时,利用第二摄像头拍摄建议构图框中的建议构图图像。由此可见,本实施例提出的终端,由于第一摄像头所拍摄的范围更广,终端利用第一摄像头采集第一预览图像,并利用预设目标检测模型从第一预览图像中确定出与第二摄像头的采集尺寸相同的建议构图图像,由此,拍摄者可以将第二摄像头的图像采集框移动至建议构图图像对应的建议构图框,使得拍摄得到的图像的视觉效果好,且提高了拍摄的智能性。An embodiment of the present application provides a terminal. The terminal includes a first camera and a second camera. The angle of view of the first camera is larger than that of the second camera. When the shooting composition function is triggered, the first camera is used to collect the first preview image. ; The first preview image is displayed on the shooting preview interface, and the recommended composition frame corresponding to the recommended composition image is displayed on the first preview image. The recommended composition image is the image determined from the first preview image; when the second camera is detected When the corresponding image capture area moves to the recommended composition frame, the second camera is used to capture the recommended composition image in the recommended composition frame. It can be seen that, in the terminal proposed in this embodiment, since the first camera captures a wider range, the terminal uses the first camera to collect the first preview image, and uses the preset target detection model to determine the first preview image from the first preview image. The two cameras capture the same recommended composition image, so the photographer can move the second camera’s image capture frame to the recommended composition frame corresponding to the recommended composition image, so that the visual effect of the captured image is good, and the shooting is improved. The intelligence.
图6为本申请实施例提供的一种终端1的组成结构示意图二,在实际应用中,基于上述实施例的同一公开构思下,如图6所示,本实施例的终端1包括:显示器13、处理器14、存储器15及通信总线16。FIG. 6 is a second schematic diagram of the composition structure of a terminal 1 provided by an embodiment of this application. In practical applications, based on the same public concept of the above-mentioned embodiment, as shown in FIG. 6, the terminal 1 of this embodiment includes: a display 13 , Processor 14, memory 15, and communication bus 16.
在具体的实施例的过程中,上述采集部分10、拍摄部分12、确定部分、切换部分、标注部分、训练部分、检测部分和移动部分可由位于终端1上的处理器14实现,上述显示部分11可由位于终端1上的显示器13实现, 上述处理器14可以为特定用途集成电路(ASIC,Application Specific Integrated Circuit)、数字信号处理器(DSP,Digital Signal Processor)、数字信号处理图像处理装置(DSPD,Digital Signal Processing Device)、可编程逻辑图像处理装置(PLD,Programmable Logic Device)、现场可编程门阵列(FPGA,Field Programmable Gate Array)、CPU、控制器、微控制器、微处理器中的至少一种。可以理解地,对于不同的设备,用于实现上述处理器功能的电子器件还可以为其它,本实施例不作具体限定。In the process of a specific embodiment, the above-mentioned collection part 10, shooting part 12, determining part, switching part, labeling part, training part, detecting part, and moving part may be implemented by the processor 14 located on the terminal 1, and the above-mentioned display part 11 It can be implemented by a display 13 located on the terminal 1. The processor 14 can be an Application Specific Integrated Circuit (ASIC), a digital signal processor (DSP, Digital Signal Processor), and a digital signal processing image processing device (DSPD, At least one of Digital Signal Processing Device, Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA, Field Programmable Gate Array), CPU, controller, microcontroller, and microprocessor kind. It can be understood that, for different devices, the electronic devices used to implement the above-mentioned processor functions may also be other, which is not specifically limited in this embodiment.
在本申请实施例中,上述通信总线16用于实现显示器13、处理器14和存储器15之间的连接通信;上述显示器13,用于在拍摄预览界面上显示第一预览图像,并在第一预览图像上显示建议构图图像对应的建议构图框,建议构图图像为从第一预览图像中确定出的图像;上述处理器14执行存储器15中存储的运行程序时实现如下的状态检测方法:In the embodiment of the present application, the above-mentioned communication bus 16 is used to realize the connection and communication between the display 13, the processor 14 and the memory 15. The above-mentioned display 13 is used to display the first preview image on the shooting preview interface, and in the first The recommended composition frame corresponding to the recommended composition image is displayed on the preview image, and the recommended composition image is an image determined from the first preview image; when the processor 14 executes the operating program stored in the memory 15, the following state detection method is implemented:
当触发拍摄构图功能时,利用第一摄像头采集第一预览图像;当检测到第二摄像头对应的图像采集区域移动至建议构图框时,利用第二摄像头拍摄建议构图框中的建议构图图像。When the shooting composition function is triggered, the first camera is used to collect the first preview image; when it is detected that the image collection area corresponding to the second camera has moved to the suggested composition frame, the second camera is used to shoot the suggested composition image in the suggested composition frame.
在上述方法中,所述处理器14,还用于确定所述第二摄像头对应的图像采集区域,所述图像采集区域的区域大小与所述第二摄像头的采集尺寸相同;In the above method, the processor 14 is further configured to determine an image acquisition area corresponding to the second camera, and the area size of the image acquisition area is the same as the acquisition size of the second camera;
所述显示器13,还用于在所述第一预览图像上显示所述图像采集区域对应的预览框。The display 13 is also used to display a preview frame corresponding to the image collection area on the first preview image.
在上述方法中,所述处理器14,还用于从所述第一摄像头切换至所述第二摄像头,并将所述拍摄预览界面中显示的所述第一预览图像切换成所述建议构图图像;当触发拍摄指令时,利用所述第二摄像头拍摄所述拍摄预览界面的所述建议构图图像。In the above method, the processor 14 is further configured to switch from the first camera to the second camera, and switch the first preview image displayed in the shooting preview interface to the suggested composition Image; when a shooting instruction is triggered, use the second camera to shoot the suggested composition image of the shooting preview interface.
在上述方法中,所述处理器14,还用于利用预设目标检测模型,从所述第一预览图像中确定出所述建议构图图像。In the above method, the processor 14 is further configured to use a preset target detection model to determine the suggested composition image from the first preview image.
在上述方法中,所述处理器14,还用于从广角训练图像中标注包含目标训练对象的建议构图训练图像;利用广角训练图像和所述广角训练图像中的建议构图训练图像,训练初始目标检测模型,得到所述预设目标检测模型。In the above method, the processor 14 is also used to annotate the recommended composition training image containing the target training object from the wide-angle training image; use the wide-angle training image and the recommended composition training image in the wide-angle training image to train the initial target A detection model to obtain the preset target detection model.
在上述方法中,所述建议构图图像的区域大小与所述第二摄像头的采集尺寸相同,所述建议构图图像中包括待拍摄的目标对象。In the above method, the area size of the suggested composition image is the same as the collection size of the second camera, and the suggested composition image includes the target object to be photographed.
在上述方法中,所述第一摄像头为广角镜头,所述第二摄像头为主摄像头。In the above method, the first camera is a wide-angle lens, and the second camera is the main camera.
本申请实施例提供一种存储介质,其上存储有计算机程序,上述计算机可读存储介质存储有一个或者多个程序,上述一个或者多个程序可被一个或者多个处理器执行,应用于终端中,该计算机程序实现如实施例一所述的拍摄构图方法。The embodiment of the present application provides a storage medium on which a computer program is stored, and the above-mentioned computer-readable storage medium stores one or more programs, and the above-mentioned one or more programs can be executed by one or more processors and applied to a terminal Here, the computer program implements the shooting composition method as described in the first embodiment.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that in this article, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, It also includes other elements that are not explicitly listed, or elements inherent to the process, method, article, or device. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article, or device that includes the element.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本公开的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台图像显示设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本公开各个实施例所述的方法。Through the description of the above implementation manners, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of the present disclosure essentially or the part that contributes to the related technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk). ) Includes several instructions to make an image display device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present disclosure.
以上所述,仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。The above are only preferred embodiments of the present application, and are not used to limit the protection scope of the present application.
工业实用性Industrial applicability
本申请实施例提供了一种拍摄构图方法及终端、存储介质,应用于终端,终端包括第一摄像头和第二摄像头,第一摄像头的视角范围大于第二摄像头的视角范围,该方法包括:当触发拍摄构图功能时,利用第一摄像头采集第一预览图像;在拍摄预览界面上显示第一预览图像,并在第一预览图像上显示建议构图图像对应的建议构图框,建议构图图像为从第一预览图像中确定出的图像;当检测到第二摄像头对应的图像采集区域移动至建议构图框时,利用第二摄像头拍摄建议构图框中的建议构图图像。采用上述实现方案,由于第一摄像头所拍摄的范围更广,终端利用第一摄像头采集第一预览图像,并利用预设目标检测模型从第一预览图像中确定出与第二摄像头的采集尺寸相同的建议构图图像,由此,拍摄者可以将第二摄像头的图像采集框移动至建议构图图像对应的建议构图框,使得拍摄得到的图像的视觉效果好,且提高了拍摄的智能性。The embodiment of the present application provides a photographing composition method, a terminal, and a storage medium, which are applied to a terminal. The terminal includes a first camera and a second camera. The viewing angle range of the first camera is larger than the viewing angle range of the second camera. The method includes: When the shooting composition function is triggered, the first camera is used to collect the first preview image; the first preview image is displayed on the shooting preview interface, and the recommended composition frame corresponding to the recommended composition image is displayed on the first preview image. The recommended composition image is from the first preview image. An image determined in the preview image; when it is detected that the image capture area corresponding to the second camera has moved to the recommended composition frame, the second camera is used to shoot the recommended composition image in the recommended composition frame. With the above implementation scheme, since the first camera captures a wider range, the terminal uses the first camera to capture the first preview image, and uses the preset target detection model to determine from the first preview image that the capture size of the second camera is the same Therefore, the photographer can move the image capture frame of the second camera to the recommended composition frame corresponding to the recommended composition image, so that the visual effect of the captured image is good, and the intelligence of shooting is improved.

Claims (10)

  1. 一种拍摄构图方法,应用于终端,所述终端包括第一摄像头和第二摄像头,所述第一摄像头的视角范围大于所述第二摄像头的视角范围,所述方法包括:A photographing composition method applied to a terminal, the terminal including a first camera and a second camera, the first camera has a larger viewing angle range than the second camera, and the method includes:
    当触发拍摄构图功能时,利用所述第一摄像头采集第一预览图像;When the shooting composition function is triggered, the first camera is used to collect a first preview image;
    在拍摄预览界面上显示所述第一预览图像,并在所述第一预览图像上显示建议构图图像对应的建议构图框,所述建议构图图像为从所述第一预览图像中确定出的图像;Display the first preview image on the shooting preview interface, and display the recommended composition frame corresponding to the recommended composition image on the first preview image, and the recommended composition image is an image determined from the first preview image ;
    当检测到所述第二摄像头对应的图像采集区域移动至所述建议构图框时,利用所述第二摄像头拍摄所述建议构图框中的所述建议构图图像。When it is detected that the image capture area corresponding to the second camera moves to the suggested composition frame, the second camera is used to capture the suggested composition image in the suggested composition frame.
  2. 根据权利要求1所述的方法,其中,所述利用所述第二摄像头拍摄所述建议构图框中的所述建议构图图像之前,所述方法还包括:5. The method according to claim 1, wherein before said using said second camera to capture said suggested composition image in said suggested composition frame, said method further comprises:
    确定所述第二摄像头对应的图像采集区域,所述图像采集区域的区域大小与所述第二摄像头的采集尺寸相同;Determining an image acquisition area corresponding to the second camera, and the area size of the image acquisition area is the same as the acquisition size of the second camera;
    在所述第一预览图像上显示所述图像采集区域对应的预览框。Displaying a preview frame corresponding to the image acquisition area on the first preview image.
  3. 根据权利要求2所述的方法,其中,所述利用所述第二摄像头拍摄所述建议构图框中的所述建议构图图像,包括:3. The method according to claim 2, wherein said using said second camera to capture said suggested composition image in said suggested composition frame comprises:
    从所述第一摄像头切换至所述第二摄像头,并将所述拍摄预览界面中显示的所述第一预览图像切换成所述建议构图图像;Switching from the first camera to the second camera, and switching the first preview image displayed in the shooting preview interface to the suggested composition image;
    当触发拍摄指令时,利用所述第二摄像头拍摄所述拍摄预览界面的所述建议构图图像。When the shooting instruction is triggered, the second camera is used to shoot the suggested composition image of the shooting preview interface.
  4. 根据权利要求1所述的方法,其中,所述利用所述第一摄像头采集第一预览图像之后,所述在拍摄预览界面上显示所述第一预览图像之前,所述方法还包括:5. The method according to claim 1, wherein after the first preview image is captured by the first camera and before the first preview image is displayed on the shooting preview interface, the method further comprises:
    利用预设目标检测模型,从所述第一预览图像中确定出所述建议构图图像。Using a preset target detection model, the suggested composition image is determined from the first preview image.
  5. 根据权利要求4所述的方法,其中,所述利用预设目标检测模型,从所述第一预览图像中确定出所述建议构图图像之前,所述方法还包括:4. The method according to claim 4, wherein before said determining said suggested composition image from said first preview image by using a preset target detection model, said method further comprises:
    从广角训练图像中标注包含目标训练对象的建议构图训练图像;Annotate the recommended composition training image containing the target training object from the wide-angle training image;
    利用广角训练图像和所述广角训练图像中的建议构图训练图像,训练初始目标检测模型,得到所述预设目标检测模型。Using the wide-angle training image and the suggested composition training image in the wide-angle training image, the initial target detection model is trained to obtain the preset target detection model.
  6. 根据权利要求1-5任一项所述的方法,其中,所述建议构图图像的区域大小与所述第二摄像头的采集尺寸相同,所述建议构图图像中包括待拍摄的目标对象。The method according to any one of claims 1 to 5, wherein the area size of the suggested composition image is the same as the acquisition size of the second camera, and the suggested composition image includes the target object to be photographed.
  7. 根据权利要求1所述的方法,其中,所述第一摄像头为广角镜头,所述第二摄像头为主摄像头。The method according to claim 1, wherein the first camera is a wide-angle lens, and the second camera is a main camera.
  8. 一种终端,所述终端包括第一摄像头和第二摄像头,所述第一摄像头的视角范围大于所述第二摄像头的视角范围,所述终端包括:A terminal, the terminal includes a first camera and a second camera, the viewing angle range of the first camera is larger than the viewing angle range of the second camera, and the terminal includes:
    采集部分,配置为当触发拍摄构图功能时,利用所述第一摄像头采集第一预览图像;The acquisition part is configured to use the first camera to acquire a first preview image when the shooting composition function is triggered;
    显示部分,配置为在拍摄预览界面上显示所述第一预览图像,并在所述第一预览图像上显示建议构图图像对应的建议构图框,所述建议构图图像为从所述第一预览图像中确定出的图像;The display part is configured to display the first preview image on the shooting preview interface, and display a suggested composition frame corresponding to the suggested composition image on the first preview image, and the suggested composition image is from the first preview image The image identified in
    拍摄部分,配置为当检测到所述第二摄像头对应的图像采集区域移动至所述建议构图框时,利用所述第二摄像头拍摄所述建议构图框中的所述建议构图图像。The photographing part is configured to use the second camera to photograph the suggested composition image in the suggested composition frame when it is detected that the image acquisition area corresponding to the second camera moves to the suggested composition frame.
  9. 一种终端,所述终端包括:处理器、显示器、存储器及通信总线;所述处理器执行存储器存储的运行程序时实现如权利要求1-7任一项所述的方法。A terminal, the terminal comprising: a processor, a display, a memory, and a communication bus; when the processor executes an operating program stored in the memory, the method according to any one of claims 1-7 is implemented.
  10. 一种存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如权利要求1-7任一项所述的方法。A storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1-7 is realized.
PCT/CN2021/072503 2020-02-28 2021-01-18 Photography composition method, terminal, and storage medium WO2021169669A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010129110.3 2020-02-28
CN202010129110.3A CN111277760B (en) 2020-02-28 2020-02-28 Shooting composition method, terminal and storage medium

Publications (1)

Publication Number Publication Date
WO2021169669A1 true WO2021169669A1 (en) 2021-09-02

Family

ID=71000449

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/072503 WO2021169669A1 (en) 2020-02-28 2021-01-18 Photography composition method, terminal, and storage medium

Country Status (2)

Country Link
CN (1) CN111277760B (en)
WO (1) WO2021169669A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979487A (en) * 2022-05-27 2022-08-30 联想(北京)有限公司 Image processing method, image processing device, electronic equipment and storage medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111277760B (en) * 2020-02-28 2022-02-01 Oppo广东移动通信有限公司 Shooting composition method, terminal and storage medium
CN111770277A (en) * 2020-07-31 2020-10-13 RealMe重庆移动通信有限公司 Auxiliary shooting method, terminal and storage medium
CN112437172A (en) * 2020-10-30 2021-03-02 努比亚技术有限公司 Photographing method, terminal and computer readable storage medium
CN112492213B (en) * 2020-12-04 2022-04-08 维沃移动通信有限公司 Image shooting method and device and electronic equipment
CN114531551B (en) * 2021-12-31 2023-12-26 联想(北京)有限公司 Image processing method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130155293A1 (en) * 2011-12-16 2013-06-20 Samsung Electronics Co., Ltd. Image pickup apparatus, method of providing composition of image pickup and computer-readable recording medium
CN106851107A (en) * 2017-03-09 2017-06-13 广东欧珀移动通信有限公司 Switch control method, control device and the electronic installation of camera assisted drawing
CN107835364A (en) * 2017-10-30 2018-03-23 维沃移动通信有限公司 One kind is taken pictures householder method and mobile terminal
CN109495686A (en) * 2018-12-11 2019-03-19 上海掌门科技有限公司 Image pickup method and equipment
CN110430359A (en) * 2019-07-31 2019-11-08 北京迈格威科技有限公司 Shoot householder method, device, computer equipment and storage medium
CN110476405A (en) * 2017-12-01 2019-11-19 三星电子株式会社 For providing and shooting the method and system of related recommendation information
CN111277760A (en) * 2020-02-28 2020-06-12 Oppo广东移动通信有限公司 Shooting composition method, terminal and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107635095A (en) * 2017-09-20 2018-01-26 广东欧珀移动通信有限公司 Shoot method, apparatus, storage medium and the capture apparatus of photo
CN109474786B (en) * 2018-12-24 2021-07-23 维沃移动通信有限公司 Preview image generation method and terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130155293A1 (en) * 2011-12-16 2013-06-20 Samsung Electronics Co., Ltd. Image pickup apparatus, method of providing composition of image pickup and computer-readable recording medium
CN106851107A (en) * 2017-03-09 2017-06-13 广东欧珀移动通信有限公司 Switch control method, control device and the electronic installation of camera assisted drawing
CN107835364A (en) * 2017-10-30 2018-03-23 维沃移动通信有限公司 One kind is taken pictures householder method and mobile terminal
CN110476405A (en) * 2017-12-01 2019-11-19 三星电子株式会社 For providing and shooting the method and system of related recommendation information
CN109495686A (en) * 2018-12-11 2019-03-19 上海掌门科技有限公司 Image pickup method and equipment
CN110430359A (en) * 2019-07-31 2019-11-08 北京迈格威科技有限公司 Shoot householder method, device, computer equipment and storage medium
CN111277760A (en) * 2020-02-28 2020-06-12 Oppo广东移动通信有限公司 Shooting composition method, terminal and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979487A (en) * 2022-05-27 2022-08-30 联想(北京)有限公司 Image processing method, image processing device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111277760B (en) 2022-02-01
CN111277760A (en) 2020-06-12

Similar Documents

Publication Publication Date Title
WO2021169669A1 (en) Photography composition method, terminal, and storage medium
US9282242B2 (en) Method and electric device for taking panoramic photograph
JP5389697B2 (en) In-camera generation of high-quality composite panoramic images
WO2014187222A1 (en) Photographing method, device and terminal
WO2016115805A1 (en) Shooting method, shooting device, mobile terminal and computer storage medium
TW201251447A (en) Positional sensor-assisted image registration for panoramic photography
US7466356B2 (en) Method and apparatus for setting a marker on an object and tracking the position of the object
JP2006211139A (en) Imaging apparatus
WO2022161340A1 (en) Image display method and apparatus, and electronic device
JP2018503269A (en) Preview image display method and apparatus
WO2013095914A1 (en) Pre-setting the foreground view of a photograph
WO2016029465A1 (en) Image processing method and apparatus and electronic device
US9088720B2 (en) Apparatus and method of displaying camera view area in portable terminal
CN105635568A (en) Image processing method in mobile terminal and mobile terminal
WO2022111330A1 (en) Image stitching method and apparatus for multi-camera device, storage medium, and terminal
CN104580899B (en) The control method and imaging device of image objects
CN109089045A (en) A kind of image capture method and equipment and its terminal based on multiple photographic devices
JP2017162371A (en) Image processing device, image processing method and program
US10212341B2 (en) Mobile electronic device with multiple cameras
CN111343360B (en) Correction parameter obtaining method
JP2006253805A (en) Photographing apparatus and method
CN112653841B (en) Shooting method and device and electronic equipment
JP2008148220A (en) Imaging apparatus, imaging method, and control program
JP2006253806A (en) Photographing apparatus and method
WO2019134513A1 (en) Shot focusing method, device, storage medium, and electronic device

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21759591

Country of ref document: EP

Kind code of ref document: A1