Image acquisition parameter determination method and device, equipment, storage medium and chip

By acquiring images from a multi-focal length image acquisition module, and using image feature matching and triangulation to calculate rotation angles and focal length updates, the tedious shooting process caused by manual adjustments is solved, achieving an automated and convenient shooting process.

CN123055984APending Publication Date: 2026-11-06BEIJING X RING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202512017127.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

In existing technologies, determining image acquisition parameters relies on manually adjusting the shooting angle, which makes the shooting process cumbersome and reduces the convenience of shooting.

Method used

By acquiring images from the terminal's multi-focal-length image acquisition module, the rotation angle is calculated using image feature matching and triangulation. The steering mechanism of the image acquisition module is automatically adjusted, and the shooting parameters are optimized by combining the focal length update algorithm.

Benefits of technology

It automatically determines the shooting angle and focal length, simplifying the shooting process and improving the convenience and accuracy of the shooting results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123055984A_ABST
    Figure CN123055984A_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, device, storage medium, and chip for determining image acquisition parameters, relating to the field of smart terminal technology. The method includes acquiring a first image of the target environment acquired by a first image acquisition module of the terminal, and a second image of the target environment acquired by a second image acquisition module; the first focal length of the first image acquisition module is less than the second focal length of the second image acquisition module; and determining the rotation angle of the steering mechanism containing the first and second image acquisition modules based on the first and second images. This eliminates the need for manual adjustment of the shooting angle during the shooting process, achieving automatic determination of the shooting angle, simplifying the shooting process, and improving shooting convenience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of smart terminal technology, and in particular to a method, apparatus, device, storage medium and chip for determining image acquisition parameters. Background Technology

[0002] With the increasing popularity of devices with camera functions, more and more users are choosing to use these devices for shooting. To improve the shooting results, it is necessary to determine the image acquisition parameters of the device.

[0003] In techniques for determining image acquisition parameters, the shooting angle is usually adjusted manually, which makes the shooting process quite cumbersome. Summary of the Invention

[0004] This disclosure provides a method, apparatus, device, storage medium, and chip for determining image acquisition parameters to solve problems in related technologies.

[0005] The first aspect of this disclosure provides a method for determining image acquisition parameters, the method comprising: The terminal acquires a first image of the target environment acquired by its first image acquisition module and a second image of the target environment acquired by its second image acquisition module; the first focal length of the first image acquisition module is less than the second focal length of the second image acquisition module. Based on the first and second images, the rotation angles of the steering mechanisms where the first and second image acquisition modules are located are determined.

[0006] In some embodiments, the method further includes: Obtain the first focal length and the second focal length; Based on the first image and the first focal length, the second focal length is updated to obtain the updated focal length.

[0007] In some embodiments, updating the second focal length based on the first image and the first focal length to obtain the updated focal length includes: Obtain the first size of the first image, and obtain the second size of the first outer border of the target object to be photographed in the first image; the target object to be photographed is the object with the highest attention value in the target environment, and the second size is equal to the size of the second image; Based on the first focal length, the first size, and the second size, the second focal length is updated to obtain the updated focal length.

[0008] In some embodiments, obtaining the second dimension of the first outer border of the target object to be photographed in the first image includes: The first image is input into the trained border recognition model to perform border recognition, and the second size of the first outer border is obtained.

[0009] In some embodiments, inputting the first image into a trained bounding box recognition model for bounding box recognition to obtain the second size of the first outer bounding box includes: Identify the target object to be photographed in the first image; Construct a second outer bounding box for the target object to be photographed; the size of the second outer bounding box is smaller than the second size. Based on the dimensions of the second image, the size of the second outer border is adjusted to obtain the second size of the first outer border.

[0010] In some embodiments, the method further includes: Obtain training images; The initial bounding box recognition model is trained based on the training images to obtain the trained bounding box recognition model.

[0011] In some embodiments, updating the focal length of the second focal length based on the first focal length, the first size, and the second size to obtain the updated focal length includes: Calculate the quotient between the first dimension and the second dimension to obtain the quotient value; The third focal length is obtained by multiplying the quotient result with the first focal length. Based on the third focal length, the second focal length is updated to obtain the updated focal length.

[0012] In some embodiments, updating the focal length of the second focal length based on the third focal length to obtain the updated focal length includes: Obtain the focal length threshold range for the second focal length; Determine whether the third focal length is within the focal length threshold range; If the third focal length is within the focal length threshold range, the third focal length is determined as the updated focal length.

[0013] In some embodiments, the method further includes: If the third focal length is not within the focal length threshold range, the maximum value within the focal length threshold range will be determined as the updated focal length. Based on the difference between the third focal length and the updated focal length, digital zoom is used to supplement the updated focal length.

[0014] In some embodiments, determining the rotation angle of the steering mechanism where the first image acquisition module and the second image acquisition module are located, based on the first image and the second image, includes: Obtain the third image displayed on the terminal; the third image is an image generated based on the first image and the second image; Establish a reference coordinate system based on the third image; The rotation angle is determined based on the second image, the first outer border, and the reference coordinate system.

[0015] In some embodiments, determining the rotation angle based on the second image, the first outer border, and the reference coordinate system includes: Obtain the first center coordinates of the first outer bounding box in the reference coordinate system and the second center coordinates of the second image in the reference coordinate system; Based on the first center coordinates and the second center coordinates, generate the offset between the first outer bounding box and the second image in the reference coordinate system; Determine the rotation angle based on the offset.

[0016] In some embodiments, determining the rotation angle based on the offset includes: Obtain the rotation coefficient corresponding to the offset; The rotation angle is obtained by multiplying the rotation coefficient and the offset.

[0017] A second aspect of this disclosure provides an apparatus for determining image acquisition parameters, comprising: The acquisition unit is used to acquire a first image of the target environment acquired by the first image acquisition module of the terminal and a second image of the target environment acquired by the second image acquisition module; the first focal length of the first image acquisition module is less than the second focal length of the second image acquisition module. The determining unit is used to determine the rotation angle of the steering mechanism where the first image acquisition module and the second image acquisition module are located, based on the first image and the second image.

[0018] In some embodiments, the apparatus further includes: The acquisition unit is also used to acquire the first focal length and the second focal length; The update unit is used to update the focal length of the second focal length based on the first image and the first focal length to obtain the updated focal length.

[0019] In some embodiments, the updating unit includes: The first acquisition module is used to acquire the first size of the first image and the second size of the first outer border of the target object to be photographed in the first image; the target object to be photographed is the object with the highest attention value in the target environment, and the second size is equal to the size of the second image; The update module is used to update the focal length of the second focal length based on the first focal length, the first size, and the second size, so as to obtain the updated focal length.

[0020] In some embodiments, the first acquisition module is further configured to: The first image is input into the trained border recognition model to perform border recognition, and the second size of the first outer border is obtained.

[0021] In some embodiments, the first acquisition module is further configured to: Identify the target object to be photographed in the first image; Construct a second outer bounding box for the target object to be photographed; the size of the second outer bounding box is smaller than the second size. Based on the dimensions of the second image, the size of the second outer border is adjusted to obtain the second size of the first outer border.

[0022] In some embodiments, the apparatus further includes: The acquisition unit is also used to acquire training images; The training unit is used to train the initial bounding box recognition model based on the training images to obtain the trained bounding box recognition model.

[0023] In some embodiments, the update module is further configured to: Calculate the quotient between the first dimension and the second dimension to obtain the quotient value; The third focal length is obtained by multiplying the quotient result with the first focal length. Based on the third focal length, the second focal length is updated to obtain the updated focal length.

[0024] In some embodiments, the update module is further configured to: Obtain the focal length threshold range for the second focal length; Determine whether the third focal length is within the focal length threshold range; If the third focal length is within the focal length threshold range, the third focal length is determined as the updated focal length.

[0025] In some embodiments, the apparatus further includes: The determining unit is also used to determine the maximum value within the focal length threshold range as the updated focal length when the third focal length is not within the focal length threshold range. The supplementary unit is used to supplement the focal length of the updated focal length using digital zoom based on the difference between the third focal length and the updated focal length.

[0026] In some embodiments, the determining unit includes: The second acquisition module is used to acquire the third image displayed on the terminal; the third image is an image generated based on the first image and the second image; A module is established to create a reference coordinate system based on the third image. The determination module is used to determine the rotation angle based on the second image, the first outer border, and the reference coordinate system.

[0027] In some embodiments, the determining module is further configured to: Obtain the first center coordinates of the first outer bounding box in the reference coordinate system and the second center coordinates of the second image in the reference coordinate system; Based on the first center coordinates and the second center coordinates, generate the offset between the first outer bounding box and the second image in the reference coordinate system; Determine the rotation angle based on the offset.

[0028] In some embodiments, the determining module is further configured to: Obtain the rotation coefficient corresponding to the offset; The rotation angle is obtained by multiplying the rotation coefficient and the offset.

[0029] A third aspect of this disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods described in the first aspect of this disclosure.

[0030] A fourth aspect of this disclosure provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the methods described in the first aspect of this disclosure.

[0031] A fifth aspect of this disclosure provides a chip including one or more interfaces and one or more processors; the interfaces are configured to receive signals from the memory of an electronic device and send signals to the processors, the signals including computer instructions stored in the memory, which, when executed by the processor, cause the electronic device to perform the methods described in the first aspect of this disclosure.

