Image Processing Method and Apparatus, Electronic Device, Storage Medium
By using multiple cameras with different depths of field in the camera to shoot the target object, the problem of low image acquisition efficiency during camera focus is solved, and the rapid acquisition of clear target images is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202111461066.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2041-11-30
AI Technical Summary
In the prior art, when a user acquires images using a camera, due to the focus process, there is a time difference between the actual captured image and the image that the user wants to acquire, resulting in the inability to obtain the desired instantaneous image, and the image acquisition efficiency is low.
Multiple cameras with different depths of field are used to shoot the same target object, and the images corresponding to each camera are obtained through the maximum aperture, the focal length is locked, and the focus time is saved, so as to obtain a clear target image.
Among the images acquired through multiple cameras, clear target images of the target object can be obtained, and users can obtain the instant images they want to take in time, improve the image acquisition efficiency and have a good user experience.
Smart Images

Figure CN114140509B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and particularly relates to an image processing method and apparatus, an electronic device, and a storage medium. Background Art
[0002] Currently, when a user obtains an image using a camera, focusing takes time, and there may be a time difference between the image the user wants to capture and the image actually captured by the camera, resulting in the user being unable to obtain the image of the desired moment. In the prior art, optimizing the focusing strategy can reduce the time spent on focusing, but the time difference still exists and cannot be eliminated, resulting in low image acquisition efficiency. Summary of the Invention
[0003] In view of the above problems existing in the prior art, this application provides an image processing method and apparatus, an electronic device, and a storage medium. The technical solutions adopted in the embodiments of this application are as follows:
[0004] On the one hand, an embodiment of this application provides an image processing method applied to an electronic device. The electronic device includes multiple cameras with different and continuous depth-of-field intervals. The method includes:
[0005] Using a first camera to capture a target object at the maximum aperture to obtain a first image; wherein, the first camera has a first depth-of-field interval;
[0006] Using other cameras to capture the target object at the maximum aperture to obtain other images; wherein, the other images respectively correspond to the other cameras, and the other cameras respectively have different depth-of-field intervals;
[0007] Wherein, the depth-of-field intervals of the other cameras and the first depth-of-field interval form a continuous depth-of-field interval;
[0008] Based on the obtained first image and the other images, obtain a target image of the target object.
[0009] In some embodiments, the determination method of the first depth-of-field interval includes:
[0010] Obtain the first shooting parameter of the first camera, and determine the first depth-of-field interval according to the first shooting parameter.
[0011] In some embodiments, the determination method of the other depth-of-field intervals at least includes:
[0012] Determine a preset second depth-of-field interval according to the first depth-of-field interval, determine a second camera according to the preset second depth-of-field interval, and obtain the second shooting parameter of the second camera; determine the actual second depth-of-field interval according to the second shooting parameter;
[0013] Determine a preset third depth-of-field interval according to the actual second depth-of-field interval; determine a third camera according to the preset third depth-of-field interval, and obtain a third shooting parameter of the third camera; determine an actual third depth-of-field interval according to the third shooting parameter.
[0014] In some embodiments, the obtaining the target image of the target object based on the obtained first image and the other images includes:
[0015] Obtain a target distance between the target object and the multiple cameras;
[0016] Compare the target distance with the multiple depth-of-field intervals, and determine the image captured by the corresponding camera as the target image according to the comparison result.
[0017] In some embodiments, the obtaining the target image of the target object based on the obtained first image and the other images includes:
[0018] Obtain multiple focal points of the multiple cameras, and determine multiple target recognition regions corresponding to the first image and the other images respectively according to the multiple focal points;
[0019] Compare the target object with the multiple target recognition regions, and determine the target image from the first image and the other images according to the comparison result.
[0020] In some embodiments, the obtaining the target image of the target object based on the obtained first image and the other images includes:
[0021] Perform portrait recognition on the first image and the other images, and obtain a recognition result;
[0022] Match the recognition result with the target object, and determine the target image from the first image and the other images according to the matching result.
[0023] In some embodiments, the obtaining the target image of the target object based on the obtained first image and the other images includes:
[0024] In response to a selection operation input by a user, determine the target image from the first image and the other images.
[0025] On the other hand, an embodiment of the present application provides an image processing apparatus, including:
[0026] A first image acquisition module, configured to capture a target object with a first camera at the maximum aperture to obtain a first image; wherein, the first camera has a first depth-of-field interval;
[0027] A second image acquisition module, configured to use other cameras to capture the target object at the maximum aperture to obtain other images; wherein, the other images respectively correspond to the other cameras, and the other cameras respectively have different depth-of-field intervals;
[0028] Wherein, the depth-of-field intervals of the other cameras and the first depth-of-field interval form a continuous depth-of-field interval;
[0029] An image determination module, configured to obtain a target image of the target object based on the acquired first image and the other images.
[0030] An embodiment of the present application further provides an electronic device, at least including a memory, a processor, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device runs, the processor communicates with the memory through the bus. When the machine-readable instructions are executed by the processor, the steps of the method provided in any embodiment of the present application are executed.
[0031] An embodiment of the present application further provides a storage medium, which stores one or more programs. When the above one or more programs are executed by a processor, the steps of the method provided in any of the above embodiments of the present application are implemented.
[0032] In the image processing method provided by the embodiment of the present application, after using multiple cameras with different and continuous depth-of-field intervals to capture the same target object, different images corresponding to each camera can be obtained. Because multiple cameras with different and continuous depth-of-field intervals can respectively clearly capture the target object at different shooting distances. When shooting the target object of the present application, when the shooting distance between the target object and the camera conforms to the depth-of-field interval of one of the cameras, the image captured by this camera will present a clear effect. Thus, a clear target image of the target object can be obtained from the multiple images acquired by multiple cameras. Therefore, in the solution provided by the embodiment of the present application, multiple cameras with different depth-of-field intervals and continuous depth-of-field intervals are used to shoot at the maximum aperture, with an exposure time period, and the focal lengths of each camera are locked, saving the focusing time. The user can obtain the image of the moment they want to shoot for the target object, improving the image acquisition efficiency and having a good user experience. Description of the Drawings
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0034] Figure 1 Schematic diagram of the application of the image processing method provided by an embodiment of the present application;
[0035] Figure 2 Flowchart of the image processing method provided by an embodiment of the present application;
[0036] Figure 3 Block diagram of the image processing apparatus provided by an embodiment of the present application;
[0037] Figure 4 Schematic structural diagram of the electronic device provided by an embodiment of the present application. Detailed implementation manners
[0038] In order to make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the described embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0039] Unless otherwise defined, the technical terms or scientific terms used in the present application shall have the ordinary meanings understood by those of ordinary skill in the art to which the present application belongs. The "first", "second", and similar terms used in the present application do not denote any order, quantity, or importance, but are only used to distinguish different components. The terms such as "including" or "comprising" mean that the elements or items appearing before the term cover the elements or items listed after the term and their equivalents, without excluding other elements or items. The terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left", and "right" are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0040] In order to keep the following description of the embodiments of the present application clear and concise, detailed descriptions of known functions and known components are omitted in the present application.
[0041] When a user obtains an image using a camera, due to the camera's focusing process, there is a time difference between the actually captured image and the image the user wants to obtain. Moreover, when shooting a moving subject, the camera may lose focus during continuous autofocus, resulting in a blurry captured image. In the image processing method provided in the embodiments of the present application, after multiple cameras with different and continuous depth-of-field intervals shoot the same target object, different images corresponding to each camera can be obtained. Since multiple cameras with different and continuous depth-of-field intervals can clearly shoot the target object at different shooting distances respectively, when shooting the target object of the present application, when the shooting distance between the target object and the camera conforms to the depth-of-field interval of one of the cameras, the image captured by this camera will present a clear effect. Thus, based on the multiple images obtained by multiple cameras, a clear target image of the target object can be obtained. Therefore, in the solution provided in the embodiments of the present application, multiple cameras with different and continuous depth-of-field intervals shoot through the maximum aperture, with an exposure time period, and the focal lengths of each camera are locked, saving the focusing time. The user can obtain the image of the moment they want to shoot for the target object, improving the image acquisition efficiency and providing a good user experience.
[0042] The embodiments of the present application are applied to electronic devices, such as cameras, tablet computers, mobile phones, and other electronic devices that can capture images. The specific form of the electronic device is not limited in the present application. The electronic device includes multiple cameras, and the multiple cameras correspondingly have multiple different and continuous depth-of-field intervals. Referring to Figure 1 As shown in, when 4 cameras are provided, each camera has a different depth-of-field interval, and each depth-of-field interval is continuous in sequence. Exemplarily, the first depth of field of camera 1 is L1. If the first depth-of-field interval is 0.5 - 0.8 m, then the first depth of field L1 is 0.3 m; the second depth of field of camera 2 is L2, and the second depth-of-field interval is continuous with the first depth-of-field interval, and can be 0.8 - 2.0 m, then the second depth of field L2 is 1.2 m; the second depth of field of camera 3 is L3, and the third depth-of-field interval is continuous with the second depth-of-field interval, and can be 2.0 - 5.0 m, then the third depth of field L3 is 3 m; the fourth depth of field of camera 4 is L4, and the fourth depth-of-field interval is continuous with the third depth-of-field interval, and can be 5.0 - 20 m, then the fourth depth of field L4 is 15 m. Thus, the first depth-of-field interval to the fourth depth-of-field interval are combined to form a continuous depth-of-field interval of 0.5 - 20 m. The numerical values of each depth-of-field interval exemplified in the present application are only for reference, and the numerical values of the depth-of-field interval can be set according to the actual usage in specific applications, and the present application does not limit them. Thus, the electronic device can obtain clear images by shooting an object at different shooting distances through multiple cameras with different and continuous depth-of-field intervals without the need for focusing processing, and has high image acquisition efficiency.
[0043] The technical solution of the present application will be described in detail below with specific embodiments. The following embodiments can be combined with each other, and the same or similar concepts or processes will not be repeated in some embodiments.
[0044] Figure 2 The flowchart of an image processing method provided by an embodiment of the present application is shown. As Figure 2 shown, the image processing method provided by the embodiment of the present application includes the following steps S100-S300:
[0045] S100, using a first camera to capture a target object with the maximum aperture to obtain a first image; wherein, the first camera has a first depth-of-field interval.
[0046] Generally, the depth of field (DOF) is the range of the front and back distances of the object to be photographed determined by the imaging where the front edge of the camera lens or other imager can obtain a clear image. That is to say, the depth of field is the range of distances where the front and back of the focus of the camera lens present clear images. The focus is the clearest point obtained when light passes through the lens and focuses on the photosensitive element. In the embodiment of the present application, the first depth-of-field interval corresponding to the first camera can be determined from the depth of field and the focusing distance of the first camera, so that when the first camera captures a target object within the first depth-of-field interval, a clear image can be obtained.
[0047] In the image processing method of the present application, multiple cameras with different and continuous depth-of-field intervals are used to capture the target object to obtain multiple images, so as to obtain a clear target image from the multiple images. This step aims to use the first camera to obtain the first image through the maximum aperture. In this step, when a shooting instruction is received, the first camera turns on the maximum aperture and directly captures the target object, so that the first image contains the target object. In this step, the first camera uses the maximum aperture for shooting, which can shorten the exposure time. At the same time, the first camera locks the focal length and saves the focusing time, thereby shortening the time to obtain the first image as much as possible.
[0048] In some embodiments, in order to determine the first depth-of-field interval, the specific method includes: obtaining the first shooting parameter of the first camera, and determining the first depth-of-field interval according to the first shooting parameter.
[0049] This embodiment aims to determine the first depth-of-field interval so that when the first camera captures a target object within the range of the first depth-of-field interval, a clear image can be obtained.
[0050] In order to determine the first depth-of-field interval corresponding to the first camera, it is necessary to first calculate its corresponding first depth of field. The depth of field includes the front depth of field and the rear depth of field, which is the sum of the front depth of field and the rear depth of field. The calculation formulas are respectively:
[0051] Front depth of field = (circle of confusion diameter × aperture value × square of the focusing distance) / (square of the lens focal length + circle of confusion diameter × aperture value × focusing distance)
[0052] Rear depth of field = (circle of confusion diameter × aperture value × square of the focusing distance) / (square of the lens focal length - circle of confusion diameter × aperture value × focusing distance)
[0053] Depth of field = (2 × circle of confusion diameter × square of the lens focal length × aperture value × square of the focusing distance) / (fourth power of the lens focal length - square of the circle of confusion diameter × square of the aperture value × square of the focusing distance)
[0054] Among them, the circle of confusion diameter is also called the allowable circle of confusion diameter, which is related to the size of the photosensitive element used. In actual calculations, for the sake of simplicity in the calculation process, the circle of confusion diameter can be selected according to experience and used as a constant in the calculation process.
[0055] It can be seen from the above calculation formula of the depth of field that the main factors affecting the depth of field include the aperture, the lens focal length, and the distance from the target object.
[0056] According to the selected first camera, the focal length and the maximum aperture value of its lens can be obtained, so as to calculate the corresponding first depth of field, as well as the first front depth of field and the first rear depth of field.
[0057] Regarding the focusing distance, since the first image is an image captured by the first camera for the target object, therefore, in actual applications, when calculating the first depth of field, the nearest focusing distance of the first camera can be used for determination. Among them, the nearest focusing distance refers to the shortest distance at which the camera can achieve focus when shooting the object to be photographed. When the distance is less than the nearest focusing distance, the target object to be photographed will be completely blurred and a clear image cannot be obtained. According to the first depth of field calculated from the nearest focusing distance, the camera can shoot the target object within the range of the nearest distance and obtain a clear image. In some actual applications, in order to make the shooting distance range determined by the first depth of field as close to the camera as possible, when selecting the first camera, a camera corresponding to a focal length in the short focal length range can be selected. Of course, the first camera can also be selected according to the shooting distance that needs to be covered during actual use, and this application does not make any limitations here.
[0058] Therefore, based on the obtained focal length, maximum aperture value, and nearest focusing distance of the lens of the first camera, the first front depth of field and the first rear depth of field corresponding to the first camera can be calculated. Then, according to the first front depth of field, the first rear depth of field, and the nearest focusing distance, the first depth of field interval can be determined.
[0059] S200, Use other cameras to capture the target object at the maximum aperture to obtain other images; wherein, the other images respectively correspond to the other cameras, and the other cameras respectively have different depth-of-field intervals;
[0060] Wherein, the depth-of-field intervals of the other cameras and the first depth-of-field interval form a continuous depth-of-field interval.
[0061] This step aims to obtain the images corresponding to each camera by using other cameras at the maximum aperture. In this step, when a shooting instruction is received, the other cameras turn on the maximum aperture to directly shoot the target object, so that the obtained corresponding images contain the target object. In this step, each camera shoots at the maximum aperture, which can shorten the exposure time. At the same time, each camera locks the focal length, saving the focusing time, so as to shorten the time to obtain the corresponding images as much as possible.
[0062] In this step, the depth-of-field intervals corresponding to the other cameras and the first depth-of-field interval form a continuous depth-of-field interval. According to the depth of field and the focusing distance corresponding to the other cameras, the corresponding depth-of-field intervals can be determined. Thus, when the other cameras shoot the target object within the corresponding depth-of-field intervals, clear images can be obtained.
[0063] In some embodiments, in order to determine other depth-of-field intervals, the implementation method includes:
[0064] Determine a preset second depth-of-field interval according to the first depth-of-field interval, determine a second camera according to the preset second depth-of-field interval, and obtain the second shooting parameters of the second camera; determine the actual second depth-of-field interval according to the second shooting parameters;
[0065] Determine a preset third depth-of-field interval according to the actual second depth-of-field interval; determine a third camera according to the preset third depth-of-field interval, and obtain the third shooting parameters of the third camera; determine the actual third depth-of-field interval according to the third shooting parameters.
[0066] In this embodiment, the preset second depth-of-field interval can be determined by those skilled in the art according to empirical values or actual situations, so that the continuous depth-of-field interval finally formed by the depth-of-field intervals of all cameras can cover the distance to be shot. Exemplarily, considering that the farther the shooting distance is, the larger the focusing distance is and the larger the depth of field is. Therefore, the depth of field corresponding to each depth-of-field interval from near to far should increase accordingly, and can increase in a certain proportional multiple relationship compared with the previous depth of field. Of course, it can also not increase in a multiple ratio, and is specifically determined according to the parameters of the camera.
[0067] In some specific applications, cameras with short focal lengths, medium focal lengths, and long focal lengths are selected respectively when choosing cameras. Thus, for cameras with different focal lengths, the shooting effects for the target object are better at different shooting distances.
[0068] Exemplarily, when using a camera to capture an image, generally, a target object more than 20 meters away does not need to be focused for shooting. Therefore, 20 meters can be determined as the farthest shooting distance that requires a focusing operation, and the nearest shooting distance can be determined according to the nearest focusing distance of the first camera. The nearest shooting distance and the farthest shooting distance form the required shooting distance interval. Then, according to the number of cameras used, the shooting distance interval is divided into corresponding multiple intervals. The first depth-of-field interval determined by the first camera corresponds to the interval where the focusing shooting distance is located, and other cameras are determined according to the values of the corresponding intervals.
[0069] In some specific applications, when determining the preset second depth-of-field interval according to the first depth-of-field interval, the end value of the first depth-of-field interval can be used as the start value of the preset second depth-of-field interval. The second depth of field can take a value that is a multiple relationship of the first depth of field, or a value that is not a multiple but greater than the first depth of field, so as to determine the end value of the preset second depth-of-field interval; or it is to determine the end value of the preset second depth-of-field interval according to the value of the second interval determined by all shooting distances and the number of cameras, so as to obtain the values at both ends of the preset second depth-of-field interval. After determining the preset second depth-of-field interval, the corresponding second depth of field and second focusing distance are determined according to the preset second depth-of-field interval. Based on the second depth of field and the second focusing distance, calculations are performed according to the depth-of-field calculation formula to determine the applicable second camera. Here, a camera with a medium focal length can be selected as the second camera. Of course, it can also be selected according to actual needs and the number of cameras, which is not limited. The actual second shooting parameters of the second camera are obtained, including the focal length of the lens and the maximum aperture value. According to the second shooting parameters, the second depth of field actually corresponding to the second camera is calculated, including the second front depth of field and the second rear depth of field. The second depth-of-field interval actually corresponding to the second camera is calculated according to the second front depth of field, the second rear depth of field, and the second focusing distance.
[0070] Next, according to the actual number of cameras used, the third camera and its actually corresponding third depth-of-field interval, as well as the fourth camera and its corresponding fourth depth-of-field interval, etc. are determined accordingly with reference to the determination method of the second camera and the second depth-of-field interval. Thus, the depth-of-field intervals of other cameras and the first depth-of-field interval can form a continuous depth-of-field interval.
[0071] S300, Based on the obtained first image and the other images, obtain the target image of the target object.
[0072] In the embodiments of the present application, when cameras in different depth-of-field intervals photograph the same target object, images with different sharpness levels are obtained. Exemplarily, when the depth-of-field interval can cover the shooting distance of the target object, the corresponding camera can obtain the image with the best sharpness. This step aims to select a clear target image from the images obtained by each camera.
[0073] In some embodiments, in order to obtain a target image from a first image and other images, the implementation manner may be:
[0074] Obtain a target distance between the target object and the multiple cameras;
[0075] Compare the target distance with the multiple depth-of-field intervals, and determine the image captured by the corresponding camera as the target image according to the comparison result.
[0076] In some specific applications, when the electronic device includes four cameras, the first depth-of-field interval L1 of camera 1 is 0.5 - 0.8 m, the second depth-of-field interval L2 of camera 2 is 0.8 - 2.0 m, the third depth-of-field interval L3 of camera 3 is 2.0 - 5.0 m, and the fourth depth-of-field interval L4 of camera 4 is 5.0 - 20 m. When the user photographs a target object at a target distance of 4 meters, the four cameras obtain their respective corresponding images. Here, the distance between the target object and the cameras can be measured based on an existing ranging device to obtain the target distance, which is not limited in this application. Comparing the target object with the target distance of 4 meters and the respective depth-of-field intervals of the four cameras, it can be determined that the third depth-of-field interval L3 of camera 3, which is 2.0 - 5.0 m, covers the target distance. According to this comparison result, it can be determined that the image captured by the corresponding camera 3 will be relatively clear, and then this image is determined as the target image.
[0077] In some embodiments, in order to obtain a target image from a first image and other images, the implementation manner may also be:
[0078] Obtain multiple focal points of the multiple cameras, and determine multiple target recognition regions corresponding to the first image and the other images according to the multiple focal points;
[0079] Compare the target object with the multiple target recognition regions, and determine the target image from the first image and the other images according to the comparison result.
[0080] Generally, the target object corresponding to the focus of a camera is the shooting object with a suitable focusing distance. In some specific applications, based on the focus of each camera, the target recognition area for recognition can be determined according to the focus, and the objects captured by each camera can be determined. Exemplarily, when there are multiple athletes in a sports field and the distances between each athlete and the user are different, if one athlete is taken as the target object and the user takes a picture of this athlete, the focus of each camera is obtained, and the area around the focus in the image is used as the target recognition area.
[0081] After determining the target recognition area in each figure, the target object is compared with the target recognition area. Here, the shooting object can be recognized from the target recognition area through image recognition. If the shooting object in a target recognition area matches the target object, according to this comparison result, the corresponding image can be determined as the target image.
[0082] In some embodiments, in order to obtain the target image from the first image and other images, the implementation method can also be:
[0083] Perform human face recognition on the first image and the other images to obtain the recognition result;
[0084] Match the recognition result with the target object, and determine the target image from the first image and the other images according to the matching result.
[0085] When the camera takes a picture, if the shooting distance of the target object is too different from the focusing distance of the camera, a clear image of the target object cannot be obtained, or in the obtained image, non-target objects within the depth of field range that matches the camera will be captured. Therefore, in some specific application methods, perform human face recognition on the first image and the other images. Here, the recognition method is not limited, and as long as the clear human object in the image can be recognized. After obtaining the recognition results in each image, match the recognition results with the target object. If one of the recognition results matches the target object, determine its corresponding image as the target image.
[0086] In some embodiments, in order to obtain the target image from the first image and other images, the implementation method can also be:
[0087] In response to the selection operation input by the user, determine the target image from the first image and the other images.
[0088] When the image acquisition device is provided with a touch display unit, user input information can be received through the touch display unit, and then a target image can be determined in response to a selection operation by the user on one of the images. In this embodiment, the user can directly perform a selection operation through the touch display unit according to the photographed target object and the clarity of the seen images, input selection information, and select the clear image where the target object is located as the target image.
[0089] An embodiment of the present application also provides an image processing device, as Figure 3 shown, including:
[0090] A first image acquisition module 10, configured to use a first camera to photograph a target object with the maximum aperture to acquire a first image; wherein, the first camera has a first depth of field interval;
[0091] A second image acquisition module 20, configured to use other cameras to photograph the target object with the maximum aperture to acquire other images; wherein, the other images respectively correspond to the other cameras, and the other cameras respectively have different depth of field intervals;
[0092] wherein, the depth of field intervals of the other cameras and the first depth of field interval form a continuous depth of field interval;
[0093] An image determination module 30, configured to obtain a target image of the target object based on the acquired first image and the other images.
[0094] The image processing device in the embodiment of the present application can implement the steps of the image processing method mentioned in any embodiment of the present application through its configured functional modules.
[0095] An embodiment of the present application also provides an electronic device, including a memory 901, a processor 902, and a bus (not shown), wherein, the structural schematic diagram of the electronic device can be as Figure 4 shown, the memory 901 stores machine-readable instructions executable by the processor 902. When the electronic device runs, the processor 902 communicates with the memory 901 through the bus, and when the machine-readable instructions are executed by the processor, the steps of the image processing method provided in any embodiment of the present application are executed.
[0096] Since the electronic device introduced in the embodiment of the present application is an electronic device provided with a memory for implementing the image processing method disclosed in the embodiment of the present application, based on the image processing method introduced in the embodiment of the present application, those skilled in the art can understand the structure and variations of the electronic device introduced in the embodiment of the present application, so it will not be elaborated here.
[0097] An embodiment of the present application also provides a storage medium storing one or more programs, which, when executed by a processor, implement the steps of the image processing method provided by any embodiment of the present application.
[0098] The storage medium in this embodiment may be included in an electronic device / system; or it may exist alone without being assembled into the electronic device / system. The above storage medium carries one or more programs, which, when executed, implement the steps of the image processing method provided by the embodiment of the present application.
[0099] According to an embodiment of the present application, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. Optionally, specific examples in this embodiment may refer to the examples described in any embodiment of the present application, and will not be elaborated herein. Obviously, those skilled in the art should understand that the above modules or steps of the present application may be implemented by a general computing device. They may be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they may be implemented by program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described may be executed in a different order than here, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them may be fabricated into a single integrated circuit module to implement. Thus, the present application is not limited to any specific combination of hardware and software.
[0100] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present application having equivalent elements, modifications, omissions, combinations (e.g., schemes that cross various embodiments), adaptations, or alterations. The elements in the claims will be broadly interpreted based on the language employed in the claims and are not limited to the examples described in the specification or during the implementation of the present application. The examples will be interpreted as non-exclusive. Thus, the specification and examples are intended to be considered only as examples, and the true scope and spirit are indicated by the full scope of the following claims and their equivalents.
[0101] The above description is intended to be illustrative and not restrictive. For example, the above examples (or one or more aspects thereof) may be used in combination with each other. For example, those of ordinary skill in the art may use other embodiments when reading the above description. Additionally, in the above detailed description, various features may be grouped together to simplify the present application. This should not be construed as an intention that a disclosed feature not claimed is necessary for any claim. On the contrary, the subject matter of the present application may be less than all of the features of a particular disclosed embodiment. Thus, the following claims are hereby incorporated into the detailed description by way of example or illustration, where each claim stands on its own as a separate embodiment, and it is contemplated that these embodiments may be combined with each other in various combinations or permutations. The scope of the present application should be determined with reference to the appended claims and the full scope of equivalents to which those claims are entitled.
[0102] The above has described multiple embodiments of the present application in detail, but the present application is not limited to these specific embodiments. Based on the concept of the present application, those skilled in the art can make various variations and modifications to the embodiments, and these variations and modifications should all fall within the scope claimed by the present application.
Claims
1. An image processing method is applied to an electronic device, and the electronic device includes multiple cameras with different and continuous depth-of-field intervals. Among them, the method includes: Using a first camera to capture a target object at the maximum aperture to obtain a first image; wherein, the first camera has a first depth-of-field interval. Using other cameras to capture the target object at the maximum aperture to obtain other images; wherein, the other images respectively correspond to the other cameras, and the other cameras respectively have different depth-of-field intervals. Among them, the depth-of-field intervals of the other cameras and the first depth-of-field interval form a continuous depth-of-field interval. Based on the obtained first image and the other images, obtain the target image of the target object. Among them, the determination method of the depth-of-field intervals of other cameras includes: Determine a preset second depth-of-field interval according to the first depth-of-field interval, determine a second camera according to the preset second depth-of-field interval, and obtain the second shooting parameters of the second camera; determine the actual second depth-of-field interval according to the second shooting parameters.
2. The method according to claim 1, wherein, the determination method of the first depth-of-field interval includes: Obtain the first shooting parameters of the first camera, and determine the first depth-of-field interval according to the first shooting parameters.
3. The method according to claim 2, wherein, the determination method of the depth-of-field intervals of other cameras further includes: Determine a preset third depth-of-field interval according to the actual second depth-of-field interval; determine a third camera according to the preset third depth-of-field interval, and obtain the third shooting parameters of the third camera; determine the actual third depth-of-field interval according to the third shooting parameters.
4. The method according to any one of claims 1-3, wherein, the obtaining the target image of the target object based on the obtained first image and the other images includes: Obtain the target distance between the target object and multiple cameras. Compare the target distance with the multiple depth-of-field intervals, and determine the image captured by the corresponding camera as the target image according to the comparison result.
5. The method according to any one of claims 1-3, wherein, the obtaining the target image of the target object based on the obtained first image and the other images includes: Obtain multiple focal points of multiple cameras, and determine multiple target recognition regions corresponding to the first image and the other images respectively according to the multiple focal points. Compare the target object with the multiple target recognition regions, and determine the target image from the first image and the other images according to the comparison result.
6. The method according to any one of claims 1-3, wherein, the obtaining the target image of the target object based on the obtained first image and the other images includes: Perform human face recognition on the first image and the other images to obtain a recognition result. Match the recognition result with the target object, and determine the target image from the first image and the other images according to the matching result.
7. The method according to any one of claims 1-3, wherein, Obtaining the target image of the target object based on the acquired first image and the other images includes: Determining the target image from the first image and the other images in response to a selection operation input by the user.
8. An image processing apparatus wherein it includes: A first image acquisition module configured to capture a target object with a first camera at the maximum aperture to obtain a first image; wherein, the first camera has a first depth of field range; A second image acquisition module configured to capture the target object with other cameras at the maximum aperture to obtain other images; wherein, the other images respectively correspond to the other cameras, and the other cameras respectively have different depths of field ranges; wherein, the depth of field ranges of the other cameras and the first depth of field range form a continuous depth of field range; An image determination module configured to obtain the target image of the target object based on the acquired first image and the other images; wherein, the method for determining the depth of field ranges of the other cameras includes: Determining a preset second depth of field range according to the first depth of field range, determining a second camera according to the preset second depth of field range, obtaining second shooting parameters of the second camera; and determining an actual second depth of field range according to the second shooting parameters.
9. An electronic device, comprising a processor, a plurality of cameras and a memory, the memory storing machine-readable instructions executable by the processor. When the electronic device runs, communication is carried out between the processor and the memory, and when the machine-readable instructions are executed by the processor, the steps of the method according to any one of claims 1 to 7 are executed.
10. A storage medium storing one or more programs, which when executed by a processor, execute the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Shooting method and system for camera shooting device
CN104780315A
Method, device and equipment for synthesizing panoramic depth image, medium, camera array and assembly
CN111866370A