Shooting method, device, equipment, medium and product

By integrating depth image recognition and multi-sensor fusion technology into the shooting device, the zoom ratio is automatically adjusted, solving the dependence on external equipment and professional photographers in existing technologies, and realizing simple Hitchcock zoom effect shooting.

CN120916062APending Publication Date: 2025-11-07VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511143855.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-14
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Current technology requires external equipment and professional photographers to capture images or videos with Hitchcock zoom effects, making the process complex.

Method used

By controlling the shooting equipment to automatically adjust the zoom ratio at different distances, and utilizing depth image recognition and multi-sensor fusion technology, the proportion of the subject in the image remains unchanged, automatically achieving the Hitchcock zoom effect.

Benefits of technology

It allows you to capture images or videos with Hitchcock zoom effects without the need for external equipment or professional personnel. It is easy to operate and improves shooting efficiency and versatility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120916062A_ABST
    Figure CN120916062A_ABST
Patent Text Reader

Abstract

The invention discloses a shooting method, device and equipment, a medium and a product, and belongs to the technical field of shooting. The shooting method comprises the steps that under the condition that the distance between a shooting object and shooting equipment is a first distance, the shooting equipment is controlled to shoot a shooting scene according to a first zoom ratio, a first image is obtained, and the shooting scene comprises the shooting object; under the condition that the distance between the shooting object and the shooting equipment is updated from the first distance to a second distance, controlling the shooting equipment to shoot the shooting scene according to a second zoom ratio to obtain a second image; wherein the first zoom magnification is different from the second zoom magnification, and the proportions of the shooting object in the first image and the second image are the same.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of shooting, and particularly relates to a shooting method, device, equipment, medium and product. BACKGROUND

[0002] Hitchcock zoom (also known as sliding zoom) is a special shooting method, which changes the moving direction of a camera and the focal length of a lens synchronously, so that the size of a main body of a picture is constant and the background presents a visual effect of moving away from or approaching the main body of the picture.

[0003] In order to shoot an image or a video with a Hitchcock zoom effect, a current scheme needs to rely on professional equipment such as a guide rail and a stabilizer, and needs a photographer to manually match, which has a high requirement for the photographer and is relatively complex to operate. SUMMARY

[0004] Embodiments of the application provide a shooting method, device, equipment, medium and product, and can solve the problem that related technologies need to rely on external equipment and professional photographers and are relatively complex to operate when shooting an image or a video with a Hitchcock zoom effect.

[0005] In a first aspect, embodiments of the application provide a shooting method, including:

[0006] In a case where a distance between a shooting object and a shooting device is a first distance, a shooting device is controlled to shoot a shooting scene at a first zoom ratio, and a first image is obtained, the shooting scene including the shooting object;

[0007] In a case where the distance between the shooting object and the shooting device is updated from the first distance to a second distance, the shooting device is controlled to shoot the shooting scene at a second zoom ratio, and a second image is obtained;

[0008] The first zoom ratio and the second zoom ratio are different, and the proportion of the shooting object in the first image and the second image is the same.

[0009] In a second aspect, embodiments of the application provide a shooting device, including:

[0010] A first control module is configured to, in a case where a distance between a shooting object and a shooting device is a first distance, control a shooting device to shoot a shooting scene at a first zoom ratio, and obtain a first image, the shooting scene including the shooting object;

[0011] A second control module is configured to, in a case where the distance between the shooting object and the shooting device is updated from the first distance to a second distance, control the shooting device to shoot the shooting scene at a second zoom ratio, and obtain a second image;

[0012] The first zoom ratio is different from the second zoom ratio, and the proportions of the shooting object in the first image and the second image are the same.

[0013] In a third aspect, an electronic device is provided. The electronic device includes a processor and a memory. The memory stores programs or instructions executable by the processor. The programs or instructions, when executed by the processor, implement the steps of the method of the first aspect.

[0014] In a fourth aspect, a readable storage medium is provided. The readable storage medium stores programs or instructions. The programs or instructions, when executed by a processor, implement the steps of the method of the first aspect.

[0015] In a fifth aspect, a chip is provided. The chip includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is configured to execute programs or instructions to implement the steps of the method of the first aspect.

[0016] In a sixth aspect, a computer program product is provided. The program product is stored in a storage medium. The program product, when executed by at least one processor, implements the steps of the method of the first aspect.

[0017] In the case where the distance between the shooting object and the shooting device is a first distance, the shooting device is controlled to shoot the shooting scene according to a first zoom ratio to obtain a first image. In the case where the distance between the shooting object and the shooting device is updated from the first distance to a second distance, the shooting device is controlled to shoot the shooting scene according to a second zoom ratio to obtain a second image. The first zoom ratio is different from the second zoom ratio, and the proportions of the shooting object in the first image and the second image are the same. That is, the embodiment of the present application can automatically zoom based on the distance between the shooting object and the shooting device, shoot an image with a Zeiss zoom effect, and does not need to rely on external devices or manually zoom by professionals, thereby simplifying the operation. BRIEF DESCRIPTION OF DRAWINGS