[0032] In summary, the image acquisition parameter determination method proposed in this disclosure includes acquiring a first image of the target environment acquired by a first image acquisition module of the terminal and a second image of the target environment acquired by a second image acquisition module; the first focal length of the first image acquisition module is less than the second focal length of the second image acquisition module; and the rotation angle of the steering mechanism where the first and second image acquisition modules are located is determined based on the first and second images. This eliminates the need for manual adjustment of the shooting angle during the shooting process, achieving automatic determination of the shooting angle, simplifying the shooting process, and improving shooting convenience.

[0033] 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

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

[0035] Figure 1A flowchart illustrating a method for determining image acquisition parameters provided in this embodiment of the disclosure; Figure 2 A flowchart illustrating another method for determining image acquisition parameters provided in this embodiment of the disclosure; Figure 3 A flowchart illustrating another method for determining image acquisition parameters provided in this embodiment of the disclosure; Figure 4 A flowchart illustrating another method for determining image acquisition parameters provided in this embodiment of the disclosure; Figure 5 A flowchart illustrating another method for determining image acquisition parameters provided in this embodiment of the disclosure; Figure 6 A flowchart illustrating the entire process of determining image acquisition parameters as provided in this embodiment of the disclosure; Figure 7 A schematic diagram of the structure of an image acquisition parameter determination device provided in an embodiment of this disclosure; Figure 8 Another device for determining image acquisition parameters provided in embodiments of this disclosure; Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure; Figure 10 This is a schematic diagram of the structure of a chip provided in an embodiment of the present disclosure; Figure 11 This is a schematic diagram of another chip structure provided in an embodiment of this disclosure. Detailed Implementation

[0036] Embodiments of this disclosure are described in detail below, with examples of embodiments illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.

[0037] With the increasing popularity of devices with camera functions, more and more users are choosing to use these devices for shooting. To improve the shooting results, it is necessary to determine the image acquisition parameters of the device.

[0038] In techniques for determining image acquisition parameters, the shooting angle is usually adjusted manually, which makes the shooting process quite cumbersome.

[0039] Therefore, to address the problems existing in related technologies, this disclosure proposes a method for determining image acquisition parameters. This method includes acquiring a first image of the target environment acquired by a first image acquisition module of the terminal, and a second image of the target environment acquired by a second image acquisition module; the first focal length of the first image acquisition module is less than the second focal length of the second image acquisition module; and determining the rotation angle of the steering mechanism where the first and second image acquisition modules are located based on the first and second images. This eliminates the need for manual adjustment of the shooting angle during the shooting process, achieving automatic determination of the shooting angle, simplifying the shooting process, and improving shooting convenience.

[0040] This disclosure is not exhaustive, but merely illustrative of some embodiments, and is not intended to limit the scope of protection of this disclosure. Unless otherwise specified, each step in a particular embodiment can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a particular embodiment can also be implemented as an independent embodiment, and the order of the steps in a particular embodiment can be arbitrarily interchanged. Furthermore, the optional implementation methods in a particular embodiment can be arbitrarily combined; moreover, the embodiments can be arbitrarily combined, for example, some or all steps of different embodiments can be arbitrarily combined, and a particular embodiment can be arbitrarily combined with the optional implementation methods of other embodiments. In each of the disclosed embodiments, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions of the embodiments are consistent and can be referenced by each other. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships. The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the scope of this disclosure. In this embodiment of the disclosure, unless otherwise stated, elements expressed in the singular form, such as "a," "an," "the," "the aforementioned," "the," "this," etc., can mean "one and only one," or "one or more," "at least one," etc. For example, when using articles such as "a," "an," "the," etc. in translation, the noun following the article can be understood as either a singular or a plural expression. In some embodiments, the terms “in response to…”, “in response to determining…”, “in the case of…”, “when…”, “if…”, “if…”, etc., can be used interchangeably. In some embodiments, the terms “greater than,” “greater than or equal to,” “not less than,” “more than,” “more than or equal to,” “not less than,” “higher than,” “higher than or equal to,” “not lower than,” and “above” can be used interchangeably, as can the terms “less than,” “less than or equal to,” “not greater than,” “less than,” “less than or equal to,” “not more than,” “lower than,” “lower than or equal to,” “not higher than,” and “below”. The prefixes such as "first" and "second" in the embodiments of this disclosure are only for distinguishing different descriptive objects and do not constitute restrictions on the position, order, priority, number or content of the descriptive objects. For the description of the descriptive objects, please refer to the description in the claims or the context of the embodiments. The use of prefixes should not constitute unnecessary restrictions.

[0041] In the embodiments of this disclosure, "multiple" refers to two or more. In the embodiments disclosed herein, terms such as “import”, “input”, and “read in” can be used interchangeably.

[0042] In some embodiments, devices, etc., can be interpreted as physical or virtual, and their names are not limited to the names recorded in the embodiments. Terms such as “device”, “equipment”, “circuit”, “network element”, “node”, “function”, “unit”, “section”, “system”, “network”, “chip”, “chip system”, “entity”, and “subject” can be used interchangeably.

[0043] In some embodiments, the terms "terminal", "terminal device", "user equipment (UE)", "user terminal", "mobile station (MS)", "mobile terminal (MT)", "subscriber station", "mobile unit", "subscriber unit", "wireless unit", "remote unit", "mobile device", "wireless device", "wireless communication device", "remote device", "mobile subscriber station", "access terminal", "mobile terminal", "wireless terminal", "remote terminal", "handset", "useragent", "mobile client", and "client" can be used interchangeably. Figure 1 This is a flowchart illustrating a method for determining image acquisition parameters according to an embodiment of this disclosure. This method can be applied to application scenarios such as smart terminals, for example, executed by a terminal with integrated image acquisition parameter determination function or an image processor within the terminal, or executed by other devices suitable for determining image acquisition parameters to output multi-layered images; this disclosure does not limit the scope of the application. Figure 1 As shown, the image processing method includes steps S101-S102. Step S101: Obtain the first image of the target environment acquired by the first image acquisition module of the terminal and the second image of the target environment acquired by the second image acquisition module; the first focal length of the first image acquisition module is less than the second focal length of the second image acquisition module.

[0044] In the embodiments of this disclosure, the terminal refers to a smart device with image acquisition capabilities, including but not limited to smartphones, tablets, drones, smart glasses, and smart monitoring devices. The first image acquisition module and the second image acquisition module are two camera modules on the terminal, either independently or integrated, each containing an optical lens, an image sensor (such as CMOS), a drive motor, and control circuitry. The first and second image acquisition modules have different focal lengths: the first image acquisition module can be a wide-angle lens (shorter focal length, such as 16mm-35mm equivalent focal length), with a large field of view, suitable for capturing panoramic views; the second image acquisition module can be a telephoto lens (longer focal length, such as 50mm-200mm equivalent focal length), with a narrow field of view but high magnification, suitable for capturing details of distant objects. The viewfinders of the first and second image acquisition modules select the shooting scene, such as scenery, people, or objects. Both the first and second images contain visual information of the target environment, but due to the different focal lengths, the presented details and field of view differ.

[0045] In the embodiments of this disclosure, when a user activates the camera function of the terminal device and points it at the target environment, two image acquisition modules start working simultaneously. The first image acquisition module acquires a first image of the target environment according to its own focal length and optical characteristics; the second image acquisition module also acquires a second image of the same target environment with a different focal length. These two images are stored separately in the terminal device's storage unit for subsequent processing. Corresponding control programs and image processing algorithms are written in the terminal device's operating system or camera application software. Upon receiving the user's shooting command, the program simultaneously triggers both image acquisition modules to acquire images. After acquisition, the first and second images are obtained through a specific interface.

[0046] By acquiring images from image acquisition modules with different focal lengths, information about the target environment can be obtained from different perspectives and magnifications. This provides a richer data foundation for subsequently determining image acquisition parameters, avoiding the problems of incomplete information or inaccurate parameter determination that may result from relying solely on a single focal length image acquisition module, thereby improving the accuracy and reliability of the shooting results.

[0047] Step S102: Determine the rotation angle of the steering mechanism where the first image acquisition module and the second image acquisition module are located based on the first image and the second image.

[0048] In the embodiments of this disclosure, the steering mechanism is a mechanical device installed on the terminal device for supporting and adjusting the orientation of the image acquisition module. The steering mechanism can change the shooting angle of the image acquisition module by rotation or other means, enabling the terminal device to acquire images of the target environment from different directions. The rotation angle includes the horizontal rotation angle of the steering mechanism in the horizontal direction (e.g., -90° to 90°) and the vertical rotation angle in the vertical direction (e.g., -45° to 45°), used to quantify the required rotation range of the steering mechanism to ensure that the image acquisition module is aligned with the target object to be photographed.

