Image acquisition method and device, electronic equipment, storage medium and product

By detecting the user's first trigger action, identifying and generating a magnified preview image, and updating the image data from the camera at different times, the problem of the target object disappearing during the magnification process on the preview interface is solved, improving the success rate of shooting and the user experience.

CN120980348APending Publication Date: 2025-11-18BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410620186.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-17
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

When shooting small or distant objects with a mobile phone, the object may disappear as it is zoomed in on the preview screen, increasing the difficulty of shooting.

Method used

By detecting the user's first trigger action, the target object is identified and a second preview image with magnification is generated. The preview interface is updated using image data collected by the first camera at different times to ensure that the target object is displayed on the preview interface.

Benefits of technology

It enables zooming in on the target object without it easily disappearing from the preview interface, improving the success rate of shooting and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120980348A_ABST
    Figure CN120980348A_ABST
Patent Text Reader

Abstract

The invention relates to an image acquisition method and device, electronic equipment, a storage medium and a product. The method comprises the steps that under the condition that a preview interface is entered based on a shooting instruction, if a first trigger operation for the preview interface is detected, a target object indicated by the first trigger operation is recognized from a first preview image displayed on the preview interface; acquiring image data of the target object from the first image data; a second preview image is generated based on image data of a target object acquired from the first image data, and the size of the target object in the second preview image is larger than that of the target object in the first preview image; and updating the first preview image displayed on the preview interface into the second preview image. Through the image acquisition method disclosed by the invention, not only can the amplification operation of the target object displayed on the preview interface be realized, but also the problem that the target object is easy to disappear from the preview interface in the amplification process of the target object can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image technology, and in particular to an image acquisition method, apparatus, electronic device, storage medium, and product. Background Technology

[0002] With the continuous improvement of mobile phone photography capabilities, more and more users are accustomed to taking photos with their phones. When photographing a target object, if the target object is small or far away from the user, the target object will appear small in the photo. Therefore, users usually zoom in on the target object in the preview before taking the photo to make it appear larger in the final image.

[0003] However, when zooming in on the target object in the preview interface, the target object may disappear from the preview interface, increasing the difficulty of shooting. Summary of the Invention

[0004] To overcome the problems existing in related technologies, this disclosure provides an image acquisition method, device, electronic device, storage medium and product, which can not only realize the zoom operation of the target object displayed on the preview interface, but also solve the problem that the target object easily disappears from the preview interface during the zoom process.

[0005] According to a first aspect of the present disclosure, an image acquisition method is provided, the method comprising:

[0006] When entering the preview interface based on a shooting command, if a first trigger operation is detected for the preview interface, the target object indicated by the first trigger operation is identified from the first preview image displayed on the preview interface, wherein the first preview image is generated based on the first image data collected by the first camera at a first moment;

[0007] A second preview image is generated based on the image data of the target object obtained from the first image data; wherein the size of the target object in the second preview image is larger than the size of the target object in the first preview image;

[0008] Update the first preview image displayed on the preview interface to the second preview image.

[0009] In some embodiments, the method further includes:

[0010] Image data of the target object is obtained from the second image data captured by the first camera at a second time, wherein the second time is any time later than the first time;

[0011] Based on the image data of the target object obtained from the second image data, a third preview image is generated, wherein the size of the target object in the third preview image is larger than the size of the target object in the first preview image;

[0012] Update the second preview image displayed on the preview interface to the third preview image.

[0013] In some embodiments, obtaining image data of the target object from second image data captured by the first camera at a second moment includes:

[0014] A first initial image is generated based on the second image data;

[0015] Determine the first image region of the target object in the first initial image;

[0016] The image data of the first image region is determined as the image data of the target object.

[0017] In some embodiments, the method further includes:

[0018] Determine the type of the first triggering operation;

[0019] The size of the first image region is determined based on the type of the first triggering operation.

[0020] In some embodiments, the method further includes:

[0021] When a second trigger operation on the third preview image is detected, a fourth preview image is generated based on the third image data acquired by the first camera at a third moment, wherein the size of the target object in the fourth preview image is smaller than the size of the target object in the third preview image, and the third moment is the moment when the second trigger operation is detected, or the third moment is the moment after the second trigger operation is detected;

[0022] Update the third preview image displayed on the preview interface to the fourth preview image.

[0023] In some embodiments, obtaining image data of the target object from second image data captured by the first camera at a second moment includes:

[0024] Determine the second moment when the relative position between the target object and the first camera changes;

[0025] Acquire the second image data captured by the first camera at the second moment;

[0026] The image data of the target object is obtained from the second image data.

[0027] In some embodiments, generating a second preview image based on image data of the target object obtained from the first image data includes:

[0028] Determine the ratio between the first size of the target object in the first preview image and the second size of the first preview image;

[0029] If the ratio is less than a preset ratio, the second preview image is generated based on the image data of the target object obtained from the first image data.

[0030] In some embodiments, the method further includes:

[0031] When the second preview image or the third preview image is displayed on the preview interface, it is determined whether the target object is within the field of view of the second camera, wherein the focusing distance of the second camera is greater than the focusing distance of the first camera;

[0032] When the target object is outside the field of view of the second camera, a prompt message is output;

[0033] The prompt message is used to prompt the user to adjust the orientation of the second camera so that the target object enters the field of view of the second camera.

[0034] In some embodiments, the method further includes:

[0035] When it is determined that the target object is within the field of view of the second camera, the image data of the target object is obtained from the fourth image data captured by the second camera;

[0036] Based on the image data of the target object obtained from the fourth image data, a fifth preview image is generated, wherein the difference between the size of the target object in the fifth preview image and the size of the target object in the second preview image or the third preview image is less than a difference threshold.

[0037] Update the second or third preview interface displayed on the preview interface to the fifth preview image.

[0038] In some embodiments, the method further includes:

[0039] When the second preview image or the third preview image is displayed on the preview interface, a photo-taking operation is detected.

[0040] Upon detecting the photo-taking operation, based on the image data of the preview image displayed on the preview interface at the time the photo-taking operation is detected, a target photo including the magnified target object is output.

[0041] According to a second aspect of the present disclosure, an image acquisition device is provided, the device comprising:

[0042] The recognition module is configured to, when entering the preview interface based on a shooting command, if a first trigger operation is detected for the preview interface, identify the target object indicated by the first trigger operation from the first preview image displayed on the preview interface, wherein the first preview image is generated based on the first image data collected by the first camera at a first moment;

[0043] The first generation module is configured to generate a second preview image based on the image data of the target object obtained from the first image data, wherein the size of the target object in the second preview image is larger than the size of the target object in the first preview image;

[0044] The first display module is configured to update the first preview image displayed on the preview interface to the second preview image.

[0045] In some embodiments, the apparatus further includes:

[0046] The first acquisition module is configured to acquire image data of the target object from second image data acquired by the first camera at a second time, wherein the second time is any time later than the first time;

[0047] The second generation module is configured to generate a third preview image based on the image data of the target object obtained from the second image data, wherein the size of the target object in the third preview image is larger than the size of the target object in the first preview image;

[0048] The second display module is configured to update the second preview image displayed on the preview interface to the third preview image.

[0049] In some embodiments, the first acquisition module is configured as follows:

[0050] A first initial image is generated based on the second image data;