[0018] Figure 1 A flowchart of a shooting method provided by the embodiment of the present application is provided.

[0019] Figure 2 A flowchart of determining the distance between the shooting object and the shooting device provided by the embodiment of the present application is provided.

[0020] Figure 3 A flowchart of obtaining a depth image of a shooting scene provided by the embodiment of the present application is provided.

[0021] Figure 4 A schematic diagram of a fused depth image provided by the embodiment of the present application is provided.

[0022] Figure 5 A flowchart of another photographing method provided by an embodiment of the present application is shown in FIG. 5.

[0023] Figure 6 A schematic diagram of an image photographed when the zoom ratio is S1 according to an embodiment of the present application is shown in FIG. 6.

[0024] Figure 7 A schematic diagram of an image photographed when the zoom ratio is S2 according to an embodiment of the present application is shown in FIG. 7.

[0025] Figure 8 A structural schematic diagram of a photographing apparatus according to an embodiment of the present application is shown in FIG. 8.

[0026] Figure 9 A structural schematic diagram of an electronic device according to an embodiment of the present application is shown in FIG. 9.

[0027] Figure 10 A hardware structural schematic diagram of an electronic device according to an embodiment of the present application is shown in FIG. 10. DETAILED DESCRIPTION

[0028] The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art belong to the scope of protection of the present application.

[0029] The terms “first”, “second”, and the like in the specification of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by “first”, “second”, etc. are generally of a kind and do not limit the number of objects, for example, the first object can be one or more. In addition, “and / or” in the specification means at least one of the connected objects, and the character “ / ” generally represents an “or” relationship between the front and rear associated objects.

[0030] As described above, in order to photograph an image or video with a Zeiss zoom effect, the current solution relies on external devices such as rails and stabilizers, and is manually zoomed by professional photographers, which is relatively complex to operate.

[0031] Therefore, the embodiments of the present application provide a photographing method, apparatus, device, medium and product, which are relatively simple to operate when photographing an image or video with a Zeiss zoom effect without relying on external devices and professional photographers.

[0032] The application embodiments provide a photographing method, device, equipment, medium and product.

[0033] Figure 1 A flowchart of a photographing method provided by the application embodiments is shown below. The photographing method can be used to photograph an image or video with a Zeiss zoom effect. The photographing method can be applied to a photographing device with a photographing function, such as a mobile phone, a camera, a camera head, a tablet computer and other electronic devices.

[0034] As shown in Figure 1 , the photographing method can include the following steps:

[0035] S110, in a case where a distance between a photographing object and the photographing device is a first distance, controlling the photographing device to photograph a photographing scene at a first zoom ratio to obtain a first image.

[0036] The photographing scene includes the photographing object.

[0037] S120, in a case where the distance between the photographing object and the photographing device is updated from the first distance to a second distance, controlling the photographing device to photograph the photographing scene at a second zoom ratio to obtain a second image.

[0038] The first zoom ratio is different from the second zoom ratio, and the proportion of the photographing object in the first image and the second image is the same.

[0039] In a case where the distance between the photographing object and the photographing device is the first distance, the application embodiments control the photographing device to photograph the photographing scene at the first zoom ratio to obtain the first image. In a case where the distance between the photographing object and the photographing device is updated from the first distance to the second distance, the application embodiments control the photographing device to photograph the photographing scene at the second zoom ratio to obtain the second image. The first zoom ratio is different from the second zoom ratio, and the proportion of the photographing object in the first image and the second image is the same. That is, the application embodiments can automatically zoom based on the distance between the photographing object and the photographing device, and photograph an image with a Zeiss zoom effect without relying on external devices or manual zooming by professionals, thus simplifying the operation.

[0040] The above steps are described in detail as follows:

[0041] In S110, the shooting scene here can be a dynamic scene or a static scene. When the shooting scene is a static scene, the shooting device can move. When the shooting scene is a dynamic scene, the shooting device can move or be stationary. The dynamic scene here can be a scene in which part of the object moves or a scene in which all objects move. The embodiment does not limit the object contained in the shooting scene, and the user can select a suitable shooting scene according to his own needs.

[0042] The shooting object here is the object contained in the shooting scene, for example, can be a shooting subject, and the shooting object can be a person, an animal, a landscape, a building, etc.

[0043] For example, after the camera application is opened, the shooting device can automatically identify the shooting object. For example, when the shooting object is a person, the shooting device can identify the shooting object by face detection, and display a face frame on the shooting preview interface, so that the user can more intuitively obtain the shooting effect of the shooting object.

[0044] The first distance is the distance between the shooting object and the shooting device. Specifically, the first distance can be the distance between a certain point or a certain region of the shooting object and the shooting device, or the distance between certain key points of the shooting object and the shooting device, which can be obtained based on the depth image.

[0045] By using the depth image, the first distance between the shooting object and the shooting device can be determined.

[0046] The first zoom ratio is a zoom ratio corresponding to the first distance, which can enable the shooting object to have a Scheimpflug zoom effect.