[0049] In the embodiments of this disclosure, a specific image feature extraction algorithm is used in the image processing software of the terminal device to extract key feature points from the first and second images, respectively. These key feature points typically include salient features such as edges, corners, and textures in the images. Then, a feature matching algorithm is used to match the feature points in the two images to find corresponding point pairs with similar features in the two images. For example, if there is a noticeable corner of a building in both the first and second images, the position of this corner point in the two images can be determined through feature matching. Based on the matching results of the feature points in the first and second images, the disparity (i.e., the positional difference of the same feature point in the two images) of each matched point pair in the two images is calculated. Using the principle of disparity and known parameters such as the focal length and baseline distance (distance between the two modules) of the two image acquisition modules, the depth information (i.e., the distance to the terminal device) of the corresponding feature points in the target environment is calculated using triangulation. Based on the calculated feature point depth information and their positions in the first image, combined with the geometric model of the terminal device and the kinematic parameters of the steering mechanism, a specific angle calculation algorithm (such as inverse calculation based on perspective projection or using 3D reconstruction technology) is used to determine the angle that the steering mechanism containing the first and second image acquisition modules needs to rotate. This allows the two image acquisition modules to better align with the target shooting direction or meet specific shooting composition requirements. For example, if it is calculated that a key subject is located to one side and at a greater depth in the first image, the steering mechanism may need to rotate the image acquisition module to that side by a certain angle to center and sharpen the subject in subsequent images.

[0050] This reduces the need for manual adjustments to the shooting angle, as the terminal device can automatically calculate and adjust the rotation angle of the steering mechanism based on the acquired image information. This makes the shooting process more intelligent and automated, allowing even users without professional shooting knowledge and experience to easily achieve ideal shooting results, thus improving user experience and shooting convenience.

[0051] In summary, in the embodiments of this disclosure, according to the image acquisition parameter determination method proposed in this disclosure, the method includes acquiring a first image of the target environment acquired by a first image acquisition module of the terminal and a second image of the target environment acquired by a second image acquisition module; the first focal length of the first image acquisition module is smaller than the second focal length of the second image acquisition module; and determining the rotation angle of the steering mechanism where the first and second image acquisition modules are located based on the first and second images. This eliminates the need for manual adjustment of the shooting angle during the shooting process, achieves automatic determination of the shooting angle, simplifies the shooting process, and improves shooting convenience.

[0052] In practical applications, when using a terminal to take pictures, in addition to determining the shooting angle, it is also necessary to determine the focal length of the image acquisition module. The angle of the image acquisition module can be determined in the following ways, but not limited to: obtaining the first focal length and the second focal length; updating the second focal length based on the first image and the first focal length to obtain the updated focal length.

[0053] In the embodiments of this disclosure, the first focal length refers to the focal length configured in the first image acquisition module. In optical imaging, the focal length determines the field of view of the camera; a shorter focal length results in a wider field of view, while a longer focal length results in a narrower field of view, making the subject more focused. The second focal length refers to the focal length of the second image acquisition module, which is typically longer than the first focal length. The first focal length of the first image acquisition module is a fixed focal length, while the second focal length of the second image acquisition module is an adjustable variable focal length. Updating the focal length involves adjusting the second focal length based on the first image and the first focal length, resulting in a new focal length used to optimize the shooting effect of the second image acquisition module, making the target object appear at a more suitable size in the second image.

[0054] In embodiments of this disclosure, within the terminal device's system, focal length parameters of the first and second image acquisition modules are obtained by calling corresponding hardware interfaces or software drivers. These focal length parameters are typically pre-set by the hardware manufacturer and stored in the device's storage unit for the terminal device's software system to read and use. Image feature extraction is performed on the first image, such as using edge detection algorithms to identify object contours and texture features in the image, determining the position and size of the main subject in the image. Simultaneously, the area proportion occupied by the main subject in the first image is calculated, which helps to understand its prominence in the current shooting scene. Based on the size and position of the main subject in the first image and the first focal length, the second focal length is updated and calculated according to a pre-set focal length adjustment algorithm. A simple calculation method is to adjust the focal length based on the proportional relationship between the desired object size and the actual captured size. For example, assuming the height of the main subject in the first image is h1, and its expected height in the second image is h2 (usually set according to common composition principles or the user's shooting intention), the first focal length is f1, and the original second focal length of the second image acquisition module is f2, then the updated focal length f2' can be calculated using the following formula: f2' = f2 × (h2 / h1). Since image acquisition modules with different focal lengths may have varying degrees of optical distortion, a distortion correction model can be introduced to improve the accuracy of the focal length update. When calculating the focal length update, the distortion parameters of the first and second image acquisition modules are estimated, and the inverse distortion correction algorithm is used to correct the focal length update result to compensate for the influence of distortion on the size and position of the subject, so that the final updated focal length more realistically reflects the needs of the shooting scene.

[0055] By reducing the need for manual focus adjustments, the device can automatically calculate the appropriate updated focus based on the initial image and focal length, making the shooting process more intelligent and automated. Users do not need to delve into complex optical principles and focus adjustment techniques; they only need to activate the shooting function, and the device can automatically update the focus, quickly obtaining the ideal shooting effect, thus improving shooting efficiency and user experience.

[0056] For example, when updating the second focal length based on the first image and the first focal length to obtain the updated focal length, the following methods can be used, but are not limited to: obtaining the first size of the first image and obtaining the second size of the first outer border of the target object to be photographed in the first image; the target object to be photographed is the object with the highest attention value in the target environment, and the second size is equal to the size of the second image; updating the second focal length based on the first focal length, the first size, and the second size to obtain the updated focal length.

[0057] In the embodiments of this disclosure, the first size refers to the overall size of the first image, typically expressed in pixels. For example, if the width of the first image is 1920 pixels and the height is 1080 pixels, then the first size is 1920 × 1080 pixels. The first size reflects the spatial extent of the first image on a two-dimensional plane. The target object to be photographed is the object that the user expects to be the subject of the photograph within the target environment. The attention value can be determined by a combination of factors, including semantic analysis of the image content, object recognition, and user operational preferences. For example, when photographing a street scene, if there is a famous landmark building in the frame, based on semantic analysis and common shooting intentions, the landmark building may be identified as the target object to be photographed. The first outer border refers to the smallest rectangular border that completely encloses the target object in the first image. The second size is the size of the first outer border, also expressed in pixels. For example, if the width of the outer border of the target object in the first image is 500 pixels and the height is 300 pixels, then the second size is 500 × 300 pixels. It represents the space occupied by the target object in the first image.

[0058] In the embodiments of this disclosure, the overall size (first size) of the first image can be easily obtained in the image processing software of the terminal device by calling the corresponding image attribute acquisition function or method. This is a basic attribute of the image, which can usually be directly read from the image file information or image processing library. The first image is analyzed using a target detection algorithm to identify various objects in the image and calculate the attention value of each object. The calculation of the attention value can comprehensively consider factors such as the size of the object (the proportion of pixels it occupies), its position (whether it is located in the center of the image often attracts more attention), and its semantic category (such as people, famous scenic spots, etc., which usually have higher attention). According to the size of the attention value, the object with the largest attention value is selected as the target to be photographed. Then, by calculating the boundary pixel coordinates of the target to be photographed, the coordinates of the two diagonal points of its outer border are determined, thereby obtaining the first outer border and its size (second size). According to the first focal length, the first size and the second size, the second focal length is updated and calculated according to the following formula to obtain the updated focal length. The formula is: Updated focal length = Second focal length × (Second size / First size) × (First focal length / Initial value of second focal length). First, it's necessary to clarify the comparison between the first and second dimensions to determine the scaling factor for magnification or reduction. Then, combining the original ratio between the first and second focal lengths, a more suitable updated focal length value is calculated, ensuring that the target object in the image captured by the second image acquisition module reaches the expected size.

[0059] By analyzing the outer frame size of the target object and the overall image size, and by adjusting the focal length, the image captured by the second image acquisition module can accurately highlight the subject, ensuring that the subject occupies a suitable proportion in the frame. This avoids the subject being too small to stand out or too large to lose the reference value of the surrounding environment, thereby improving the professionalism and aesthetic appeal of the captured images.

[0060] For example, when performing the operation of obtaining the second size of the first outer border of the target object to be photographed in the first image, it can be implemented in the following ways, but not limited to: inputting the first image into a trained border recognition model to perform border recognition and obtain the second size of the first outer border.

[0061] In the embodiments of this disclosure, the trained bounding box recognition model refers to a deep learning model, such as a convolutional neural network-based model, that has been trained on a large amount of image data labeled with object bounding box information and has learned to accurately identify the bounding box features of objects in an image. During the training process, the bounding box recognition model optimizes its internal parameters and structure by learning from a large number of sample images, thereby acquiring the ability to accurately locate and recognize the bounding boxes of objects in the input image.

[0062] In the embodiments of this disclosure, a first image is used as input and fed into a trained bounding box recognition model. The bounding box recognition model automatically detects the target object in the first image and outputs the coordinate information of the first outer bounding box of the target object, thereby obtaining the second size. For example, if the bounding box recognition model outputs the coordinates of the upper left corner of the outer bounding box of the target object as (x1, y1) and the coordinates of the lower right corner as (x2, y2), then the width of the second size is x2-x1 and the height is y2-y1. The coordinate information is usually represented in pixels and directly reflects the position and size of the target object in the first image.

[0063] After the first image is input into the trained border recognition model, the model can automatically complete the border recognition task without the need for manual annotation and measurement of the border size of the target object to be photographed. This greatly improves the automation of the shooting process, reduces manual intervention, lowers the difficulty and cost of operation, and enables users to take pictures more conveniently and efficiently.