[0051] Determine the first image region of the target object in the first initial image;

[0052] The image data of the first image region is determined as the image data of the target object.

[0053] In some embodiments, the apparatus further includes:

[0054] The first determining module is configured to determine the type of the first triggering operation;

[0055] The second determining module is configured to determine the size of the first image region based on the type of the first triggering operation.

[0056] In some embodiments, the apparatus further includes:

[0057] The third generation module is configured to generate a fourth preview image based on the third image data collected by the first camera at a third moment when a second trigger operation on the third preview image is detected, wherein the size of the target object in the fourth preview image is smaller than the size of the target object in the third preview image, and the third moment is the moment when the second trigger operation is detected, or the third moment is the moment after the second trigger operation is detected;

[0058] The third display module is configured to update the third preview image displayed on the preview interface to a fourth preview image.

[0059] In some embodiments, the first acquisition module is configured as follows:

[0060] Determine the second moment when the relative position between the target object and the first camera changes;

[0061] Acquire the second image data captured by the first camera at the second moment;

[0062] The image data of the target object is obtained from the second image data.

[0063] In some embodiments, the first generation module is configured as follows:

[0064] Determine the ratio between the first size of the target object in the first preview image and the second size of the first preview image;

[0065] If the ratio is less than a preset ratio, the second preview image is generated based on the image data of the target object obtained from the first image data.

[0066] In some embodiments, the apparatus further includes:

[0067] The third determining module is configured to determine whether the target object is within the field of view of the second camera when the second preview image or the third preview image is displayed on the preview interface, wherein the focusing distance of the second camera is greater than the focusing distance of the first camera.

[0068] The first output module is configured to output a prompt message when the target object is outside the field of view of the second camera;

[0069] The prompt message is used to prompt the user to adjust the orientation of the second camera so that the target object enters the field of view of the second camera.

[0070] In some embodiments, the apparatus further includes:

[0071] The second acquisition module is configured to acquire image data of the target object from the fourth image data collected by the second camera when it is determined that the target object is within the field of view of the second camera;

[0072] The fourth generation module is configured to generate a fifth preview image based on the image data of the target object obtained from the fourth image data, wherein the difference between the size of the target object in the fifth preview image and the size of the target object in the second preview image or the third preview image is less than a difference threshold.

[0073] The fourth display module is configured to update the second preview interface or the third preview interface displayed on the preview interface to the fifth preview image.

[0074] In some embodiments, the apparatus further includes:

[0075] The detection module is configured to detect a photo-taking operation when the second preview image or the third preview image is displayed on the preview interface;

[0076] The second output module is configured to, upon detecting the photo-taking operation, output a target photo including a magnified version of the target object based on the image data of the preview image displayed on the preview interface when the photo-taking operation is detected.

[0077] According to a third aspect of the present disclosure, an electronic device is provided, comprising:

[0078] processor;

[0079] Memory used to store computer programs or instructions;

[0080] The processor executes the computer program or instructions to implement the steps of any of the methods described above.

[0081] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, the storage medium storing a computer program or instructions, characterized in that, when the computer program or instructions in the storage medium are executed by a processor, the steps of the method described in any of the preceding claims are implemented.

[0082] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program or instructions, characterized in that, when the computer program or instructions are executed by a processor, they implement the steps of the method described in any of the preceding claims.

[0083] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0084] In this embodiment of the disclosure, when the electronic device detects a user's first trigger operation on the preview interface, it identifies the target object triggered by the first trigger operation from the first preview image displayed on the preview interface. Then, the electronic device can obtain image data of the target object from the first image data used to generate the first preview image, and generate a second preview image with a magnified view of the target object based on the target object's image data. Since the second preview image is generated based on the target object's image data, it will necessarily include the target object. This not only enables the magnification operation of the target object displayed on the preview interface but also solves the problem that the target object easily disappears from the preview interface during the magnification process.

[0085] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0086] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0087] Figure 1 This is a flowchart illustrating an image acquisition method according to an exemplary embodiment.

[0088] Figure 2 This is a schematic diagram illustrating a first preview image according to an exemplary embodiment.

[0089] Figure 3 This is a schematic diagram of a second preview image according to an exemplary embodiment.

[0090] Figure 4 This is a schematic diagram of a first preview image according to another exemplary embodiment.

[0091] Figure 5This is a schematic diagram illustrating a third preview image according to an exemplary embodiment.

[0092] Figure 6 This is a schematic diagram illustrating the field of view of a first camera and a second camera according to an exemplary embodiment.

[0093] Figure 7 This is a schematic diagram illustrating a preview image of the moon according to an exemplary embodiment.

[0094] Figure 8 This is a flowchart illustrating an image processing method according to another exemplary embodiment.

[0095] Figure 9 This is a block diagram illustrating an image acquisition device according to an exemplary embodiment.

[0096] Figure 10 This is a structural block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation

[0097] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0098] In some embodiments, when a user takes a picture of a target object with their mobile phone, if the target object is small (such as a nearby insect) or far away from the user (such as the moon in the distance), the target object will appear small in the photo. Therefore, users typically zoom in on the target object in the preview screen by swiping two fingers from the center outwards before taking the picture, so that the target object appears larger in the final photo.

[0099] However, when using two fingers to slide from the middle to both ends to enlarge the size of the target object on the preview screen, the target object may disappear from the preview screen, increasing the difficulty of shooting.

[0100] To address the aforementioned problems, this disclosure provides an image acquisition method. (See reference...) Figure 1 , Figure 1 This is a schematic flowchart illustrating an image acquisition method according to an exemplary embodiment. In the following text, reference will be made to... Figure 1The steps shown herein, with an electronic device as the execution subject, describe the image acquisition method provided in the embodiments of this disclosure.

[0101] In step 101, when entering the preview interface based on the shooting command, if a first trigger operation for the preview interface is detected, the target object indicated by the first trigger operation is identified from the first preview image displayed on the preview interface.

[0102] The first preview image is generated based on image data captured by the first camera at a first moment.

[0103] Understandably, when a user needs to capture an image of a target object, they can tap the camera app installed on their electronic device. The camera app detects this tap and generates a shooting command based on it. The electronic device then enters a preview interface based on the shooting command and displays a first preview image based on the first image data captured by the device's camera. If the user needs to zoom in on the target object in the first preview image, they can trigger the preview interface through a first trigger operation. Based on this, the electronic device can detect the user's first trigger operation on the preview interface and identify the target object indicated by the first trigger operation from the first preview image displayed on the preview interface.

[0104] In some embodiments, an electronic device for performing the image acquisition method of the present disclosure may include a terminal device. The terminal device may include a mobile terminal and a fixed terminal. The mobile terminal may include smartphones, tablets, laptops, digital cameras, and wearable electronic devices, etc. The fixed terminal may include desktop computers and all-in-one computers, etc.

[0105] In some embodiments, the first camera described above may be a camera built into an electronic device or a camera capable of establishing a communication connection with an electronic device; this disclosure does not limit this.

[0106] For example, the first camera described above can be the main camera or a wide-angle camera in a smartphone.

[0107] In some embodiments, the first triggering operation described above may be a digital zoom operation on the first preview image.

[0108] In some embodiments, the first triggering operation described above includes, but is not limited to, a click operation or a swipe operation. The click operation includes, but is not limited to, a single click, a double click, or other types of click operations.