[0047] For example, the zoom ratio can be determined based on the distance between the shooting object and the shooting device and the mapping relationship, which can be obtained by fitting the relationship between multiple sets of distances and zoom ratios. For example, in the embodiment, the first zoom ratio can be obtained by looking up the mapping relationship based on the first distance between the shooting object and the shooting device.

[0048] Different shooting distances can correspond to different zoom ratios, so that an image or a video with a Scheimpflug zoom effect can be shot, meeting the shooting needs of the user.

[0049] Based on the first distance and the mapping relationship, the first zoom ratio corresponding to the first distance can be automatically determined without relying on external devices or professional photographers, and the operation is relatively simple.

[0050] For example, when the shooting device detects that the distance between the shooting object and the shooting device is the first distance, the shooting device can automatically control the shooting device to shoot the shooting scene according to the first zoom ratio to obtain a first image.

[0051] In S120, the second distance can be greater than the first distance, or can be less than the first distance. The second zoom ratio is a zoom ratio corresponding to the second distance, and can make the shooting object have a Hikivot effect. That is, the same shooting object has the same proportion in the second image and the second image.

[0052] Exemplarily, the shooting device can find the second zoom ratio corresponding to the second distance based on the second distance according to the mapping relationship, and control the shooting device to shoot according to the second zoom ratio to obtain the second image, without relying on external devices and professional photographers, and the operation is simple.

[0053] In some embodiments, the shooting method can further include the following steps:

[0054] S130, obtaining a depth image of the shooting scene;

[0055] S140, determining the distance between the shooting object and the shooting device according to the depth image.

[0056] The depth image here is an image formed based on the depth information of the shooting scene, and the depth information here can be the distance between the shooting scene and the shooting device. Exemplarily, an RGB image corresponding to the shooting scene can be obtained first, and then the depth of each pixel is estimated by using a deep learning model or other modeling method to obtain a depth image.

[0057] Exemplarily, the depth image of the shooting scene can also be directly obtained by using a depth sensor, which can be integrated in the shooting device or independent of the shooting device and in communication connection with the shooting device.

[0058] In some embodiments, the shooting device can obtain the depth image of the shooting scene in the case of receiving the input of the user to the camera application. Exemplarily, the shooting device can also automatically open the camera application and obtain the depth image of the shooting scene in the case of receiving the voice input or gesture input of the user.

[0059] Exemplarily, the depth image can be displayed on the shooting preview interface, which is convenient for the user to view, and can also be saved in a specified position of the shooting device.

[0060] Based on the depth image, the distance between the shooting object and the shooting device can be determined. For example, based on the depth image, the first distance and the second distance between the shooting object and the shooting device can be determined.

[0061] The embodiment realizes adaptive zooming in combination with the depth image, without relying on external devices or manual zooming by professional photographers, improves the shooting efficiency and shooting effect, and improves the universality of the scheme.

[0062] Figure 2 A flowchart for determining the distance between the shooting object and the shooting device provided by the embodiment of the application, i.e., S140 described above, can be refined as S210-S230 in the flowchart. Figure 2

[0063] S210, determining a plurality of regions of the shooting object.

[0064] The region herein can be a region where a key position of the shooting object is located. Since the shooting object is usually a three-dimensional object and has an irregular shape, the distances between different regions and the shooting device are usually different. Taking a person as an example, when a user turns sideways to face the shooting device, the distances between the left and right hands and the shooting device are different. Or, when the user faces the shooting device, if one hand is close to the shooting device and the other hand is far away from the shooting device, the distances between the two hands and the shooting device are also different.

[0065] To accurately determine the distance between the shooting object and the shooting device, a plurality of key positions can be selected from the shooting object. Taking a person as an example, the regions where the head, left foot, right foot, left hand, right hand, and other key positions are located can be selected, so that the distance between the shooting object and the shooting device can be determined based on the selected plurality of regions subsequently.

[0066] S220, determining a third distance between each region and the shooting device according to the depth image.

[0067] The third distance between each region and the shooting device can be directly obtained from the depth image, which is simple and accurate.

[0068] S230, determining the distance between the shooting object and the shooting device according to the third distances corresponding to the regions.

[0069] The maximum value can be determined from the third distances, and the maximum value is determined as the distance between the shooting object and the shooting device.

[0070] The maximum value and the minimum value can also be determined from the third distances, and the distance between the shooting object and the shooting device is determined based on the maximum value and the minimum value. For example, the average of the maximum value and the minimum value can be taken as the distance between the shooting object and the shooting device.

[0071] ​Exemplarily, the maximum value and the minimum value can also be removed from the third distances, and the distance between the photographed object and the photographing device is determined based on the remaining first distances, for example, the mean value of the remaining distances can be taken as the distance between the photographed object and the photographing device.

[0072] Exemplarily, the distance between the photographed object and the photographing device can also be determined in the following manner:

[0073] determining the mean value of the third distances corresponding to the regions as the distance between the photographed object and the photographing device.

[0074] determining the mean value of the distances as the distance between the photographed object and the photographing device.