[0064] Figure 2 A flowchart of a method for determining image acquisition parameters proposed in this disclosure is further shown. Based on Figure 2 The embodiment shown, Figure 2 This may include the following steps: Step S201: Identify the target object to be photographed in the first image.

[0065] In the embodiments of this disclosure, the first image contains noise due to factors such as lighting and equipment. A Gaussian filtering algorithm is used to denoise the image. Gaussian filtering effectively smooths the image and reduces noise interference by weighted averaging of the pixel values ​​surrounding each pixel. For example, for a first image with salt-and-pepper noise, Gaussian filtering significantly improves image clarity, facilitating subsequent object detection. To improve the recognizability of object features in the image, the contrast and brightness of the first image are adjusted. Histogram equalization is used to enhance image contrast, making the difference between the object and the background more obvious. Brightness values ​​are appropriately adjusted based on the overall brightness of the image to avoid loss of object features due to excessive darkness or brightness. For example, in a first image taken against the light, image enhancement processing can make the originally blurry object outlines clearer. The size of the first image is adjusted to the input size required by the target detection model (e.g., 640×640 pixels). Bilinear interpolation is used for size adjustment to ensure that the image is not distorted while adapting to the model's input requirements, ensuring efficient and accurate object detection.

[0066] In the embodiments of this disclosure, the preprocessed first image is input into a bounding box recognition model. The bounding box recognition model extracts feature information of the image (such as the edges, textures, and shapes of objects) through multi-layer convolution operations, and then obtains information on all detected objects in the first image through steps such as candidate region generation, classification, and bounding box regression. This information includes the object's category (such as "person", "flower", "car"), bounding box coordinates (used to determine the object's position in the image), and detection confidence (representing the model's level of confidence in the detection results). For example, after detecting a first image containing a puppy, a lawn, and trees, the model may output results such as "puppy (bounding box coordinates (100, 150, 300, 400), confidence 0.92)", "lawn (bounding box coordinates (0, 350, 600, 600), confidence 0.85)", and "tree (bounding box coordinates (450, 50, 550, 300), confidence 0.88)". For each detected object, feature parameters are extracted to calculate the attention value. These mainly include: 1) Measuring attention by calculating the average color saturation of the object's region; the more vibrant the color, the higher the value. For example, the color vibrancy of a red flower is usually higher than that of a green leaf. 2) Assigning a higher motion weight to objects in motion (determined by comparing previous and subsequent frames or using optical flow). For example, a flying bird is more active than a stationary tree. 3) Objects in the center of the image are generally more attention-grabbing; the image is divided into different regions and assigned different weights, with the center region having the highest weight and the edge regions having lower weights. 4) The ratio of the object's pixel area in the first image to the total pixel area of ​​the first image; the larger the size proportion, the more prominent the object is in the image. The attention value for each object is obtained by weighting and summing the above feature parameters according to preset weight coefficients. The calculation formula is: Attention Value = Color Vibrancy × 0.3 + Motion State × 0.2 + Position Weight × 0.2 + Size Proportion × 0.3. For example, for a detected puppy, its color vibrancy is 0.8, its movement status is 0.9 (running), its position weight is 0.7 (located off-center in the image), and its size proportion is 0.6. Therefore, its attention value = 0.8 × 0.3 + 0.9 × 0.2 + 0.7 × 0.2 + 0.6 × 0.3 = 0.24 + 0.18 + 0.14 + 0.18 = 0.74. The attention values ​​of all objects are compared, and the object with the highest attention value is selected as the target subject to be photographed. Continuing the example, if the attention value of the lawn is 0.5 and the attention value of the trees is 0.6, then the puppy has the highest attention value and is identified as the target subject to be photographed.

[0067] It achieves automatic recognition of the target subject, eliminating the need for users to manually select the subject and greatly improving the automation of the shooting process. Users only need to start the shooting function, and the terminal device can automatically complete the recognition of the target subject, reducing the difficulty and complexity of shooting operations. Even photography novices can easily obtain ideal shooting results, enhancing the user experience.

[0068] Step S202: Construct a second outer border of the target object to be photographed; the size of the second outer border is smaller than the second size.

[0069] In the embodiments of this disclosure, the second outer border is a rectangular frame that completely surrounds the target object in the first image, and its size is smaller than that of the first outer border. The second outer border is constructed to more accurately define the core area of ​​the target object for subsequent operations such as optimizing shooting parameters.

[0070] In the embodiments of this disclosure, for the identified target object to be photographed, an edge detection algorithm is used to extract its contour features, and then a minimum bounding rectangle algorithm is used to generate a rectangular frame that tightly surrounds the object's contour, i.e., the "second bounding border". The size of this border is determined by the actual size of the target object in the first image. For example, if the target is a person, and its contour width in the first image is 500 pixels and its height is 800 pixels, then the size of the second bounding border is 500 × 800 pixels (this size is smaller than the size of the second image, i.e., the second size). To avoid interference from the target edges (such as hair around a person or shadows on the object's surface), the initially constructed second bounding border can be fine-tuned. For example, the border can be shrunk using morphological operations (such as erosion), or the border can be further cropped based on the object's semantic features (such as the facial features of a person) to ensure that the border only contains the core area of ​​the target object, improving the accuracy of subsequent processing.

[0071] By constructing a second outer frame smaller than the second size, the target subject can be locked more precisely, avoiding focus adjustment errors caused by background interference. Precise focus updates can significantly improve shooting results and ensure object sharpness.

[0072] Step S203: Adjust the size of the second outer border according to the size of the second image to obtain the second size of the first outer border.

[0073] In the embodiments of this disclosure, the original size parameters of the second outer border, including width (W1) and height (H1), such as 400 pixels × 600 pixels, are extracted; simultaneously, the size parameters of the second image, including width (W2) and height (H2), such as 2560 pixels × 1440 pixels, are obtained. Since the second outer border needs to be adjusted to match the size of the second image, scaling ratios in the width and height directions need to be calculated separately. The calculation formulas are as follows: Width scaling ratio (Sx) = Width of the second image (W2) ÷ Width of the second outer border (W1); Height scaling ratio (Sy) = Height of the second image (H2) ÷ Height of the second outer border (H1); using example parameters: Sx = 2560 ÷ 400 = 6.4, Sy = 1440 ÷ 600 = 2.4. Using the scaling ratios calculated above, the width and height of the second outer border are enlarged to ensure that the adjusted border size perfectly matches the size of the second image. The adjusted width of the first outer border is W1 × Sx = 400 × 6.4 = 2560 pixels, and the height is H1 × Sy = 600 × 2.4 = 1440 pixels. Therefore, the "second size of the first outer border" is 2560 × 1440 pixels, consistent with the size of the second image. During adjustment, if the aspect ratio of the second outer border differs from that of the second image (e.g., in the example, the aspect ratio of the second outer border is 2:3, while the aspect ratio of the second image is 16:9), center alignment must be used to ensure the target object remains centered within the adjusted border. For example, if the adjusted first outer border is 2560 × 1440 pixels, the target object, after scaling, will be centered within the border. While there may be a small background area at the edges, the core subject will remain centered within the border, preventing object shift due to aspect ratio differences.

[0074] By adjusting the size of the second outer frame to match the second size of the first outer frame, which is consistent with the size of the second image, subsequent focal length update calculations based on the first focal length, first size, and second size become more accurate. Because size matching eliminates size differences between different images, focal length update calculations can be performed based on a unified size benchmark, resulting in more precise focal length updates and improved image quality and effect.

[0075] In practical applications, in order to improve the accuracy of the bounding box recognition model, it is necessary to train the bounding box recognition model. The training method of the bounding box recognition model can be implemented in the following ways, but is not limited to: acquiring training images; training the initial bounding box recognition model based on the training images to obtain the trained bounding box recognition model.

[0076] In the embodiments of this disclosure, training images refer to a set of image data used to train the bounding box recognition model. Training images typically contain various scenes and target objects, and the boundaries and positions of the target objects in each image have clear annotation information. The annotation content generally includes the category of the target object and the corresponding bounding box coordinates, so that the model can learn the features and bounding box information of different types of target objects during training, laying the foundation for accurate identification and localization of target objects in the future. The initial bounding box recognition model refers to a model with basic bounding box recognition capabilities built before model training begins. It contains a series of adjustable parameters and structures, such as convolutional layers, pooling layers, and fully connected layers in a convolutional neural network. These parameters are randomly initialized before training begins, and the model has not yet been optimized and adjusted using training data, resulting in relatively weak recognition performance.

[0077] In the embodiments of this disclosure, training images are input into an initial bounding box recognition model. The model performs forward propagation based on the features of the input image, outputting predicted bounding box coordinates and target category probabilities. The prediction results are compared with the ground truth annotations in the training images, the value of the loss function is calculated, and the difference between the model's current prediction and the true value is evaluated. Based on the value of the loss function, an optimization algorithm is used to backpropagate and update the parameters in the model, adjusting the model parameters to gradually reduce the value of the loss function, thereby improving the model's ability to recognize and locate target objects in the training images. The above steps are repeated for multiple iterations of training on the training images, continuously optimizing the model parameters during training until the model's loss function value on the training set reaches a satisfactory threshold or converges and stabilizes. At this point, the trained bounding box recognition model is obtained.