[0109] In some embodiments, the first moment can be the moment when the electronic device detects the first trigger operation, or the first moment can be the moment after the electronic device detects the first trigger operation.

[0110] In some embodiments, the preview interface described above may be a preview interface of a camera application installed on an electronic device.

[0111] In some embodiments, when the electronic device displays a first preview image on the preview interface, if a user's first trigger operation on the preview interface is detected, the target object indicated by the first trigger operation can be determined from the first preview image displayed on the preview interface based on the location where the first trigger operation is triggered on the preview interface, and the target object can be identified.

[0112] For example, refer to Figure 2 , Figure 2 This is a schematic diagram illustrating a first preview image according to an exemplary embodiment. Suppose a user needs to zoom in on an orange in the first preview image displayed on the preview interface; they can click on the orange in the first preview image. Based on this, the electronic device can detect the user's click operation on the orange in the first preview image, and at this time, the electronic device can determine that the target object indicated by the user's click operation is the orange. Similarly, suppose a user needs to zoom in on a mouse cursor in the first preview image; they can click on the mouse cursor in the first preview image. Based on this, the electronic device can detect the user's click operation on the mouse cursor in the first preview image, and at this time, the electronic device can identify that the target object indicated by the user's click operation is the mouse cursor.

[0113] In this embodiment of the disclosure, the target object to be magnified on the preview interface is determined by clicking, which can reduce the shaking of the electronic device and the camera located on the electronic device compared to magnifying the size of the target object by sliding two fingers from the middle to both ends.

[0114] In step 102: A second preview image is generated based on the image data of the target object obtained from the first image data.

[0115] The target object in the second preview image is larger than the target object in the first preview image.

[0116] Understandably, after the electronic device identifies the target object indicated by the first trigger operation from the first preview image, it can also obtain image data of the target object from the image data captured by the first camera at the first moment, and generate a second preview image of the target object with its size enlarged based on the image data of the target object.

[0117] In some embodiments, the image data acquired by the first camera at a first moment can be understood as the image data sensed by the image sensor corresponding to the first camera at a first moment.

[0118] In some embodiments, the electronic device may generate a first preview image based on image data captured by a first camera at a first moment. Then, the electronic device determines the pixel values ​​of the pixels used to display the target object in the first preview image as the image data of the target object.

[0119] For example, after recognizing the target object indicated by the first trigger operation, the electronic device can determine a second image region of the target object in the first preview image and determine the image data of the second image region as the image data of the target object.

[0120] For example, the first preview image displayed on the preview interface of the electronic device is Figure 2 When viewing the preview image shown, if the electronic device identifies an orange as the target object from the first preview image based on the user's first trigger operation, the electronic device can determine a second image region including the orange based on the orange's position in the first preview image. Figure 2 The image area defined by the rectangle 201 in the image is used to define the second image area including the orange, and the image data of the second image area is determined as the image data of the target object. Similarly, if the electronic device recognizes the target object as a mouse from the first preview image based on the user's first trigger operation, the electronic device can determine the second image area including the mouse based on the position of the mouse in the first preview image. Figure 2 The image area defined by the rectangle 202 in the image is used to determine the image data of the target object, and the image data of the second image area including the mouse is determined as the image data of the target object.

[0121] For example, the image data of the second image region can be understood as the pixel values ​​of the pixels included in the second image region.

[0122] In some embodiments, the size of the second image region can be set as needed, and this disclosure does not limit this.

[0123] For example, the size of the second image region can be determined based on the size of the target object in the first preview image. For instance, the electronic device can generate a rectangular frame to surround the target object based on its outer contour, and define the area enclosed by the rectangular frame as the second image region.

[0124] In some embodiments, the size of the second image region can be determined based on the type of the first triggering operation.

[0125] For example, the electronic device may pre-store a first mapping relationship between different types of first trigger operations and preset sizes. Based on this, when a user detects a first trigger operation, they can also determine the type of the first trigger operation, obtain the preset size corresponding to the type of the detected first trigger operation from the first mapping relationship, and determine a second image region including the target object from the first preview image based on the preset size corresponding to the type of the first trigger operation.

[0126] For example, the first triggering operation includes a single-click operation and a double-click operation. The first mapping relationship stores a first preset size corresponding to the single-click operation and a second preset size corresponding to the double-click operation. Based on this, if the first triggering operation detected by the electronic device is a single-click operation, a second image region including the target object and having the first preset size can be determined from the first preview image based on the position of the target object in the first preview image.

[0127] In some embodiments, the specific values ​​of the first preset dimension and the second preset dimension can be set as needed, and this disclosure does not limit this.

[0128] In other embodiments, the electronic device may also store a second mapping relationship between different types of trigger operations and a first preset proportion, wherein the first preset proportion indicates the proportion of the target object's size in the second preview image. Based on this, the electronic device can determine the type of the first trigger operation before determining the second image region including the target object from the first preview image, and determine the first preset proportion corresponding to the type of the first trigger operation from the second mapping relationship based on the type of the first trigger operation. Additionally, the electronic device can also acquire the size of the preview interface, and then determine the size of the second image region based on the size of the preview interface and the first preset proportion corresponding to the first trigger operation, so that the size proportion of the target object in the second preview image generated based on the image data of the second image region is the first preset proportion corresponding to the type of the first trigger operation.

[0129] For example, the first triggering operation includes a single-click operation and a double-click operation. The second mapping relationship stores a first preset percentage corresponding to the single-click operation and a first preset percentage corresponding to the double-click operation. Based on this, if the first triggering operation detected by the electronic device is a single-click operation, the first preset percentage corresponding to the single-click operation can be determined from the second mapping relationship. Then, the electronic device can determine the size of the second image region based on the size of the preview interface and the first preset percentage corresponding to the single-click operation, so that the size percentage of the target object in the second preview image generated based on the image data of the second image region is the first preset percentage corresponding to the single-click operation.

[0130] In some embodiments, the specific values ​​of the first preset percentage and the second preset percentage can be set as needed, and this disclosure does not limit this.

[0131] For example, the first preset percentage can be 80%, and the second preset percentage can be 90%. The first preset percentage of 80% indicates that the target object occupies 80% of the size in the second preview image.

[0132] In some embodiments, when determining the size of the second image region based on the above method, the shape of the second image region can also be determined based on the shape of the preview interface. For example, when the shape of the preview interface is rectangular, the second image region is also determined to be rectangular, so that the second preview image generated based on the image data of the second image region can fill the entire preview interface.

[0133] In some embodiments, the electronic device generates a second preview interface based on image data of a target object obtained from first image data. This includes: after obtaining a second image region including the target object from the first preview image, the electronic device can perform magnification and interpolation processing on the second image region to obtain a second preview image. Since the size of the target object is also magnified during the magnification of the second image region, the size of the target object in the second preview image will be larger than the size of the target object in the first preview image.

[0134] For example, refer to Figure 3 and Figure 4 picture, Figure 3 This is a schematic diagram illustrating a second preview image according to an exemplary embodiment; Figure 4 This is a schematic diagram illustrating a second preview image according to another exemplary embodiment. The image data of the target object acquired by the electronic device is... Figure 2 When the electronic device receives the image data of the image region defined by the rectangular frame 201, the electronic device can... Figure 2 The image region defined by the rectangular frame 201 is interpolated and enlarged to obtain... Figure 3 The second preview image shown. The image data of the target object acquired by the electronic device is... Figure 2 When the electronic device receives the image data of the image region defined by the rectangular frame 202, the electronic device can... Figure 2 The image data of the image region defined by the rectangular frame 202 is interpolated and magnified to obtain... Figure 4 The second preview image shown.