[0075] The embodiment determines the distance between the photographed object and the photographing device based on the distances between the photographed object and the photographing device, fully considers the influence degree of different positions of the photographed object on the photographing result, and thus can more accurately determine the zoom ratio and improve the photographing effect.

[0076] For example, the photographing device includes at least two depth sensors, and exemplarily, Figure 3 A flowchart for obtaining a depth image of a photographing scene is provided for the embodiment of the present application, and S130 can be refined as S310-S320 in the above. Figure 3

[0077] S310, respectively obtaining a candidate depth image of the photographing scene through each depth sensor.

[0078] Exemplarily, each depth sensor can be a different type of sensor, for example, can include but is not limited to a structured light sensor, a time-of-flight sensor, a laser radar, a millimeter wave radar, an ultrasonic radar, a binocular camera, etc.

[0079] For example, in some embodiments, the photographing device can be integrated with a structured light sensor, a time-of-flight sensor and a binocular camera, and each depth sensor can obtain a depth image, and the depth image obtained by each depth sensor is referred to as a candidate depth image in the embodiment.

[0080] The structured light sensor can detect the depth of a close distance, the time-of-flight sensor can detect the depth of a middle or long distance, and the binocular camera can obtain a dense depth image through parallax matching.

[0081] S320, fusing the candidate depth images to obtain a depth image of the photographing scene.

[0082] The depth information obtained by different depth sensors is different, and by fusing the candidate depth images obtained by each depth sensor, a depth image with more comprehensive information and higher robustness can be obtained.

[0083] ​For example, the candidate depth images obtained by fusing the structured light sensor, the time-of-flight sensor and the binocular camera can obtain a depth image with a longer distance, more comprehensive information and higher robustness.

[0084] Exemplarily, the candidate depth images can be fused in the following manner:

[0085] The candidate depth images are preprocessed to obtain preprocessed images;

[0086] Invalid regions in the preprocessed images are determined and removed;

[0087] The images after removing the invalid regions are fused to obtain a final depth image.

[0088] Exemplarily, each candidate depth image can be preprocessed first. For example, the candidate depth image can be filtered by a filtering method to remove random noise and abnormal points in the candidate depth image. The filtering method can adopt a time domain filtering method, a spatial domain filtering method, etc.

[0089] For each preprocessed image, the confidence or signal intensity map of each pixel output by each depth sensor can be used to determine whether the depth value of each pixel is within the effective range of the depth sensor, so as to identify invalid pixel regions such as holes, out-of-range and low-confidence, and remove the invalid pixel regions to reduce the influence on the fusion result.

[0090] Each processed candidate depth image is fused to obtain a final depth image.

[0091] Exemplarily, the processed candidate depth images can be converted to the same coordinate system and the same time point to realize registration and alignment of the candidate depth images. Then, the multiple candidate depth images after registration and alignment and their corresponding confidence are fused into a final depth image.

[0092] For example, the multiple candidate depth images after registration and alignment can be fused based on the maximum confidence, that is, the depth value of the depth sensor with the highest confidence is selected as the final depth value. Of course, other fusion methods such as weighted average-based fusion and probability-based fusion can also be used.

[0093] Exemplarily, after fusion, the fusion result can be post-processed, such as hole filling, edge sharpening, smoothing filtering, etc., to improve the quality of the fusion result.

[0094] Figure 4 Exemplarily, a schematic diagram of a fused depth image is provided. The darker the color, the smaller the depth value, that is, the closer the distance to the shooting device.

[0095] The embodiment can obtain a depth image of a shooting scene in real time based on multiple depth sensors integrated in a shooting device, without relying on other devices, and can reduce random noise, reduce holes, and improve robustness by fusing candidate depth images obtained by the multiple depth sensors.

[0096] To flexibly adjust the zoom effect, in some embodiments, S120 can include the following steps:

[0097] In a case where the distance between the shooting object and the shooting device is updated from the first distance to the second distance, a moving speed of the shooting device relative to the shooting scene is obtained;

[0098] According to the moving speed, a zoom speed of the shooting device is determined;

[0099] According to the zoom speed, the shooting device is controlled to be adjusted from the first zoom ratio to the second zoom ratio, and the shooting device is controlled to shoot the shooting scene according to the second zoom ratio to obtain a second image.

[0100] Exemplarily, when an inertial measurement unit is integrated in the shooting device, the moving speed of the shooting device relative to the shooting scene can be determined based on the inertial measurement unit. Exemplarily, an environment map can also be constructed in combination with an image currently shot by the shooting device and measurement data of the inertial measurement unit, and the moving speed of the shooting device relative to the shooting scene can be determined based on the environment map.

[0101] Exemplarily, the moving speed of the shooting device relative to the shooting scene can also be indirectly determined based on images shot by the shooting device. For example, the moving speed of the shooting device relative to the shooting scene can be obtained by tracking movement of one or more stationary points in the shooting scene in a motion tracking manner.

[0102] Of course, other manners can also be used to determine the moving speed of the shooting device relative to the shooting scene, which is not limited in the embodiment.

