Data flow configuration method and apparatus, electronic device, and medium
By dynamically configuring the camera's data stream based on shooting mode and magnification information, the problem of resource waste in electronic devices is solved, achieving smoothness and responsiveness during zooming and shooting, while reducing power consumption.
Patent Information
- Application Number
- CN202411632920.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2044-11-14
AI Technical Summary
In electronic devices, the existing technology of configuring the entire data stream for each frame of an image leads to resource waste and affects the smoothness of the user's zoom when previewing the image and the response speed of taking pictures.
Based on the shooting mode and magnification information of the shooting scene, the navigation frame stream, preview stream, photo stream and spatial alignment transformation (SAT) algorithm stream of the camera are dynamically configured. By determining the main camera and the secondary camera, the data stream is precisely configured to reduce unnecessary resource consumption.
While maintaining smooth zooming and fast shooting response, it reduces power consumption and improves resource utilization efficiency.
Smart Images

Figure CN119485011B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of electronic equipment technology, and specifically relates to a data stream configuration method, apparatus, electronic device, and medium. Background Technology
[0002] Currently, electronic devices are equipped with multiple cameras to maintain the smoothness of switching cameras when users zoom in on preview images and the responsiveness when users take photos.
[0003] When displaying a preview image or capturing a picture of the preview image in an electronic device, the electronic device caches each frame of the preview image and the picture captured from the preview image. When caching each frame, the electronic device configures multiple data streams for the camera. These data streams typically include the following four types: preview stream, picture capture stream, Spatial Alignment Transformation (SAT) algorithm stream, and navigation box stream. However, depending on the shooting scenario, these four data streams are not necessary for capturing every frame. If the above four data streams are configured for every frame, it will result in a waste of power resources. Summary of the Invention
[0004] The purpose of this application is to provide a data stream configuration method, apparatus, electronic device, and medium to dynamically configure the data stream for the camera according to the shooting scene, thereby reducing power consumption while maintaining the smoothness of switching cameras when the user zooms in on the preview image and the response speed when the user takes a picture.
[0005] In a first aspect, embodiments of this application provide a data flow configuration method, the method comprising:
[0006] Acquire shooting mode information and first magnification information, wherein the shooting mode information includes preview non-zoom mode, preview zoom mode and shooting mode;
[0007] Based on the first magnification information, determine the types of N cameras used for shooting, where N is a positive integer and N≥2;
[0008] Based on the first magnification information and the types of the N cameras, determine the configuration of the navigation frame flow for the N cameras;
[0009] Based on the shooting mode information and / or the types of the N cameras, determine the configuration of the N camera preview stream, photo stream, and spatial alignment transformation SAT algorithm stream.
[0010] Secondly, embodiments of this application provide a data stream configuration apparatus, the apparatus comprising:
[0011] The first acquisition module is used to acquire shooting mode information and first magnification information, wherein the shooting mode information includes preview non-zoom mode, preview zoom mode and shooting mode;
[0012] The first determining module is used to determine the types of N cameras used for shooting based on the first magnification information, where N is a positive integer and N≥2;
[0013] The second determining module is used to determine the configuration of the navigation frame flow of the N cameras based on the first magnification information and the types of the N cameras;
[0014] The third determining module is used to determine the configuration of the N camera preview stream, the photo stream, and the spatial alignment transformation (SAT) algorithm stream based on the shooting mode information and / or the types of the N cameras.
[0015] Thirdly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0016] Fourthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.
[0017] Fifthly, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.
[0018] In this embodiment, when shooting a scene, the types of N cameras can be determined based on the first magnification information used when shooting the scene. Then, the configuration of the navigation frame streams of the N cameras can be determined based on the types of the N cameras and the first magnification information. Furthermore, the configuration of the preview stream, the capture stream, and the spatial alignment transform (SAT) algorithm stream of the N cameras can be determined based on the shooting mode information and the types of the N cameras. Compared to the prior art where all data streams are configured for each frame of an image when shooting a scene, the solution in this embodiment dynamically configures the data stream for each frame of an image based on the shooting mode information and the first magnification information of the scene. This maintains the smoothness of switching cameras when the user zooms in on the preview image and the response speed when the user takes a picture, while reducing power consumption waste. Attached Figure Description
[0019] Figure 1 This is a framework diagram of a data flow configuration system provided by existing technology;
[0020] Figure 2 This is a flowchart illustrating a data flow configuration method provided in some embodiments of this application;
[0021] Figure 3 This is a framework diagram of a data flow configuration system provided in some embodiments of this application;
[0022] Figure 4 This is a flowchart illustrating a data flow configuration method provided in some embodiments of this application;
[0023] Figure 5 These are schematic diagrams illustrating the structure of a data stream configuration apparatus as shown in some embodiments of this application;
[0024] Figure 6 These are schematic diagrams illustrating the structure of an electronic device according to some embodiments of this application;
[0025] Figure 7 These are schematic diagrams illustrating the hardware structure of an electronic device according to some embodiments of this application. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0027] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and are not limited in number; for example, a first object can be one or N objects. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0028] Before introducing the solutions of the embodiments of this application, the background technology of the embodiments of this application will be introduced first:
[0029] refer to Figure 1Taking two cameras on an electronic device as an example, when the electronic device is used to capture a scene (whether it is to preview the scene or to take a picture of the preview image), each camera of the electronic device collects information about the scene (i.e., raw data), and then inputs the collected information into the corresponding image processing module. After processing the collected information, the image processing module outputs a preview stream, a picture stream, a SAT algorithm stream, and a navigation box stream to the display decision module. The display decision module determines which preview stream, picture stream, SAT algorithm stream, and navigation box stream to use and sends them to the display module. The display module processes the received preview stream, picture stream, SAT algorithm stream, and navigation box stream and displays the scene.
[0030] It should be noted that, in Figure 1 In the diagram, the solid line indicates the data stream that is required during the shooting process, while the dashed line indicates the data stream that is optional during the shooting process.
[0031] As described above, when using electronic devices to capture a scene (whether previewing the scene or taking a picture of the preview image), each frame requires configuring the entire data stream for each camera of the electronic device, which wastes power resources. To solve this problem, this application provides a data stream configuration method, device, electronic device, and medium. When capturing a scene, the types of N cameras can be determined based on the first magnification information used when capturing the scene. Then, the configuration of the navigation frame streams of the N cameras can be determined based on the types of the N cameras and the first magnification information. Furthermore, the configuration of the preview stream, the photo stream, and the spatial alignment transform (SAT) algorithm stream of the N cameras can be determined based on the shooting mode information and the types of the N cameras. Compared to the prior art where the entire data stream is configured for each frame when capturing a scene, the solution of this application dynamically configures the data stream for each frame based on the shooting mode information and the first magnification information of the scene. This maintains the smoothness of switching cameras when the user zooms in on the preview image and the response speed when the user takes a picture, while reducing power waste.
[0032] The technical solutions of this application embodiment can be applied to scenarios where a shooting scene is being filmed.
[0033] Before introducing the solutions of the embodiments of this application, let's first introduce the technical terms involved in the embodiments of this application:
[0034] Preview stream: This is the data used to display the frames to the display module. It must be configured for each frame of the image during the shooting process.
[0035] Photo stream: This is the data stream that needs to be retained in the album after the user clicks the shutter button in the camera app. To provide users with a faster photo-taking experience, when the camera app is in the preview image of the shooting scene (i.e., without clicking the shutter button in the camera app), the electronic device caches the latest few frames of camera data. Not every frame is necessary in the preview scene.
[0036] SAT algorithm stream: This is a data stream used to align the images of two cameras. It is required for each frame when the user zooms in on the preview image.
[0037] Navigation box stream: The data stream is only needed when the navigation box appears after the user zooms the preview image to a certain high magnification. It is not necessary for every frame in the preview scene.
[0038] The data flow configuration method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0039] Figure 2 This is a flowchart illustrating a data flow configuration method provided in an embodiment of this application. The execution subject of this data flow configuration method can be an electronic device, which can be, but is not limited to, a personal computer (PC), a smartphone, a tablet computer, or a personal digital assistant (PDA).
[0040] like Figure 2 As shown, the data flow configuration method provided in this application embodiment may include steps 210-240.
[0041] Step 210: Obtain shooting mode information and first magnification information.
[0042] The shooting mode information refers to the shooting mode the camera application is in when shooting the scene. The shooting scene can be the environment to be photographed, such as buildings, people, or plants. Specific shooting mode information can include preview without zoom mode, preview with zoom mode, and still image mode.
[0043] The aforementioned preview non-zoom mode can refer to the camera application being in the preview image scene of the shooting scene, and not zooming on the preview image of the shooting scene.
[0044] The aforementioned preview zoom mode refers to the camera application being in the preview image scene of the shooting scene, and zooming on the preview image of the shooting scene.
[0045] It should be noted that when the camera app is in the preview image scene of the shooting scene, it means that the user has not yet clicked the camera control in the camera app, and the camera app is currently in the scene of displaying the preview image of the shooting scene.
[0046] The aforementioned shooting mode refers to a scenario where a user takes a picture of a preview image of the shooting scene after clicking the shooting control in the camera application.
[0047] The first magnification information can be the magnification information used when shooting the scene.
[0048] Step 220: Determine the types of N cameras used for shooting based on the first magnification information.
[0049] Where N is a positive integer and N≥2.
[0050] In some embodiments of this application, the magnification information of each of the N cameras is different, and the types of the N cameras may include a main camera and secondary cameras, wherein there is only one main camera and there may be multiple secondary cameras.
[0051] In some embodiments of this application, in order to accurately determine the main camera and the secondary camera, step 220 may specifically include:
[0052] Calculate the difference between the first magnification information and the magnification information of each of the N cameras to obtain the first magnification difference for each of the N cameras;
[0053] The camera corresponding to the smallest positive real number among the first magnification differences of the N cameras is determined as the main camera, and the other cameras among the N cameras besides the main camera are determined as secondary cameras.
[0054] For each of the N cameras, the corresponding first magnification difference can be the difference between the first magnification information and the first magnification information.
[0055] In some embodiments of this application, by calculating the difference between the first magnification information and the magnification information of N cameras respectively, the first magnification difference corresponding to each of the N cameras is obtained. Then, the camera corresponding to the smallest positive real number among the first magnification differences corresponding to the N cameras can be determined as the main camera, and the other cameras among the N cameras other than the main camera can be determined as secondary cameras.
[0056] In one example, the electronic device has three cameras: Camera 1, Camera 2, and Camera 3. Camera 1 has a magnification of 0.6X, Camera 2 has a magnification of 1X, and Camera 3 has a magnification of 3X. If the first magnification is 1.5X, then the differences between the first magnification and the magnification of Camera 1, Camera 2, and Camera 3 are calculated: D1 = 1.5X - 0.6X = 0.9X, D2 = 1.5X - 1X = 0.5X, and D3 = 1.5X - 3X = -1.5X. The smallest positive real number among D1, D2, and D3 is D2 = 0.5X. Therefore, Camera 2, corresponding to D2 = 0.5X, can be considered the main camera, and Camera 1 and Camera 3 can be considered secondary cameras.
[0057] In the embodiments of this application, by calculating the difference between the first magnification information and the magnification information of N cameras respectively, the first magnification difference corresponding to each of the N cameras is obtained. Then, the camera corresponding to the smallest positive real number among the first magnification differences corresponding to the N cameras can be determined as the main camera, and the other cameras among the N cameras other than the main camera are determined as secondary cameras. In this way, the main camera and secondary cameras can be accurately determined.
[0058] Step 230: Based on the first magnification information and the types of N cameras, determine the configuration of the navigation frame flow for the N cameras.
[0059] In some embodiments of this application, since the navigation frame stream is a data stream that needs to be configured only after the magnification of the shooting reaches a certain level and the navigation frame appears, the navigation frame stream can be configured first when configuring the data stream. Specifically, the configuration of the navigation frame stream of N cameras can be determined based on the first magnification information and the types of N cameras.
[0060] In some embodiments of this application, in order to reduce power consumption waste, step 230 may specifically include:
[0061] If the camera used to preview the shooting scene according to the first magnification information is determined to be the main camera, and the first magnification information is less than the first threshold, the navigation frame flow is not configured for the main camera.
[0062] If the camera used to preview the shooting scene according to the first magnification information is determined to be the main camera, and the first magnification information is greater than or equal to the first threshold, then the navigation frame flow is configured for the main camera.
[0063] If the camera used to preview the shooting scene according to the first magnification information is the secondary camera, and the first magnification information is less than the first threshold, then no navigation frame flow is configured for the secondary camera.
[0064] If the camera used to preview the shooting scene according to the first magnification information is determined to be a secondary camera, and the first magnification information is greater than or equal to the first threshold, the navigation frame flow is not configured for the primary camera.
[0065] The first threshold can be a pre-set threshold for the first multiplier information, which can be the threshold at which the first multiplier information can reach the point where the navigation box can appear. For example, the first threshold can be 20X. The specific value of the first threshold can be determined according to the user's needs and the multiplier required for the navigation box to appear. It is not limited in this embodiment.
[0066] In some embodiments of this application, if the camera used to preview the shooting scene according to the first magnification information is determined to be the main camera, and the first magnification information is less than the first threshold, then a navigation frameflow is not configured for the main camera; if the camera used to preview the shooting scene according to the first magnification information is the main camera, and the first magnification information is greater than or equal to the first threshold, then a navigation frameflow is configured for the main camera; if the camera used to preview the shooting scene according to the first magnification information is determined to be the secondary camera, and the first magnification information is less than the first threshold, then a navigation frameflow is not configured for the secondary camera; if the camera used to preview the shooting scene according to the first magnification information is determined to be the secondary camera, and the first magnification information is greater than or equal to the first threshold, then a navigation frameflow is not configured for the main camera.
[0067] In some embodiments of this application, compared to the prior art which configures a navigation frame stream for every frame of an image when shooting a scene, this application dynamically configures a navigation frame stream for the camera used when previewing a scene according to the first magnification information based on whether the first magnification information reaches a first threshold for the navigation frame to appear, and the type of camera used when previewing the scene according to the first magnification information. This reduces power consumption waste while maintaining the smoothness of switching cameras when the user zooms in on the preview image and the response speed when the user takes a picture.
[0068] Step 240: Based on the shooting mode information and / or the types of N cameras, determine the configuration of the N camera preview streams, photo streams, and spatial alignment transformation SAT algorithm streams.
[0069] In some embodiments of this application, after the configuration of the navigation frame stream is determined, the configuration of the N camera preview stream, the photo stream, and the spatial alignment transformation SAT algorithm stream can be determined according to the shooting mode information and / or the types of the N cameras.
[0070] In some embodiments of this application, in order to accurately determine the configuration of the preview stream, the image stream, and the SAT algorithm stream, step 240 may specifically include:
[0071] If the camera used to preview the shooting scene according to the first magnification information is determined to be the main camera, then the main camera is configured with a preview stream, a photo stream, and a SAT algorithm stream.
[0072] If the camera used to preview the shooting scene according to the first magnification information is determined to be a secondary camera, the configuration of the preview stream, the photo stream and the spatial alignment transformation SAT algorithm stream of each secondary camera is determined according to the shooting mode information.
[0073] In some embodiments of this application, when it is determined that the camera used to preview the shooting scene according to the first magnification information is the main camera, a preview stream, a photo stream, and a SAT algorithm stream are configured for the main camera. When it is determined that the camera used to preview the shooting scene according to the first magnification information is a secondary camera, the configuration of the preview stream, photo stream, and spatial alignment transformation SAT algorithm stream of each secondary camera can be determined according to the shooting mode information.
[0074] In the embodiments of this application, the configuration of the N camera preview stream, photo stream and SAT algorithm stream is dynamically determined based on the shooting mode information and / or the types of the N cameras, thus accurately determining the configuration of the preview stream, photo stream and SAT algorithm stream.
[0075] In some embodiments of this application, when the shooting mode information includes a preview non-focus mode, in order to accurately determine the data stream configured for each secondary camera, the step of determining the configuration of the preview stream, image stream, and SAT algorithm stream for each secondary camera based on the shooting mode information may specifically include:
[0076] Select the secondary camera whose magnification is closest to the first magnification from all the secondary cameras to obtain the target secondary camera;
[0077] If the first magnification difference corresponding to the target secondary camera is determined to be less than the second threshold, a preview stream and a SAT algorithm stream are configured for the target secondary camera, but no preview stream and SAT algorithm stream are configured for the other secondary cameras besides the target secondary camera.
[0078] Among them, the target secondary camera can be the secondary camera whose magnification is closest to the first magnification information selected from all the secondary cameras.
[0079] Referring to the example above, camera 2 is the main camera, and cameras 1 and 3 are secondary cameras. Among cameras 1 and 3, the camera that is closest to the first magnification information of 1.5X is camera 1. Therefore, camera 1 is the target secondary camera.
[0080] The second threshold can be a pre-set threshold for the first magnification difference corresponding to the target secondary camera. For example, the second threshold can be 1. The specific value of the second threshold can be selected by the user according to their needs, and is not limited in this embodiment.
[0081] It should be noted that the camera application is in the preview image scene of the shooting scene, and the preview image of the shooting scene is not zoomed in the preview image scene. This means that the camera application is currently in the preview image scene of the shooting scene, and the user has not zoomed in on the preview image while displaying the preview image of the shooting scene. For example, the user has not changed the shooting magnification information when displaying the preview image.
[0082] In some embodiments of this application, when it is determined that the first magnification difference corresponding to the target secondary camera is less than the second threshold, a preview stream and a SAT algorithm stream are configured for the target secondary camera, and no preview stream and SAT algorithm stream are configured for the other secondary cameras besides the target secondary camera.
[0083] Continuing with the example above, taking a second threshold of 1 as an example, camera 1 is the target secondary camera, and the first magnification difference D1 corresponding to camera 1 is 0.9X. Since D1 < 1, a preview stream and SAT algorithm stream are configured for camera 1, but not for camera 3.
[0084] In some embodiments of this application, when it is determined that the first magnification difference corresponding to the target secondary camera is greater than or equal to the second threshold, no preview stream and SAT algorithm stream are configured for each secondary camera.
[0085] Continuing with the example above, taking a second threshold of 0.5 as an example, if camera 1 is the target secondary camera, and the first magnification difference D1 corresponding to camera 1 is 0.9X, and D1 > 0.5, then neither camera 1 nor camera 3 will be configured with a preview stream or a SAT algorithm stream.
[0086] In the embodiments of this application, the target secondary camera is obtained by selecting the secondary camera whose magnification is closest to the first magnification information from among the secondary cameras. If it is determined that the first magnification difference corresponding to the target secondary camera is less than the second threshold, a preview stream and a SAT algorithm stream are configured for the target secondary camera, and no preview stream and SAT algorithm stream are configured for the other secondary cameras besides the target secondary camera. In this way, the data stream configured for the secondary camera can be accurately determined.
[0087] In some embodiments of this application, when the shooting mode information includes a preview zoom mode, determining the configuration of the preview stream, photo stream, and SAT algorithm stream for each secondary camera based on the shooting mode information may specifically include:
[0088] Based on the first magnification information, the second magnification information, and the preview frame rate of the preview image of the shooting scene, determine the rate of change of magnification when previewing the shooting scene;
[0089] If the rate of change is determined to be greater than the first speed threshold, a preview stream and a SAT algorithm stream are configured for each secondary camera.
[0090] If the rate of change is less than or equal to a first speed threshold, the secondary camera whose magnification is closest to the first magnification information is selected from all the secondary cameras to obtain the target secondary camera; if the first magnification difference corresponding to the target secondary camera is less than a second threshold, a preview stream and a SAT algorithm stream are configured for the target secondary camera, and no preview stream and SAT algorithm stream are configured for the other secondary cameras besides the target secondary camera.
[0091] The second magnification information can be the magnification information collected before shooting the scene using the first magnification information. In other words, the second magnification information is the magnification information of the preview image before zooming to the first magnification information. That is to say, when the camera application is in the preview image scene of the shooting scene, the preview image of the shooting scene is zoomed from the second magnification information to the first magnification information.
[0092] For example, when displaying a preview image of a shooting scene in a camera application, the user initially captures the preview image of the shooting scene using a 1X magnification. Then, the user zooms the magnification information from 1X to 1.5X in the preview image interface. In this case, 1X is the second magnification information, and 1.5X is the first magnification information.
[0093] The first speed threshold can be a pre-set threshold for the rate of change of magnification when previewing the shooting scene. The value of the first speed threshold can be selected by the user according to their needs, and is not limited in this embodiment.
[0094] In some embodiments of this application, the rate of change of the magnification when previewing the shooting scene can be determined based on the first magnification information, the second magnification information, and the preview frame rate of the preview image of the shooting scene. Specifically, the rate of change of the magnification when previewing the shooting scene can be determined according to the following formula (1):
[0095] V = | N1X-N2X | ·F (1)
[0096] Wherein, N1X is the first magnification information, N2X is the second magnification information, and F is the preview frame rate of the preview image of the shooting scene.
[0097] If the rate of change is greater than the first speed threshold, a preview stream and a SAT algorithm stream can be configured for each secondary camera. If the rate of change is less than or equal to the first speed threshold, the focal length difference between each secondary camera is further calculated. The preview stream and SAT algorithm stream are configured in the same way as described above when the preview image of the shooting scene does not change focus. That is, when the rate of change is less than or equal to the first speed threshold, the secondary camera whose magnification is closest to the first magnification information is selected from among the secondary cameras to obtain the target secondary camera. If it is determined that the first magnification difference corresponding to the target secondary camera is less than the second threshold, a preview stream and a SAT algorithm stream are configured for the target secondary camera, and no preview stream and SAT algorithm stream are configured for the other secondary cameras besides the target secondary camera.
[0098] Continuing with the example above, taking a first speed threshold of 20, a second magnification information of 1X, and a preview frame rate of 45fps for the preview image of the shooting scene as an example, calculate the rate of change of magnification when previewing the shooting scene: V = |1-1.5|·45 = 22.5. Since 22.5 > 20, both camera 1 and camera 3 are configured with preview streams and SAT algorithm streams.
[0099] Continuing with the example above, taking a first speed threshold of 25, a second magnification information of 1X, a preview frame rate of 45fps for the preview image of the shooting scene, and a second threshold of 1 as an example, calculate the rate of change of magnification when previewing the shooting scene: V = |1-1.5|·45 = 22.5, 22.5 < 25. Then, select camera 1 as the target secondary camera from camera 1 and camera 3. The first magnification difference corresponding to camera 1 is D1 = 0.9X, D1 < 1. Then, configure the preview stream and SAT algorithm stream for camera 1, but not for camera 3.
[0100] Continuing with the example above, taking a first speed threshold of 25, a second magnification information of 1X, a preview frame rate of 45fps for the preview image of the shooting scene, and a second threshold of 0.5 as an example, calculate the rate of change of magnification when previewing the shooting scene: V = |1-1.5|·45 = 22.5, 22.5 < 25. Then, select camera 1 as the target secondary camera from camera 1 and camera 3. The first magnification difference corresponding to camera 1 is D1 = 0.9X, D1 > 0.5. Therefore, neither camera 1 nor camera 3 is configured with a preview stream or a SAT algorithm stream.
[0101] In the embodiments of this application, when the shooting mode information includes a preview zoom mode, the rate of change of the magnification when previewing the shooting scene is determined based on the first magnification information, the second magnification information and the preview frame rate of the preview image of the shooting scene. Based on the comparison between the rate of change and the first speed threshold, the preview stream and SAT algorithm stream are dynamically configured for each secondary camera, so that the configuration of the preview stream and SAT algorithm stream of each secondary camera can be accurately determined.
[0102] In some embodiments of this application, when the shooting mode information includes a photo mode, determining the configuration of the preview stream, photo stream, and SAT algorithm stream for each secondary camera based on the shooting mode information may specifically include:
[0103] Do not configure a photo stream, preview stream, or SAT algorithm stream for each secondary camera.
[0104] In some embodiments of this application, when the camera application is in shooting mode, it is not necessary to configure the shooting stream, preview stream, and SAT algorithm stream for each secondary camera; only the main camera is configured with the shooting stream, preview stream, and SAT algorithm stream.
[0105] In the embodiments of this application, when the camera application is in shooting mode, no shooting stream, preview stream, and SAT algorithm stream are configured for each secondary camera, thus avoiding power waste.
[0106] In some embodiments of this application, steps 210-240 described above can be applied to an outflow control module in an electronic device; that is, in the embodiments of this application, they can be implemented in existing... Figure 1 The architecture shown adds an outflow control module, which makes decisions on the configuration of the data flow.
[0107] refer to Figure 3 , Figure 3 To illustrate the framework diagram of the data flow configuration system for implementing the data flow configuration method of this application embodiment, as shown below: Figure 3 As shown, the data stream configuration system may include multiple cameras, an outflow control module, an image processing module, a display decision module, and a display module.
[0108] It should be noted that, in Figure 3 In this context, the functions of the camera, image processing module, display decision module, and display module are as follows: Figure 1 The camera, image processing module, display decision module, and display module in the diagram shown have the same function, and will not be described again here.
[0109] exist Figure 3 In this embodiment, the outflow control module is used to implement the data flow configuration method shown in steps 210-240 of the above embodiment.
[0110] It should be noted that, in Figure 3 In the diagram, the solid line indicates the data stream that is required during the shooting process, while the dashed line indicates the data stream that is optional during the shooting process.
[0111] In some embodiments of this application, to facilitate a better understanding of the data flow configuration method provided by the embodiments of this application, the following specific examples will be used to describe in detail the data flow configuration method provided by the embodiments of this application, such as... Figure 4 As shown, the data flow configuration method provided in this application embodiment includes steps 401-412.
[0112] Step 401: Obtain shooting mode information and first magnification information.
[0113] Step 401 is the same as step 210 above, and will not be repeated here.
[0114] Step 402: Determine whether the camera used to preview the shooting scene according to the first magnification information is the main camera. If yes, proceed to step 403; otherwise, proceed to step 404.
[0115] Before step 402, it is necessary to determine the types of N cameras. The specific determination method can be found in the above embodiment, and will not be repeated here.
[0116] Step 403: Configure everything except the navigation box flow.
[0117] In step 403, if the camera used to preview the shooting scene according to the first magnification information is determined to be the main camera, then the preview stream, the shooting stream and the SAT algorithm stream are configured for the main camera.
[0118] Step 404: Determine the configuration of the navigation box flow.
[0119] Step 405: Determine whether the first multiplier information is greater than the first threshold. If not, proceed to step 406. If yes, proceed to step 407.
[0120] Step 406: Neither the main camera nor the secondary camera is configured with a navigation frame stream.
[0121] Step 407: Determine if it is the main camera. If yes, proceed to step 408; otherwise, proceed to step 409.
[0122] In step 407, it can be determined whether the camera used to preview the shooting scene according to the first magnification information is the main camera. If yes, proceed to step 408; otherwise, proceed to step 409.
[0123] Step 408: Configure the navigation box flow.
[0124] Step 409: Do not configure the navigation box flow.
[0125] Step 410: Preview the scene without zoom.
[0126] In step 410, in the preview non-focus scene, it is determined whether the difference between the target secondary camera and the first magnification information in each secondary camera is less than the second threshold. If it is less, a preview stream and SAT algorithm stream are configured for the target secondary camera, and no preview stream and SAT algorithm stream are configured for the other secondary cameras in each secondary camera except the target secondary camera. If it is not less, no preview stream and SAT algorithm stream are configured for each secondary camera.
[0127] In step 410, before determining whether the difference between the target secondary camera and the first magnification information in each secondary camera is less than the second threshold, the target secondary camera must first be selected from each secondary camera. The specific selection method can be referred to the above embodiment, and will not be repeated here.
[0128] Step 411: Preview the zoom scene.
[0129] In step 410, in the preview zoom scene, the zoom speed is first calculated, and it is determined whether the zoom speed is greater than the first speed threshold. If it is greater, a preview stream and a SAT algorithm stream are configured for each secondary camera. If it is not greater, it is determined whether the difference between the target secondary camera and the first magnification information is less than the second threshold. If it is less, a preview stream and a SAT algorithm stream are configured for the target secondary camera, and no preview stream and SAT algorithm stream are configured for the other secondary cameras except the target secondary camera. If it is not less, no preview stream and SAT algorithm stream are configured for each secondary camera.
[0130] In step 410, the calculation method for zoom speed in the above embodiment can be referred to when calculating the zoom speed, and will not be repeated here.
[0131] Step 412, Photo Shooting Scene.
[0132] In step 412, during the photo-taking scenario, none of the secondary cameras are configured with a photo stream, a preview stream, or a SAT algorithm stream.
[0133] The data stream configuration method provided in this application can be executed by a data stream configuration device. This application uses an example of a data stream configuration device executing the data stream configuration method to illustrate the data stream configuration device provided in this application.
[0134] Figure 5 This is a schematic diagram illustrating the structure of a data stream configuration device according to an exemplary embodiment. For example... Figure 5 As shown, the data stream configuration device 500 may include:
[0135] The first acquisition module 510 is used to acquire shooting mode information and first magnification information, wherein the shooting mode information includes preview non-zoom mode, preview zoom mode and shooting mode;
[0136] The first determining module 520 is used to determine the types of N cameras used for shooting based on the first magnification information, where N is a positive integer and N≥2;
[0137] The second determining module 530 is used to determine the configuration of the navigation frame flow of the N cameras based on the first magnification information and the types of the N cameras;
[0138] The third determining module 540 is used to determine the configuration of the N camera preview stream, the photo stream, and the spatial alignment transformation SAT algorithm stream based on the shooting mode information and / or the types of the N cameras.
[0139] In this embodiment, when shooting a scene, the types of N cameras can be determined based on the first magnification information used when shooting the scene. Then, the configuration of the navigation frame streams of the N cameras can be determined based on the types of the N cameras and the first magnification information. Furthermore, based on the shooting mode information of the camera application when shooting the scene and the types of the N cameras, the configuration of the preview stream, the photo stream, and the spatial alignment transformation (SAT) algorithm stream of the N cameras can be determined. Compared to the prior art where all data streams are configured for each frame of an image when shooting a scene, the solution in this embodiment dynamically configures the data stream for each frame of an image based on the shooting mode information and the first magnification information of the scene. This maintains the smoothness of switching cameras when the user zooms in on the preview image and the response speed when the user takes a photo, while reducing power consumption waste.
[0140] In some embodiments of this application, the magnification information of each of the N cameras is different, and the types of the N cameras include main cameras and secondary cameras; the first determining module 520 is specifically used for:
[0141] Calculate the difference between the first magnification information and the magnification information of the N cameras respectively to obtain the first magnification difference corresponding to the N cameras respectively;
[0142] The camera corresponding to the smallest positive real number among the first magnification differences of the N cameras is determined as the main camera, and the other cameras among the N cameras besides the main camera are determined as secondary cameras.
[0143] In some embodiments of this application, the second determining module 530 is specifically used for:
[0144] If the camera used to preview the shooting scene according to the first magnification information is determined to be the main camera, and the first magnification information is less than the first threshold, then no navigation frame flow is configured for the main camera.
[0145] If the camera used to preview the shooting scene according to the first magnification information is determined to be the main camera, and the first magnification information is greater than or equal to the first threshold, a navigation frame flow is configured for the main camera.
[0146] If it is determined that the camera used to preview the shooting scene according to the first magnification information is a secondary camera, and the first magnification information is less than the first threshold, then no navigation frame flow is configured for the secondary camera;
[0147] If it is determined that the camera used to preview the shooting scene according to the first magnification information is a secondary camera, and the first magnification information is greater than or equal to the first threshold, then a navigation frameflow is not configured for the main camera.
[0148] In some embodiments of this application, the third determining module 540 may include:
[0149] The first determining unit is configured to configure the preview stream, the photo stream, and the SAT algorithm stream for the main camera when it is determined that the camera used to preview the shooting scene according to the first magnification information is the main camera.
[0150] The second determining unit is used to determine the configuration of each of the secondary camera's preview stream, photo stream, and SAT algorithm stream based on the shooting mode information, when it is determined that the camera used to preview the shooting scene according to the first magnification information is a secondary camera.
[0151] In some embodiments of this application, when the shooting mode information includes a preview non-focus mode, the second determining unit is specifically used for:
[0152] Select the secondary camera whose magnification is closest to the first magnification information from all the secondary cameras to obtain the target secondary camera;
[0153] If the first magnification difference corresponding to the target secondary camera is determined to be less than the second threshold, the preview stream and the SAT algorithm stream are configured for the target secondary camera, and the preview stream and the SAT algorithm stream are not configured for the other secondary cameras among the secondary cameras except for the target secondary camera.
[0154] In some embodiments of this application, when the shooting mode information includes a preview zoom mode, the screenshot taken by the second determining unit is used for:
[0155] Based on the first magnification information, the second magnification information, and the preview frame rate of the preview image of the shooting scene, the rate of change of the magnification when previewing the shooting scene is determined, wherein the second magnification information is the magnification information of the preview image before the first magnification information is obtained;
[0156] If the rate of change is determined to be greater than a first speed threshold, the preview stream and the SAT algorithm stream are configured for each of the secondary cameras.
[0157] If the rate of change is determined to be less than or equal to the first speed threshold, the secondary camera whose magnification is closest to the first magnification information is selected from the secondary cameras to obtain the target secondary camera; if the first magnification difference corresponding to the target secondary camera is determined to be less than the second threshold, the preview stream and the SAT algorithm stream are configured for the target secondary camera, and the preview stream and the SAT algorithm stream are not configured for the other secondary cameras besides the target secondary camera.
[0158] In some embodiments of this application, when the shooting mode information includes a photo mode, the second determining unit is specifically used for:
[0159] Do not configure a photo stream, preview stream, and SAT algorithm stream for each of the aforementioned secondary cameras.
[0160] The data flow configuration device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the specific device.
[0161] The data flow configuration device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.
[0162] The data stream configuration device provided in this application embodiment can achieve... Figure 2 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0163] Optionally, such as Figure 6 As shown, this application embodiment also provides an electronic device 600, including a processor 601 and a memory 602. The memory 602 stores a program or instructions that can run on the processor 601. When the program or instructions are executed by the processor 601, they implement the various steps of the above-described data flow configuration method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0164] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0165] Figure 7 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0166] The electronic device 700 includes, but is not limited to, components such as: radio frequency unit 701, network module 702, audio output unit 703, input unit 704, sensor 705, display unit 706, user input unit 707, interface unit 708, memory 709, and processor 710.
[0167] Those skilled in the art will understand that the electronic device 700 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 710 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 7 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0168] The processor 710 is configured to acquire shooting mode information and first magnification information, wherein the shooting mode information includes preview non-focus mode, preview zoom mode, and photo mode; determine the types of N cameras used for shooting based on the first magnification information, where N is a positive integer and N≥2; determine the configuration of the navigation frame streams of the N cameras based on the first magnification information and the types of the N cameras; and determine the configuration of the preview stream, photo stream, and spatial alignment transform (SAT) algorithm stream of the N cameras based on the shooting mode information and / or the types of the N cameras.
[0169] Thus, when shooting a scene, the types of N cameras can be determined based on the first magnification information used when shooting the scene. Then, based on the types of N cameras and the first magnification information, the configuration of the navigation frame streams of the N cameras can be determined. Furthermore, based on the shooting mode information of the camera application when shooting the scene and the types of the N cameras, the configuration of the preview stream, the capture stream, and the spatial alignment transformation (SAT) algorithm stream of the N cameras can be determined. Compared to the prior art where all data streams are configured for each frame of the image when shooting a scene, the solution of this application embodiment dynamically configures the data stream for each frame of the image based on the shooting mode information and the first magnification information of the scene. This maintains the smoothness of switching cameras when the user zooms in on the preview image and the response speed when the user takes a picture, while reducing power consumption waste.
[0170] Optionally, the magnification information of each of the N cameras is different, and the types of the N cameras include main cameras and secondary cameras; the processor 710 is further configured to calculate the difference between the first magnification information and the magnification information of the N cameras respectively, to obtain the first magnification difference value corresponding to the N cameras respectively; the camera corresponding to the smallest positive real number among the first magnification differences corresponding to the N cameras is determined as the main camera, and the other cameras among the N cameras besides the main camera are determined as secondary cameras.
[0171] Thus, by calculating the difference between the first magnification information and the magnification information of the N cameras, the first magnification difference corresponding to the N cameras is obtained. Then, the camera corresponding to the smallest positive real number among the first magnification differences of the N cameras can be determined as the main camera, and the other cameras among the N cameras besides the main camera can be determined as the secondary cameras. In this way, the main camera and the secondary cameras can be accurately determined.
[0172] Optionally, the processor 710 is further configured to: 1) not configure a navigation frameflow for the main camera when it is determined that the camera used for previewing the shooting scene according to the first magnification information is the main camera, and the first magnification information is less than a first threshold; 2) configure a navigation frameflow for the main camera when it is determined that the camera used for previewing the shooting scene according to the first magnification information is the main camera, and the first magnification information is greater than or equal to the first threshold; 3) not configure a navigation frameflow for the secondary camera when it is determined that the camera used for previewing the shooting scene according to the first magnification information is the secondary camera, and the first magnification information is less than the first threshold; and 4) not configure a navigation frameflow for the main camera when it is determined that the camera used for previewing the shooting scene according to the first magnification information is the secondary camera, and the first magnification information is greater than or equal to the first threshold.
[0173] Thus, compared to the prior art where a navigation frame stream is configured for every frame of an image when shooting a scene, this embodiment dynamically configures the navigation frame stream for the camera used when previewing the scene according to the first magnification information based on whether the first magnification information reaches a first threshold for the navigation frame to appear, and the type of camera used when previewing the scene according to the first magnification information. This maintains the smoothness of switching cameras when the user zooms in on the preview image and the response speed when the user takes a picture, while reducing power consumption waste.
[0174] Optionally, the processor 710 is further configured to configure the preview stream, the photo stream, and the SAT algorithm stream for the main camera when it is determined that the camera used to preview the shooting scene according to the first magnification information is the main camera; and to determine the configuration of the preview stream, photo stream, and SAT algorithm stream of each secondary camera according to the shooting mode information when it is determined that the camera used to preview the shooting scene according to the first magnification information is the secondary camera.
[0175] Thus, by dynamically determining the configuration of the preview stream, photo stream, and SAT algorithm stream of the N cameras based on the shooting mode information and / or the types of the N cameras, the configuration of the preview stream, photo stream, and SAT algorithm stream can be accurately determined.
[0176] Optionally, if the shooting mode information includes a preview non-focus mode, the processor 710 is further configured to select the secondary camera whose magnification is closest to the first magnification information from among the secondary cameras to obtain a target secondary camera; if it is determined that the first magnification difference corresponding to the target secondary camera is less than a second threshold, the processor configures the preview stream and the SAT algorithm stream for the target secondary camera, and does not configure the preview stream and the SAT algorithm stream for the other secondary cameras among the secondary cameras besides the target secondary camera.
[0177] Thus, by selecting the secondary camera whose magnification is closest to the first magnification information from among the secondary cameras, the target secondary camera is obtained. If the difference in the first magnification corresponding to the target secondary camera is less than the second threshold, a preview stream and a SAT algorithm stream are configured for the target secondary camera, and no preview stream and SAT algorithm stream are configured for the other secondary cameras besides the target secondary camera. In this way, the data stream configured for the secondary camera can be accurately determined.
[0178] Optionally, when the shooting mode information includes a preview zoom mode, the processor 710 is further configured to determine the rate of change of the magnification when previewing the shooting scene based on the first magnification information, the second magnification information, and the preview frame rate of the preview image of the shooting scene, wherein the second magnification information is the magnification information of the preview image zoomed to the level before the first magnification information; if the rate of change is determined to be greater than a first speed threshold, the preview stream and the SAT algorithm stream are configured for each of the secondary cameras; if the rate of change is determined to be less than or equal to the first speed threshold, the secondary camera whose magnification is closest to the first magnification information is selected from the secondary cameras to obtain the target secondary camera; if the first magnification difference corresponding to the target secondary camera is determined to be less than a second threshold, the preview stream and the SAT algorithm stream are configured for the target secondary camera, and the preview stream and the SAT algorithm stream are not configured for the other secondary cameras besides the target secondary camera.
[0179] Thus, when the shooting mode information includes the preview zoom mode, the rate of change of the magnification when previewing the shooting scene is determined based on the first magnification information, the second magnification information and the preview frame rate of the preview image of the shooting scene. Based on the comparison between the rate of change and the first speed threshold, the preview stream and SAT algorithm stream are dynamically configured for each secondary camera, so that the configuration of the preview stream and SAT algorithm stream of each secondary camera can be accurately determined.
[0180] Optionally, if the shooting mode information includes a photo mode, the processor 710 is also configured not to configure a photo stream, a preview stream, and a SAT algorithm stream for each of the secondary cameras.
[0181] In this way, when the camera application is in shooting mode, no shooting stream, preview stream, or SAT algorithm stream is configured for each secondary camera, thus avoiding power waste.
[0182] It should be understood that, in this embodiment, the input unit 704 may include a graphics processing unit (GPU) 7041 and a microphone 7042. The GPU 7041 processes image data of still images or videos obtained by an image capture device (such as a color camera) in video capture mode or image capture mode. The display unit 706 may include a display panel 7061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 707 includes at least one of a touch panel 7071 and other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0183] The memory 709 can be used to store software programs and various data. The memory 709 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 709 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 709 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0184] Processor 710 may include one or more processing units; optionally, processor 710 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 710.
[0185] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described data flow configuration method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0186] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0187] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above data flow configuration method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0188] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0189] This application provides a computer program product that is stored in a storage medium and executed by at least one processor to implement the various processes of the data flow configuration method embodiment described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0190] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0191] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0192] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A data stream configuration method, characterized in that, The method includes: Acquire shooting mode information and first magnification information, wherein the shooting mode information includes preview non-zoom mode, preview zoom mode and shooting mode. The preview zoom mode refers to the scene where the camera application is in the preview image scene of the shooting scene before the user clicks the shooting control in the camera application, and zooms on the preview image of the shooting scene. The shooting mode is the scene where the user clicks the shooting control in the camera application and takes a picture of the preview image of the shooting scene. Based on the first magnification information, the types of N cameras used for shooting are determined, where N is a positive integer and N≥2. The magnification information of each of the N cameras is different, and the types of the N cameras include main cameras and secondary cameras. Based on the first magnification information and the types of the N cameras, determine the configuration of the navigation frame flow for the N cameras; Based on the shooting mode information and / or the types of the N cameras, determine the configuration of the N camera preview stream, photo stream, and spatial alignment transform SAT algorithm stream; The step of determining the types of the N cameras used for shooting based on the first magnification information includes: Calculate the difference between the first magnification information and the magnification information of the N cameras respectively to obtain the first magnification difference corresponding to the N cameras respectively; The camera corresponding to the smallest positive real number among the first magnification differences of the N cameras is determined as the main camera, and the other cameras among the N cameras besides the main camera are determined as secondary cameras.
2. The method according to claim 1, characterized in that, The step of determining the configuration of the navigation frame flow for the N cameras based on the first magnification information and the types of the N cameras includes: If the camera used to preview the shooting scene according to the first magnification information is determined to be the main camera, and the first magnification information is less than the first threshold, then no navigation frame flow is configured for the main camera. If the camera used to preview the shooting scene according to the first magnification information is determined to be the main camera, and the first magnification information is greater than or equal to the first threshold, a navigation frame flow is configured for the main camera. If it is determined that the camera used to preview the shooting scene according to the first magnification information is a secondary camera, and the first magnification information is less than the first threshold, then no navigation frame flow is configured for the secondary camera; If it is determined that the camera used to preview the shooting scene according to the first magnification information is a secondary camera, and the first magnification information is greater than or equal to the first threshold, then a navigation frameflow is not configured for the main camera.
3. The method according to claim 1, characterized in that, The step of determining the configuration of the N camera preview stream, image stream, and Spatial Alignment Transform (SAT) algorithm stream based on the shooting mode information and / or the types of the N cameras includes: When it is determined that the camera used to preview the shooting scene according to the first magnification information is the main camera, the preview stream, the shooting stream and the SAT algorithm stream are configured for the main camera; If it is determined that the camera used to preview the shooting scene according to the first magnification information is a secondary camera, the configuration of the preview stream, photo stream and SAT algorithm stream of each secondary camera is determined according to the shooting mode information.
4. The method according to claim 3, characterized in that, When the shooting mode information includes a preview non-focus mode, determining the configuration of the preview stream, image stream, and SAT algorithm stream for each secondary camera based on the shooting mode information includes: Select the secondary camera whose magnification is closest to the first magnification information from all the secondary cameras to obtain the target secondary camera; If the first magnification difference corresponding to the target secondary camera is determined to be less than the second threshold, the preview stream and the SAT algorithm stream are configured for the target secondary camera, and the preview stream and the SAT algorithm stream are not configured for the other secondary cameras among the secondary cameras except for the target secondary camera.
5. The method according to claim 3, characterized in that, When the shooting mode information includes a preview zoom mode, determining the configuration of the preview stream, image stream, and SAT algorithm stream for each of the secondary cameras based on the shooting mode information includes: Based on the first magnification information, the second magnification information, and the preview frame rate of the preview image of the shooting scene, the rate of change of the magnification when previewing the shooting scene is determined, wherein the second magnification information is the magnification information of the preview image before the first magnification information is obtained; If the rate of change is determined to be greater than a first speed threshold, the preview stream and the SAT algorithm stream are configured for each of the secondary cameras. If the rate of change is determined to be less than or equal to the first speed threshold, the secondary camera whose magnification is closest to the first magnification information is selected from the secondary cameras to obtain the target secondary camera; if the first magnification difference corresponding to the target secondary camera is determined to be less than the second threshold, the preview stream and the SAT algorithm stream are configured for the target secondary camera, and the preview stream and the SAT algorithm stream are not configured for the other secondary cameras besides the target secondary camera.
6. The method according to claim 3, characterized in that, When the shooting mode information includes a photo mode, determining the configuration of the preview stream, photo stream, and spatial alignment transform (SAT) algorithm stream for each secondary camera based on the shooting mode information includes: Do not configure a photo stream, preview stream, and SAT algorithm stream for each of the aforementioned secondary cameras.
7. A data stream configuration device, characterized in that, The device includes: The first acquisition module is used to acquire shooting mode information and first magnification information. The shooting mode information includes preview without zoom mode, preview zoom mode and shooting mode. The preview zoom mode refers to the scene where the user has not yet clicked the shooting control in the camera application, the camera application is in the preview image scene of the shooting scene, and the preview image of the shooting scene is zoomed. The shooting mode is the scene where the user clicks the shooting control in the camera application and takes a picture of the preview image of the shooting scene. The first determining module is used to determine the types of N cameras used for shooting based on the first magnification information, where N is a positive integer and N≥2, and the magnification information of each of the N cameras is different, and the types of the N cameras include main cameras and secondary cameras; The second determining module is used to determine the configuration of the navigation frame flow of the N cameras based on the first magnification information and the types of the N cameras; The third determining module is used to determine the configuration of the N camera preview stream, the photo stream, and the spatial alignment transformation SAT algorithm stream based on the shooting mode information and / or the types of the N cameras; The first determining module is specifically used for: Calculate the difference between the first magnification information and the magnification information of the N cameras respectively to obtain the first magnification difference corresponding to the N cameras respectively; The camera corresponding to the smallest positive real number among the first magnification differences of the N cameras is determined as the main camera, and the other cameras among the N cameras besides the main camera are determined as secondary cameras.
8. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the data flow configuration method as described in any one of claims 1-6.
9. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the data stream configuration method as described in any one of claims 1-6.
Citation Information
Patent Citations
Shooting method and electronic equipment
CN111010506A
Shooting zooming method, electronic equipment and storage medium
CN113840076A
Image sensor control method and device, system on chip, equipment and medium
CN117915165A