[0135] In step 103, the first preview image displayed on the preview interface is updated to the second preview image.

[0136] For example, the preview interface displays something like... Figure 2The first preview image shown has been updated to Figure 3 or Figure 4 The second preview image shown.

[0137] In this embodiment of the disclosure, when the electronic device detects a user's first trigger operation on the preview interface, it can identify the target object triggered by the first trigger operation from the first preview image displayed on the preview interface. Then, the electronic device can obtain image data of the target object from the first image data that generated the first preview image, and generate a second preview image with a magnified view of the target object based on the target object's image data. Since the second preview image is generated based on the target object's image data, it will necessarily include the target object. This not only enables the magnification operation of the target object displayed on the preview interface but also solves the problem that the target object easily disappears from the preview interface during the magnification process.

[0138] In some embodiments, the method further includes:

[0139] Image data of the target object is obtained from the second image data captured by the first camera at a second moment, wherein the second moment is any moment later than the first moment;

[0140] Based on the image data of the target object obtained from the second image data, a third preview image is generated, wherein the size of the target object in the third preview image is larger than the size of the target object in the first preview image;

[0141] Update the second preview image displayed on the preview screen to the third preview image.

[0142] Understandably, since the image data captured by the first camera is constantly being updated, the electronic device can also acquire the second image data captured by the first camera at a second moment, and extract the image data of the target object from the second image data. Then, the electronic device can generate a magnified third preview image of the target object based on the image data of the target object obtained from the second image data. At this point, the electronic device can update the currently displayed second preview image to the third preview image.

[0143] In some embodiments, the second image data may be the next frame of image data of the first image data sensed by the image sensor corresponding to the first camera.

[0144] In some embodiments, the process by which the electronic device obtains image data of the target object from the second image data captured by the first camera at a second moment, and generates a second preview image based on the image data of the target object, can refer to the above-described implementation process of the electronic device obtaining image data of the target object from the first image data and generating a third preview image based on the image data of the target object obtained from the first image data. The embodiments disclosed herein will not be repeated here.

[0145] In some embodiments, the size of the target object in the third preview image may be the same as or different from the size of the target object in the second preview image, and this disclosure does not limit this.

[0146] For example, the difference between the size of the target object in the third preview image and the size of the target object in the second preview image is less than a preset difference.

[0147] In some embodiments, obtaining image data of the target object from second image data captured by the first camera at a second moment includes:

[0148] Determine the second moment when the relative position between the target object and the first camera changes;

[0149] Acquire the second image data captured by the first camera at the second moment;

[0150] Obtain the image data of the target object from the second image data.

[0151] Understandably, when the relative position between the target object and the first camera changes, the image data related to the target object in the image data captured by the first camera will also change. At this point, the electronic device can acquire the second image data captured by the first camera at the second moment when the relative position between the target object and the first camera changes, and extract the image data of the target object from the second image data. Subsequently, the electronic device can generate a third preview interface with the target object magnified based on the image data of the target object extracted from the second image data.

[0152] In some embodiments, the relative position between the target object and the first camera changes, including at least one of the following:

[0153] The relative distance between the target object and the first camera increases;

[0154] The relative distance between the target object and the first camera is reduced;

[0155] The field of view of the first camera has changed;

[0156] The state of the target object has changed.

[0157] For example, the state of the target object changes, including but not limited to: the pose of the target object changes or the body orientation of the target object changes.

[0158] In this embodiment, the electronic device acquires image data of the target object from the second image data captured by the first camera at a second moment, and generates a magnified third preview image of the target object based on the image data of the target object acquired from the second image data. Therefore, even if the target object captured by the first camera is a moving object, or if the first camera moves during the user's capture of the target object, the electronic device can still display the magnified preview image of the target object on the preview interface, without causing the target object to be lost, further improving the user experience.

[0159] In some embodiments, obtaining image data of the target object from second image data captured by the first camera at a second moment includes:

[0160] A first initial image is generated based on the second image data;

[0161] Determine the first image region of the target object in the first initial image;

[0162] The image data of the first image region is determined as the image data of the target object.

[0163] Understandably, since the image data captured by the first camera is constantly being updated, after acquiring the second image data captured by the first camera at the second moment, the electronic device can generate a first initial image based on the second image data, but it will not display the first initial image on the preview interface. The electronic device can identify the target object from the first initial image, determine the image region of the target object in the first initial image, and define the image region of the target object in the first initial image as the first image region. Then, the electronic device can generate a third preview image based on the image data of the first image region.

[0164] In some embodiments, the process of generating a third preview image based on image data of a first image region by an electronic device can refer to the above-described process of generating a second preview image based on image data of a second image region by an electronic device, and will not be repeated here.

[0165] In some embodiments, the size of the first image region and the size of the second image region may be the same or different, and this disclosure does not limit this.

[0166] For example, the electronic device can acquire the distance change range of the target object from the first time to the second time, and determine the size of the first image region based on the distance change range of the target object from the first time to the second time.

[0167] For example, when the distance between the target object and the first camera increases from the first moment to the second moment, the size of the first image region is determined to be smaller than the size of the second image region. When the distance between the target object and the first camera decreases from the first moment to the second moment, the size of the first image region is determined to be larger than the size of the second image region. When the distance between the target object and the first camera remains constant from the first moment to the second moment, the size of the first image region is determined to be the same as the size of the second image region.

[0168] In this embodiment, as the distance between the target object and the first camera increases, the size of the target object in the first initial image becomes smaller than the size of the target object in the first preview image. Therefore, reducing the size of the first image area allows the electronic device to increase the magnification factor of the first image area when generating the third preview image, thereby increasing the magnification factor of the target object and ensuring that the target object remains large enough to be displayed on the third preview interface. Conversely, as the distance between the target object and the first camera decreases, the size of the target object in the first initial image becomes larger than the size of the target object in the first preview image. Increasing the size of the first image area allows the electronic device to reduce the magnification factor of the first image area when generating the third preview image, thus reducing the magnification factor of the target object and decreasing the probability that the target object cannot be fully displayed on the preview interface due to excessive magnification.

[0169] For example, refer to Figure 5 , Figure 5 This is a schematic diagram illustrating a third preview image according to an exemplary embodiment. It is assumed that the first initial image generated by the electronic device based on second image data captured by the first camera at a second moment is... Figure 5 In the image shown in A1, the electronic device can determine a first image region of the orange in the first initial image A1, and generate a third preview image as shown in A2 based on the image data of the first image region of the orange included in the first initial image A1. Assume that the first initial image generated by the electronic device based on the second image data acquired by the first camera at a second moment is... Figure 5 In the image shown in B1, the electronic device can determine a first image region of the orange in the first initial image B1, and generate a third preview image as shown in B2 based on the image data of the first image region of the orange included in the first initial image B1. Assume that the first initial image generated by the electronic device based on the second image data acquired by the first camera at a second moment is... Figure 5In the image shown in C1, the electronic device can determine the first image region of the orange in the first initial image C1, and generate the third preview image shown in C2 based on the image data of the first image region of the orange included in the first initial image C1.