[0103] According to the moving speed of the shooting device relative to the shooting scene, the zoom speed of the shooting device can be flexibly adjusted. For example, the faster the moving speed, the faster the zoom speed, and the slower the moving speed, the slower the zoom speed.

[0104] The first zoom ratio is a zoom ratio before the shooting device is adjusted, and based on the zoom speed, the zoom ratio can be adjusted from the first zoom ratio to the second zoom ratio. Taking 1x as the first zoom ratio and 4x as the second zoom ratio as an example, in a fast-moving scene, the shooting device can be directly adjusted from the first zoom ratio to the second zoom ratio by 1s. In a slow-moving scene, the zoom ratio can be first adjusted from 1x to 2x by 1s, and then the zoom ratio can be adjusted from 2x to 4x by 2s.

[0105] Thus, for the same shooting scene, the zoom speed is different, and the shooting effect of the video obtained is also different.

[0106] The embodiment can adaptively adjust the zoom speed according to the moving speed of the shooting device relative to the shooting scene, so as to adaptively adjust the zoom effect of the image or video and meet the personalized shooting needs of the user.

[0107] To determine the mapping relationship between the shooting distance and the zoom ratio, exemplarily, before S110, the shooting method can further include the following steps:

[0108] The shooting device is controlled to shoot the reference shooting object under the reference shooting scene, to obtain the shooting distance and the zoom ratio corresponding to a plurality of reference images, the shooting distance being the distance between the reference shooting object and the shooting device, wherein the proportion of the reference shooting object in the corresponding reference image remains unchanged under each group of shooting distance and zoom ratio;

[0109] According to each group of shooting distance and zoom ratio, the relationship is fitted to obtain the mapping relationship.

[0110] The reference shooting scene can be the same as or different from the shooting scene during actual shooting in the above embodiment. The reference shooting object can be the same as or different from the shooting object in the above embodiment.

[0111] Exemplarily, in the case of keeping the proportion of the shooting object in the shooting picture unchanged, the zoom ratio can be manually adjusted based on the shooting distance, and the shooting distance and the zoom ratio at this time are recorded, then the shooting distance is adjusted, and the zoom ratio is adjusted to keep the proportion of the shooting object in the shooting picture unchanged, and the same is repeated, to obtain a plurality of groups of shooting distance and zoom ratio.

[0112] Exemplarily, the shooting device can also be controlled to shoot at different shooting distances, and the zoom ratio is manually adjusted to obtain a plurality of images, then the candidate images with the same proportion of the shooting object are selected from the plurality of images, and the shooting distance and the corresponding zoom ratio of each candidate image are obtained.

[0113] Exemplarily, the obtained plurality of groups of shooting distance and zoom ratio can be fitted to obtain the mapping relationship between the shooting distance and the zoom ratio.

[0114] For example, the plurality of groups of shooting distance and zoom ratio can be linearly fitted to obtain the linear mapping relationship between the shooting distance and the zoom ratio. Of course, quadratic function fitting or cubic function fitting can also be performed, and after preliminary fitting, the test data of the plurality of groups of shooting distance and zoom ratio can be used to check the fitting relationship, if the check fails, the fitting function can be adjusted until the check passes.

[0115] In some embodiments, the mapping relationship between the shooting distance and the zoom ratio can be expressed in the following form: F=k*D(t)+b, where D represents the shooting distance, F represents the zoom ratio, and k and b are fitting coefficients. Where t is a sampling period.

[0116] The embodiment obtains multiple sets of shooting distance and zoom ratio while keeping the proportion of the shooting object in the shooting picture unchanged, and performs relationship fitting on the multiple sets of shooting distance and zoom ratio, to obtain the mapping relationship between the shooting distance and the zoom ratio, thereby providing a basis for subsequent automatic zooming and simplifying the zooming operation.

[0117] Figure 5 Another flowchart of a shooting method provided by the embodiment of the present application is shown in FIG. 6, Figure 5 Different from Figure 1 The difference lies in that, Figure 5 It further includes S510-S520.

[0118] S510, determining a target region in which the depth information meets a preset condition from the second image according to the depth image.

[0119] The preset condition can be determined according to actual needs. For example, in some embodiments, the preset condition can be that the depth information is greater than or equal to a preset depth threshold, or the depth information is less than or equal to a preset depth threshold, or the depth information is within a certain depth interval.

[0120] Based on the depth information, the shooting image can be divided into regions of different depth levels, and the shooting device can select a suitable region as the target region according to the user's needs.

[0121] S520, performing image processing on the target region.

[0122] The image processing can include but is not limited to brightness adjustment processing, blurring processing, etc. For example, the user can increase the brightness of the foreground region in the shooting image and decrease the brightness of the background region in the shooting image, so that the important region is more eye-catching.

[0123] In the portrait shooting scene, the user can also blur the background region to make the foreground portrait more prominent and enhance the visual impact.

[0124] After the shooting is completed, the embodiment can further flexibly perform image processing on different regions based on the depth information of the depth image, thereby meeting the user's personalized needs.