[0078] By training the initial bounding box recognition model with a large number of training images covering different scenes and target objects, the model can learn rich features and bounding box information of different types of target objects. In practical applications, it can more accurately identify the target object to be photographed and construct the bounding box, thereby improving the accuracy of target recognition and providing a reliable foundation for the determination of subsequent image acquisition parameters (such as focal length update, rotation angle determination, etc.), thus improving the shooting effect and quality of the entire image acquisition system.

[0079] For example, when performing a focal length update on the second focal length based on the first focal length, the first size, and the second size to obtain an updated focal length, the following methods can be used, but are not limited to: calculating the quotient between the first size and the second size to obtain a quotient value; calculating the product of the quotient value and the first focal length to obtain a third focal length; and updating the focal length on the second focal length based on the third focal length to obtain an updated focal length.

[0080] In the embodiments of this disclosure, a first image of the target environment is acquired by a first image acquisition module (focal length f1). Simultaneously, a border recognition model determines the second size (assumed to be w2×h2 pixels) of the first outer border of the target object in the first image. The size of the first image is then acquired (assumed to be w1×h1 pixels), and a quotient calculation is performed, i.e., the ratio of the first size to the second size in the width direction (w1 / w2) and the ratio in the height direction (h1 / h2). The average of the two ratios can be used as the final quotient, or one ratio can be chosen according to actual needs. Assume the quotient obtained here is s. Next, the quotient result s is multiplied by the first focal length f1, i.e., s×f1, to obtain the third focal length f3. Then, the focal length threshold range (assumed to be [min,max]) of the second focal length f2 of the second image acquisition module is obtained, and it is determined whether the third focal length f3 is within this focal length threshold range. If f3 is within the focal length threshold range, it is directly used as the updated focal length to update the second focal length, allowing the second image acquisition module to use this updated focal length for subsequent shooting. If f3 is not within the focal length threshold range, the maximum (or minimum, determined based on the actual situation) value within the threshold range is taken as the updated focal length. Based on the difference between the third focal length f3 and the updated focal length, digital zoom technology is used to supplement the updated focal length to ensure shooting quality.

[0081] Shooting based on updated focal lengths can adapt to different shooting scenarios and target objects. Whether it is a small object at close range or a large scene at a distance, clear and satisfactory images can be obtained through reasonable focal length adjustments. This enhances the applicability and flexibility of terminal devices in various shooting environments and expands the shooting functions and application range of the devices.

[0082] Figure 3 The flowchart of a method for determining image acquisition parameters proposed in this disclosure is further shown. Figure 3 This may include the following steps: Step S301: Obtain the focal length threshold range of the second focal length.

[0083] In the embodiments of this disclosure, the focal length threshold range refers to the effective focal length adjustment range that the second image acquisition module can achieve. This range is determined by the module's hardware performance and is typically expressed as "minimum focal length value - maximum focal length value" (e.g., 20mm-100mm). Focal length values ​​exceeding this range cannot be achieved by the module through optical adjustment and require supplementary means such as digital zoom. For example, if the optical focal length adjustment range of a telephoto lens is 35mm-200mm, then its focal length threshold range is 35mm to 200mm.

[0084] Terminal devices typically store parameter information for each image acquisition module, including focal length threshold ranges. By accessing the device's parameter database, the focal length threshold range data corresponding to the second image acquisition module can be found. This data is pre-written during device manufacturing, allowing direct access to the minimum and maximum settable values ​​of the second focal length, thereby determining the focal length threshold range.

[0085] After obtaining the focal length threshold range for the second focal length, the calculated updated focal length can be ensured to be within a reasonable range when updating the focal length, avoiding setting a focal length value that exceeds the hardware's capabilities. This prevents the image acquisition module from malfunctioning or experiencing a severe drop in image quality due to improper focal length settings, ensuring the feasibility and effectiveness of the focal length adjustment operation.

[0086] Step S302: Determine whether the third focal length is within the focal length threshold range.

[0087] In embodiments of this disclosure, the terminal device's memory or storage already stores a previously calculated third focal length and a focal length threshold range (including minimum and maximum focal length values) for the second focal length obtained from a device parameter database, hardware interface, or specification. The value of the third focal length is compared with the minimum and maximum values ​​of the focal length threshold range. If the third focal length is greater than or equal to the minimum value and less than or equal to the maximum value of the focal length threshold range, it is determined that the third focal length is within the focal length threshold range. Conversely, if the third focal length is less than the minimum value or greater than the maximum value, it is determined that it is not within the focal length threshold range. Based on the result of the comparison operation, a corresponding flag or signal is generated for subsequent focal length update processing.

[0088] By determining whether the third focal length is within the focal length threshold range, it is possible to avoid setting a focal length value that exceeds the hardware's capabilities to the second image acquisition module. This prevents the module from malfunctioning or even damaging the hardware due to improper focal length settings, thus ensuring the stability and reliability of the device.

[0089] Step S303: If the third focal length is within the focal length threshold range, the third focal length is determined as the updated focal length.

[0090] In the embodiments disclosed herein, the first image acquisition module has a first size of 4000×3000 pixels and a first focal length of 24mm, a second size of 2000×1500 pixels, and a calculated third focal length of 48mm. The second image acquisition module has a focal length threshold range of 20mm-100mm, and 48mm falls within this range. Therefore, 48mm is determined as the updated focal length, and the second image acquisition module takes a picture with a focal length of 48mm. At this time, the image ratio of the target object in the second image will meet expectations.

[0091] Setting the third focal length as the updated focal length ensures that the second image acquisition module uses the most suitable focal length during shooting. This results in images that are more clearly and accurately focused on the target object, improving image quality and meeting the user's expectations for the shooting effect.

[0092] In practical applications, since the focal length adjustment range of the second image acquisition module is limited, when the third focal length exceeds the focal length adjustment range, it is necessary to supplement the focal length of the second image acquisition module. This can be achieved in the following ways, but not limited to: when the third focal length is not within the focal length threshold range, determine the maximum value within the focal length threshold range as the updated focal length; based on the difference between the third focal length and the updated focal length, use digital zoom to supplement the updated focal length.

[0093] In the embodiments of this disclosure, digital zoom is a technique that uses software algorithms to interpolate images to enlarge or reduce them. In focal length supplementation, it can be used to further adjust the visual effect of an image after the physical focal length has reached its limit, making the image appear as if it were taken at a longer or shorter focal length. Focal length supplementation refers to processing the image using digital zoom technology based on the difference between the updated focal length and the third focal length, to achieve a shooting effect closer to the third focal length, thus compensating for the deficiencies caused by focal length limitations.

[0094] In the embodiments of this disclosure, the focal length threshold range (including minimum and maximum values) of the third focal length and the second image acquisition module is first obtained. Then, it is determined whether the third focal length is within this range by comparison. If the third focal length is not within the focal length threshold range, the maximum value within the focal length threshold range is determined as the updated focal length. This can be accomplished by direct assignment, assigning the maximum value to the updated focal length variable. The difference between the third focal length and the updated focal length (i.e., the maximum value) is calculated, which represents the amount of focal length that needs to be supplemented by digital zoom. The formula for calculating the difference is: Focal length difference = Third focal length - Updated focal length. If the difference is positive, it indicates that magnification is required; if the difference is negative, it indicates that reduction is required. Based on the focal length difference, a digital zoom algorithm is invoked to process the image. During magnification, interpolation algorithms (such as bilinear interpolation, bicubic interpolation, etc.) can be used to increase the number of pixels in the image, making the image appear as if it was taken at a longer focal length. During reduction, the number of pixels is reduced or downsampling is performed, making the image appear as if it was taken at a shorter focal length. The specific implementation of digital zoom depends on the image processing capabilities of the terminal device and the algorithm used.

[0095] Digital zoom can supplement the focal length by updating the focal length, which can compensate for the insufficient shooting effect caused by the third focal length exceeding the focal length threshold range. For example, when the third focal length is large and exceeds the range, using digital zoom to magnify the image can make the subject stand out more, similar to the effect of telephoto shooting, thereby improving the user's satisfaction with the shooting effect.

[0096] Figure 4 The flowchart of a method for determining image acquisition parameters proposed in this disclosure is further shown. Figure 4 This may include the following steps: Step S401: Obtain the third image displayed on the terminal; the third image is an image generated based on the first image and the second image.

[0097] In the embodiments of this disclosure, the third image refers to the image displayed on the terminal's screen for the user to view. The third image is not directly acquired by a single image acquisition module, but is a composite image generated after processing based on the first and second images. It can fuse information from the two original images to provide the user with a more comprehensive visual reference.

[0098] In the embodiments of this disclosure, a first image is obtained by capturing the target environment using a first image acquisition module (such as a wide-angle camera) of the terminal device. A second image is obtained by capturing the same target environment using a second image acquisition module (such as a telephoto camera) of the terminal device. Necessary preprocessing, such as resizing, color correction, and format conversion, is performed on the first and second images to ensure consistency during the compositing process. Image processing algorithms are used to identify and match feature points in the first and second images to determine their relative positions and angles. Based on the feature point matching results, the first and second images are stitched together. Multi-layer fusion technology is used to fuse the details of the two images. To make the synthesized image more natural, a weighted fusion of the first and second images can be performed. Edge areas are gradually transitioned to reduce obvious boundaries between images. The generated third image is transmitted to the display module of the terminal device. A display function is called or a graphical user interface library is used to display the third image on the terminal screen.