[0170] In some embodiments, the method further includes:

[0171] Determine the type of the first triggering operation;

[0172] The size of the first image region is determined based on the type of the first trigger operation.

[0173] Understandably, the first trigger operation detected by the electronic device can be of different types. Based on this, the electronic device can determine the type of the first trigger operation when it detects it, and determine the size of the first image area based on the type of the first trigger operation.

[0174] In some embodiments, the electronic device may pre-store a first mapping relationship between different types of first trigger operations and preset sizes. Based on this, when a user detects a first trigger operation, the user can also determine the type of the first trigger operation, obtain the preset size corresponding to the type of the detected first trigger operation from the first mapping relationship, and determine a first image region including the target object from the first initial image based on the preset size corresponding to the type of the first trigger operation.

[0175] For example, the first triggering operation includes a single-click operation and a double-click operation. The first mapping relationship stores a first preset size corresponding to the single-click operation and a second preset size corresponding to the double-click operation. Based on this, if the first triggering operation detected by the electronic device is a single-click operation, a first image region including the target object and having the first preset size can be determined from the first initial image based on the position of the target object in the first initial image.

[0176] In other embodiments, the electronic device may also store a third mapping relationship between different types of trigger operations and a second preset ratio, wherein the second preset ratio is used to indicate the proportion of the target object's size in the third preview image. Based on this, the electronic device can determine the type of the first trigger operation before determining the first image region including the target object from the first initial image, and determine the second preset ratio corresponding to the type of the first trigger operation from the second mapping relationship based on the type of the first trigger operation. Additionally, the electronic device can also acquire the size of the preview interface, and then determine the size of the first image region based on the size of the preview interface and the second preset ratio corresponding to the type of the first trigger operation, so that the size proportion of the target object in the third preview image generated based on the image data of the first image region is the second preset ratio corresponding to the type of the first trigger operation.

[0177] For example, the first triggering operation includes a single-click operation and a double-click operation. The second mapping relationship stores a second preset proportion corresponding to the single-click operation and a second preset proportion corresponding to the double-click operation. Based on this, if the first triggering operation detected by the electronic device is a single-click operation, the second preset proportion corresponding to the single-click operation can be determined from the second mapping relationship. Then, the electronic device can determine the size of the second image region based on the size of the preview interface and the second preset proportion, so that the size proportion of the target object in the third preview image generated based on the image data of the second image region is the first preset proportion corresponding to the single-click operation.

[0178] In other embodiments, the electronic device may also determine the size of the first image region based on the size of the target object in the first initial image.

[0179] For example, after identifying the target object from the first initial image, the electronic device can generate a rectangular box based on the outer contour of the target object and determine the area enclosed by the rectangular box as the second image area.

[0180] In other embodiments, the electronic device may also determine the size of the second image region based on the size of the preview interface.

[0181] In this embodiment of the disclosure, the electronic device determines the size of the first image region based on the type of the detected first trigger operation. Different sizes of first image regions can be determined from the first initial image, thereby making the size of the target object in the third preview image generated based on the different sizes of the first image regions different. In this way, different sizes of the target object displayed on the preview interface can be scaled through different trigger operations, which can further improve the user experience.

[0182] In some embodiments, when a second trigger operation on a third preview image is detected, a fourth preview image is generated based on third image data acquired by the first camera at a third time, wherein the size of the target object in the fourth preview image is smaller than the size of the target object in the third preview image, and the third time is the time when the second trigger operation is detected, or the third time is the time after the second trigger operation is detected.

[0183] Update the third preview image displayed on the preview screen to the fourth preview image.

[0184] Understandably, when the preview interface displays a magnified third preview image of the target object, if a second user trigger operation is detected, the electronic device can acquire the third image data captured by the first camera upon detecting or after the second trigger operation, and generate a fourth preview image based on the third image data. Since the fourth preview image is generated based on all image data sensed by the image sensor corresponding to the first camera, without identifying the target object or extracting its image data, the size of the target object in the fourth preview image is the unmagnified size. Therefore, the size of the target object in the fourth preview image is smaller than its size in the third preview image.

[0185] In some embodiments, the second triggering operation and the first triggering operation may be the same type of triggering operation or different types of triggering operations, and this disclosure does not limit this.

[0186] For example, the first triggering operation can be a double-click operation, and the second triggering operation can be a triple-click operation.

[0187] In some embodiments, the third image data may be the image data of the next frame after the second image data.

[0188] For example, an electronic device can generate a fourth preview image based on all the acquired third image data.

[0189] For example, the electronic device may also generate a second initial image based on third image data. Then, the electronic device may determine a third image region in the second initial image that includes the target object, wherein the size of the third image region is larger than the size of the first image region. After determining the third image region, the electronic device may generate a fourth preview image based on the image data of the third image region. Because the size of the third image region is larger than the size of the first image region, the proportion of the target object in the third image region is smaller than the proportion of the target object in the first image region, thus making the size of the target object in the fourth preview image generated based on the image data of the third image region smaller than the size of the target object in the third preview image generated based on the image data of the first image region.

[0190] It should be noted that the implementation method of the electronic device determining the third image region including the target object from the second initial image can refer to the implementation method of the electronic device determining the first image region including the target object from the first initial image, and will not be repeated here in the embodiments of this disclosure.

[0191] In this embodiment, when the electronic device detects a second trigger operation on the third preview image displayed on the preview interface, the electronic device generates a fourth preview image with the target object smaller than the third preview image based on the third image data captured by the first camera at a second moment. It can be understood that when the electronic device detects a second trigger operation by the user on the third preview image after the target object has been enlarged, the electronic device can generate a fourth preview image without enlarging the target object based on the latest acquired image data, i.e., the third image data, and update the third preview image of the target object displayed on the preview interface with the enlarged target object to a fourth preview image without the enlarged target object. Therefore, in this embodiment, the user can restore the preview interface with the enlarged target object to a preview interface without enlargement through the second trigger operation, facilitating user control over the size of the target object on the preview interface.

[0192] In some embodiments, the method further includes:

[0193] When the third preview image is displayed on the preview interface of the electronic device, if a third trigger operation on the third preview image is detected, the electronic device can generate a sixth preview image based on the fourth image data captured by the first camera at the third moment, and update the third preview image displayed on the preview interface to the sixth preview image. The size of the target object in the sixth preview image is larger than the size of the target object in the third preview image.

[0194] For example, when a third trigger operation is detected, the electronic device can acquire fourth image data captured by the first camera at a third moment, and generate a second initial image based on the fourth image data, but does not display the second initial image on the preview interface. Then, the electronic device can determine the image region where the target object is located from the second initial image, and, with the target object as the center, determine a fourth image region from the second initial image whose size is smaller than the first image region, and generate a fifth preview interface based on the image data of the fourth image region.

[0195] Since the size of the fourth image region is smaller than that of the first image region, the proportion of the target object in the fourth image region is greater than that in the first image region. Therefore, the size of the target object in the fifth preview interface generated based on the image data of the fourth image region is greater than the size of the target object in the third preview image generated based on the image data of the first image region. This allows for hierarchical magnification of the target object displayed on the preview interface, further improving the user experience.