[0125] Taking a mobile phone as an example, when the initial shooting is performed, the distance between the user A and the mobile phone 601 is 1.5 m, and the shooting image can be seen in FIG. 6A. Figure 6At this time, the zoom ratio is S1, where user A is the shooting subject and large tree B is the background. When user A moves to a distance of 3 m from the mobile phone 601, in order to keep the size of user A in the picture unchanged, the zoom ratio needs to be adjusted from S1 to S2. The image captured based on the zoom ratio S2 can be seen in Figure 7 . Wherein S1 is less than S2, the object B in the adjusted image becomes larger, producing a visual effect of compression forward.

[0126] The embodiment uses the depth information of the shooting scene to automatically zoom, keeping the proportion of the shooting subject in the picture unchanged, and breaking the dependence of the traditional Hicock zoom method on professional equipment and shooting methods, thereby improving the universality of the scheme.

[0127] It should be noted that the shooting method provided by the embodiment of the application can be executed by a shooting device or a processing module in the shooting device for executing the shooting method. In the embodiment of the application, the shooting device is taken as an example to execute the model training method, and the shooting device provided by the embodiment of the application is described.

[0128] Figure 8 A structural schematic diagram of a shooting device provided by the embodiment of the application.

[0129] As shown in Figure 8 , the shooting device 800 can include:

[0130] A first control module 801, configured to, in a case where the distance between the shooting object and the shooting device is a first distance, control the shooting device to capture the shooting scene at a first zoom ratio to obtain a first image, the shooting scene including the shooting object.

[0131] A second control module 802, configured to, in a case where the distance between the shooting object and the shooting device is updated from the first distance to a second distance, control the shooting device to capture the shooting scene at a second zoom ratio to obtain a second image.

[0132] Wherein the first zoom ratio and the second zoom ratio are different, and the proportion of the shooting object in the first image and the second image is the same.

[0133] In the case that the distance between the photographed object and the photographing device is a first distance, the photographing device is controlled to photograph the photographed scene according to a first zoom ratio, and a first image is obtained; in the case that the distance between the photographed object and the photographing device is updated from the first distance to a second distance, the photographing device is controlled to photograph the photographed scene according to a second zoom ratio, and a second image is obtained; wherein the first zoom ratio is different from the second zoom ratio, and the proportion of the photographed object in the first image and the second image is the same. That is, the embodiment of the present application can automatically zoom based on the distance between the photographed object and the photographing device, and photograph an image with a Zeiss zoom effect, without relying on external devices or manual zooming by professionals, thus simplifying the operation.

[0134] In some possible implementation of the embodiment of the present application, the photographing device 800 can further include:

[0135] The acquisition module is configured to acquire a depth image of the photographed scene.

[0136] The determination module is configured to determine the distance between the photographed object and the photographing device according to the depth image.

[0137] In some possible implementation of the embodiment of the present application, the determination module is specifically configured to:

[0138] determine a plurality of regions of the photographed object;

[0139] determine a third distance between each region and the photographing device according to the depth image, respectively;

[0140] determine the distance between the photographed object and the photographing device according to the third distances corresponding to the regions.

[0141] In some possible implementation of the embodiment of the present application, the photographing device includes at least two depth sensors.

[0142] The acquisition module is specifically configured to:

[0143] acquire a candidate depth image of the photographed scene through each depth sensor, respectively;

[0144] The photographing device 800 can further include:

[0145] The fusion module is configured to fuse the candidate depth images to obtain the depth image of the photographed scene.

[0146] In some possible implementation of the embodiment of the present application, the acquisition module is further configured to, in the case that the distance between the photographed object and the photographing device is updated from the first distance to the second distance, acquire a moving speed of the photographing device relative to the photographed scene.

[0147] The determination module is further configured to determine a zooming speed of the photographing device according to the moving speed.

[0148] The second control module 802 is specifically configured to:

[0149] According to the zoom speed, the shooting device is controlled to be adjusted from the first zoom ratio to the second zoom ratio, and the shooting device is controlled to shoot the shooting scene according to the second zoom ratio to obtain a second image.

[0150] In some possible implementations of the embodiments of the present application, the zoom ratio of the shooting device is determined based on a distance between the shooting object and the shooting device and a mapping relationship.

[0151] The mapping relationship is obtained by fitting a plurality of sets of relationships between distances and zoom ratios, and the shooting object has a same proportion in images corresponding to the distances and the zoom ratios in each set.

[0152] In some possible implementations of the embodiments of the present application, the determining module is further configured to determine, from the second image, a target region in which the depth information meets a preset condition according to the depth image.

[0153] The shooting device 800 can further include:

[0154] The execution module is configured to perform image processing on the target region.

[0155] The shooting device in the embodiments of the present application can be a device or a component in an electronic device, for example, an integrated circuit or a chip. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), and the like, and can also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, and the like, and the embodiments of the present application are not limited specifically.

[0156] The electronic device in the embodiments of the present application can be a terminal having an operating system. The operating system can be an Android operating system, can be an iOS operating system, and can also be other possible operating systems, and the embodiments of the present application are not limited specifically.