[0099] The third image combines the advantages of the first and second images, providing a wider field of view and more detailed local information. Users can see a more complete scene while still being able to focus on details.

[0100] Step S402: Establish a reference coordinate system based on the third image.

[0101] In the embodiments of this disclosure, the reference coordinate system is a two-dimensional Cartesian coordinate system established with the third image as a spatial reference, used to quantify the positional information of each element in the image. The origin, coordinate axis directions, and unit length of the coordinate system are all set based on the pixel distribution of the third image. For example, the origin is the upper left corner of the image, the horizontal direction to the right is the X-axis, and the vertical direction downward is the Y-axis, with the unit being pixels. Through this coordinate system, the position of any point in the image can be represented by (X coordinate, Y coordinate), providing a unified positional quantification standard for subsequent calculations of offsets, rotation angles, etc.

[0102] In embodiments of this disclosure, representative key points or feature points are selected as reference points for the coordinate system in the third image. These key points are typically salient features in the image (such as corner points, edge points, or object contour points). Selecting these key points helps ensure that the coordinate system accurately corresponds to the actual content of the image. The origin of the reference coordinate system can be a specific point in the image, such as the center point of the image or a specific object location. The coordinate axes are typically horizontal and vertical, with the X-axis and Y-axis defined to be parallel to the width and height directions of the image, respectively. To ensure that the coordinate system is consistent with the image content, the orientation of the coordinate system can be determined by certain landmarks or known physical locations in the image. Based on the selected key points, origin, and coordinate axis orientations, each pixel or feature point in the image is mapped to the reference coordinate system. This can be achieved through mathematical formulas (such as coordinate transformation formulas) or geometric transformations. Through mapping, the position of each element in the image in the reference coordinate system can be accurately determined. After establishing the reference coordinate system, the image may need to be calibrated to ensure the accuracy of the coordinate system. This includes operations such as calibrating the coordinate axes and repositioning key points. The optimized reference coordinate system will more accurately reflect the actual positional relationships of the image. Once a reference coordinate system is established, more complex image processing can be performed, such as object tracking, image transformation, and 3D reconstruction. The reference coordinate system provides a unified reference framework for these operations, making subsequent image analysis more accurate and efficient.

[0103] A reference coordinate system provides a unified reference framework for subsequent image processing and analysis tasks, facilitating the accurate positioning and measurement of the target object's position and size.

[0104] Step S403: Determine the rotation angle based on the second image, the first outer border, and the reference coordinate system.

[0105] In the embodiments of this disclosure, a second image has been acquired by a second image acquisition module. A first outer bounding box has been identified in the first image using a bounding box recognition model and its size adjusted to match the size of the second image. An image processing algorithm (such as a target detection algorithm) is used to identify the target object to be photographed in the second image. The position information of the target object in the second image is obtained, typically represented by pixel coordinates. A reference coordinate system has been established, covering the entire third image. The position information of the first outer bounding box is transformed into the reference coordinate system, typically represented by the coordinates of the upper left and lower right corners. The offset between the center coordinates of the target object in the second image and the center coordinates of the first outer bounding box in the reference coordinate system is calculated. The offset can be calculated using a simple coordinate difference. Based on the offset and the direction of the reference coordinate system, the required rotation angle is calculated. The calculation of the rotation angle can be based on geometric relationships, such as using the arctangent function to calculate the angle corresponding to the offset.

[0106] It enables automated adjustment of shooting angles, reducing the tediousness and errors of manual operation, and improving shooting efficiency and user experience.

[0107] Figure 5 The flowchart of a method for determining image acquisition parameters proposed in this disclosure is further shown. Figure 5 This may include the following steps: Step S501: Obtain the first center coordinates of the first outer bounding box in the reference coordinate system and the second center coordinates of the second image in the reference coordinate system.

[0108] In the embodiments of this disclosure, the first center coordinates are the center coordinates of the first outer bounding frame in the reference coordinate system, used to represent the position of the target object to be photographed in the third image. The second center coordinates are the center coordinates of the second image in the reference coordinate system, used to represent the position of the second image in the third image.

[0109] In image registration, center coordinate calculation can avoid the accumulation of errors caused by operations such as rotation and translation. Precise center positioning can effectively reduce errors in subsequent processing and improve the reliability of the final result.

[0110] Step S502: Based on the first center coordinates and the second center coordinates, generate the offset between the first outer border and the second image in the reference coordinate system.

[0111] In embodiments of this disclosure, the offset refers to the relative distance between the center coordinates of the first outer frame and the center coordinates of the second image in a reference coordinate system, typically expressed in pixels. This offset reflects the positional deviation of the target object relative to the second image.

[0112] In the embodiments of this disclosure, it is assumed that the first center coordinates are (x1, y1) and the second center coordinates are (x2, y2). The offset between the two center coordinates is calculated using the following formula: Offset x = x1 x2; offset y=y1 y2; will provide the horizontal and vertical offsets of the first outer bounding box and the second image in the reference coordinate system. The calculated offsets (offset x, offset y) will be used as the result for subsequent rotation angle calculations or other image processing tasks.

[0113] The offset calculation provides the precise positional deviation between the target object and the second image, which helps with subsequent shooting angle adjustments and image alignment.

[0114] Step S503: Determine the rotation angle based on the offset.

[0115] In the embodiments of this disclosure, the offset is obtained by calculating the difference between the first center coordinates and the second center coordinates, and is represented as (offset x, offset y). The rotation direction is determined according to the sign of the offset: if offset x > 0, it means the target object is on the right and needs to be rotated to the right. If offset x < 0, it means the target object is on the left and needs to be rotated to the left. If offset y > 0, it means the target object is below and needs to be rotated downward. If offset y < 0, it means the target object is above and needs to be rotated upward. The rotation angle θ is calculated using the arctangent function, with the formula: θ = arctan(offset x, offset y); if offset x = 0, the rotation direction is directly determined as upward or downward based on the sign of offset y. If offset y = 0, the rotation direction is directly determined as left or right based on the sign of offset x. The calculated rotation angle is adjusted according to the physical limitations and requirements of the device. For example, the device may only be able to rotate within a certain range, or the angle may need to be converted into a specific number of stepper motor steps. The calculated and adjusted rotation angle is output to the steering mechanism for adjusting the shooting angle.

[0116] It automatically calculates the rotation angle and adjusts the device orientation, enabling it to quickly respond to changes in the target object's position. This is suitable for dynamic shooting scenarios, such as tracking moving objects.

[0117] For example, when determining the rotation angle based on the offset, the following methods can be used, but are not limited to: obtaining the rotation coefficient corresponding to the offset; and multiplying the rotation coefficient and the offset to obtain the rotation angle.

[0118] In the embodiments of this disclosure, the rotation coefficient refers to the scaling factor that converts the offset into the actual rotation angle, and is usually determined by the hardware characteristics of the device (such as the field of view of the camera, sensor size, etc.) and the resolution of the image.

[0119] In the embodiments of this disclosure, it is assumed that the calculated offset is (200 pixels, -120 pixels), that is, an X-axis offset of 200 pixels (horizontal leftward) and a Y-axis offset of -120 pixels (vertical downward). The terminal pre-stores a rotation coefficient lookup table for different scenarios. This table is generated based on the hardware parameters of the steering mechanism (e.g., for a certain model of motor, each 0.1° rotation corresponds to an image offset of 12.5 pixels, i.e., the rotation coefficient is 0.1° / 12.5 pixels = 0.008° / pixel) and pre-shipment calibration data. The system matches the corresponding rotation coefficient from the pre-stored rotation coefficient lookup table according to the direction of the offset (horizontal or vertical). For example: Horizontal direction: Since the X-axis offset is 200 pixels (horizontal), the matched horizontal rotation coefficient is 0.008° / pixel. Vertical direction: Since the Y-axis offset is -120 pixels (vertical), the matched vertical rotation coefficient is 0.01° / pixel. The rotation coefficient is pre-calibrated for the steering mechanism of this terminal to ensure the accuracy of the conversion between offset and rotation angle. The rotation coefficient and offset are multiplied: Horizontal rotation coefficient × X-axis offset = 0.008° / pixel × 200 pixels = 1.6°. Since the X-axis offset is positive (leftward), the horizontal rotation angle is 1.6° (to the right, opposite to the offset direction). Vertical rotation coefficient × Y-axis offset = 0.01° / pixel × (-120 pixels) = -1.2°. The negative sign indicates that the vertical rotation direction is upward (opposite to the offset direction, canceling the downward offset). Combining the calculation results for the horizontal and vertical directions, the rotation angle is 1.6° horizontally to the right and 1.2° vertically upward. After receiving this angle parameter, the steering mechanism drives the first and second image acquisition modules to rotate by the corresponding angle, aligning the center of the second image with the center of the first outer frame. Example: When photographing a speaker, the offset is (-100 pixels, 60 pixels) (the second image is offset 100 pixels to the right and 60 pixels upward). The system obtains a horizontal rotation coefficient of 0.005° / pixel and a vertical rotation coefficient of 0.006° / pixel. It calculates that the horizontal rotation angle is 0.005° / pixel × (-100 pixels) = -0.5° (to the left) and the vertical rotation angle is 0.006° / pixel × 60 pixels = 0.36° (downward). The final rotation angle is 0.5° horizontally to the left and 0.36° vertically downward.