[0196] In some embodiments, the triggering method of the third triggering operation is different from that of the second triggering operation.

[0197] In some embodiments, obtaining image data of the target object from the first image data includes:

[0198] Determine the ratio between the first size of the target object in the first preview image and the second size of the first preview image;

[0199] If the ratio is less than a preset ratio, a second preview image is generated based on the image data of the target object obtained from the first image data.

[0200] Understandably, the electronic device can also acquire the first size of the first preview image when displaying it on the preview interface. Additionally, the electronic device can acquire the second size of the target object in the first preview image. Then, the electronic device determines the ratio between the first and second sizes. If the ratio is less than a preset ratio, it indicates that the target object is smaller in the first preview image. The user's first trigger operation on the preview interface might be a trigger operation to instruct the target object displayed on the preview interface to be enlarged. In this case, the electronic device can execute steps 102 and 103 as described above.

[0201] In some embodiments, the electronic device may determine a first size of the target object in the first preview image based on the number of pixels occupied by the target object in the first preview image, and determine a second size of the first preview image based on the resolution of the first preview image.

[0202] In other embodiments, the electronic device may determine the first size of the target object in the first preview image based on the size of the second image region, and determine the size of the first preview image based on the size of the electronic device's display screen.

[0203] In some embodiments, the size of the preset ratio can be set as needed, and this disclosure does not limit this.

[0204] For example, the preset ratio can range from 1 / 10 to 1 / 500.

[0205] In some embodiments, the method further includes:

[0206] When displaying the first preview image, it is determined whether the target object is within the field of view of the second camera, wherein the focusing distance of the second camera is greater than the focusing distance of the first camera;

[0207] When the target object is outside the field of view of the second camera, a prompt message is output;

[0208] The prompt message is used to remind the user to adjust the orientation of the second camera so that the target object enters the field of view of the second camera.

[0209] It is understandable that electronic devices may include multiple cameras, where the focal length of the second camera is greater than the focal distance of the first camera. Therefore, assuming the relative position of the target object and the electronic device remains unchanged, the amount of image data related to the target object in the image data captured by the second camera is greater than the amount of image data related to the target object in the image data captured by the first camera. Consequently, the size of the target object in the preview image generated based on the image data captured by the second camera is larger than the size of the target object in the preview image generated based on the image data captured by the second camera. Therefore, the electronic device can also determine whether the target object is within the field of view of the second camera when displaying the first preview image on the preview interface. If the electronic device determines that the target object is outside the field of view of the second camera, it can output a prompt message, prompting the user to adjust the orientation of the second camera so that the target object can enter the field of view. Based on this, the electronic device can generate a fifth preview image based on the fourth image data captured by the second camera and update the second or third preview image displayed on the preview interface to the fifth preview image.

[0210] In some embodiments, the second camera may be a camera in the electronic device with a focusing distance greater than that of the first camera. For example, the second camera may also be the camera in the electronic device with the largest focusing distance. For instance, the second camera may be a telephoto camera in the electronic device.

[0211] In some embodiments, the above-mentioned prompt information can be any type of prompt information, and this disclosure does not limit this.

[0212] For example, the aforementioned prompts may include, but are not limited to: pop-up prompts, or preset identifiers displayed on the preview interface using preset colors.

[0213] For example, pop-up notifications include, but are not limited to, text-based notifications, image-based notifications, or preset identifiers.

[0214] In some embodiments, the electronic device may also determine the adjustment direction of the second camera based on the current orientation of the second camera and the position of the target object in the first preview image, and include information related to the adjustment direction of the second camera in the prompt message, so that the user can determine the adjustment direction of the second camera based on the instructions in the prompt message.

[0215] In some embodiments, determining whether a target object is within the field of view of a second camera includes:

[0216] Determine the distance between the target object and the first camera;

[0217] If the distance between the target object and the first camera is greater than a preset distance, determine whether the target object is within the field of view of the second camera.

[0218] For example, refer to Figure 6 and Figure 7 , Figure 6 This is a schematic diagram illustrating the field of view of a first camera and a second camera according to an exemplary embodiment; Figure 7 This is a schematic diagram illustrating a preview image of the moon according to an exemplary embodiment. Figure 6 In this context, α represents the field of view of the first camera. Figure 6 In this context, β represents the field of view of the second camera. When the moon is within the field of view of the first camera (e.g., ...), ... Figure 6 If the moon is visible on the right but not within the field of view of the second camera, a prompt message is output. This prompt message is used to advise the user to adjust the orientation of the second camera so that the moon enters the field of view of the second camera (e.g., the moon on the right). Figure 6 (The moon on the left in the image). Figure 7 A preview image displayed on the preview interface based on the field of view of the first or second camera.

[0219] In some embodiments, the method further includes:

[0220] When it is determined that the target object is within the field of view of the second camera, the image data of the target object is obtained from the fourth image data captured by the second camera;

[0221] Based on the image data of the target object obtained from the fourth image data, a fifth preview image is generated, wherein the difference between the size of the target object in the fifth preview image and the size of the target object in the second or third preview image is less than a difference threshold.

[0222] Update the second or third preview image displayed on the preview screen to the fifth preview image.

[0223] Understandably, when the user adjusts the camera's orientation to bring the target object into the field of view of the second camera, the electronic device can acquire the fourth image data of the target object and extract the target object's image data from the fourth image data. Then, based on the target object's image data extracted from the fourth image data, the electronic device can generate a fifth preview image and update the second or third preview image displayed on the preview interface to the fifth preview image.

[0224] In some embodiments, the implementation of the electronic device generating a fifth preview image based on the fourth image data can refer to the implementation of the target object generating a third preview image based on the second image data described above, and will not be repeated here.

[0225] In this embodiment, since the relative positions of the target object and the electronic device remain unchanged, the amount of image data of the target object captured by the second camera is greater than that captured by the first camera. Therefore, the clarity of the target object in the fifth preview image generated based on the image data of the target object captured by the second camera is greater than that in the second and third preview images. Therefore, prompting the user to adjust the field of view of the second camera can improve the quality of the preview image displayed on the preview interface.

[0226] In some embodiments, the method further includes:

[0227] Detect the photo capture operation when the second or third preview image is displayed on the preview interface;

[0228] When a photo-taking operation is detected, a target photo including a magnified version of the target object is output based on the image data of the preview image displayed on the preview interface when the photo-taking operation is detected.

[0229] Understandably, when the second preview image is displayed on the preview interface, if a user's photo-taking action is detected, the electronic device can acquire the fifth image data used to generate the second preview image and generate the target photo based on the fifth image data. Since the target object's size in the second preview image is larger than its size in the first preview image, a target photo with an enlarged size of the target object can be generated based on the fifth image data. Similarly, when the third preview image is displayed on the preview interface, if a user's photo-taking action is detected, the electronic device can acquire the sixth image data used to generate the third preview image and generate the target photo based on the sixth image data. Since the target object's size in the third preview image is larger than its size in the first preview image, a target photo with an enlarged size of the target object can be generated based on the sixth image data.

[0230] In some embodiments, after generating a target photo, the electronic device can store the target photo in the storage space corresponding to the camera application or the photo album application, so that the user can view the captured target photo from the camera application or the photo album application.

[0231] In some embodiments, when the fifth preview image is displayed on the preview interface, if a user's photo-taking operation is detected, the electronic device can output a target photo with the target object enlarged based on the image data that generated the fifth preview image.

