Shooting preview method, device, electronic device and storage medium
By adding judgment function to the camera control module during the shooting preview process, reducing the frequency of sending request information to the sensor module, solving the problem of high power consumption and delay during the shooting preview process, and improving the smoothness of the preview image.
Patent Information
- Application Number
- CN202310153845.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2043-02-21
AI Technical Summary
During the preview process, the power consumption and delay are high, resulting in low picture fluency of the preview image.
The camera control module determines whether to send request information to the sensor module, based on the magnification and image information of the preview image. Without sending request information, the sensor module multiplexes the original data of the previous frame preview image to output the next frame preview image.
Reduces power consumption and delay during shooting preview and improves the picture smoothness of the preview image.
Smart Images

Figure CN116156315B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of terminal technology, and specifically relates to a shooting preview method, device, electronic device and storage medium. Background Art
[0002] Before users use the camera application (APP) of electronic devices such as smartphones to take pictures, they usually determine the timing of taking pictures based on the preview image. In order to see distant objects or scenery clearly, the user can adjust the magnification of the preview image while the camera remains unchanged. The electronic device can automatically switch the current best performing camera based on the magnification to provide the user with a preview image.
[0003] In the related technology, when an electronic device displays a preview image, regardless of whether the camera is switched, the request information sent by the camera APP to the camera control module will continue to be sent to the sensor module, which will increase the power consumption and delay of the sensor module, 3A module and laser module during the shooting preview process, and the smoothness of the preview image will also be reduced. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a shooting preview method, device, electronic device and storage medium, which can solve the problems of high power consumption and delay in the shooting preview process, and low picture smoothness of the preview image.
[0005] In a first aspect, an embodiment of the present application provides a shooting preview method, the method comprising:
[0006] Displaying a preview interface, wherein the preview interface includes an N-th frame preview image, where N is a positive integer;
[0007] Based on at least one of the magnification of the preview image and the image information, determining, by the camera control module, whether to send request information to the sensor module;
[0008] When the camera control module determines not to send request information to the sensor module, the sensor module multiplexes the original data of the Nth frame preview image to output the N+1th frame preview image;
[0009] When the camera control module determines to send request information to the sensor module, the sensor module outputs the N+1th frame preview image based on the request information.
[0010] In a second aspect, an embodiment of the present application provides a shooting preview device, the device comprising:
[0011] A display module, used to display a preview interface, wherein the preview interface includes an N-th frame preview image, where N is a positive integer;
[0012] a determination module, configured to determine, through the camera control module, whether to send request information to the sensor module based on at least one of the magnification of the preview image and the image information;
[0013] The output module is used to multiplex the original data of the Nth frame preview image through the sensor module and output the N+1th frame preview image when the camera control module determines that no request information is sent to the sensor module;
[0014] When the camera control module determines to send request information to the sensor module, the sensor module outputs the N+1th frame preview image based on the request information.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0017] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0018] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0019] In an embodiment of the present application, based on the magnification of the preview image of the N+1th frame, the magnification of the preview image of the previous N frames and the image information, the camera control module determines whether to send request information to the sensor module. If it is determined not to send the request information, the sensor module reuses the original data of the preview image of the Nth frame and outputs the preview image of the N+1th frame; if it is determined to send the request information, the sensor module outputs the preview image of the N+1th frame based on the request information. By adding a judgment function to the camera control module, when the magnification of the preview image and the image information remain basically unchanged, the camera control module is prevented from continuously sending request information to the sensor module, thereby reducing power consumption and delay in the shooting preview process, and improving the picture smoothness of the preview image. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1It is a flowchart of a shooting preview method provided by the related art;
[0021] Figure 2 This is one of the flowcharts of the shooting preview method provided in the embodiment of the present application;
[0022] Figure 3 This is the second flow chart of the shooting preview method provided in the embodiment of the present application;
[0023] Figure 4 This is the third flow chart of the shooting preview method provided in the embodiment of the present application;
[0024] Figure 5 is a structural schematic diagram of a shooting preview device provided in an embodiment of the present application;
[0025] Figure 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0026] Figure 7 It is a hardware schematic diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0028] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0029] First, the following contents are introduced:
[0030] When users use the camera APP of electronic devices such as smartphones to take pictures, in order to see distant objects clearly, they can generally slide to change the magnification (zoom radio) of the preview image in the UI (User Interface) interface of the camera APP, and then change the field of view (Fov) to achieve a change in imaging distance. At this time, the viewing angle of the camera APP will not be changed, that is, the position of the camera of the electronic device remains basically unchanged.
[0031] When the preview image magnification changes, it is usually accompanied by the switching of cameras with different focal lengths. In order to provide users with a better imaging experience, the camera control module can generally be used to switch cameras, and the best performing camera is selected to provide the user with a preview image for shooting. Therefore, when the user switches the preview image to a specific magnification, the camera will be switched.
[0032] By switching multiple cameras, the preview image's FOV can be guaranteed to be sufficiently continuous, and users can be prevented from directly feeling the switching of the background cameras, and a clear and stable preview image can always be provided to users. However, regardless of whether the camera is switched, the request information sent by the camera app to the camera control module will be continuously sent down to the sensor module, resulting in increased delay and power consumption during the shooting preview process.
[0033] In the related technology, the preview function of the camera APP of the electronic device can realize finer granularity and higher magnification shooting preview, automatically switch the camera in the background through the camera control module, select the best performing camera, and provide users with better preview images.
[0034] Figure 1 is a flowchart of a shooting preview method provided by related technology, such as Figure 1 As shown, the method includes the following process:
[0035] First, after the user starts the camera APP of the electronic device, the electronic device can display a preview interface, and the camera APP can send request information to the camera control module at regular intervals, and the request information can carry the magnification information of the preview image at the current moment.
[0036] For example, after the user starts the camera APP of the electronic device, the electronic device can display a preview interface, and the camera APP can send a request message to the camera control module every 33ms. The request message can carry the magnification factor information of the preview image at 9:12 time being magnified by 1.2 times.
[0037] For example, after the user starts the camera APP of the electronic device, the electronic device can display a preview interface, and the camera APP can send a request message to the camera control module every 35ms. The request message can carry the magnification factor information of the preview image magnified 3 times at 15:20.
[0038] The camera control module can determine the activated camera according to the camera recommendation result given by the Fallback module, and the activated camera can continuously output the raw data of the preview image to the sensor module.
[0039] The sensor module may send raw data of the preview image to the 3A module and the laser module, and based on the raw data of the preview image, the sensor module may send the preview image to the camera APP.
[0040] When the preview image is uploaded to the camera APP, the 3A module and the laser module can calculate the image information contained in the raw data of the preview image, update it to the Metadata, and then send it to the Fallback module.
[0041] At the same time, the Fallback module can give recommended activated camera information based on the latest image information and send it to the camera control module.
[0042] For example, the camera control module can determine to activate the camera based on the camera recommendation result given by the Fallback module, and the activated camera can send the raw data of the 7th frame preview image to the sensor module; the sensor module can send the raw data of the 7th frame preview image to the 3A module and the laser module, and based on the raw data of the 7th frame preview image, the sensor can send the 7th frame preview image to the camera APP; in the process of uploading the 7th frame preview image to the camera APP, the 3A module and the laser module can calculate the image information contained in the raw data of the 7th frame preview image, and update it to Metadata, and then send it to the Fallback module; the Fallback module can give the recommended activation camera information based on the image information of the 7th frame preview image, and send it to the camera control module. The camera control module can determine the activated camera according to the camera recommendation result given by the Fallback module. The activated camera can output the raw data of the 8th frame preview image to the sensor module; the sensor module can send the raw data of the 8th frame preview image to the 3A module and the laser module. Based on the raw data of the 8th frame preview image, the sensor can send the 8th frame preview image to the camera APP; in the process of uploading the 8th frame preview image to the camera APP, the 3A module and the laser module can calculate the image information contained in the raw data of the 8th frame preview image, update it to Metadata, and then send it to the Fallback module to form a dynamic closed loop.
[0043] Optionally, the electronic device may include a camera APP, a camera control module, a sensor module, a 3A module, a laser module and a Fallback module.
[0044] Finally, the camera APP can deliver the preview image of the sensor to the preview interface through subsequent processing.
[0045] In summary, the methods of related technologies all rely on request information to be sent to the sensor module, which causes certain power consumption and delay to the camera App, and even affects the smoothness of the preview image.
[0046] The shooting preview method, device, electronic device and storage medium provided in the embodiments of the present application can reduce power consumption and delay during camera preview and improve the picture smoothness of shooting preview.
[0047] The following, in conjunction with the accompanying drawings, describes in detail the shooting preview method, device, electronic device and storage medium provided by the embodiments of the present application through specific embodiments and their application scenarios.
[0048] Figure 2 is one of the flow charts of the shooting preview method provided in the embodiment of the present application, such as Figure 2 As shown, the execution subject of the shooting preview method may be an electronic device, and the method may include the following steps:
[0049] Step 200, displaying a preview interface, wherein the preview interface includes an Nth frame preview image, where N is a positive integer;
[0050] Optionally, the electronic device may display a preview interface.
[0051] Optionally, the electronic device may include various electronic devices such as a mobile terminal, a mobile phone, a computer, or a wearable smart device.
[0052] Optionally, the electronic device may include a camera control module and a sensor module.
[0053] Optionally, the camera control module can control the working status of different cameras in a multi-camera electronic device.
[0054] Optionally, the camera control module can control the camera to start.
[0055] Optionally, the camera control module can control the camera to be turned off.
[0056] Optionally, the camera control module may determine whether to send the request information to the sensor module.
[0057] Optionally, the sensor module may output image data of the preview interface.
[0058] Optionally, when the user uses the electronic device to take a photo, the preview interface may include a frame of preview image captured by the camera at the current moment.
[0059] Optionally, when the magnification and image information of the first N frames of preview images remain substantially unchanged, the preview interface may include the Nth frame of preview image.
[0060] Optionally, N may be 1, 6, 35, etc., which is not limited in the embodiment of the present application.
[0061] For example, when the camera APP sends request information to the camera control module every 0.03 seconds, when the user starts the camera APP of the electronic device at 8:11, the electronic device can display a preview interface, and the preview interface can display the first frame preview image at 8:11; after 0.03 seconds, the preview interface can display the second frame preview image; after another 0.09 seconds, the preview interface can display the fifth frame preview image.
[0062] For example, when the camera APP sends request information to the camera control module every 0.04s, when the user starts the camera APP of the electronic device at 8:20, the electronic device can display a preview interface, and the preview interface can display the first frame preview image at 8:20; after 0.04s, the preview interface can display the second frame preview image; after another 0.16s, the preview interface can display the sixth frame preview image.
[0063] Optionally, the camera APP can send a request message at an interval of 33ms and return a frame of image data.
[0064] Optionally, the camera APP can send a request message at an interval of 35ms and return a frame of image data.
[0065] Step 210, based on at least one of the magnification of the preview image and the image information, determining, by the camera control module, whether to send request information to the sensor module;
[0066] Optionally, the camera control module may determine whether to send request information to the sensor module based on the first magnification factor, the second magnification factor of the first N preview images, and the image information of the first N preview images.
[0067] Optionally, the second magnification factor may include magnification factors of the first N frames of preview images.
[0068] For example, when N is 3, the second magnification may include a magnification of 1.2 times for the first preview image, a magnification of 1.2 times for the second preview image, and a magnification of 1.2 times for the third preview image.
[0069] For example, when N is 5, the second magnification may include a magnification of 1.2 times for the first preview frame, 1.3 times for the second preview frame, 1.5 times for the third preview frame, 1.1 times for the fourth preview frame, and 2 times for the fifth preview frame.
[0070] Optionally, the image information may include picture information, environment information, and focus distance information of the preview image.
[0071] Optionally, if the image information of the first N frames of preview images remains basically unchanged, and when the first magnification factor is basically the same as the second magnification factor, it means that the preview image of the N+1th frame will be basically the same as the preview image of the Nth frame, then the camera control module can determine not to send a request information to the sensor module.
[0072] Optionally, if the image information of the first N frames of preview images changes beyond a certain range, when the first magnification factor is substantially the same as the second magnification factor, indicating that the N+1th frame preview image will be different from the Nth frame preview image, the camera control module may determine to send a request message to the sensor module.
[0073] Optionally, if the change value between the first magnification and the second magnification exceeds a certain range, indicating that the preview image of the N+1th frame will be different from the preview image of the Nth frame, the camera control module may determine to send a request message to the sensor module.
[0074] Step 220, when the camera control module determines not to send request information to the sensor module, the sensor module multiplexes the original data of the Nth frame preview image and outputs the N+1th frame preview image; when the camera control module determines to send request information to the sensor module, the sensor module outputs the N+1th frame preview image based on the request information.
[0075] Optionally, the original data may include picture information, environment information, focus distance information, etc. of the preview image.
[0076] Optionally, if the first magnification is substantially the same as the second magnification, and the image information of the first N frames of preview images remains substantially unchanged, the camera control module may determine not to send a request message to the sensor module, and the sensor module may be unable to obtain the raw data of the new preview image and may only output the preview image based on the raw data of the previous frame of preview image. Therefore, the sensor module may reuse the raw data of the Nth frame of preview image and output the N+1th frame of preview image, and the N+1th frame of preview image is substantially the same as the Nth frame of preview image.
[0077] Optionally, if the image information of the first N frames of preview images remains basically unchanged, the camera control module can determine not to send request information to the sensor module. The sensor module cannot obtain the original data of the new preview image and can only output the preview image based on the original data of the previous frame of preview image. Therefore, the sensor module can reuse the original data of the Nth frame preview image and output the N+1th frame preview image. The N+1th frame preview image is basically the same as the Nth frame preview image.
[0078] Optionally, if the image information of the first N frames of preview images changes beyond a certain range, the camera control module can determine to send a request message to the sensor module, the sensor module can obtain the original data of the new preview image, and the sensor module can output the N+1th frame preview image based on the first magnification, and the N+1th frame preview image is different from the Nth frame preview image.
[0079] Optionally, if the change value between the first magnification and the second magnification exceeds a certain range, the camera control module can determine to send a request message to the sensor module, the sensor module can obtain the original data of the new preview image, and the sensor module can output the N+1th frame preview image based on the request information. The N+1th frame preview image is different from the Nth frame preview image.
[0080] Optionally, if the change value of the first magnification and the second magnification exceeds a certain range, and the image information change of the first N frames of preview images exceeds a certain range, the camera control module can determine to send a request message to the sensor module, the sensor module can obtain the original data of the new preview image, and the sensor module can output the N+1th frame preview image based on the request information, and the N+1th frame preview image is different from the Nth frame preview image.
[0081] Figure 3 This is a second flow chart of the shooting preview method provided in the embodiment of the present application. Figure 3 As shown, the method includes the following process:
[0082] First, after the user starts the camera APP of the electronic device, the electronic device can display a preview interface, and the camera APP can send request information to the camera control module at regular intervals, and the request information can carry the magnification information of the preview image at the current moment.
[0083] For example, after the user opens the camera APP of the electronic device, the electronic device can display a preview interface, and the camera APP can send a request message to the camera control module every 33ms. The request message can carry the magnification factor information of the preview image at 9:12 time being magnified by 1.2 times.
[0084] For example, after the user opens the camera APP of the electronic device, the electronic device can display a preview interface, and the camera APP can send a request message to the camera control module every 35ms. The request message can carry the magnification factor information of the preview image magnified 3 times at 15:20.
[0085] The camera control module can determine the activated camera according to the camera recommendation result given by the Fallback module, and the activated camera can continuously output the raw data of the preview image to the sensor module.
[0086] The sensor module may send raw data of the preview image to the 3A module and the laser module, and based on the raw data of the preview image, the sensor module may send the preview image to the camera APP.
[0087] When the preview image is uploaded to the camera APP, the 3A module and the laser module can calculate the image information contained in the raw data of the preview image, update it to the Metadata, and then send it to the Fallback module.
[0088] Optionally, the Fallback module may provide recommended activated camera information based on the latest image information and send it to the camera control module.
[0089] Optionally, the Fallback module may send the image information to the camera control module. Based on the magnification information and the image information of the preview image, the camera control module may determine whether to continue to send the request information to the sensor module.
[0090] Optionally, the electronic device may include a camera APP, a camera control module, a sensor module, a 3A module, a laser module, a Metadata and a Fallback module.
[0091] Optionally, the camera APP can transmit the preview image of the sensor to the preview interface through subsequent processing.
[0092] Optionally, the subsequent processing may include the camera APP sending raw data of the preview image of the sensor module to Metadata and the camera APP delivering the preview image of the sensor to the preview interface.
[0093] For example, when the camera control module determines to continue sending request information to the sensor module, the camera control module can determine to activate the camera based on the camera recommendation result given by the Fallback module, and the activated camera can send the raw data of the 7th frame preview image to the sensor module; the sensor module can send the raw data of the 7th frame preview image to the 3A module and the laser module, and based on the raw data of the 7th frame preview image, the sensor can send the 7th frame preview image to the camera APP; in the process of uploading the 7th frame preview image to the camera APP, the 3A module and the laser module can calculate the image information contained in the raw data of the 7th frame preview image, and update it to Metadata, and then send it to the Fallback module; the Fallback module can give recommended activation camera information based on the image information of the 7th frame preview image, and send it to the camera control module. The camera control module can determine the activated camera according to the camera recommendation result given by the Fallback module. The activated camera can output the raw data of the 8th frame preview image to the sensor module; the sensor module can send the raw data of the 8th frame preview image to the 3A module and the laser module. Based on the raw data of the 8th frame preview image, the sensor can send the 8th frame preview image to the camera APP; in the process of uploading the 8th frame preview image to the camera APP, the 3A module and the laser module can calculate the image information contained in the raw data of the 8th frame preview image, update it to Metadata, and then send it to the Fallback module to form a dynamic closed loop.
[0094] For example, when the camera control module determines not to continue sending request information to the sensor module, the Fallback module can give recommended activation camera information based on the image information of the 7th frame preview image, and send it to the camera control module; the camera control module can determine to activate the camera based on the camera recommendation result given by the Fallback module, and the activated camera can send the original data of the 7th frame preview image to the sensor module; based on the original data of the 7th frame preview image, the sensor can send the 7th frame preview image to the camera APP; in the process of uploading the 7th frame preview image to the camera APP, based on the image information of the 7th frame preview image in the Fallback module, the camera control module determines not to switch the camera, reuses the original data of the 7th frame preview image, and the sensor module can output the 8th frame preview image.
[0095] In an embodiment of the present application, based on the magnification of the preview image of the N+1th frame, the magnification of the preview image of the previous N frames and the image information, the camera control module determines whether to send request information to the sensor module. If it is determined not to send the request information, the sensor module reuses the original data of the preview image of the Nth frame and outputs the preview image of the N+1th frame; if it is determined to send the request information, the sensor module outputs the preview image of the N+1th frame based on the request information. By adding a judgment function to the camera control module, when the magnification of the preview image and the image information remain basically unchanged, the camera control module is prevented from continuously sending request information to the sensor module, thereby reducing power consumption and delay in the shooting preview process, and improving the picture smoothness of the preview image.
[0096] Optionally, determining, by the camera control module, not to send request information to the sensor module comprises at least one of the following:
[0097] When the camera control module determines that the difference between the first magnification of the N+1th frame preview image and the reference value of the second magnification of the previous N frames preview image is less than the difference threshold, it is determined not to send the request information to the sensor module, and the reference value of the second magnification of the previous N frames preview image is determined based on the second magnification of the previous N frames preview image;
[0098] When the camera control module determines that the reference value corresponding to the image information of the first N frames of preview images is less than the reference value threshold corresponding to the image information, determining not to send the request information to the sensor module;
[0099] The request information carries the first magnification factor, and the reference value corresponding to the image information of the first N preview images is determined based on the image information of the first N preview images and an average value of the image information of the first N preview images.
[0100] Optionally, the first magnification factor may include a magnification factor of the (N+1)th frame preview image.
[0101] Optionally, the camera APP can send the first magnification factor to the camera control module.
[0102] Optionally, the first magnification may represent a magnification of the preview image desired by the user when shooting.
[0103] Optionally, the first magnification may be 1.2 times, 3 times, 6 times, etc., which is not limited in the embodiment of the present application.
[0104] Optionally, the request information may carry the first magnification.
[0105] Optionally, when the camera control module determines that the difference between the first magnification factor and the reference value of the second magnification factor of the first N frames of preview images is less than a difference threshold, the first magnification factor can be written into Metadata, and the Metadata also includes image information of the first N frames of preview images.
[0106] Optionally, if the difference between the reference value of the first magnification and the second magnification of the preview image of the first N frames determined by the camera control module is less than the difference threshold, and the reference values corresponding to each type of image information of the preview image of the first N frames determined by the camera control module are respectively less than the reference value thresholds corresponding to each type of image information, indicating that the preview image of the N+1th frame will be basically the same as the preview image of the Nth frame, the camera control module can determine not to send the request information to the sensor module.
[0107] Optionally, if the camera control module determines that the reference values corresponding to each type of image information of the first N frames of preview images are respectively less than the reference value thresholds corresponding to each type of image information, indicating that the N+1th frame preview image will be basically the same as the Nth frame preview image, then the camera control module can determine not to send a request information to the sensor module.
[0108] Optionally, since the sensor module is only a hardware without software control, it can only output a preview image based on the original data of the previous preview image when it is unable to obtain the original data of the new preview image. Therefore, the sensor module can reuse the original data of the Nth frame preview image and output the N+1th frame preview image, and the N+1th frame preview image is basically the same as the Nth frame preview image.
[0109] Optionally, the image information may include picture information, environment information, and focus distance information of the preview image.
[0110] In an embodiment of the present application, when the camera control module determines that the difference between the first magnification and the reference value of the second magnification of the preview image of the previous N frames is less than the difference threshold, and when the camera control module determines that the reference value corresponding to the image information of the preview image of the previous N frames is less than the reference value threshold corresponding to the image information, it is determined not to send request information to the sensor module, so as to avoid the camera control module from continuously sending request information to the sensor module when the magnification and image information of the preview image remain basically unchanged, thereby reducing power consumption and delay in the shooting preview process, and improving the picture smoothness of the preview image.
[0111] Optionally, determining, by the camera control module, to send request information to the sensor module comprises at least one of the following:
[0112] In the case where the camera control module determines that the difference between the first magnification of the N+1th frame preview image and the reference value of the second magnification of the previous N frames preview image is greater than or equal to the difference threshold, determining to send request information to the sensor module, wherein the reference value of the second magnification of the previous N frames preview image is determined based on the second magnification of the previous N frames preview image;
[0113] When the reference value corresponding to the image information of the first N frames of preview images is greater than or equal to the reference value threshold corresponding to the image information, determining to send request information to the sensor module;
[0114] The request information carries the first magnification factor, and the reference value corresponding to the image information of the first N preview images is determined based on the image information of the first N preview images and an average value of the image information of the first N preview images.
[0115] Optionally, if the camera control module determines that the difference between the first magnification and the reference value of the second magnification of the preview image of the first N frames is greater than or equal to the difference threshold, indicating that the preview image of the N+1th frame will be different from the preview image of the Nth frame, the camera control module can determine to send a request information to the sensor module.
[0116] Optionally, if the reference value corresponding to at least one type of image information of the first N frames of preview images is greater than or equal to a reference value threshold corresponding to the image information, and when the camera control module determines that the difference between the first magnification factor and the reference value of the second magnification factor of the first N frames of preview images is less than the difference threshold, indicating that the preview image of the N+1th frame will be different from the preview image of the Nth frame, the camera control module can determine to send a request information to the sensor module.
[0117] Optionally, if the reference value corresponding to at least one type of image information of the first N frames of preview images is greater than or equal to the reference value threshold corresponding to the image information, indicating that the N+1th frame preview image will be different from the Nth frame preview image, the camera control module can determine to send a request information to the sensor module.
[0118] Optionally, if the camera control module determines that the difference between the first magnification and the reference value of the second magnification of the preview image of the first N frames is greater than or equal to the difference threshold, and the reference value corresponding to at least one type of image information of the preview image of the first N frames is greater than or equal to the reference value threshold corresponding to the image information, indicating that the preview image of the N+1th frame will be different from the preview image of the Nth frame, the camera control module can determine to send a request information to the sensor module.
[0119] Optionally, when the camera control module determines to send a request message to the sensor module, the sensor module can obtain the original data of the new preview image, and the sensor module can output the N+1th frame preview image based on the first magnification, and the N+1th frame preview image is different from the Nth frame preview image.
[0120] In an embodiment of the present application, when the difference between the reference values of the first magnification and the second magnification is determined by the camera control module to be greater than or equal to the difference threshold, or when the difference between the reference values of the first magnification and the second magnification is determined by the camera control module to be less than the difference threshold, and the reference values corresponding to each type of image information of the first N frames of preview images are respectively less than the reference value thresholds corresponding to each type of image information, it is determined not to send request information to the sensor module, so that request information is sent to the sensor module only when the magnification or image information of the preview image changes beyond a certain range, and request information is not sent to the sensor module in other cases, so as to avoid the camera control module constantly sending request information to the sensor module, reduce power consumption and delay during shooting and previewing, and improve the picture smoothness of the preview image.
[0121] Optionally, the reference value of the second magnification of the first N frames of preview images is
[0122] Among them, the preview interface at time t displays the preview image of frame N+1, ratio t Indicates the first magnification of the request information at time t, ratio t-i Indicates the second magnification stored by the camera control module at time ti.
[0123] Optionally, the preview interface at time ti can display the preview image of the N+1-ith frame, and the second magnification stored in the camera control module at time ti can be expressed as ratio t-i , that is, the magnification of the preview image of the N+1-ith frame can be expressed as ratio t-i .
[0124] For example, the preview interface at time t-1 can display the Nth frame preview image, and the second magnification stored in the camera control module at time t-1 can be expressed as ratio t-1 , that is, the magnification of the Nth frame preview image can be expressed as ratio t-1 .
[0125] For example, the preview interface at time t-2 can display the preview image of frame N-1, and the second magnification stored in the camera control module at time t-2 can be expressed as ratio t-2 , that is, the magnification of the N-1th frame preview image can be expressed as ratiot-2 .
[0126] Optionally, when the camera control module determines that the difference between the first magnification factor and the reference value of the second magnification factor of the preview image of the first N frames is less than a difference threshold, the camera control module can determine whether to send a request information to the sensor module by comparing the reference values corresponding to each type of image information of the preview image of the first N frames with the reference value thresholds corresponding to each type of image information.
[0127] Optionally, if the camera control module determines that the difference between the first magnification and the reference value of the second magnification of the first N frames of preview images is greater than or equal to a difference threshold, the camera control module may determine to send a request message to the sensor module.
[0128] Optionally, the reference value of the second magnification of the first N frames of preview images may be
[0129] Optionally, in order to compare the magnification information, the camera control module can obtain the second magnification information of the first N frames of preview images stored in the Metadata, and compare it with the first magnification ratio. t The specific comparison method is as follows:
[0130]
[0131] Optionally, in formula (1), N can be the number of the first N preview images to be compared, and ratio t It can be the first magnification carried by the request information at time t, ratio t-i It may be the second magnification factor stored by the camera control module at time ti, and Δratio may be a preset difference threshold.
[0132] Optionally, a smaller N indicates a lower tolerance to changes in magnification of the preview image.
[0133] Optionally, when N=1 and Δratio=0, the process is consistent with the original process.
[0134] Optionally, N may be a smaller positive integer, such as 1, 2, 5, etc.
[0135] Optionally, Δratio may be a smaller value greater than 0 and less than 1, such as 0.05, 0.1, or 0.2.
[0136] Optionally, if the second magnification information of the previous N frames is equal to the ratio t Basically the same, then we can use ratio tThe information is written into Metadata, and then the camera control module can determine whether the image information change value of the preview image is less than the threshold, thereby determining whether to send the request information to the sensor module.
[0137] In an embodiment of the present application, a reference value of the second magnification is determined based on the second magnification of the preview image of the first N frames and the average value of the second magnification of the preview image of the first N frames. The camera control module determines whether to send a request message to the sensor module by comparing the difference between the first magnification and the reference value of the second magnification. When the difference is less than the difference threshold, the camera control module does not send a request message to the sensor module, thereby avoiding the camera control module from continuously sending a request message to the sensor module, reducing power consumption and delay in the shooting preview process, and improving the picture smoothness of the preview image.
[0138] Optionally, the image information includes at least one of the following types of information: image brightness information, camera focus distance information, and camera exposure information;
[0139] The reference value corresponding to the image brightness information is
[0140] Among them, the preview interface at time t displays the preview image of frame N+1. Indicates the average value of the image brightness information of the first N frames of preview images, lux t-i Indicates the brightness value corresponding to the image brightness information of the preview image at time ti;
[0141] The reference value corresponding to the camera exposure information is
[0142] Among them, the preview interface at time t displays the preview image of frame N+1. Indicates the average value of the camera exposure information of the first N frames of preview images, ev t-i Indicates the exposure value corresponding to the camera exposure information of the preview image at time ti;
[0143] The reference value corresponding to the camera focus distance information is
[0144] Among them, the preview interface at time t displays the preview image of frame N+1. Indicates the average value of the camera focus distance information of the first N frames of preview images. t-i Indicates the distance value corresponding to the camera focus distance information of the preview image at time ti.
[0145] Optionally, the preview interface at time ti can display the preview image of the N+1-ith frame, and the brightness value corresponding to the image brightness information of the preview image at time ti can be expressed as luxt-i , that is, the brightness value corresponding to the image brightness information of the N+1-i frame preview image can be expressed as lux t-i .
[0146] For example, the preview interface at time t-1 can display the preview image of the Nth frame, and the brightness value corresponding to the image brightness information of the preview image at time t-1 can be expressed as lux t-1 , that is, the brightness value corresponding to the image brightness information of the Nth frame preview image can be expressed as lux t-1 .
[0147] For example, the preview interface at time t-2 can display the preview image of frame N-1, and the brightness value corresponding to the image brightness information of the preview image at time t-2 can be expressed as lux t-2 , that is, the brightness value corresponding to the image brightness information of the N-1th frame preview image can be expressed as lux t-2 .
[0148] Optionally, the preview interface at time ti can display the preview image of the N+1-ith frame, and the exposure value corresponding to the camera exposure information of the preview image at time ti can be expressed as ev t-i , that is, the exposure value corresponding to the camera exposure information of the N+1-i frame preview image can be expressed as ev t-i .
[0149] For example, the preview interface at time t-1 can display the Nth frame preview image, and the exposure value corresponding to the camera exposure information of the preview image at time t-1 can be expressed as ev t-1 , that is, the exposure value corresponding to the camera exposure information of the Nth frame preview image can be expressed as ev t-1 .
[0150] For example, the preview interface at time t-2 can display the preview image of frame N-1, and the exposure value corresponding to the camera exposure information of the preview image at time t-2 can be expressed as ev t-2 , that is, the exposure value corresponding to the camera exposure information of the N-1th frame preview image can be expressed as ev t-2 .
[0151] Optionally, the preview interface at time ti can display the preview image of the N+1-ith frame, and the distance value corresponding to the camera focus distance information of the preview image at time ti can be expressed as focus t-i , that is, the distance value corresponding to the camera focus distance information of the N+1-i frame preview image can be expressed as focus t-i .
[0152] For example, the preview interface at time t-1 can display the preview image of the Nth frame, and the distance value corresponding to the camera focus distance information of the preview image at time t-1 can be expressed as focust-1 , that is, the distance value corresponding to the camera focus distance information of the Nth frame preview image can be expressed as focus t-1 .
[0153] For example, the preview interface at time t-2 can display the preview image of frame N-1, and the distance value corresponding to the camera focus distance information of the preview image at time t-2 can be expressed as focus t-2 , that is, the distance value corresponding to the camera focus distance information of the N-1th frame preview image can be expressed as focus t-2 .
[0154] Optionally, when the camera control module determines that the difference between the first magnification and the reference value of the second magnification of the previous N frames of preview images is less than a difference threshold, it is necessary to continue to compare image information of the previous N frames of preview images.
[0155] Optionally, when the user does not move the lens all the time when using the preview function of the camera APP, the camera can remain fixed in order to capture a certain picture.
[0156] Optionally, by further comparing the image information of the preview image, the camera control module can determine whether it is possible to avoid further sending the request information to the sensor module.
[0157] Optionally, if the reference values corresponding to each type of image information of the first N frames of preview images are respectively less than the reference value thresholds corresponding to each type of image information, the camera APP may directly return to the preview interface.
[0158] Optionally, the image information may include image brightness information.
[0159] Optionally, the image information may include camera focus distance information.
[0160] Optionally, the image information may include camera exposure information.
[0161] Optionally, the image information may include image brightness information and camera focus distance information.
[0162] Optionally, the image information may include image brightness information and camera exposure information.
[0163] Optionally, the image information may include camera focus distance information and camera exposure information.
[0164] Optionally, the image information may include image brightness information, camera focus distance information, and camera exposure information.
[0165] Optionally, when the user is in different environments, the environment brightness information may change, resulting in a change in the image brightness information.
[0166] Optionally, when the user is in the same environment, the ambient brightness information may also change over time, resulting in changes in the image brightness information.
[0167] Optionally, in order to display the preview image required by the user on the preview interface, the camera control module may compare the image brightness information in the preview image.
[0168] Optionally, time t-1 may correspond to image brightness information, camera exposure information, and camera focus distance information of the Nth frame preview image.
[0169] Optionally, when the request information has not yet been sent to the sensor module, the camera control module cannot obtain the brightness information lux at the current time t. t , by comparing the image brightness information of the previous N frames of preview images, it can be determined whether to send the request information to the sensor module. The specific comparison method is as follows:
[0170]
[0171]
[0172] Optionally, in formula (2), N can be the number of the first N preview images to be compared, lux t-i It can represent the brightness value corresponding to the image brightness information of the preview image at time ti. It can represent the average value of the image brightness information of the first N frames of preview images. It can represent a preset reference value threshold of image brightness information.
[0173] Optionally, It can be pre-set to 0.6, or 0.65, or 0.7, etc., and this embodiment of the present application is not limited to this.
[0174] Optionally, in different environments, in order to clearly restore the scenery seen by the human eye, it is necessary to set the exposure parameters correctly. However, whether the exposure parameters are automatically set by the camera APP or manually set by the user, the preview image may be too dark or overexposed. By comparing the camera exposure information of the preview image, it can be determined whether to send the request information to the sensor module.
[0175] Optionally, when the request information has not yet been sent to the sensor module, the camera control module cannot obtain the camera exposure information at the current time t. The camera exposure information of the previous N frames of preview images can be compared to determine whether to send the request information to the sensor module. The specific comparison method is as follows:
[0176]
[0177]
[0178] Optionally, in formula (4), N may be the number of the first N preview images to be compared, It can represent the average value of the camera exposure information of the first N frames of preview images, ev t-i It can represent the exposure value corresponding to the camera exposure information of the preview image at time ti. It can represent the preset reference value threshold of camera exposure information.
[0179] Optionally, It can be pre-set to 1.30, or 1.31, or 1.33, etc., and this embodiment of the present application is not limited to this.
[0180] Optionally, the distance information in the camera APP generally comes from two sources, namely, camera focus distance information and camera laser distance information.
[0181] Optionally, when the electronic device is equipped with a laser module, the distance information in the camera APP may include camera focus distance information and camera laser distance information.
[0182] Optionally, when the electronic device is not equipped with a laser module, the distance information in the camera APP may include camera focus distance information.
[0183] Optionally, when the laser confidence is less than or equal to 1, or the shooting scene is glass, the camera control module can determine whether to send request information to the sensor module based on the camera focus distance information.
[0184] Optionally, when the request information has not yet been sent to the sensor module, the camera control module cannot obtain the camera focus distance information at the current time t. The camera focus distance information of the previous N frames of preview images can be compared to determine whether to send the request information to the sensor module. The specific comparison method is as follows:
[0185]
[0186]
[0187] Optionally, in formula (6), N may be the number of the first N preview images to be compared, It can represent the average value of the camera focus distance information of the first N frames of preview images. t-i It can represent the distance value corresponding to the camera focus distance information of the preview image at time ti. It can represent a preset reference value threshold of the camera focus distance.
[0188] Optionally, It can be pre-set to 1.32, or 1.35, or 1.36, etc., and this embodiment of the present application is not limited to this.
[0189] Figure 4 This is a third flow chart of the shooting preview method provided in the embodiment of the present application, such as Figure 4 As shown, the method includes the following process:
[0190] Optionally, the camera control module may determine whether a difference between the first magnification factor and a reference value of a second magnification factor of the previous N frames of preview images is less than a difference threshold.
[0191] Optionally, when the difference between the reference values of the first magnification and the second magnification is less than a difference threshold, if the camera control module determines that the reference values corresponding to the image brightness information, camera distance information and camera exposure information of the first N frames of preview images are respectively less than the reference value thresholds corresponding to each type of image information, it is determined not to send a request information to the sensor module.
[0192] Optionally, when the difference between the reference values of the first magnification and the second magnification is less than the difference threshold, if the camera control module determines that the reference value corresponding to the image brightness information of the first N frames of preview images is greater than or equal to its corresponding reference value threshold, it determines to send a request information to the sensor module.
[0193] Optionally, when the difference between the reference values of the first magnification and the second magnification is less than the difference threshold, if the camera control module determines that the reference value corresponding to the camera distance information of the first N frames of preview images is greater than or equal to its corresponding reference value threshold, it determines to send a request information to the sensor module.
[0194] Optionally, when the difference between the reference values of the first magnification and the second magnification is less than the difference threshold, if the camera control module determines that the reference value corresponding to the camera exposure information of the first N frames of preview images is greater than or equal to its corresponding reference value threshold, it determines to send a request information to the sensor module.
[0195] Optionally, when the difference between the reference values of the first magnification and the second magnification is less than the difference threshold, if the camera control module determines that the reference values corresponding to the image brightness information and the camera distance information of the first N frames of preview images are greater than or equal to their corresponding reference value thresholds, it determines to send a request information to the sensor module.
[0196] Optionally, when the difference between the reference values of the first magnification and the second magnification is less than the difference threshold, if the camera control module determines that the reference values corresponding to the image brightness information and the camera exposure information of the first N frames of preview images are greater than or equal to their corresponding reference value thresholds, it determines to send a request information to the sensor module.
[0197] Optionally, when the difference between the reference values of the first magnification and the second magnification is less than the difference threshold, if the camera control module determines that the reference values corresponding to the camera distance information and the camera exposure information of the first N frames of preview images are greater than or equal to their corresponding reference value thresholds, it determines to send a request information to the sensor module.
[0198] Optionally, when the difference between the reference values of the first magnification and the second magnification is less than a difference threshold, if the camera control module determines that the reference values corresponding to the image brightness information, camera distance information and camera exposure information of the first N frames of preview images are greater than or equal to their corresponding reference value thresholds, it determines to send a request information to the sensor module.
[0199] Optionally, if the difference between the reference values of the first magnification factor and the second magnification factor is greater than or equal to a difference threshold, it is determined to send request information to the sensor module.
[0200] In an embodiment of the present application, based on the reference values corresponding to the image brightness information, camera focus distance information and camera exposure information of the first N frames of preview images, the camera control module determines whether to send request information to the sensor module by comparing the size relationship between the above image information and the corresponding reference value threshold, so that when all reference values are less than the difference threshold, the camera control module does not send request information to the sensor module, thereby avoiding the camera control module from continuously sending request information to the sensor module, reducing power consumption and delay in the shooting preview process, and improving the picture smoothness of the preview image.
[0201] Optionally, in the case where the electronic device includes a laser module, the image information also includes camera laser distance information, and the reference value corresponding to the camera laser distance information is
[0202] Among them, the preview interface at time t displays the preview image of frame N+1. Indicates the average value of the camera laser distance information corresponding to the first N frames of preview images, laser t-i Indicates the distance value corresponding to the camera laser distance information of the preview image at time ti.
[0203] Optionally, the preview interface at time ti can display the preview image of the N+1-ith frame, and the distance value corresponding to the camera laser distance information of the preview image at time ti can be expressed as laser t-i , that is, the distance value corresponding to the camera laser distance information of the N+1-i frame preview image can be expressed as laser t-i .
[0204] For example, the preview interface at time t-1 can display the preview image of the Nth frame, and the distance value corresponding to the camera laser distance information of the preview image at time t-1 can be expressed as laser t-1 , that is, the distance value corresponding to the camera laser distance information of the Nth frame preview image can be expressed as laser t-1 .
[0205] For example, the preview interface at time t-2 can display the preview image of frame N-1, and the distance value corresponding to the camera laser distance information of the preview image at time t-2 can be expressed as laser t-2 , that is, the distance value corresponding to the camera laser distance information of the N-1th frame preview image can be expressed as laser t-2 .
[0206] Optionally, when the electronic device is equipped with a laser module, the distance information in the camera APP may include camera focus distance information and camera laser distance information.
[0207] Optionally, when the electronic device is equipped with a laser module, the camera control module may add an additional judgment link.
[0208] Optionally, when the laser confidence is greater than 1 and the shooting scene is not glass, the camera control module can determine whether to send request information to the sensor module based on the camera laser distance information.
[0209] Optionally, time t-1 may correspond to the camera laser distance information of the Nth frame preview image.
[0210] Optionally, when the request information has not yet been sent to the sensor module, the camera control module cannot obtain the camera laser distance information at the current time t. The camera laser distance information of the previous N frames of preview images can be compared to determine whether to send the request information to the sensor module. The specific comparison method is as follows:
[0211]
[0212]
[0213] Optionally, in formula (8), N may be the number of the first N preview images to be compared, It can represent the average value of the camera laser distance information corresponding to the first N frames of preview images, laser t-i Indicates the distance value corresponding to the camera laser distance information of the preview image at time ti. It can represent a preset reference value threshold of the camera laser distance.
[0214] Optionally, It can be pre-set to 1.52, or 1.55, or 1.56, etc., and this embodiment of the present application is not limited to this.
[0215] Optionally, when the difference between the reference values of the first magnification and the second magnification is less than the difference threshold, if the camera control module determines that the reference value corresponding to the camera laser distance information of the first N frames of preview images is greater than or equal to its corresponding reference value threshold, it determines to send a request information to the sensor module.
[0216] In an embodiment of the present application, based on the reference value corresponding to the camera laser distance information of the first N frames of preview images, the camera control module determines whether to send request information to the sensor module by comparing the size relationship between the above image information and its corresponding reference value threshold, so that when the reference value of the camera laser distance is less than the difference threshold, the camera control module does not send request information to the sensor module, thereby avoiding the camera control module from continuously sending request information to the sensor module, reducing power consumption and delay in the shooting preview process, and improving the picture smoothness of the preview image.
[0217] The shooting preview method provided in the embodiment of the present application can be executed by a shooting preview device. In the embodiment of the present application, the shooting preview device provided in the embodiment of the present application is described by taking the shooting preview device executing the shooting preview method as an example.
[0218] Figure 5 is a structural diagram of a shooting preview device provided in an embodiment of the present application, such as Figure 5 As shown, the shooting preview device includes: a display module 510, a judgment module 520 and an output module 530.
[0219] Display module 510, used to display a preview interface, the preview interface includes the Nth frame preview image, where N is a positive integer;
[0220] A determination module 520, configured to determine, through the camera control module, whether to send request information to the sensor module based on at least one of the magnification of the preview image and the image information;
[0221] The output module 530 is used to multiplex the original data of the Nth frame preview image through the sensor module and output the N+1th frame preview image when the camera control module determines not to send the request information to the sensor module;
[0222] When the camera control module determines to send request information to the sensor module, the sensor module outputs the N+1th frame preview image based on the request information.
[0223] In an embodiment of the present application, based on the magnification of the preview image of the N+1th frame, the magnification of the preview image of the previous N frames and the image information, the camera control module determines whether to send request information to the sensor module. If it is determined not to send the request information, the sensor module reuses the original data of the preview image of the Nth frame and outputs the preview image of the N+1th frame; if it is determined to send the request information, the sensor module outputs the preview image of the N+1th frame based on the request information. By adding a judgment function to the camera control module, when the magnification of the preview image and the image information remain basically unchanged, the camera control module is prevented from continuously sending request information to the sensor module, thereby reducing power consumption and delay in the shooting preview process, and improving the picture smoothness of the preview image.
[0224] Optionally, the device further comprises at least one of the following:
[0225] A first determination module is used to determine, through a camera control module, that a difference between a first magnification of the N+1th frame preview image and a reference value of a second magnification of the previous N frames preview image is less than a difference threshold, wherein the reference value of the second magnification of the previous N frames preview image is determined based on the second magnification of the previous N frames preview image;
[0226] A second determination module is used to determine not to send request information to the sensor module when the camera control module determines that the reference value corresponding to the image information of the first N frames of preview images is less than the reference value threshold corresponding to the image information;
[0227] The request information carries the first magnification factor, and the reference value corresponding to the image information of the first N preview images is determined based on the image information of the first N preview images and an average value of the image information of the first N preview images.
[0228] Optionally, the device further comprises at least one of the following:
[0229] a third determining module, configured to determine to send a request message to the sensor module when the camera control module determines that the difference between the first magnification of the N+1th frame preview image and the reference value of the second magnification of the previous N frames preview image is greater than or equal to the difference threshold, wherein the reference value of the second magnification of the previous N frames preview image is determined based on the second magnification of the previous N frames preview image;
[0230] A fourth determination module, configured to determine to send request information to the sensor module when the reference value corresponding to the image information of the first N frames of preview images is greater than or equal to the reference value threshold corresponding to the image information;
[0231] The request information carries the first magnification factor, and the reference value corresponding to the image information of the first N preview images is determined based on the image information of the first N preview images and an average value of the image information of the first N preview images.
[0232] Optionally, the reference value of the second magnification of the first N frames of preview images is
[0233] The request information at time t carries the magnification information of the preview image of frame N+1, ratio t Indicates the first magnification of the request information at time t, ratio t-i Indicates the second magnification stored by the camera control module at time ti.
[0234] Optionally, the image information includes at least one of the following types of information: image brightness information, camera focus distance information, and camera exposure information;
[0235] The reference value corresponding to the image brightness information is
[0236] Among them, the image brightness information of the preview image at time t-1 corresponds to the Nth frame, Indicates the average value of the image brightness information of the first N frames of preview images, lux t-i Indicates the brightness value corresponding to the image brightness information of the preview image at time ti;
[0237] The reference value corresponding to the camera exposure information is
[0238] Among them, time t-1 corresponds to the camera exposure information of the Nth frame preview image, Indicates the average value of the camera exposure information of the first N frames of preview images, ev t-i Indicates the exposure value corresponding to the camera exposure information of the preview image at time ti;
[0239] The reference value corresponding to the camera focus distance information is
[0240] Among them, the time t-1 corresponds to the camera focus distance information of the Nth frame preview image, Indicates the average value of the camera focus distance information of the first N frames of preview images. t-i Indicates the distance value corresponding to the camera focus distance information of the preview image at time ti.
[0241] Optionally, in the case where the electronic device includes a laser module, the image information also includes camera laser distance information, and the reference value corresponding to the camera laser distance information is
[0242] Among them, the camera laser distance information corresponding to the Nth frame preview image at time t-1 is Indicates the average value of the camera laser distance information corresponding to the first N frames of preview images, laser t-i Indicates the distance value corresponding to the camera laser distance information of the preview image at time ti.
[0243] In an embodiment of the present application, based on the magnification of the preview image of the N+1th frame, the magnification of the preview image of the previous N frames and the image information, the camera control module determines whether to send request information to the sensor module. If it is determined not to send the request information, the sensor module reuses the original data of the preview image of the Nth frame and outputs the preview image of the N+1th frame; if it is determined to send the request information, the sensor module outputs the preview image of the N+1th frame based on the first magnification. By adding a judgment function to the camera control module, when the magnification and image information of the preview image remain basically unchanged, the camera control module is prevented from continuously sending request information to the sensor module, thereby reducing power consumption and delay in the shooting preview process, and improving the picture smoothness of the preview image.
[0244] The shooting preview device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0245] The shooting preview device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0246] The shooting preview device provided in the embodiment of the present application can achieve Figures 2 to 4 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0247] Optionally, Figure 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 6 As shown, an embodiment of the present application further provides an electronic device 600, including a processor 601 and a memory 602, wherein the memory 602 stores a program or instruction that can be executed on the processor 601, and when the program or instruction is executed by the processor 601, each step of the above-mentioned shooting preview method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0248] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0249] Figure 7 is a hardware schematic diagram of an electronic device provided in an embodiment of the present application, such as Figure 7 As shown, an embodiment of the present application also provides an electronic device.
[0250] The electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710.
[0251] Those skilled in the art will appreciate that the electronic device 700 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 710 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0252] The display unit 706 is used to: display a preview interface, wherein the preview interface includes an N-th frame preview image, wherein N is a positive integer;
[0253] The audio output unit 703 is used to: determine whether to send request information to the sensor module through the camera control module based on at least one of the magnification of the preview image and the image information;
[0254] The audio output unit 703 is further used to: when the camera control module determines not to send request information to the sensor module, multiplex the original data of the Nth frame preview image through the sensor module to output the N+1th frame preview image;
[0255] The audio output unit 703 is further used for: when the camera control module determines to send request information to the sensor module, outputting the N+1th frame preview image based on the request information through the sensor module.
[0256] In an embodiment of the present application, based on the magnification of the preview image of the N+1th frame, the magnification of the preview image of the previous N frames and the image information, the camera control module determines whether to send request information to the sensor module. If it is determined not to send the request information, the sensor module reuses the original data of the preview image of the Nth frame and outputs the preview image of the N+1th frame; if it is determined to send the request information, the sensor module outputs the preview image of the N+1th frame based on the request information. By adding a judgment function to the camera control module, when the magnification of the preview image and the image information remain basically unchanged, the camera control module is prevented from continuously sending request information to the sensor module, thereby reducing power consumption and delay in the shooting preview process, and improving the picture smoothness of the preview image.
[0257] Optionally, the processor 710 is further configured to perform at least one of the following:
[0258] Determining, by a camera control module, that a difference between a first magnification of the N+1th frame preview image and a reference value of a second magnification of the first N frames preview image is less than a difference threshold, wherein the reference value of the second magnification of the first N frames preview image is determined based on the second magnification of the first N frames preview image;
[0259] When the camera control module determines that the reference value corresponding to the image information of the first N frames of preview images is less than the reference value threshold corresponding to the image information, determining not to send the request information to the sensor module;
[0260] The request information carries the first magnification factor, and the reference value corresponding to the image information of the first N preview images is determined based on the image information of the first N preview images and an average value of the image information of the first N preview images.
[0261] Optionally, the processor 710 is further configured to perform at least one of the following:
[0262] In the case where the camera control module determines that the difference between the first magnification of the N+1th frame preview image and the reference value of the second magnification of the previous N frames preview image is greater than or equal to the difference threshold, determining to send request information to the sensor module, wherein the reference value of the second magnification of the previous N frames preview image is determined based on the second magnification of the previous N frames preview image;
[0263] When the reference value corresponding to the image information of the first N frames of preview images is greater than or equal to the reference value threshold corresponding to the image information, determining to send request information to the sensor module;
[0264] The request information carries the first magnification factor, and the reference value corresponding to the image information of the first N preview images is determined based on the image information of the first N preview images and an average value of the image information of the first N preview images.
[0265] In an embodiment of the present application, based on the magnification of the preview image of the N+1th frame, the magnification of the preview image of the previous N frames and the image information, the camera control module determines whether to send request information to the sensor module. If it is determined not to send the request information, the sensor module reuses the original data of the preview image of the Nth frame and outputs the preview image of the N+1th frame; if it is determined to send the request information, the sensor module outputs the preview image of the N+1th frame based on the request information. By adding a judgment function to the camera control module, when the magnification of the preview image and the image information remain basically unchanged, the camera control module is prevented from continuously sending request information to the sensor module, thereby reducing power consumption and delay in the shooting preview process, and improving the picture smoothness of the preview image.
[0266] It should be understood that in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and at least one of other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0267] The memory 709 can be used to store software programs and various data. The memory 709 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 709 may include a volatile memory or a non-volatile memory, or the memory 709 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 709 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0268] The processor 710 may include one or more processing units; optionally, the processor 710 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 710.
[0269] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned shooting preview method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0270] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0271] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned shooting preview method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0272] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0273] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned shooting preview method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0274] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0275] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0276] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A shooting preview method, characterized in that: Applied to electronic equipment, the method comprises: Displaying a preview interface, wherein the preview interface includes an N-th frame preview image, where N is a positive integer; Based on at least one of the magnification of the preview image and the image information, determining, by the camera control module, whether to send request information to the sensor module; When the camera control module determines not to send request information to the sensor module, the sensor module multiplexes the original data of the Nth frame preview image to output the N+1th frame preview image; When the camera control module determines to send request information to the sensor module, the sensor module outputs the N+1th frame preview image based on the request information.
2. The shooting preview method according to claim 1, characterized in that: The determining, by the camera control module, not to send the request information to the sensor module comprises at least one of the following: When the camera control module determines that the difference between the first magnification of the preview image of the N+1th frame and the reference value of the second magnification of the preview image of the previous N frames is less than the difference threshold, it is determined not to send the request information to the sensor module, and the reference value of the second magnification of the preview image of the previous N frames is determined based on the second magnification of the preview image of the previous N frames; When the camera control module determines that the reference value corresponding to the image information of the first N frames of preview images is less than the reference value threshold corresponding to the image information, determining not to send the request information to the sensor module; The request information carries the first magnification factor, and the reference value corresponding to the image information of the first N preview images is determined based on the image information of the first N preview images and an average value of the image information of the first N preview images.
3. The shooting preview method according to claim 1, characterized in that: The step of determining, by the camera control module, to send request information to the sensor module comprises at least one of the following: In the case where the camera control module determines that the difference between the first magnification of the N+1th frame preview image and the reference value of the second magnification of the previous N frames preview image is greater than or equal to the difference threshold, determining to send request information to the sensor module, wherein the reference value of the second magnification of the previous N frames preview image is determined based on the second magnification of the previous N frames preview image; When the reference value corresponding to the image information of the first N frames of preview images is greater than or equal to the reference value threshold corresponding to the image information, determining to send request information to the sensor module; The request information carries the first magnification factor, and the reference value corresponding to the image information of the first N preview images is determined based on the image information of the first N preview images and an average value of the image information of the first N preview images.
4. The shooting preview method according to claim 2 or 3, characterized in that: The reference value of the second magnification of the first N frames of preview images is The request information at time t carries the magnification information of the preview image of frame N+1, ratio t Indicates the first magnification of the request information at time t, ratio t-i Indicates the second magnification stored by the camera control module at time ti.
5. The shooting preview method according to claim 2 or 3, characterized in that: The image information includes at least one of the following types of information: image brightness information, camera focus distance information, and camera exposure information; The reference value corresponding to the image brightness information is Among them, the image brightness information of the preview image at time t-1 corresponds to the Nth frame, Indicates the average value of the image brightness information of the first N frames of preview images, lux t-i Indicates the brightness value corresponding to the image brightness information of the preview image at time ti; The reference value corresponding to the camera exposure information is Among them, time t-1 corresponds to the camera exposure information of the Nth frame preview image, Indicates the average value of the camera exposure information of the first N frames of preview images, ev t-i Indicates the exposure value corresponding to the camera exposure information of the preview image at time ti; The reference value corresponding to the camera focus distance information is Among them, the time t-1 corresponds to the camera focus distance information of the Nth frame preview image, Indicates the average value of the camera focus distance information of the first N frames of preview images. t-i Indicates the distance value corresponding to the camera focus distance information of the preview image at time ti.
6. The shooting preview method according to claim 5, characterized in that: In the case where the electronic device includes a laser module, the image information also includes camera laser distance information, and the reference value corresponding to the camera laser distance information is Among them, the camera laser distance information corresponding to the Nth frame preview image at time t-1 is Indicates the average value of the camera laser distance information corresponding to the first N frames of preview images, laser t-i Indicates the distance value corresponding to the camera laser distance information of the preview image at time ti.
7. A shooting preview device, characterized in that: The device comprises: A display module, used to display a preview interface, wherein the preview interface includes an N-th frame preview image, where N is a positive integer; a determination module, configured to determine, through the camera control module, whether to send request information to the sensor module based on at least one of the magnification of the preview image and the image information; The output module is used to multiplex the original data of the Nth frame preview image through the sensor module and output the N+1th frame preview image when the camera control module determines that no request information is sent to the sensor module; When the camera control module determines to send request information to the sensor module, the sensor module outputs the N+1th frame preview image based on the request information.
8. The shooting preview device according to claim 7, characterized in that: The device further comprises at least one of the following: A first determination module, configured to determine not to send request information to the sensor module when the difference between a first magnification factor of the preview image of the N+1th frame and a reference value of a second magnification factor of the preview image of the previous N frames is less than a difference threshold through the camera control module, wherein the reference value of the second magnification factor of the preview image of the previous N frames is determined based on the second magnification factor of the preview image of the previous N frames; A second determination module is used to determine not to send request information to the sensor module when the camera control module determines that the reference value corresponding to the image information of the first N frames of preview images is less than the reference value threshold corresponding to the image information; The request information carries the first magnification factor, and the reference value corresponding to the image information of the first N preview images is determined based on the image information of the first N preview images and an average value of the image information of the first N preview images.
9. The shooting preview device according to claim 7, characterized in that: The device further comprises at least one of the following: a third determining module, configured to determine to send a request message to the sensor module when the camera control module determines that the difference between the first magnification of the N+1th frame preview image and the reference value of the second magnification of the previous N frames preview image is greater than or equal to the difference threshold, wherein the reference value of the second magnification of the previous N frames preview image is determined based on the second magnification of the previous N frames preview image; A fourth determination module, configured to determine to send request information to the sensor module when the reference value corresponding to the image information of the first N frames of preview images is greater than or equal to the reference value threshold corresponding to the image information; The request information carries the first magnification factor, and the reference value corresponding to the image information of the first N preview images is determined based on the image information of the first N preview images and an average value of the image information of the first N preview images.
10. The shooting preview device according to claim 8 or 9, characterized in that: The reference value of the second magnification of the first N frames of preview images is The request information at time t carries the magnification information of the preview image of frame N+1, ratio t Indicates the first magnification of the request information at time t, ratio t-i Indicates the second magnification stored by the camera control module at time ti.
11. The shooting preview device according to claim 8 or 9, characterized in that: The image information includes at least one of the following types of information: image brightness information, camera focus distance information, and camera exposure information; The reference value corresponding to the image brightness information is Among them, the image brightness information of the preview image at time t-1 corresponds to the Nth frame, Indicates the average value of the image brightness information of the first N frames of preview images, lux t-i Indicates the brightness value corresponding to the image brightness information of the preview image at time ti; The reference value corresponding to the camera exposure information is Among them, time t-1 corresponds to the camera exposure information of the Nth frame preview image, Indicates the average value of the camera exposure information of the first N frames of preview images, ev t-i Indicates the exposure value corresponding to the camera exposure information of the preview image at time ti; The reference value corresponding to the camera focus distance information is Among them, the time t-1 corresponds to the camera focus distance information of the Nth frame preview image, Indicates the average value of the camera focus distance information of the first N frames of preview images. t-i Indicates the distance value corresponding to the camera focus distance information of the preview image at time ti.
12. The shooting preview device according to claim 11, characterized in that: In the case where the electronic device includes a laser module, the image information also includes camera laser distance information, and the reference value corresponding to the camera laser distance information is Among them, the camera laser distance information corresponding to the Nth frame preview image at time t-1 is Indicates the average value of the camera laser distance information corresponding to the first N frames of preview images, laser t-i Indicates the distance value corresponding to the camera laser distance information of the preview image at time ti.
13. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the shooting preview method according to any one of claims 1 to 6 are implemented.
14. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the shooting preview method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Image processing circuit, image processing method, electronic device, and readable storage medium
CN114286007A
Shooting method and device, electronic equipment and storage medium
CN115589458A