[0120] The rotation coefficient is the key bridge connecting the offset (pixels) and the rotation angle (degrees). Through the pre-stored calibration coefficient, the abstract pixel offset can be accurately converted into an angle command that the steering mechanism can execute, avoiding adjustment errors caused by inconsistent units and ensuring that the rotation angle matches the offset.

[0121] In the embodiments of this disclosure, in order to facilitate a better understanding of the entire process of determining image acquisition parameters, such as Figure 6 As shown, Figure 6This is a flowchart illustrating the entire process of determining image acquisition parameters according to an embodiment of this disclosure. The short-focus camera is a fixed-focus camera with a focal length of f1 mm, and the long-focus camera is an optical zoom camera covering a focal length range of f2 to f3 mm, where f1 < f2 < f3. The long-focus camera process is as follows: Zooming is performed based on the target focal length f calculated by the short-focus camera, outputting a preview and a sequence of final images. Users can preview the images in real time on the screen and select or switch targets as needed. When f2 ≤ f ≤ f3, the long-focus camera performs image-friendly optical zoom. When f > f3, the long-focus camera zooms to its maximum optical focal length f3, and the remaining focal length is handled by digital zoom at the Image Signal Processor (ISP). Short-focal-length camera workflow: It outputs an image (w×h) covering a wider field of view. For low power consumption, the short-focal-length camera can output low-resolution images, which are then sent to a simplified ISP for basic image quality processing. The Neural Processing Unit (NPU) receives the image output from the simplified ISP, detects the target location and identifies the target category, and calculates the target's bounding box (i.e., the second bounding box) ROI0(w0, h0). The NPU analyzes the current shooting scene and, combined with the target category, determines the intelligent composition frame (i.e., the first bounding box) ROI1(w1, h1) based on ROI0. ROI1 has the same aspect ratio as the telephoto camera. The target focal length f of the telephoto camera is calculated based on ROI1(w1, h1): f = (w / w1)×f1 or f = (h / h1)×f1. The goal of the telephoto camera is to capture content consistent with the intelligent composition frame ROI1, but this is difficult to achieve manually during shooting, especially in scenes where the target is moving quickly.This solution will incorporate a motorized gimbal (i.e., a rotating structure): The user interface (User...) will provide a solution for this. In the Interface (UI), clicking triggers the intelligent tracking function and initializes the gimbal. Using the first frame after clicking the tracking object as a reference, a virtual world coordinate system (x, y, z) is established, where x is the horizontal axis, y is the vertical axis, and z is the depth axis. The mapping of the telephoto and short-focus camera images to the world coordinate system is calculated separately. Using the coordinates of the ROI1 center in the world coordinate system as Target and the coordinates of the telephoto camera's optical center as Real, the offsets (Δx, Δy, Δz) in the world coordinate system can be obtained using the formula Offet = Real - Target. The coordinate offsets are then converted into gimbal rotation angles: First, a scaling factor k is defined to describe the relationship between the offset and the rotation angle, Δθ = k * Offset, where k is the calibration factor. Substituting the offsets (Δx, Δy, Δz) into the formula Δθ = k * Offset yields the horizontal and pitch angles of the gimbal. During gimbal rotation, the coordinates of the telephoto and short-focus cameras in the world coordinate system are updated based on the gimbal rotation angle.

[0122] In summary, the embodiments disclosed herein can achieve the following beneficial effects: In the embodiments of this disclosure, two image acquisition modules with different focal lengths, a first image acquisition module and a second image acquisition module, are used to acquire images of the target environment, respectively, to obtain a first image acquired by the first image acquisition module and a second image acquired by the second image acquisition module. Based on the first image acquired by the first image acquisition module and the second image acquired by the second image acquisition module, the rotation angle of the steering mechanism where the first image acquisition module and the second image acquisition module are located is determined, so that the shooting process no longer relies on manual adjustment of the shooting angle, realizing automatic determination of the shooting angle, simplifying the shooting process, and improving the convenience of shooting.

[0123] Corresponding to the image acquisition parameter determination method described above, this invention also proposes an image acquisition parameter determination device. Since the device embodiments of this invention correspond to the method embodiments described above, details not disclosed in the device embodiments can be referred to in the method embodiments described above, and will not be repeated here.

[0124] Figure 7 This is a schematic diagram of the structure of an image acquisition parameter determination device 600 provided in an embodiment of the present disclosure. The image processing device includes: Acquisition unit 61 is used to acquire a first image of the target environment acquired by the first image acquisition module of the terminal and a second image of the target environment acquired by the second image acquisition module; the first focal length of the first image acquisition module is less than the second focal length of the second image acquisition module. The determining unit 62 is used to determine the rotation angle of the steering mechanism where the first image acquisition module and the second image acquisition module are located based on the first image and the second image.

[0125] In summary, in the embodiments of this disclosure, the image acquisition parameter determination device proposed in this disclosure includes acquiring a first image of the target environment acquired by a first image acquisition module of the terminal and a second image of the target environment acquired by a second image acquisition module; the first focal length of the first image acquisition module is smaller than the second focal length of the second image acquisition module; and the rotation angle of the steering mechanism where the first and second image acquisition modules are located is determined based on the first and second images. This eliminates the need for manual adjustment of the shooting angle during the shooting process, achieving automatic determination of the shooting angle, simplifying the shooting process, and improving shooting convenience.

[0126] In one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the device also includes: The acquisition unit 61 is also used to acquire the first focal length and the second focal length; The update unit 63 is used to update the focal length of the second focal length based on the first image and the first focal length to obtain the updated focal length.

[0127] In one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the update unit 63 includes: The first acquisition module 631 is used to acquire the first size of the first image and the second size of the first outer border of the target object to be photographed in the first image; the target object to be photographed is the object with the highest attention value in the target environment, and the second size is equal to the size of the second image; The update module 632 is used to update the focal length of the second focal length based on the first focal length, the first size, and the second size to obtain the updated focal length.

[0128] In one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the first acquisition module 631 is also used for: The first image is input into the trained border recognition model to perform border recognition, and the second size of the first outer border is obtained.

[0129] In one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the first acquisition module 631 is also used for: Identify the target object to be photographed in the first image; Construct a second outer bounding box for the target object to be photographed; the size of the second outer bounding box is smaller than the second size. Based on the dimensions of the second image, the size of the second outer border is adjusted to obtain the second size of the first outer border.

[0130] In one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the device also includes: The acquisition unit 61 is also used to acquire training images; Training unit 64 is used to train the initial bounding box recognition model based on the training images to obtain the trained bounding box recognition model.

[0131] In one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the update module 632 is also used for: Calculate the quotient between the first dimension and the second dimension to obtain the quotient value; The third focal length is obtained by multiplying the quotient result with the first focal length. Based on the third focal length, the second focal length is updated to obtain the updated focal length.

[0132] In one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the update module 632 is also used for: Obtain the focal length threshold range for the second focal length; Determine whether the third focal length is within the focal length threshold range; If the third focal length is within the focal length threshold range, the third focal length is determined as the updated focal length.

[0133] In one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the device also includes: The determining unit 62 is also used to determine the maximum value within the focal length threshold range as the updated focal length when the third focal length is not within the focal length threshold range. The supplementary unit 65 is used to supplement the focal length of the updated focal length using digital zoom based on the difference between the third focal length and the updated focal length.

[0134] In one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the determining unit 62 includes: The second acquisition module 621 is used to acquire the third image displayed on the terminal; the third image is an image generated based on the first image and the second image; Module 622 is used to establish a reference coordinate system based on the third image; The determination module 623 is used to determine the rotation angle based on the second image, the first outer border, and the reference coordinate system.

[0135] In one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the determining module 623 is also used for: Obtain the first center coordinates of the first outer bounding box in the reference coordinate system and the second center coordinates of the second image in the reference coordinate system; Based on the first center coordinates and the second center coordinates, generate the offset between the first outer bounding box and the second image in the reference coordinate system; Determine the rotation angle based on the offset.

[0136] In one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the determining module 623 is also used for: Obtain the rotation coefficient corresponding to the offset; The rotation angle is obtained by multiplying the rotation coefficient and the offset.

[0137] Since the apparatus provided in this embodiment corresponds to the methods provided in the above embodiments, the implementation of the methods is also applicable to the apparatus provided in this embodiment, and will not be described in detail in this embodiment.

[0138] The methods and apparatus provided in the embodiments of this application have been described above. To implement the functions of the methods provided in the embodiments of this application, the electronic device may include a hardware structure and software modules, and may implement the above functions in the form of a hardware structure, software modules, or a hardware structure plus software modules. One of the above functions may be executed in the form of a hardware structure, software modules, or a hardware structure plus software modules.