[0232] refer to Figure 8 , Figure 8 This is a schematic flowchart illustrating an image processing method according to another exemplary embodiment. In the following text, ... Figure 8 The following describes the image processing method provided in this disclosure, using the steps shown as an example.

[0233] In step 801, when the electronic device displays the first preview image on the preview interface based on the activation of the first camera, if a first trigger operation on the first preview image is detected, the target object indicated by the first trigger operation is identified.

[0234] The first preview image is generated based on the first image data captured by the first camera at the first moment.

[0235] For example, the first triggering operation can be a double-click operation.

[0236] In step 802, image data of the target object is obtained from the first image data.

[0237] In step 803, a second preview image is generated based on the image data of the target object obtained from the first image data.

[0238] The target object in the second preview image is larger than the target object in the first preview image.

[0239] In step 804, the first preview image displayed on the preview interface is updated to the second preview image.

[0240] In step 805, the second image data captured by the first camera at the second moment is obtained.

[0241] The second moment is later than the first moment.

[0242] In step 806, image data of the target object is obtained from the second image data, and a third preview image is generated based on the image data of the target object obtained from the second image data.

[0243] Among them, the difference between the size of the target object in the third preview image and the size of the target object in the second preview image is less than the difference threshold.

[0244] In step 807, the second preview image displayed on the preview interface is updated to the third preview image.

[0245] In step 808, when a second trigger operation on the third preview image is detected, the third image data captured by the first camera at the third moment is obtained, and a fourth preview image is generated based on the third image data, wherein the third moment is later than the second moment.

[0246] In step 809, the third preview image displayed on the preview interface is updated to the fourth preview image.

[0247] In the fourth preview image, the size of the target object is smaller than the size of the target object in the third preview image.

[0248] In step 810, when a third trigger operation on the third preview image is detected, the fourth image data captured by the first camera is acquired.

[0249] In step 811, image data of the target object is obtained from the fourth image data, and a sixth preview image is generated based on the image data of the target object obtained from the fourth image data, wherein the size of the target object in the sixth preview image is larger than the size of the target object in the fourth preview image.

[0250] In this embodiment of the disclosure, when photographing a target object, as long as the target object enters the field of view of the first camera, the image acquisition method provided in this embodiment of the disclosure can acquire a magnified image of the target object. For example, Figure 5 A1, B1, and C1 in the diagram represent three different fields of view of the first camera. Since the orange is located within all three fields of view (A1, B1, and C1), only its position differs within each field of view (it's difficult for a user to maintain a consistently stable and complete field of view while shooting), the preview image displayed on the preview interface will always include the image of the orange, regardless of how the first camera's field of view moves (it needs to include the target object). The orange will not be removed from the preview image due to camera shake.

[0251] refer to Figure 9 , Figure 9 This is a block diagram illustrating an image acquisition device according to an exemplary embodiment. Figure 9 As shown, the image acquisition device 900 includes:

[0252] The recognition module 901 is configured to, when entering the preview interface based on a shooting command, if a first trigger operation is detected for the preview interface, identify the target object indicated by the first trigger operation from the first preview image displayed on the preview interface, wherein the first preview image is generated based on the first image data collected by the first camera at a first moment;

[0253] The first generation module 902 is configured to generate a second preview image based on the image data of the target object obtained from the first image data, wherein the size of the target object in the second preview image is larger than the size of the target object in the first preview image;

[0254] The first display module 903 is configured to update the first preview image displayed on the preview interface to the second preview image.

[0255] In some embodiments, the device further includes:

[0256] The second acquisition module is configured to acquire image data of the target object from the second image data acquired by the first camera at a second time, wherein the second time is any time later than the first time;

[0257] The second generation module is configured to generate a third preview image based on the image data of the target object obtained from the second image data, wherein the size of the target object in the third preview image is larger than the size of the target object in the first preview image;

[0258] The second display module is configured to update the second preview image displayed on the preview interface to the third preview image.

[0259] In some embodiments, the second acquisition module is configured as follows:

[0260] A first initial image is generated based on the second image data;

[0261] Determine the first image region of the target object in the first initial image;

[0262] The image data of the first image region is determined as the image data of the target object.

[0263] In some embodiments, the device further includes:

[0264] The first determining module is configured to determine the type of the first triggering operation;

[0265] The second determining module is configured to determine the size of the first image region based on the type of the first trigger operation.

[0266] In some embodiments, the device further includes:

[0267] The third generation module is configured to generate a fourth preview image based on the third image data collected by the first camera at a third moment when a second trigger operation on the third preview image displayed on the preview interface is detected. The target object in the fourth preview image is smaller than the target object in the third preview image. The third moment is the moment when the second trigger operation is detected, or the third moment is after the second trigger operation is detected.

[0268] The third display module is configured to update the third preview image displayed on the preview interface to the fourth preview image.

[0269] In some embodiments, the first acquisition module is configured as follows:

[0270] Determine the second moment when the relative position between the target object and the first camera changes;

[0271] Acquire the second image data captured by the first camera at the second moment;

[0272] Obtain the image data of the target object from the second image data.

[0273] In some embodiments, the first generation module 902 is configured as follows:

[0274] Determine the ratio between the first size of the target object in the first preview image and the second size of the first preview image;

[0275] If the ratio is less than a preset ratio, a second preview image is generated based on the image data of the target object obtained from the first image data.

[0276] In some embodiments, the device further includes:

[0277] The third determining module is configured to determine whether the target object is within the field of view of the second camera when the second preview image or the third preview image is displayed on the preview interface, wherein the focusing distance of the second camera is greater than the focusing distance of the first camera.

[0278] The first output module is configured to output a prompt message when the target object is outside the field of view of the second camera;

[0279] The prompt message is used to remind the user to adjust the orientation of the second camera so that the target object enters the field of view of the second camera.

[0280] In some embodiments, the device further includes:

[0281] The third acquisition module is configured to acquire image data of the target object from the fourth image data collected by the second camera when it is determined that the target object is within the field of view of the second camera;

[0282] The fourth generation module is configured to generate a fifth preview image based on the image data of the target object obtained from the fourth image data, wherein the difference between the size of the target object in the fifth preview image and the size of the target object in the second or third preview image is less than a difference threshold.

[0283] The fourth display module is configured to update the second or third preview interface displayed on the preview interface to the fifth preview image.

[0284] In some embodiments, the device further includes:

[0285] The detection module is configured to detect the photo-taking operation when the second or third preview image is displayed on the preview interface;

[0286] The second output module is configured to, upon detecting a photo-taking operation, output a target photo including a magnified version of the target object, based on the image data of the preview image displayed on the preview interface when the photo-taking operation is detected.

[0287] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0288] Figure 10 This is a structural block diagram illustrating an electronic device 1000 according to an exemplary embodiment. For example, the electronic device 1000 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0289] Reference Figure 10 The electronic device 1000 may include one or more of the following components: processing component 1002, memory 1004, power supply component 1006, multimedia component 1008, audio component 1010, input / output (I / O) interface 1012, sensor component 1014, and communication component 1016.

