Macro shooting method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202110962111.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-20
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2041-08-20
AI Technical Summary
[0003]相关技术中,当需要进行微距拍摄时,无法自动识别微距模式,用户体验较差,拍摄效率低
[0016]本申请提出的微距拍摄方法、装置、电子设备和存储介质,获取第一摄像头采集的第一图像,以及第二摄像头采集的第二图像,在第一图像和第二图像的图像画面不存在重叠区域的情况下,控制第三摄像头进行微距拍摄,其中,在第一摄像头和第二摄像头的拍摄距离大于或等于第一拍摄距离的情况下,第一摄像头和第二摄像头的视野范围具有重叠区域,第一拍摄距离小于或等于第三摄像头设定的微距拍摄距离,本申请中识别第一图像和第二图像中画面内容不存在重叠区域,确定被摄对象处于第一摄像头和第二摄像头的视角盲区中,则自动开启第三摄像头的微距拍摄模式,以提高微距拍摄的效率。
Smart Images

Figure CN115714899B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image acquisition technology, and in particular to a macro photography method, apparatus, electronic device, and storage medium. Background Technology
[0002] Macro photography can magnify small details of the subject and capture objects at closer distances, making it very attractive and increasingly used in electronic products.
[0003] In related technologies, when macro photography is required, the macro mode cannot be automatically recognized, resulting in a poor user experience and low shooting efficiency. Summary of the Invention
[0004] This application aims to at least partially address one of the technical problems in the related art.
[0005] Therefore, this application proposes a macro photography method, apparatus, electronic device, and storage medium to achieve automatic recognition of macro modes and improve macro photography efficiency.
[0006] The first aspect of this application provides a macro photography method, including:
[0007] Acquire a first image captured by a first camera and a second image captured by a second camera; if there is no overlapping area between the images of the first image and the second image, control the third camera to perform macro photography;
[0008] The third camera has at least a macro shooting function. When the shooting distance between the first camera and the second camera is greater than or equal to the first shooting distance, the field of view of the first camera and the second camera overlaps. The first shooting distance is less than or equal to the macro shooting distance set by the third camera.
[0009] A second aspect of this application provides a macro photography device, comprising:
[0010] The acquisition module is used to acquire a first image captured by a first camera and a second image captured by a second camera;
[0011] The control module is used to control the third camera to perform macro photography when there is no overlapping area between the images of the first image and the second image.
[0012] The third camera has at least a macro shooting function. When the shooting distance between the first camera and the second camera is greater than or equal to the first shooting distance, the field of view of the first camera and the second camera overlaps. The first shooting distance is less than or equal to the macro shooting distance set by the third camera.
[0013] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method described in the first aspect.
[0014] A third aspect of this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0015] A fourth aspect of this application provides a computer program product having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0016] The macro photography method, apparatus, electronic device, and storage medium proposed in this application acquire a first image captured by a first camera and a second image captured by a second camera. When there is no overlapping area between the images of the first and second images, a third camera is controlled to perform macro photography. Specifically, when the shooting distance between the first and second cameras is greater than or equal to a first shooting distance, the field of view of the first and second cameras overlaps. When the first shooting distance is less than or equal to the macro shooting distance set by the third camera, this application identifies that there is no overlapping area between the content of the first and second images and determines that the subject is in the blind spot of the first and second cameras. Then, the macro photography mode of the third camera is automatically activated to improve the efficiency of macro photography.
[0017] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0018] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0019] Figure 1 A schematic flowchart illustrating a macro photography method provided in an embodiment of this application;
[0020] Figure 2 This is a schematic diagram of a camera blind spot provided in an embodiment of this application;
[0021] Figure 3 A schematic diagram illustrating the setup of various cameras for macro photography, provided in an embodiment of this application;
[0022] Figure 4 A flowchart illustrating another macro photography method provided in this application embodiment;
[0023] Figure 5 This is a schematic diagram showing that the images provided in the embodiments of this application do not have overlapping areas;
[0024] Figure 6 A flowchart illustrating another macro photography method provided in this application embodiment;
[0025] Figure 7 This is a schematic diagram of the structure of a macro photography device provided in an embodiment of this application;
[0026] Figure 8 This is a block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0027] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0028] The macro photography method, apparatus, electronic device, and storage medium of this application are described below with reference to the accompanying drawings.
[0029] Figure 1 This is a flowchart illustrating a macro photography method provided in an embodiment of this application.
[0030] like Figure 1 As shown, the method may include the following steps:
[0031] Step 101: Obtain the first image captured by the first camera and the second image captured by the second camera.
[0032] The execution subject of this application embodiment is a macro photography device, which is installed in an electronic device, such as a mobile phone or a PDA, and is not limited in this embodiment.
[0033] In this embodiment of the application, at least three cameras can be provided on the electronic device. For ease of distinction, they are referred to as the first camera, the second camera, and the third camera, wherein the third camera has at least a macro shooting function.
[0034] In one implementation of this application, a first camera and a second camera can be monitored, and a first image captured by the first camera and a second image captured by the second camera can be obtained. Based on the first image and the second image, it can be determined whether to enter the macro shooting mode, so as to perform macro shooting through a third camera with macro shooting function.
[0035] In another implementation of this application, when the third camera is activated, the first and second cameras are also activated, and a first image captured by the first camera and a second image captured by the second camera are acquired. In this embodiment, when the third camera is activated, it may be necessary to perform macro photography on the subject, such as people, landscapes, small animals, or tiny objects. Therefore, the first and second images can be used to quickly determine whether to enable the macro photography mode of the third camera and perform macro photography. As one implementation, the macro photography mode of the third camera can be determined by judging whether the subject of the third camera is in the blind spot of the first and second cameras.
[0036] In one scenario of this application embodiment, the third camera can be a fixed-focus macro camera to quickly identify whether the macro shooting function is enabled, that is, to quickly enable the macro shooting function. In addition, it can also ensure the accuracy of the current subject being photographed by the third camera.
[0037] In another scenario of this application embodiment, the third camera has at least two shooting focal lengths. One of these focal lengths corresponds to a macro shooting mode. The shooting scene or mode corresponding to the other focal length is not limited in this embodiment; that is, the third camera can be a telephoto camera, wide-angle camera, or ultra-wide-angle camera with a macro shooting mode. This allows for quick determination of whether the third camera is using a macro shooting focal length for macro shooting, shortening the focusing time and increasing the focusing accuracy of macro shooting.
[0038] It should be noted that if the third camera has autofocus, for example, if it is a telephoto camera, then the field of view (FOV) of the first and second cameras, i.e., the range of angles of view covered by the lenses, can be greater than the FOV of the third camera. If the third camera is a telephoto camera, the first and second cameras can focus on close-up objects faster than the third camera, thus improving the speed of macro shooting with the third camera. If the third camera is a fixed-focus macro camera, then there is no limitation on the FOV of the third camera compared to the FOV of the first or second camera.
[0039] In one implementation of this application, the first camera can be a wide-angle camera or an ultra-wide-angle camera, the second camera can also be a wide-angle camera or an ultra-wide-angle camera, and the third camera can be a telephoto camera. The telephoto camera can perform macro photography in macro shooting mode. When both the first and second cameras are wide-angle cameras, their field of view (i.e., their field of view) can be the same or different. For example, the field of view of the first camera may be smaller than that of the second camera (e.g., the first camera can be a wide-angle camera and the second camera can be an ultra-wide-angle camera); or the field of view of the first wide-angle camera may be larger than that of the second camera (e.g., the first camera can be an ultra-wide-angle camera and the second camera can be a wide-angle camera); or both the first and second cameras may be wide-angle cameras with the same field of view.
[0040] Step 102: If there is no overlapping area between the first and second images, control the third camera to perform macro photography.
[0041] In this embodiment of the application, a first image captured by a first camera and a second image captured by a second camera are obtained. By comparing the image frames in the first image and the image frames in the second image, it is identified whether there are overlapping image frames in the two image frames. This is to identify whether there is a blind spot in the field of view between the first camera and the second camera at the current shooting distance, i.e., a blind spot in the field of view. This allows it to determine whether the subject is within the macro shooting range, thereby deciding whether to control the third camera to perform macro shooting.
[0042] Figure 2 This is a schematic diagram of a camera blind spot provided in an embodiment of this application. Figure 2 The black triangle area corresponding to region A in the diagram represents the blind spots of the first and second cameras. At the current shooting distance, if a blind spot exists within region A between the first and second cameras, the third camera is controlled to perform macro photography.
[0043] In this embodiment, the third camera, the first camera, and the second camera are disposed on the same surface of the electronic device, for example, both on the back of the electronic device or both on the front of the electronic device. The specific positional relationship between the third camera and the first and second cameras on the same surface of the electronic device can be adjusted according to device design requirements, stacking requirements, etc. For example, the third camera can be located on one side of either the first or second camera, such as directly to one side or diagonally to one side; for example, the third camera can be located between the first and second cameras, such as in the middle, or offset from one of them; or the optical axis of the third camera can be located between the first and second cameras and deviate from the plane formed by the optical axes of the first and second cameras; for example, the optical axes of the third camera, the first camera, and the second camera can be located in the same plane.
[0044] For example, such as Figure 3 As shown, the third camera can be located between the first and second cameras. In this example, when the subject to be captured by the third camera is within the blind spots of the first and second cameras, it means that neither the first nor second cameras can capture a complete image of the subject. This indicates that the subject is within the macro shooting distance of the third camera, and macro shooting mode needs to be activated to control the third camera for macro shooting. For example, in one scenario, if there is an overlapping area between the first and second images, it means the subject is not within the blind spots of the first and second cameras, and there is no need to switch the third camera to macro shooting mode.
[0045] In another scenario, if there is no overlap between the first and second images, meaning the subject is not continuous in the first and second images, it indicates that the subject is in the blind spot of the first and second cameras. This means the distance between the subject and the plane of the third camera (i.e., the shooting distance) is less than or equal to the macro shooting distance. In this case, the system automatically switches to the macro shooting mode of the third camera to perform macro shooting. This method determines whether the subject is in the blind spot of the first and second cameras by comparing the overlap of the first and second images. When the subject is determined to be in the blind spot, the third camera automatically performs macro shooting, improving the automatic recognition of macro shooting and quickly determining whether macro shooting is needed, thus increasing the efficiency of macro shooting with the third camera.
[0046] In this embodiment, the third camera has a set macro shooting distance. When it is determined that the subject is in the blind spot of the first and second cameras (i.e., the blind spot of the field of view), the maximum distance between the subject and the first or second camera is determined. If the maximum distance is greater than the set macro shooting distance of the third camera, there will be areas that cannot be focused when the third camera performs macro shooting, resulting in unclear imaging. Therefore, in some optional embodiments, in order to improve the macro shooting effect, it is set that when the shooting distance of the first and second cameras is greater than or equal to a first shooting distance (that is, when the distance of the subject from the first and second cameras is greater than or equal to the first shooting distance), the field of view of the first and second cameras overlaps. In this case, the first shooting distance is less than or equal to the set macro shooting distance of the third camera, thus improving the macro shooting effect of the third camera.
[0047] For example, in some possible embodiments, the blind spot between the first camera and the second camera can be adjusted according to the device usage requirements. For example, the blind spot between the first camera and the second camera can be adjusted by adjusting one or more of the distance between the first camera and the second camera, the viewing angle, and the macro shooting distance set by the third camera.
[0048] In the macro photography method of this application embodiment, a first image captured by a first camera and a second image captured by a second camera are obtained. When there is no overlapping area between the images of the first image and the second image, a third camera is controlled to perform macro photography. When the shooting distance between the first camera and the second camera is greater than or equal to a first shooting distance, the field of view of the first camera and the second camera overlaps. When the first shooting distance is less than or equal to the macro shooting distance set by the third camera, this application embodiment identifies that there is no overlapping area between the image content of the first image and the second image, determines that the subject is in the blind spot of the first camera and the second camera, and then automatically activates the macro photography mode of the third camera to improve the efficiency of macro photography.
[0049] To achieve the above embodiments, this embodiment provides another macro photography method, illustrating how to determine whether to enable macro photography when the subject is determined to be in a blind spot. Figure 4 A flowchart illustrating another macro photography method provided in this application embodiment is shown below. Figure 4 As shown, the method includes the following steps:
[0050] Step 401: Obtain the first image captured by the first camera and the second image captured by the second camera.
[0051] In one implementation of this application, the first camera and the second camera are spaced apart, and the third camera is located between the first camera and the second camera, such as... Figure 3 A schematic diagram showing the positions of a first camera, a second camera, and a third camera is presented.
[0052] In one implementation of this application, the first and second cameras can be activated simultaneously when the third camera is activated; thereby acquiring a first image captured by the first camera and a second image captured by the second camera. This allows for quick determination of whether to enable the macro shooting mode of the third camera.
[0053] In one implementation of this application, a first camera can be driven to capture a first image using a first pixel merging method, and a second camera can be driven to capture a second image using a second pixel merging method. The first pixel merging method is obtained by merging a predetermined number of adjacent photosensitive pixels in the image sensor of the first camera; the second pixel merging method is obtained by merging a predetermined number of adjacent photosensitive pixels in the image sensor of the second camera, so as to merge multiple adjacent pixels in the image sensor into a single pixel for output, thereby increasing the light-receiving area of a single pixel and reducing the output resolution. Since the larger the area of a single pixel, the better the imaging effect, merging pixels not only improves the imaging effect but also reduces the resolution during image acquisition, which facilitates the improvement of processing speed when determining whether there is an overlapping area in the first and second images.
[0054] Pixel merging can be achieved by merging four adjacent photosensitive pixels in the image sensor, nine adjacent pixels in the image sensor, or sixteen adjacent pixels in the image sensor. In this embodiment, the number of pixels merged is not limited.
[0055] The explanations in step 101 of the aforementioned method embodiments also apply to step 401, and will not be repeated here.
[0056] Step 402: Compare the pixels in the first image with the pixels in the second image to obtain the target number of unmatched pixels.
[0057] In this embodiment of the application, identifying the subject in the first image and identifying the subject in the second image can be achieved by using a pre-trained neural network model to identify each pixel of the subject in the first image and each pixel of the subject in the second image.
[0058] Then, the pixels of the subject in the first image and the pixels of the subject in the second image are compared. Based on the features carried by each pixel, the number of unmatched pixels in the first and second images is determined. The number of targets is compared with a threshold. If the number of targets is greater than the threshold, it means that the corresponding images of the subject in the first and second images are not continuous, that is, the subject is in the blind spot of the first and second cameras. In this case, the macro shooting mode needs to be turned on and the third camera is controlled to perform macro shooting. Figure 5 This is a schematic diagram illustrating the absence of overlapping areas in the image provided in this embodiment of the application. The subject of the image is an ant. Figure 5 As shown, there is no overlapping area between the images in the first image and the second image. That is, the number of pixels that match the features of the ant's pixels in the first image and the features of the ant's pixels in the second image is 0, which is less than the set threshold. Therefore, there is no overlapping area between the images in the first image and the second image.
[0059] In this embodiment of the application, in order to improve the efficiency of determining the number of unmatched pixels, the following implementation method can be adopted.
[0060] In one implementation, the relative positional relationship between the first camera and the second camera is obtained. Based on this relationship, the first target edge of the first image is determined. The relative positional relationship between the first camera and the second camera can be either horizontally or vertically spaced within the electronic device. This embodiment uses a horizontally spaced arrangement of the first camera and the second camera as an example. Figure 2 The first and second cameras are placed horizontally at an interval, and the captured first and second images are shown below. Figure 5 As shown, the first target edge in the first image captured by the first camera is determined to be B1. Then, the pixels on the first target edge are matched with the pixels in the second image to obtain the number of unmatched target pixels. For example... Figure 5 As shown, the pixels belonging to the subject in image B1 are matched with all pixels belonging to the subject in the second image. In this embodiment, by matching the pixels belonging to the subject on the edges of one image with all pixels belonging to the subject in another image, the number of pixels to be matched is reduced, and the efficiency of pixel matching is improved.
[0061] As a second implementation method, to further improve the efficiency of pixel matching, based on the relative positional relationship between the first and second cameras, the second target edge adjacent to the first target edge in the second image is determined. Taking the horizontally spaced first and second cameras as an example... Figure 5As shown, the second target edge in the second image adjacent to the first target edge B1 is determined to be B2. Then, the pixels on the first target edge are matched with the pixels on the second target edge to obtain the number of unmatched target pixels.
[0062] Alternatively, as an implementation method, while reducing the computational load of matching and ensuring the accuracy of matching, the number of matching pixels in the two images can be increased. For example, the pixels in a set region of the image in the adjacent parts of the first and second images can be compared, such as one-quarter of the image area.
[0063] It should be noted that when the first and second cameras are placed vertically spaced apart, the method for determining the first and second target edges is the same as when the first and second cameras are placed horizontally spaced apart, and will not be repeated in this embodiment. Alternatively, the pixels on the second target edge in the second image can be matched with the pixels in the first image to obtain the number of unmatched target pixels; the principle is the same, and will not be repeated in this embodiment.
[0064] Step 403: If the number of targets is greater than the threshold, control the third camera to perform macro photography.
[0065] In one implementation of this application, when the number of targets exceeds a threshold, i.e., when it is determined that there is no overlapping area between the images in the first and second images, the third camera is controlled to move to a second shooting distance. The second shooting distance is less than or equal to a set macro shooting distance, meaning that the second shooting distance is used as the initial focus position of the third camera. Then, based on the initial focus position, the focus position of the third camera is adjusted to obtain the target focus position. For example, if the macro shooting distance is set to 8 cm and the second shooting distance is 5 cm, then focus searching starts from 5 cm to determine the target focus position where a clear image can be formed. The third camera is then controlled to perform macro shooting at the target focus position to obtain a clear macro image. This achieves automatic activation of the macro mode. At the same time, by directly controlling the third camera to move to the second shooting distance and then fine-tuning the focus, the speed of macro shooting is improved.
[0066] In the macro photography method of this application embodiment, a first image captured by a first camera and a second image captured by a second camera are obtained. When there is no overlapping area between the images of the first image and the second image, a third camera is controlled to perform macro photography. When the shooting distance between the first camera and the second camera is greater than or equal to a first shooting distance, the field of view of the first camera and the second camera overlaps. When the first shooting distance is less than or equal to the macro shooting distance set by the third camera, this application identifies that there is no overlapping area between the content of the first image and the second image, determines that the subject is in the blind spot of the first camera and the second camera, and then automatically activates the macro photography mode of the third camera to improve the efficiency of macro photography.
[0067] To achieve the above embodiments, this embodiment provides another macro photography method, illustrating how to control a third camera to take pictures when it is determined that the subject is not in a blind spot. Figure 6 A flowchart illustrating another macro photography method provided in this application embodiment is shown below. Figure 6 As shown, the method includes the following steps:
[0068] Step 601: Obtain the first image captured by the first camera and the second image captured by the second camera.
[0069] Step 602: Compare the pixels in the first image with the pixels in the second image to obtain the target number of unmatched pixels.
[0070] Steps 601 and 602 can be explained in the foregoing embodiments, as the principle is the same, and will not be repeated in this embodiment.
[0071] Step 603: If the number of targets is less than or equal to the threshold, control the third camera to perform non-macro shooting.
[0072] In this embodiment, the third camera includes macro shooting capabilities and non-macro shooting capabilities. When the number of unmatched pixels in the first and second images is less than or equal to a threshold, meaning there is an overlapping area between the first and second images, the subject is not in the blind spots of the first and second cameras, but rather in the overlapping area of their fields of view. Figure 2 The overlapping area C of the first and second camera's field of view controls the third camera to start non-macro shooting mode and perform normal focusing to capture images of the subject, thus meeting the shooting needs of different scenarios.
[0073] The descriptions of the first camera, the second camera, and the third camera can be found in the explanations in the foregoing embodiments, as the principles are the same, and will not be repeated in this embodiment.
[0074] In the macro photography method of this application embodiment, a first image captured by a first camera and a second image captured by a second camera are obtained. When there is an overlapping area between the images of the first image and the second image, the third camera is controlled to perform non-macro photography, that is, to perform normal photography. This achieves rapid identification of whether macro photography is to be performed and meets the shooting needs of different scenarios.
[0075] Based on the above embodiments, this embodiment also provides an implementation method in which, before acquiring the first image captured by the first camera and the second image captured by the second camera, the distance between the first camera and the second camera can be adjusted according to the macro shooting distance required by the third camera, so as to meet the macro shooting needs of various scenarios. In one implementation method of this application embodiment, as follows: Figure 3 As shown, the first, second, and third cameras are placed at intervals. The shooting angles of the first and second cameras are known, and the set macro shooting distance of the third camera is also available. According to the Pythagorean theorem, given the length of one side and one angle, the lengths of the other two sides can be calculated, thus allowing the camera spacing to be determined. Therefore, after responding to user input to adjust the set macro shooting distance of the third camera, the spacing between the first and second cameras can be adjusted based on the adjusted setting macro shooting distance. This is achieved by controlling the motor corresponding to either the first or second camera to move, thereby adjusting the spacing between the first and second cameras to meet macro shooting needs in different scenarios and improving the flexibility of macro shooting.
[0076] To achieve the above embodiments, this application also proposes a macro photography device.
[0077] Figure 7 This is a schematic diagram of a macro photography device provided in an embodiment of this application.
[0078] like Figure 7 As shown, the device may include an acquisition module 71 and a control module 72.
[0079] The acquisition module 71 is used to acquire a first image captured by the first camera and a second image captured by the second camera.
[0080] Control module 72 is used to control the third camera to perform macro shooting when there is no overlapping area between the images of the first image and the second image;
[0081] The third camera has at least a macro shooting function. When the shooting distance between the first camera and the second camera is greater than or equal to the first shooting distance, the field of view of the first camera and the second camera overlaps. The first shooting distance is less than or equal to the macro shooting distance set by the third camera.
[0082] Optionally, in one implementation of this application embodiment, the acquisition module 71 is used for:
[0083] When the third camera is activated, the first camera and the second camera are activated; a first image captured by the first camera and a second image captured by the second camera are acquired.
[0084] In one implementation of this application, the third camera has at least two shooting focal lengths, and any one of the at least two shooting focal lengths corresponds to a macro shooting mode.
[0085] In one implementation of this application embodiment, the control module 72 may include:
[0086] A matching unit is used to match pixels in the first image and pixels in the second image to obtain the target number of unmatched pixels; if the target number is greater than a threshold, the third camera is controlled to perform macro shooting.
[0087] In one implementation of this application, the matching unit is further configured to:
[0088] Obtain the relative positional relationship between the first camera and the second camera; determine the first target edge of the first image based on the relative positional relationship; match the pixels on the first target edge with the pixels in the second image to obtain the target number of unmatched pixels.
[0089] In one implementation of this application, the matching unit is further configured to:
[0090] Identify a second target edge in the second image that is adjacent to the first target edge; match the pixels on the first target edge with the pixels on the second target edge to obtain the number of unmatched target pixels.
[0091] In one implementation of this application embodiment, the acquisition module 71 is further configured to:
[0092] The system drives the first camera to capture the first image using a first pixel merging method, and drives the second camera to capture the second image using a second pixel merging method; wherein the first pixel merging method is obtained by merging a predetermined number of adjacent photosensitive pixels in the image sensor of the first camera; and the second pixel merging method is obtained by merging a predetermined number of adjacent photosensitive pixels in the image sensor of the second camera.
[0093] In one implementation of this application, the control module 72 is used for:
[0094] The second shooting distance is used as the initial focus position of the third camera, and the second shooting distance is less than or equal to the set macro shooting distance; the focus position of the third camera is adjusted according to the initial focus position to obtain the target focus position; the third camera is controlled to perform macro shooting at the target focus position.
[0095] In one implementation of this application, the first camera and the second camera are spaced apart, and the third camera is located between the first camera and the second camera.
[0096] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of this embodiment, and will not be repeated here.
[0097] In the macro shooting device of this application embodiment, a first image captured by a first camera and a second image captured by a second camera are acquired. When there is no overlapping area between the images of the first image and the second image, a third camera is controlled to perform macro shooting. When the shooting distance between the first camera and the second camera is greater than or equal to a first shooting distance, the field of view of the first camera and the second camera overlaps. When the first shooting distance is less than or equal to the macro shooting distance set by the third camera, this application identifies that there is no overlapping area between the image content of the first image and the second image, determines that the subject is in the blind spot of the first camera and the second camera, and then automatically activates the macro shooting mode of the third camera to improve the efficiency of macro shooting.
[0098] To implement the above embodiments, this application also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the method described in the foregoing method embodiments.
[0099] To implement the above embodiments, this application also proposes a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in the foregoing method embodiments.
[0100] To implement the above embodiments, this application also proposes a computer program product having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in the foregoing method embodiments.
[0101] Figure 8 This is a block diagram of an electronic device provided in an embodiment of this application. For example, device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, etc.
[0102] Reference Figure 8 The device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.
[0103] Processing component 802 typically controls the overall operation of device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 208 and processing component 802.
[0104] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0105] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device 800.
[0106] Multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0107] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
[0108] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0109] Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of device 800. For example, sensor assembly 814 may detect the on / off state of device 800, the relative positioning of components such as the display and keypad of device 800, changes in the position of device 800 or a component of device 800, the presence or absence of user contact with device 800, the orientation or acceleration / deceleration of device 800, and temperature changes of device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0110] Communication component 816 is configured to facilitate wired or wireless communication between device 800 and other devices. Device 800 can access wireless networks based on communication standards, such as WiFi, 4G, or 5G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0111] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0112] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of the device 800 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0113] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0114] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0115] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0116] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0117] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0118] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0119] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0120] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A macro photography method, characterized in that, include: Acquire a first image of the object captured by the first camera, and a second image of the object captured by the second camera; When there is no overlapping area between the first image and the second image, control the third camera to take macro photos of the object; The third camera has at least a macro shooting function. When the shooting distance from the first camera and the second camera to the object is greater than or equal to the first shooting distance, the field of view of the first camera and the second camera overlaps. When the shooting distance from the first camera and the second camera to the object is less than the first shooting distance, the first camera and the second camera do not overlap. The first camera, the second camera and the third camera are arranged on the same side of the electronic device, and the first shooting distance is less than or equal to the macro shooting distance set by the third camera.
2. The method as described in claim 1, characterized in that, The acquisition of the first image captured by the first camera and the second image captured by the second camera includes: When the third camera is activated, the first camera and the second camera are also activated; Acquire a first image captured by the first camera and a second image captured by the second camera.
3. The method as described in claim 2, characterized in that, The third camera has at least two shooting focal lengths, and any one of the at least two shooting focal lengths corresponds to a macro shooting mode.
4. The method as described in claim 1, characterized in that, The step of controlling the third camera to perform macro photography when there is no overlapping area between the first image and the second image includes: The pixels in the first image and the pixels in the second image are matched to obtain the target number of unmatched pixels; If the number of targets exceeds a threshold, the third camera is controlled to perform macro photography.
5. The method as described in claim 4, characterized in that, The step of matching pixels in the first image and pixels in the second image to obtain the target number of unmatched pixels includes: Obtain the relative positional relationship between the first camera and the second camera; Based on the relative positional relationship, determine the first target edge of the first image; The pixels on the edge of the first target are matched with the pixels in the second image to obtain the number of unmatched pixels in the target.
6. The method as described in claim 5, characterized in that, The step of matching the pixels on the edge of the first target with the pixels in the second image to obtain the number of unmatched pixels of the target includes: Determine the second target edge in the second image that is adjacent to the first target edge; The pixels on the first target edge are matched with the pixels on the second target edge to obtain the number of unmatched target pixels.
7. The method as described in claim 1, characterized in that, The acquisition of the first image captured by the first camera and the second image captured by the second camera includes: The first camera is driven to capture the first image using a first pixel merging method, and the second camera is driven to capture the second image using a second pixel merging method; The first pixel merging method is obtained by merging a predetermined number of adjacent photosensitive pixels in the image sensor of the first camera; the second pixel merging method is obtained by merging a predetermined number of adjacent photosensitive pixels in the image sensor of the second camera.
8. The method as described in claim 1, characterized in that, The control of the third camera for macro photography includes: The second shooting distance is used as the initial focus position of the third camera, and the second shooting distance is less than or equal to the set macro shooting distance; Based on the initial focus position, adjust the focus position of the third camera to obtain the target focus position; Control the third camera to perform macro photography at the target focus position.
9. The method according to any one of claims 1-6, characterized in that, The first camera and the second camera are spaced apart, and the third camera is located between the first camera and the second camera.
10. A macro photography device, characterized in that, include: The acquisition module is used to acquire a first image of the object captured by the first camera and a second image of the object captured by the second camera; The control module is used to control the third camera to take macro photos of the object when there is no overlapping area between the images of the first image and the second image. The third camera has at least a macro shooting function. When the shooting distance from the first camera and the second camera to the object is greater than or equal to the first shooting distance, the field of view of the first camera and the second camera overlaps. When the shooting distance from the first camera and the second camera to the object is less than the first shooting distance, the first camera and the second camera do not overlap. The first camera, the second camera and the third camera are arranged on the same side of the electronic device, and the first shooting distance is less than or equal to the macro shooting distance set by the third camera.
11. The apparatus as claimed in claim 10, characterized in that, The acquisition module is used for: When the third camera is activated, the first camera and the second camera are also activated; Acquire a first image captured by the first camera and a second image captured by the second camera.
12. The apparatus as claimed in claim 11, characterized in that, The third camera has at least two shooting focal lengths, and any one of the at least two shooting focal lengths corresponds to a macro shooting mode.
13. The apparatus as claimed in claim 10, characterized in that, The control module includes: A matching unit is used to match pixels in the first image and pixels in the second image to obtain the target number of unmatched pixels; If the number of targets exceeds a threshold, the third camera is controlled to perform macro photography.
14. The apparatus as claimed in claim 13, characterized in that, The matching unit is further configured to: Obtain the relative positional relationship between the first camera and the second camera; Based on the relative positional relationship, determine the first target edge of the first image; The pixels on the edge of the first target are matched with the pixels in the second image to obtain the number of unmatched pixels in the target.
15. The apparatus as claimed in claim 14, characterized in that, The matching unit is further configured to: Identify a second target edge in the second image that is adjacent to the first target edge; match the pixels on the first target edge with the pixels on the second target edge to obtain the number of unmatched target pixels.
16. The apparatus as claimed in claim 10, characterized in that, The acquisition module is also used for: The first camera is driven to capture the first image using a first pixel merging method, and the second camera is driven to capture the second image using a second pixel merging method; The first pixel merging method is obtained by merging a predetermined number of adjacent photosensitive pixels in the image sensor of the first camera; the second pixel merging method is obtained by merging a predetermined number of adjacent photosensitive pixels in the image sensor of the second camera.
17. The apparatus as claimed in claim 10, characterized in that, The control module is used for: The second shooting distance is used as the initial focus position of the third camera, and the second shooting distance is less than or equal to the set macro shooting distance; Based on the initial focus position, adjust the focus position of the third camera to obtain the target focus position; Control the third camera to perform macro photography at the target focus position.
18. The apparatus according to any one of claims 10-17, characterized in that, The first camera and the second camera are spaced apart, and the third camera is located between the first camera and the second camera.
19. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the method as described in any one of claims 1-9.
20. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-9.
Citation Information
Patent Citations
Shooting mode automatic adjustment method and device and mobile terminal
CN105959555A
Haulage motor shunting device and method and included angle determining method for binocular video camera
CN108099956A
Digital camera with free visual angle
CN201562109U