[0157] The photographing device provided in the embodiment of the present application can realize each process in the photographing method embodiment Figures 1 to 7 and achieve the same technical effects. To avoid repetition, details are not described herein.

[0158] As shown in Figure 9 the embodiment of the present application also provides an electronic device 900, which includes a processor 901 and a memory 902. The memory 902 stores programs or instructions executable on the processor 901. When the programs or instructions are executed by the processor 901, each step of the photographing method embodiment described above is implemented, and the same technical effects can be achieved. To avoid repetition, details are not described herein.

[0159] It should be noted that the electronic device in the embodiment of the present application includes the mobile terminal and the non-mobile terminal described above.

[0160] Figure 10 A hardware structure schematic diagram of an electronic device provided in the embodiment of the present application is provided.

[0161] The electronic device 1000 includes but is not limited to the following components: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010.

[0162] Those skilled in the art can understand that the electronic device 1000 can also include a power supply (such as a battery) for powering each component. The power supply can be logically connected to the processor 1010 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. Figure 10 The structure of the electronic device 1000 shown in the embodiment of the present application does not constitute a limitation on the electronic device 1000. The electronic device 1000 can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components, which is not described herein.

[0163] The processor 1010 is configured to:

[0164] In a case where the distance between the photographing object and the photographing device is a first distance, the photographing device is controlled to photograph a photographing scene at a first zoom ratio, to obtain a first image, the photographing scene including the photographing object;

[0165] In a case where the distance between the photographing object and the photographing device is updated from the first distance to a second distance, the photographing device is controlled to photograph the photographing scene at a second zoom ratio, to obtain a second image;

[0166] The first zoom ratio and the second zoom ratio are different, and the proportion of the photographing object in the first image and the second image is the same.

[0167] In the case that the distance between the photographed object and the photographing device is the first distance, the photographing device is controlled to photograph the photographed scene according to a first zoom ratio, and a first image is obtained; in the case that the distance between the photographed object and the photographing device is updated from the first distance to a second distance, the photographing device is controlled to photograph the photographed scene according to a second zoom ratio, and a second image is obtained; wherein the first zoom ratio is different from the second zoom ratio, and the proportion of the photographed object in the first image and the second image is the same. That is, the embodiment of the present application can automatically zoom based on the distance between the photographed object and the photographing device, and photograph an image with a Zeiss zoom effect, without relying on external devices or manual zooming by professionals, thus simplifying the operation.

[0168] In some possible implementation of the embodiment of the present application, the processor 1010 is further configured to:

[0169] obtain a depth image of the photographed scene;

[0170] determine the distance between the photographed object and the photographing device according to the depth image.

[0171] In some possible implementation of the embodiment of the present application, the processor 1010 is specifically configured to:

[0172] determine a plurality of regions of the photographed object;

[0173] determine a third distance between each region and the photographing device according to the depth image, respectively;

[0174] determine the distance between the photographed object and the photographing device according to the third distances corresponding to the regions.

[0175] In some possible implementation of the embodiment of the present application, the photographing device includes at least two depth sensors;

[0176] The processor 1010 is specifically configured to:

[0177] obtain a candidate depth image of the photographed scene through each depth sensor, respectively;

[0178] fuse the candidate depth images to obtain the depth image of the photographed scene.

[0179] In some possible implementation of the embodiment of the present application, the processor 1010 is specifically configured to:

[0180] In the case that the distance between the photographed object and the photographing device is updated from the first distance to the second distance, obtain a moving speed of the photographing device relative to the photographed scene;

[0181] determine a zooming speed of the photographing device according to the moving speed;

[0182] According to the zoom speed, the photographing device is controlled to be adjusted from the first zoom ratio to the second zoom ratio, and the photographing device is controlled to photograph the photographing scene according to the second zoom ratio to obtain a second image.

[0183] In some possible implementations of the embodiments of the present application, the zoom ratio of the photographing device is determined based on a distance between the photographing object and the photographing device and a mapping relationship.

[0184] The mapping relationship is obtained by fitting a plurality of sets of distance-zoom ratio relationships, and the photographing object has a same proportion in images corresponding to the distance-zoom ratio of each set.

[0185] In some possible implementations of the embodiments of the present application, the processor 1010 is further configured to determine, from the second image, a target region in which the depth information meets a preset condition according to the depth image; and perform image processing on the target region.

[0186] It should be understood that, in the embodiments of the present application, the input unit 1004 can include a graphics processing unit (GPU) 10041 and a microphone 10042. The graphics processing unit 10041 processes image data of a still picture or a video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 1006 can include a display panel 10061, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, and the like. The user input unit 1007 includes at least one of a touch panel 10071 and other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 can include a touch detection device and a touch controller. The other input devices 10072 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, and the like), a trackball, a mouse, and an operation lever, which will not be described here.

[0187] The memory 1009 can be used to store software programs and various data. The memory 1009 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), etc. In addition, the memory 1009 can include a volatile memory or a non-volatile memory, or the memory 1009 can include both volatile and non-volatile memories. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synchlink DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 1009 in the embodiments of the present application includes but is not limited to these and any other suitable types of memories.