[0290] Processing component 1002 typically controls the overall operation of electronic device 1000, such as operations associated with at least one of display, telephone call, data communication, camera operation, and recording operation. Processing component 1002 may include one or more processors 1020 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 1002 may include one or more modules to facilitate interaction between processing component 1002 and other components. For example, processing component 1002 may include a multimedia module to facilitate interaction between multimedia component 1008 and processing component 1002.

[0291] Memory 1004 is configured to store various types of data to support operation on electronic device 1000. Examples of such data include at least one of the following: instructions for any application or method operating on electronic device 1000, contact data, phonebook data, messages, pictures, and videos. Memory 1004 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0292] Power supply component 1006 provides power to various components of electronic device 1000. Power supply component 1006 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 1000.

[0293] Multimedia component 1008 includes a screen that provides an output interface between electronic device 1000 and user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 1008 includes a front-facing camera and / or a rear-facing camera. When electronic device 1000 is in an operating mode, such as a shooting mode or video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0294] Audio component 1010 is configured to output and / or input audio signals. For example, audio component 1010 includes a microphone (MIC) configured to receive external audio signals when electronic device 1000 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 1004 or transmitted via communication component 1016. In some embodiments, audio component 1010 also includes a speaker for outputting audio signals.

[0295] I / O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, such as keyboards, click wheels, and buttons. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0296] Sensor assembly 1014 includes one or more sensors for providing state assessments of various aspects of electronic device 1000. For example, sensor assembly 1014 may detect the on / off state of electronic device 1000, the relative positioning of components (e.g., the display and keypad of electronic device 1000), changes in position of electronic device 1000 or one of its components, the presence or absence of user contact with electronic device 1000, orientation or acceleration / deceleration of electronic device 1000, and temperature changes of electronic device 1000. Sensor assembly 1014 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1014 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 1014 may also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetometer, a pressure sensor, and a temperature sensor.

[0297] Communication component 1016 is configured to facilitate wired or wireless communication between electronic device 1000 and other devices. Electronic device 1000 can access wireless networks based on communication standards, such as Wi-Fi, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 1016 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 1016 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.

[0298] In an exemplary embodiment, the electronic device 1000 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.

[0299] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1004 including executable instructions or a computer program, which can be executed by the processor 1020 of the electronic device 1000 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.

[0300] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform any of the image acquisition methods described in the embodiments of this disclosure. For example, the method includes:

[0301] When entering the preview interface based on a shooting command, if a first trigger operation is detected for the preview interface, the target object indicated by the first trigger operation is identified from the first preview image displayed on the preview interface, wherein the first preview image is generated based on the first image data captured by the first camera at a first moment;

[0302] Obtain the image data of the target object from the first image data;

[0303] Based on the image data of the target object obtained from the first image data, a second preview image is generated, wherein the size of the target object in the second preview image is larger than the size of the target object in the first preview image;

[0304] Update the first preview image displayed on the preview screen to the second preview image.

[0305] This disclosure provides a computer program product comprising a computer program or executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, causing the computer device to perform any of the image acquisition methods described above in this disclosure.

[0306] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0307] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. An image acquisition method, characterized in that, The method includes: When entering the preview interface based on a shooting command, if a first trigger operation is detected for the preview interface, the target object indicated by the first trigger operation is identified from the first preview image displayed on the preview interface; wherein, the first preview image is generated based on the first image data captured by the first camera at a first moment; A second preview image is generated based on the image data of the target object obtained from the first image data; wherein the size of the target object in the second preview image is larger than the size of the target object in the first preview image; Update the first preview image displayed on the preview interface to the second preview image.

2. The method according to claim 1, characterized in that, The method further includes: Image data of the target object is obtained from the second image data captured by the first camera at a second time, wherein the second time is any time later than the first time; A third preview image is generated based on the image data of the target object obtained from the second image data; wherein the size of the target object in the third preview image is larger than the size of the target object in the first preview image; Update the second preview image displayed on the preview interface to the third preview image.

3. The method according to claim 2, characterized in that, The step of obtaining the image data of the target object from the second image data captured by the first camera at the second moment includes: A first initial image is generated based on the second image data; Determine the first image region of the target object in the first initial image; The image data of the first image region is determined as the image data of the target object.

4. The method according to claim 3, characterized in that, The method further includes: Determine the type of the first triggering operation; The size of the first image region is determined based on the type of the first triggering operation.

5. The method according to claim 2, characterized in that, The method further includes: When a second trigger operation on the third preview image is detected, a fourth preview image is generated based on the third image data acquired by the first camera at a third moment, wherein the size of the target object in the fourth preview image is smaller than the size of the target object in the third preview image, and the third moment is the moment when the second trigger operation is detected, or the third moment is the moment after the second trigger operation is detected; Update the third preview image displayed on the preview interface to the fourth preview image.

6. The method according to claim 2, characterized in that, The step of obtaining the image data of the target object from the second image data captured by the first camera at the second moment includes: Determine the second moment when the relative position between the target object and the first camera changes; Acquire the second image data captured by the first camera at the second moment; The image data of the target object is obtained from the second image data.

7. The method according to any one of claims 1 to 6, characterized in that, The step of generating a second preview image based on the image data of the target object obtained from the first image data includes: Determine the ratio between the first size of the target object in the first preview image and the second size of the first preview image; If the ratio is less than a preset ratio, the second preview image is generated based on the image data of the target object obtained from the first image data.

8. The method according to any one of claims 2 to 6, characterized in that, The method further includes: When the second preview image or the third preview image is displayed on the preview interface, it is determined whether the target object is within the field of view of the second camera, wherein the focusing distance of the second camera is greater than the focusing distance of the first camera; When the target object is outside the field of view of the second camera, a prompt message is output; The prompt message is used to prompt the user to adjust the orientation of the second camera so that the target object enters the field of view of the second camera.

9. The method according to claim 8, characterized in that, The method further includes: When it is determined that the target object is within the field of view of the second camera, the image data of the target object is obtained from the fourth image data collected by the second camera; Based on the image data of the target object obtained from the fourth image data, a fifth preview image is generated, wherein the difference between the size of the target object in the fifth preview image and the size of the target object in the second preview image or the third preview image is less than a difference threshold. Update the second or third preview interface displayed on the preview interface to the fifth preview image.

10. The method according to claim 2, characterized in that, The method further includes: When the second preview image or the third preview image is displayed on the preview interface, a photo-taking operation is detected. Upon detecting the photo-taking operation, based on the image data of the preview image displayed on the preview interface at the time the photo-taking operation is detected, a target photo including the magnified target object is output.

11. An image acquisition device, characterized in that, The device includes: The recognition module is configured to, when entering the preview interface based on a shooting command, if a first trigger operation is detected for the preview interface, identify the target object indicated by the first trigger operation from the first preview image displayed on the preview interface, wherein the first preview image is generated based on the first image data collected by the first camera at a first moment; The first generation module is configured to generate a second preview image based on the image data of the target object obtained from the first image data, wherein the size of the target object in the second preview image is larger than the size of the target object in the first preview image; The first display module is configured to update the first preview image displayed on the preview interface to the second preview image.

12. An electronic device, characterized in that, include: processor; Memory used to store computer programs or instructions; The processor executes the computer program or instructions to implement the steps of the method according to any one of claims 1 to 10.

13. A non-transitory computer-readable storage medium storing a computer program or instructions, characterized in that, When the computer program or instructions in the storage medium are executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

14. A computer program product comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 10.