[0139] Figure 9 This is a block diagram illustrating an electronic device 700 for implementing the above-described method for determining image acquisition parameters, according to an exemplary embodiment. For example, the electronic device 700 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0140] Reference Figure 9 The electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power supply component 706, a multimedia component 708, an audio component 710, an input / output (I / O) interface 712, a sensor component 714, and a communication component 716.

[0141] Processing component 702 typically controls the overall operation of electronic device 700, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.

[0142] Memory 704 is configured to store various types of data to support the operation of electronic device 700. Examples of this data include instructions for any application or method operating on electronic device 700, contact data, phonebook data, messages, pictures, videos, etc. Memory 704 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.

[0143] Power supply component 706 provides power to various components of electronic device 700. Power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 700.

[0144] Multimedia component 708 includes a screen that provides an output interface between electronic device 700 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 708 includes a front-facing camera and / or a rear-facing camera. When electronic device 700 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.

[0145] Audio component 710 is configured to output and / or input audio signals. For example, audio component 710 includes a microphone (MIC) configured to receive external audio signals when electronic device 700 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 704 or transmitted via communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.

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

[0147] Sensor assembly 714 includes one or more sensors for providing state assessments of various aspects of electronic device 700. For example, sensor assembly 714 may detect the on / off state of electronic device 700, the relative positioning of components such as the display and keypad of electronic device 700, changes in position of electronic device 700 or a component of electronic device 700, the presence or absence of user contact with electronic device 700, orientation or acceleration / deceleration of electronic device 700, and temperature changes of electronic device 700. Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 714 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0148] Communication component 716 is configured to facilitate wired or wireless communication between electronic device 700 and other devices. Electronic device 700 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, 4G LTE, 5G NR (NewRadio), or combinations thereof. In one exemplary embodiment, communication component 716 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 716 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

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

[0150] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, which can be executed by a processor 720 of an electronic device 700 to perform the above-described method for image processing. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0151] Embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the methods described in the above embodiments of this disclosure.

[0152] To implement the above embodiments, this disclosure also proposes a chip, including: the chip includes processing circuitry configured to perform the methods provided in the foregoing embodiments.

[0153] Figure 10 This is a schematic diagram of the structure of a chip according to an embodiment of this disclosure. See also... Figure 10 The diagram shown is a schematic representation of the structure of chip 800, but is not limited to this.

[0154] Chip 800 includes processing circuit 801 and interface circuit 802. Interface circuit 802 is used to read instructions and send instructions to processing circuit 801 so that processing circuit 801 executes the above-described method.

[0155] Optionally, such as Figure 11 As shown, Figure 11 This is a schematic diagram of another chip structure proposed in an embodiment of this disclosure. Chip 800 may further include: a memory 803 for storing instructions, and an interface circuit 802 for reading the instructions stored in the memory 803.

[0156] Optionally, the interface circuit 802 is connected to the memory 803. The interface circuit 802 can be used to receive signals from the memory 803 or other devices, and can also be used to send signals to the memory 803 or other devices. For example, the interface circuit 802 can read instructions stored in the memory 803 and send those instructions to the processing circuit 801.

[0157] Optionally, the number of memories 803 can be one or more. The number of interface circuits 802 can also be one or more.

[0158] In some embodiments, the interface circuit 802 performs at least one of the communication steps such as sending and / or receiving in the above method, and the processing circuit 801 performs other steps.

[0159] In some embodiments, the terms interface circuit, interface, transceiver pin, transceiver, etc., can be used interchangeably.

[0160] Alternatively, all or part of the memory 1203 may be located outside the chip 1200.

[0161] Those skilled in the art will also understand that the various illustrative logical blocks and steps listed in the embodiments of this application can be implemented by electronic hardware, computer software, or a combination of both. Whether such functionality is implemented through hardware or software depends on the specific application and the overall system design requirements. Those skilled in the art can implement the functionality using various methods for each specific application, but such implementation should not be construed as exceeding the scope of protection of the embodiments of this application.

[0162] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. 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.

[0163] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0164] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.

[0165] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processing module, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (control method), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic device, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0166] It should be understood that various parts of the embodiments of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0167] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0168] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc.

[0169] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for determining image acquisition parameters, characterized in that, The method includes: The system acquires a first image of the target environment acquired by a first image acquisition module of the terminal and a second image of the target environment acquired by a second image acquisition module; the first focal length of the first image acquisition module is smaller than the second focal length of the second image acquisition module. Based on the first image and the second image, the rotation angle of the steering mechanism where the first image acquisition module and the second image acquisition module are located is determined.

2. The method according to claim 1, characterized in that, The method further includes: Obtain the first focal length and the second focal length; Based on the first image and the first focal length, the second focal length is updated to obtain the updated focal length.

3. The method according to claim 2, characterized in that, The step of updating the second focal length based on the first image and the first focal length to obtain the updated focal length includes: Obtain the first size of the first image, and obtain the second size of the first outer border of the target object to be photographed in the first image; the target object to be photographed is the object with the highest attention value in the target environment, and the second size is equal to the size of the second image; Based on the first focal length, the first size, and the second size, the second focal length is updated to obtain the updated focal length.

4. The method according to claim 3, characterized in that, The step of obtaining the second dimension of the first outer border of the target object in the first image includes: The first image is input into the trained border recognition model to perform border recognition, thereby obtaining the second size of the first outer border.

5. The method according to claim 4, characterized in that, The step of inputting the first image into the trained bounding box recognition model for bounding box recognition to obtain the second size of the first outer bounding box includes: Identify the target object to be photographed in the first image; Construct a second outer border for the target object to be photographed; the size of the second outer border is smaller than the second size. Based on the size of the second image, the size of the second outer border is adjusted to obtain the second size of the first outer border.

6. The method according to claim 4, characterized in that, The method further includes: Obtain training images; The initial bounding box recognition model is trained based on the training images to obtain the trained bounding box recognition model.

7. The method according to claim 3, characterized in that, The step of updating the focal length of the second focal length based on the first focal length, the first size, and the second size to obtain the updated focal length includes: The quotient of the first dimension and the second dimension is calculated to obtain the quotient value. The third focal length is obtained by multiplying the quotient result with the first focal length. Based on the third focal length, the second focal length is updated to obtain the updated focal length.

8. The method according to claim 7, characterized in that, The step of updating the focal length of the second focal length based on the third focal length to obtain the updated focal length includes: Obtain the focal length threshold range for the second focal length; Determine whether the third focal length is within the focal length threshold range; If the third focal length is within the focal length threshold range, the third focal length is determined as the updated focal length.

9. The method according to claim 8, characterized in that, The method further includes: If the third focal length is not within the focal length threshold range, the maximum value within the focal length threshold range is determined as the updated focal length; Based on the difference between the third focal length and the updated focal length, digital zoom is used to supplement the updated focal length.

10. The method according to claim 3, characterized in that, The step of determining the rotation angle of the steering mechanism where the first image acquisition module and the second image acquisition module are located based on the first image and the second image includes: Obtain the third image displayed on the terminal; the third image is an image generated based on the first image and the second image; A reference coordinate system is established based on the third image. The rotation angle is determined based on the second image, the first outer border, and the reference coordinate system.

11. The method according to claim 10, characterized in that, Determining the rotation angle based on the second image, the first outer border, and the reference coordinate system includes: Obtain the first center coordinates of the first outer bounding box in the reference coordinate system and the second center coordinates of the second image in the reference coordinate system; Based on the first center coordinates and the second center coordinates, the offset between the first outer bounding box and the second image in the reference coordinate system is generated. The rotation angle is determined based on the offset.

12. The method according to claim 11, characterized in that, Determining the rotation angle based on the offset includes: Obtain the rotation coefficient corresponding to the offset; The rotation angle is obtained by multiplying the rotation coefficient and the offset.

13. A device for determining image acquisition parameters, characterized in that, The device includes: The acquisition unit is used to acquire a first image of the target environment acquired by the first image acquisition module of the terminal and a second image of the target environment acquired by the second image acquisition module; the first focal length of the first image acquisition module is less than the second focal length of the second image acquisition module. The determining unit is used to determine the rotation angle of the steering mechanism where the first image acquisition module and the second image acquisition module are located, based on the first image and the second image.

14. The apparatus according to claim 13, characterized in that, The device further includes: The acquisition unit is further configured to acquire the first focal length and the second focal length; The update unit is used to update the second focal length based on the first image and the first focal length to obtain the updated focal length.

15. The apparatus according to claim 14, characterized in that, The update unit includes: The first acquisition module is used to acquire the first size of the first image and the second size of the first outer border of the target object to be photographed in the first image; the target object to be photographed is the object with the highest attention value in the target environment, and the second size is equal to the size of the second image; An update module is used to update the second focal length based on the first focal length, the first size, and the second size to obtain the updated focal length.

16. The apparatus according to claim 15, characterized in that, The determining unit includes: The second acquisition module is used to acquire a third image displayed by the terminal; the third image is an image generated based on the first image and the second image; A module is established to create a reference coordinate system based on the third image. The determining module is used to determine the rotation angle based on the second image, the first outer border, and the reference coordinate system.

17. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-12.

18. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-12.

19. A chip, characterized in that, The chip includes a processing circuit and an interface circuit; wherein the interface circuit is used to read instructions and send the instructions to the processing circuit so that the processing circuit executes the method as described in any one of claims 1-12.