[0188] The processor 1010 can include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 1010.

[0189] The embodiments of the present application also provide a readable storage medium, and the readable storage medium stores programs or instructions, the programs or instructions are executed by a processor to realize the processes of the above-mentioned photographing method embodiments and achieve the same technical effects. To avoid repetition, details are not described here.

[0190] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0191] The chip provided in the embodiments of the present application includes a processor and a communication interface, the communication interface is coupled with the processor, the processor is used to run programs or instructions to realize the processes of the above-mentioned photographing method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.

[0192] It should be understood that the chip mentioned in the embodiments of the present application can also be referred to as a system-level chip, a system chip, a chip system, or a system-on-chip, etc.

[0193] The embodiments of the present application provide a computer program product stored in a storage medium, the program product is executed by at least one processor to realize the processes of the above-mentioned photographing method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.

[0194] It should be noted that in this paper, the term "including", "containing" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to the order of functions shown or discussed, but can also include functions performed in a substantially simultaneous manner or in reverse order, for example, the described method can be performed in an order different from that described, and various steps can also be added, omitted or combined. In addition, the features described with reference to certain examples can be combined in other examples.

[0195] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a plurality of instructions for making a terminal (which can be a mobile phone, computer, server, or network equipment, etc.) execute the method described in each embodiment of the present application.

[0196] The embodiments of the present application are described above with reference to the accompanying drawings, but the present application is not limited to the above-described specific embodiments, and the above-described specific embodiments are merely illustrative, but not restrictive, and a person of ordinary skill in the art can make many forms under the inspiration of the present application without departing from the purpose of the present application and the scope protected by the claims.

Claims

1. A photographing method characterized by comprising: The method comprises: controlling the photographing device to photograph a photographing scene including the photographing object at a first zoom ratio to obtain a first image, in a case where a distance between the photographing object and the photographing device is a first distance; controlling the photographing device to photograph the photographing scene at a second zoom ratio to obtain a second image, in a case where the distance between the photographing object and the photographing device is updated from the first distance to a second distance; wherein the first zoom ratio is different from the second zoom ratio, and a proportion of the photographing object in the first image and the second image is the same.

2. The method of claim 1, wherein, The method further comprises: obtaining a depth image of the photographing scene; determining the distance between the photographing object and the photographing device according to the depth image.

3. The method of claim 2, wherein, The determination of the distance between the photographing object and the photographing device according to the depth image comprises: determining a plurality of regions of the photographing object; determining a third distance between each of the regions and the photographing device according to the depth image; determining the distance between the photographing object and the photographing device according to the third distances corresponding to the regions.

4. The method of claim 2, wherein, The photographing device comprises at least two depth sensors. The obtaining of the depth image of the photographing scene comprises: obtaining a candidate depth image of the photographing scene by each of the depth sensors respectively; fusing the candidate depth images to obtain the depth image of the photographing scene.

5. The method according to any one of claims 1 to 4, characterized in that, The control of the photographing device to photograph the photographing scene at the second zoom ratio to obtain the second image, in the case where the distance between the photographing object and the photographing device is updated from the first distance to the second distance, comprises: obtaining a moving speed of the photographing device relative to the photographing scene, in the case where the distance between the photographing object and the photographing device is updated from the first distance to the second distance; determining a zoom speed of the photographing device according to the moving speed; controlling the photographing device to adjust from the first zoom ratio to the second zoom ratio according to the zoom speed, and controlling the photographing device to photograph the photographing scene at the second zoom ratio to obtain the second image.

6. The method according to any one of claims 1 to 4, characterized in that, The zoom ratio of the photographing device is determined based on the distance between the photographing object and the photographing device, and a mapping relationship; The mapping relationship is obtained by fitting a plurality of sets of relationships between distances and zoom ratios, and a proportion of the photographing object in images corresponding to the sets of distances and zoom ratios is the same.

7. The method according to any one of claims 2-4, characterized in that, The method further comprises: determining a target region in which depth information satisfies a preset condition from the second image according to the depth image; performing image processing on the target region.

8. An imaging device, characterized by comprising: The method comprises: a first control module, configured to control a photographing device to photograph a photographing scene including a photographing object at a first zoom ratio to obtain a first image, in a case where a distance between the photographing object and the photographing device is a first distance; A second control module is configured to control the photographing device to photograph the photographing scene according to a second zoom ratio to obtain a second image when the distance between the photographing object and the photographing device is updated from the first distance to a second distance. The first zoom ratio is different from the second zoom ratio, and the proportion of the photographing object in the first image and the second image is the same.

9. An electronic device, comprising: The electronic device comprises a processor and a memory, the memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the method according to any one of claims 1-7.

10. A readable storage medium, characterized by, The readable storage medium stores programs or instructions, and the programs or instructions are executed by the processor to implement the steps of the method according to any one of claims 1-7.

11. A computer program product, characterised in that, The program product is stored in a storage medium, and the program product is executed by at least one processor to implement the steps of the method according to any one of claims 1-7.