Camera control method and device and electronic equipment
By dynamically controlling the AON function of the camera based on image detection information in electronic devices, the problem of excessive power consumption due to high camera power consumption is solved, and the effect of extending the battery life of the electronic device is achieved.
Patent Information
- Application Number
- CN202411768233.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-28
AI Technical Summary
The normally open AON function of the camera in electronic devices leads to an increase in camera power consumption, excessive power consumption, and shorten the battery life.
By acquiring the detection information of the N-frame image collected by the electronic device, the AON function of the camera is turned off when the device is in a motion state, and the AON function is turned on when the device is not in a motion state.
Reduce camera power consumption, save power of electronic devices, and extend the battery life of electronic devices.
Smart Images

Figure CN119729198A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic device control, and specifically relates to a camera control method, device and electronic device. Background Art
[0002] Electronic devices can quickly respond to face unlocking, gesture screen control and other operations through the camera's Always-On (AON) function. Specifically, the AON function keeps the camera in an always-on state, collects images in real time, and performs face recognition through image analysis to unlock the electronic device.
[0003] However, the AON function requires the camera to remain always on and continuously collect images, which increases the power consumption of the camera, causes excessive power consumption of the electronic device, and shortens the battery life. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a camera control method, device, electronic device and storage medium, which can reduce the power consumption of the camera, save power of the electronic device, and extend the battery life of the electronic device.
[0005] In a first aspect, an embodiment of the present application provides a camera control method, including:
[0006] Acquire detection information, where the detection information includes N frames of images collected by the electronic device, where N is an integer greater than 1;
[0007] When the detection information indicates that the state of the electronic device is in motion, turning off the normally-on AON function of the camera;
[0008] When the electronic device is not in motion, turn on the AON function.
[0009] In a second aspect, an embodiment of the present application provides a control device, including:
[0010] An acquisition module, used to acquire detection information, where the detection information includes N frames of images collected by the electronic device, where N is an integer greater than 1;
[0011] A control module, used for turning off the normally-on AON function of the camera when the detection information indicates that the state of the electronic device is in motion;
[0012] The control module is also used to enable the AON function when the electronic device is not in motion.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, and when the program or instruction is executed by the processor, the steps of the camera control method shown in the first aspect are implemented.
[0014] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the camera control method shown in the first aspect are implemented.
[0015] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor and a display interface, the display interface and the processor are coupled, and the processor is used to run programs or instructions to implement the steps of the camera control method shown in the first aspect.
[0016] 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 steps of the camera control method shown in the first aspect.
[0017] In an embodiment of the present application, detection information can be obtained, the detection information includes N frames of images collected by the electronic device, and when the detection information indicates that the state of the electronic device is in motion, the normally open AON function of the camera is turned off, and then, when the electronic device is not in motion, the AON function is turned on. In this way, the AON function does not need to be kept normally open, which reduces the power consumption of the camera, saves the power of the electronic device, and extends the battery life of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart of a camera control method provided for some embodiments of the present application;
[0019] Figure 2 A schematic diagram of a flow chart of controlling the AON function to be turned off and on in a camera control method provided in some embodiments of the present application;
[0020] Figure 3 A schematic diagram of the structure of a control device provided in some embodiments of the present application;
[0021] Figure 4 A schematic diagram of the structure of an electronic device provided for some embodiments of the present application;
[0022] Figure 5 A schematic diagram of the hardware structure of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION
[0023] 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.
[0024] 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 terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of 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.
[0025] In related technologies, the AON function will keep a camera, such as the front camera of an electronic device, always on to continuously capture images. Then, based on the camera's motion detection (Motion Detect, MD) detection technology, the peripheral system in the electronic device determines whether there is movement of an object in the captured image. If it is determined that there is movement of an object, the camera's face detection (Face Detect, FD) technology can be used to detect whether the movement of the current object includes a face. When there is a face, the camera will be triggered to output a high-definition image with a high frame rate and high resolution. Then, the main system in the electronic device will be awakened to perform image analysis on the high-definition image, thereby executing corresponding functions, such as unlocking the electronic device.
[0026] Based on this, since the AON function requires the camera to remain open and continuously collect images, the power consumption of the camera will increase. In addition, changes in ambient light or the shaking of the electronic device in sports scenes such as running and walking can easily cause the main system to be mistakenly awakened and image analysis to be performed, further increasing the power consumption of the main system, causing the electronic device to consume too much power and shortening the battery life.
[0027] In order to solve the problems in the related art, the embodiments of the present application provide a camera control method, device, electronic device and storage medium. Figures 1 to 5 , the camera control method provided in the embodiment of the present application is described in detail through specific embodiments and their application scenarios.
[0028] First, combine Figure 1 A camera control method provided in an embodiment of the present application is described in detail.
[0029] Figure 1 A flowchart of a camera control method provided for some embodiments of the present application.
[0030] like Figure 1 As shown, the camera control method provided in the embodiment of the present application can be applied to electronic devices. Based on this, the camera control method can include steps 110 and 130 as shown below.
[0031] Step 110, obtaining detection information, the detection information includes N frames of images collected by the electronic device, N is an integer greater than 1; Step 120, when the detection information indicates that the state of the electronic device is in motion, turning off the normally-on AON function of the camera; Step 130, when the electronic device is not in motion, turning on the AON function.
[0032] Exemplarily, if N is 3, the electronic device collects 3 frames of images, namely, image 1, image 2, and image 3; then, through image 1, image 2, and image 3, it is determined whether the state of the electronic device is in motion. Then, if the blurriness of the photographed objects in image 1, image 2, and image 3 is high, that is, the effective facial contour cannot be recognized, it can be determined that the state of the electronic device is in motion, and the AON function of the camera is turned off. On the contrary, if the blurriness of the photographed objects in image 1, image 2, and image 3 is low, that is, the effective facial contour can be recognized, it can be determined that the electronic device is not in motion, and the AON function is turned on.
[0033] Therefore, the AON function does not need to be kept on all the time, which reduces the power consumption of the camera, saves power of electronic devices, and extends the battery life of electronic devices.
[0034] The above steps are described in detail below, as shown below.
[0035] Regarding step 110, in some embodiments of the present application, whether the state of the electronic device is in motion can be determined by the change in the difference value of at least two frames of images collected. Based on this, before step 110, the camera control method can also include steps 210 and 220.
[0036] Step 210 , comparing at least two frames of images among the N frames of images to obtain a difference value between the at least two frames of images.
[0037] Exemplarily, N frames of images are collected through the MD detection technology, wherein the N frames of images may be low-frame-rate, low-resolution images collected by a camera with an AON function to reduce the power consumption of the camera.
[0038] It should be noted that the difference value of at least two frames of images in the embodiment of the present application refers to the difference value of pixel points in at least two frames of images. Specifically, the difference value of pixel points in at least two frames of images can be calculated by grayscale value, color component, mean square error, peak signal-to-noise ratio, structural similarity index, etc.
[0039] Based on this, if the at least two frames of images include a first frame of image and a second frame of image, the difference value between the first frame of image and the second frame of image can be calculated based on the pixels of the first frame of image and the pixels of the second frame of image. Here, the following is an example of calculating the difference value between the first frame of image and the second frame of image by comparing the grayscale values or color components of adjacent or specific pixels.
[0040] Specifically, the first frame image and the second frame image are first grayscaled to obtain a grayscale first frame image and a grayscale second frame image. Then, the absolute value of the difference between the grayscale value of the pixel point of the grayscale first frame image and the grayscale value of the pixel point of the grayscale second frame image is determined as the difference value between the first frame image and the second frame image.
[0041] Alternatively, the color components of the three color channels R, G, and B of the first frame image are calculated respectively, and the color components of the three color channels R, G, and B of the second frame image are calculated respectively. Then, the difference value between the color component of the R color channel of the first frame image and the color component of the R color channel of the second frame image is obtained, and the difference value between the color component of the G color channel of the first frame image and the color component of the G color channel of the second frame image is obtained, and the difference value between the color component of the B color channel of the first frame image and the color component of the B color channel of the second frame image is obtained. Then, these difference values are weighted summed, and the value after the weighted summation is determined as the difference value between the first frame image and the second frame image.
[0042] If at least two frames of images include a first frame of image, a second frame of image, and a third frame of image, the difference values of the pixels of the first frame of image, the pixels of the second frame of image, and the pixels of the third frame of image may be calculated in accordance with at least one of the above methods. Specifically, the difference values of the pixels of the first frame of image and the pixels of the second frame of image may be calculated first to obtain a difference value 1 of the first frame of image and the second frame of image, and then the difference values of the pixels of the second frame of image and the pixels of the third frame of image may be calculated to obtain a difference value 2 of the second frame of image and the third frame of image. At this time, both the difference value 1 and the difference value 2 may be used as the difference value of at least two frames of image, and the average value of the difference value 1 and the difference value 2 may be used as the difference value of at least two frames of image.
[0043] Step 220: When the difference value is greater than or equal to the first threshold, determine that the state of the electronic device is a motion state.
[0044] Exemplarily, still taking the example in the above step 210 as an example, if the difference value of at least two frames of images is the difference value of the first frame of image and the second frame of image, then the difference value is greater than or equal to 10% of the total pixel points, then the state of the electronic device can be determined to be a motion state.
[0045] If the difference values of at least two frames of images are difference value 1 and difference value 2, then the state of the electronic device can be determined to be in motion if difference value 1 or difference value 2 is greater than or equal to 10% of the total pixel points. Alternatively, the state of the electronic device can be determined to be in motion if both difference value 1 and difference value 2 are greater than or equal to 10% of the total pixel points.
[0046] Therefore, the difference value between at least two frames of images can be determined from the dimensions of the pixel points of at least two frames of images, which can improve the accuracy of determining whether the state of the electronic device is a motion state.
[0047] In other embodiments of the present application, whether the state of the electronic device is in motion can be determined based on the change in the difference value of at least two frames of images combined with the first sensor information collected by the sensor in the electronic device to improve the accuracy of whether the state of the electronic device is in motion.
[0048] Specifically, the detection information also includes first sensor information of the electronic device, and the first sensor information includes at least one of the following: shaking amplitude and ambient light intensity. Based on this, the above step 220 may specifically include:
[0049] When the difference value is greater than or equal to the first threshold, it is determined that the state of the electronic device is a motion state according to the first sensor information.
[0050] Exemplarily, when the difference value is greater than or equal to 10% of the total pixel points, the state of the electronic device is determined to be a motion state according to at least one of the following: shaking amplitude and ambient light intensity.
[0051] In this way, the accuracy of determining whether the state of the electronic device is in a motion state can be improved based on the change of the difference value of at least two frames of images combined with the first sensor information collected by the sensor in the electronic device.
[0052] Specifically, the above-mentioned step of determining that the state of the electronic device is a motion state according to the first sensor information may specifically include at least one of the following steps: step 2201 and step 2202.
[0053] Step 2201: When the shaking amplitude is greater than or equal to a second threshold, determine that the state of the electronic device is a motion state.
[0054] Exemplarily, when an electronic device is shaken, the electronic device will collect information such as the current tilt angle, tilt direction, and gravity acceleration of the electronic device through a gyroscope or an acceleration sensor to determine the shaking amplitude of the electronic device based on this information. In this way, when the shaking amplitude is greater than or equal to the second threshold value of 8 centimeters, it can be determined that the state of the electronic device is in motion.
[0055] It should be noted that the shaking amplitude may include multiple shaking amplitudes at multiple times. When the multiple shaking amplitudes are all greater than or equal to the second threshold of 8 cm, it can be determined that the state of the electronic device is in motion.
[0056] In addition, in the embodiment of the present application, when the shaking amplitude is less than the second threshold value of 8 centimeters, it can be determined that the state of the electronic device is not in the motion state.
[0057] Step 2202: When the rate of change of the ambient light intensity is greater than or equal to a third threshold, determine that the state of the electronic device is a motion state.
[0058] For example, when an electronic device is shaken, the ambient light intensity of the electronic device will change. At this time, the rate of change of the ambient light intensity can be calculated based on the ambient light intensity at adjacent times. For example, the ambient light intensity 1 at 10:01 is 1000 lux, and the ambient light intensity 2 at 10:02 is 2000 lux. In this way, when the ambient light intensity increases from 1000 lux to 2000 lux, the rate of change of the ambient light intensity 1000 can be obtained to be greater than or equal to 500, and it can be determined that the state of the electronic device is in motion.
[0059] Similarly, if the ambient light intensity 1 at 10:01 is 5000 lux, and the ambient light intensity 2 at 10:02 is 3000 lux, then when the ambient light intensity decreases from 5000 lux to 3000 lux, it can be obtained that the rate of change of the ambient light intensity 2000 is greater than or equal to 500, and it can be determined that the state of the electronic device is in motion.
[0060] It should be noted that the first sensor information may include the shaking amplitude alone, or the ambient light intensity alone. In this case, it may be determined that the state of the electronic device is a motion state in the above manner.
[0061] Therefore, when the first sensor information includes the shaking amplitude and the ambient light intensity, the state of the electronic device can be determined to be a motion state when the shaking amplitude is greater than or equal to the second threshold and the rate of change of the ambient light intensity is greater than or equal to the third threshold, so as to improve the accuracy of the state of the electronic device being a motion state.
[0062] Involving step 120, in some embodiments of the present application, before the step of turning off the normally-on AON function of the camera, it is possible to further determine whether there is an application in the electronic device that uses the AON function. If there is an application that uses the AON function, the AON function is not turned off. Conversely, if there is no application that uses the AON function, the AON function can be turned off. In this way, while ensuring that the user can use the functions in the electronic device normally, the power of the electronic device can be saved and the battery life of the electronic device can be extended.
[0063] Based on this, before the step of turning off the normally-on AON function of the camera in step 120, the camera control method may further include:
[0064] When the AON function is not used by an application in the electronic device, the AON function is turned off.
[0065] When the application in the electronic device is used, keep the AON function turned on.
[0066] For example, if an application in an electronic device, such as a calendar application, uses the AON function, the camera with the AON function needs to be kept open and the AON function needs to be turned on. Conversely, if an application in an electronic device, such as a calendar application, does not use the AON function, the AON function can be turned off.
[0067] In this way, users can be guaranteed to use electronic devices normally, and the AON function can be turned off only when the application in the electronic device is using the AON function, such as using a desk calendar or displaying the desktop for a long time. In this way, users can be guaranteed to use the functions in the electronic device normally while saving power of the electronic device and extending the battery life of the electronic device.
[0068] Regarding step 130, in some embodiments of the present application, before step 140, the camera control method may further include a condition for triggering detection of whether the electronic device is not in motion. Based on this, before step 140, the camera control method may further include steps 310 to 330.
[0069] Step 310: Acquire second sensor information of the electronic device, where the second sensor information includes gravity acceleration and three-axis acceleration.
[0070] For example, data such as gravity acceleration and three-axis acceleration that are used to indicate that the state of the electronic device changes from a horizontal state to a vertical state can be collected by sensors such as an acceleration sensor and a gyroscope in the electronic device.
[0071] Step 320: Determine whether the user has raised his wrist based on the second sensor information.
[0072] For example, the shaking amplitude of the electronic device can be determined by gravity acceleration and triaxial acceleration. At this time, when the shaking amplitude is less than the second threshold of 8 cm, it can be determined that the electronic device has no wrist-lifting action. When the shaking amplitude is greater than or equal to the second threshold of 8 cm, it can be determined that the electronic device has a wrist-lifting action.
[0073] Here, it should be noted that the shaking amplitude may include multiple shaking amplitudes at multiple times. When the multiple shaking amplitudes are all smaller than the second threshold value of 8 centimeters, the shaking amplitude of the electronic device can be determined.
[0074] Step 330: If it is determined that the user has raised the wrist, determine that the electronic device is not in the motion state. In addition, if it is determined that the user has not raised the wrist, determine that the electronic device is in the motion state.
[0075] Therefore, the embodiment of the present application can identify whether the state of the electronic device is walking, running or other motion state while maintaining the normal operation of the AON function. When the electronic device is in motion, the AON function can be turned off, that is, there is no need to wake up the main system in the electronic device to perform image analysis on the high-definition image, thereby reducing the erroneous awakening of the main system in the electronic device, which not only reduces the power consumption of the camera with the AON function, but also reduces the power consumption of the main system, saves the power of the electronic device, and extends the battery life of the electronic device. Then, when the second sensor information obtained determines that the user has raised his wrist, it can be determined that the electronic device is not in motion. In this way, when it is determined that the electronic device is not in motion, the AON function can be turned on immediately to ensure that the user can use the functions in the electronic device normally.
[0076] The following takes the folding screen mobile phone as an example. Figure 2 , the camera control method provided in the embodiment of the present application is illustrated by way of example, specifically steps 2101 to 2111 as follows.
[0077] Step 2101, acquiring detection information, where the detection information includes N frames of images captured by the electronic device.
[0078] Step 2102, determine whether the calendar application in the electronic device uses the AON function. If it is determined that the calendar application in the electronic device uses the AON function, then exit the process. Otherwise, if it is determined that the calendar application in the electronic device does not use the AON function, then execute steps 2103 to 2105.
[0079] Step 2103, obtain the number of steps through the counter in the electronic device. And, step 2104, obtain the gravity acceleration and the three-axis acceleration through the acceleration sensor and the gyroscope in the electronic device, and determine the shaking amplitude of the electronic device through the gravity acceleration and the three-axis acceleration. And, step 2105, obtain the difference value of at least two frames of images by comparing at least two frames of images in N frames of images.
[0080] Step 2106, determine whether the state of the electronic device is in motion according to the number of steps, the difference value and the shaking amplitude. If it is detected that the number of steps is reported and the reporting of the number of steps lasts for a preset time, the difference value is greater than or equal to the first threshold, and the shaking amplitude is greater than or equal to the second threshold, it is determined that the state of the electronic device is in motion, and step 2107 can be executed. On the contrary, if it is detected that there is no reporting of the number of steps or the reporting of the number of steps does not last for a preset time, the difference value is less than the first threshold, and the shaking amplitude is less than the second threshold, then exit the process.
[0081] Step 2107, turning off the normally-on AON function of the camera to save power consumption.
[0082] Step 2108, obtain the second sensor information of the electronic device, the second sensor information includes gravity acceleration and three-axis acceleration. Here, the embodiment of the present application takes into account that due to the gravity sensor, the stopping real-time performance is good and the delay is short, and the status can be reported immediately when the user stops walking or running. Therefore, the embodiment of the present application uses the gravity acceleration obtained by the gravity sensor as information for judging that the electronic device is not in motion.
[0083] Step 2109: Determine whether the user has raised his wrist based on the second sensor information. If no wrist-raising action is detected, repeat step 2108.
[0084] If the user's wrist-raising action is detected, step 2110 is executed. If the change in gravity acceleration is less than the fourth threshold, it can be determined that the user has not raised his wrist. Otherwise, if the change in gravity acceleration is greater than or equal to the fourth threshold, it can be determined that the user has raised his wrist.
[0085] Step 2110, determining that the electronic device is not in the motion state.
[0086] Step 2111, restore the AON function, that is, turn on the AON function.
[0087] Thus, the embodiment of the present application can identify whether the state of the electronic device is a motion state such as walking or running while maintaining the normal operation of the AON function. When the state of the electronic device is a motion state, the AON function can be turned off, that is, there is no need to wake up the main system in the electronic device to perform image analysis on the high-definition image, reduce the error of waking up the main system in the electronic device, not only reduce the power consumption of the camera with the AON function, but also reduce the power consumption of the main system, save the power of the electronic device, and extend the battery life of the electronic device. Then, when it is determined through the acquired second sensor information that the user has a wrist-raising action, it can be determined that the electronic device is not in a motion state. In this way, when it is determined that the electronic device is not in a motion state, the AON function can be turned on immediately to ensure that the user can use the function in the electronic device normally. It should be noted that the camera control method provided in the embodiment of the present application can be executed by a mobile phone, a tablet computer, a laptop computer, a PDA, a wearable device, and other electronic devices. In some embodiments of the present application, the camera control method is executed by an electronic device as an execution subject, and the camera control method provided in the embodiment of the present application is described as an example.
[0088] The camera control method provided in the embodiment of the present application can be executed by a control device. In the embodiment of the present application, the camera control method is executed by a control device as an example to illustrate the device of the camera control method provided in the embodiment of the present application.
[0089] The present application also provides a control device. Figure 3 Provide detailed explanation.
[0090] Figure 3 A schematic diagram of the structure of a control device provided for some embodiments of the present application.
[0091] like Figure 3 As shown, the control device 30 can be applied to electronic equipment, and the control device 30 can specifically include:
[0092] An acquisition module 301 is used to acquire detection information, where the detection information includes N frames of images collected by the electronic device, where N is an integer greater than 1;
[0093] The control module 302 is used to turn off the normally-on AON function of the camera when the detection information indicates that the state of the electronic device is in motion;
[0094] The control module 302 is also used to enable the AON function when the electronic device is not in motion.
[0095] The control device 30 in the embodiment of the present application is described in detail below, as shown below.
[0096] In some embodiments of the present application, the control device 30 further includes a comparison module, which is used to compare at least two frames of images among the N frames of images to obtain a difference value of at least two frames of images;
[0097] The control device 30 further includes a determination module, which is used to determine that the state of the electronic device is a motion state when the difference value is greater than or equal to a first threshold.
[0098] In some embodiments of the present application, the detection information further includes first sensor information of the electronic device, and the first sensor information includes at least one of the following: shaking amplitude, ambient light intensity;
[0099] The determination module is specifically configured to determine, when the difference value is greater than or equal to a first threshold, that the state of the electronic device is a motion state according to the first sensor information.
[0100] In some embodiments of the present application, the determination module is specifically configured to determine that the state of the electronic device is a motion state when the shaking amplitude is greater than or equal to a second threshold;
[0101] When the rate of change of the ambient light intensity is greater than or equal to the third threshold, it is determined that the state of the electronic device is a motion state.
[0102] In some embodiments of the present application, the control module may also be configured to turn off the AON function when the application in the electronic device does not use the AON function.
[0103] In some embodiments of the present application, the acquisition module 301 is further used to acquire second sensor information of the electronic device, where the second sensor information includes gravity acceleration and three-axis acceleration;
[0104] The control device 30 further includes a determination module, which is used to determine whether the user has a wrist-raising action according to the second sensor information;
[0105] The determination module may also be used to determine that the electronic device is not in motion when it is determined that the user has raised his wrist.
[0106] The control 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., and 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.
[0107] The control 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.
[0108] The control device provided in the embodiment of the present application can achieve Figure 1 to Figure 2 The various processes implemented in the camera control method embodiment shown achieve the same technical effect and will not be described again here to avoid repetition.
[0109] Based on this, the control device provided in the embodiment of the present application can obtain detection information, which includes N frames of images collected by the electronic device, and when the detection information indicates that the state of the electronic device is in motion, the normally open AON function of the camera is turned off, and then, when the electronic device is not in motion, the AON function is turned on. In this way, the AON function does not need to be kept normally open, which reduces the power consumption of the camera, saves the power of the electronic device, and extends the battery life of the electronic device.
[0110] Optional, such as Figure 4 As shown, an embodiment of the present application further provides an electronic device 40, including a processor 401 and a memory 402, wherein the memory 402 stores programs or instructions that can be executed on the processor 401, and when the program or instructions are executed by the processor 401, the various steps of the above-mentioned camera control method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0111] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0112] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
[0113] The electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510 and other components.
[0114] Those skilled in the art will appreciate that the electronic device 500 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 510 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system.
[0115] Figure 5 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.
[0116] Wherein, in an embodiment of the present application, the processor 510 is used to obtain detection information, and the detection information includes N frames of images collected by the electronic device, where N is an integer greater than 1. The processor 510 can also be used to turn off the normally open AON function of the camera when the detection information indicates that the state of the electronic device is in motion. The processor 510 can also be used to replace the first food image in the first object with the second food image to obtain the second object. The processor 510 can also be used to turn on the AON function when the electronic device is not in motion.
[0117] The electronic device 500 is described in detail below, as shown below.
[0118] In some embodiments of the present application, the processor 510 is used to compare at least two frames of images among the N frames of images to obtain a difference value of the at least two frames of images;
[0119] When the difference value is greater than or equal to the first threshold, it is determined that the state of the electronic device is a motion state.
[0120] In some embodiments of the present application, the detection information further includes first sensor information of the electronic device, and the first sensor information includes at least one of the following: shaking amplitude, ambient light intensity;
[0121] The processor 510 is specifically configured to determine, when the difference value is greater than or equal to a first threshold, that the state of the electronic device is a motion state according to the first sensor information.
[0122] In some embodiments of the present application, the processor 510 is specifically configured to, when the shaking amplitude is greater than or equal to a second threshold, determine that the state of the electronic device is a motion state;
[0123] When the rate of change of the ambient light intensity is greater than or equal to the third threshold, it is determined that the state of the electronic device is a motion state.
[0124] In some embodiments of the present application, the processor 510 may also be configured to disable the AON function when an application in the electronic device does not use the AON function.
[0125] In some embodiments of the present application, the processor 510 is further configured to obtain second sensor information of the electronic device, where the second sensor information includes gravity acceleration and triaxial acceleration;
[0126] Used to determine whether the user has raised his wrist according to the information from the second sensor;
[0127] When it is determined that the user has raised his wrist, it is determined that the electronic device is not in motion.
[0128] It should be understood that the input unit 504 may include a graphics processor (GPU) 5041 and a microphone 5042, and the graphics processor 5041 processes the image data of a static image or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 506 may include a display panel, and the display panel may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 507 includes a touch panel 5071 and at least one of other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include two parts: a touch detection device and a touch display. Other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (such as a volume display button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0129] The memory 509 can be used to store software programs and various data. The memory 509 can mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area can 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 509 can include a volatile memory or a non-volatile memory, or the memory 509 can include both volatile and non-volatile memories. Among them, the non-volatile memory can 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 509 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0130] The processor 510 may include one or more processing units; optionally, the processor 510 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless display signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 510.
[0131] 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, the various processes of the above-mentioned camera control method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0132] The processor is the processor in the electronic device 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.
[0133] In addition, an embodiment of the present application further provides a chip, which includes a processor and a display interface, the display interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned camera control method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0134] 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.
[0135] 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 camera control method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0136] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0137] In addition, it should be noted 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 a reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
[0138] 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 of each embodiment of the present application.
[0139] 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 being within the scope of protection of the purpose and claims of the present application, all of which are within the protection of the present application.
Claims
1. A camera control method, characterized in that: include: Acquire detection information, where the detection information includes N frames of images collected by the electronic device, where N is an integer greater than 1; When the detection information indicates that the state of the electronic device is in motion, turning off the normally-on AON function of the camera; When the electronic device is not in the motion state, the AON function is turned on.
2. The method according to claim 1, characterized in that Before turning off the normally-on AON function of the camera, the method further includes: Comparing at least two frames of images among the N frames of images to obtain a difference value of the at least two frames of images; When the difference value is greater than or equal to the first threshold, it is determined that the state of the electronic device is the motion state.
3. The method according to claim 2, characterized in that The detection information also includes first sensor information of the electronic device, and the first sensor information includes at least one of the following: shaking amplitude, ambient light intensity; When the difference value is greater than or equal to a first threshold, determining that the state of the electronic device is the motion state includes: When the difference value is greater than or equal to a first threshold, it is determined that the state of the electronic device is the motion state according to the first sensor information.
4. The method according to claim 3, characterized in that: The step of determining, according to the first sensor information, that the state of the electronic device is the motion state includes: When the shaking amplitude is greater than or equal to a second threshold, determining that the state of the electronic device is the motion state; When the rate of change of the ambient light intensity is greater than or equal to a third threshold, it is determined that the state of the electronic device is the motion state.
5. The method according to claim 1, characterized in that Before turning off the normally-on AON function of the camera, the method further includes: When the application in the electronic device does not use the AON function, the AON function is turned off.
6. The method according to claim 1, characterized in that When the electronic device is not in the motion state, before the AON function is turned on, the method further includes: Acquire second sensor information of the electronic device, where the second sensor information includes gravity acceleration and three-axis acceleration; Determining whether the user has raised his wrist according to the second sensor information; When it is determined that the user has the wrist-raising action, it is determined that the electronic device is not in the motion state.
7. A camera control device, characterized in that: include: An acquisition module, used to acquire detection information, wherein the detection information includes N frames of images collected by the electronic device, where N is an integer greater than 1; A control module, configured to turn off a normally-on AON function of a camera when the detection information indicates that the electronic device is in a motion state; The control module is also used to turn on the AON function when the electronic device is not in the motion state.
8. The device according to claim 7, characterized in that The control device further includes a comparison module, which is used to compare at least two frames of images among the N frames of images to obtain a difference value of the at least two frames of images; The control device further comprises a determination module, which is used to determine that the state of the electronic device is the motion state when the difference value is greater than or equal to a first threshold.
9. The device according to claim 8, characterized in that The detection information also includes first sensor information of the electronic device, and the first sensor information includes at least one of the following: shaking amplitude, ambient light intensity; The determination module is specifically configured to determine, when the difference value is greater than or equal to a first threshold, that the state of the electronic device is the motion state according to the first sensor information.
10. The device according to claim 9, characterized in that The determination module is specifically configured to determine that the state of the electronic device is the motion state when the shaking amplitude is greater than or equal to a second threshold; When the rate of change of the ambient light intensity is greater than or equal to a third threshold, it is determined that the state of the electronic device is the motion state.
11. The device according to claim 7, characterized in that The control module is further configured to disable the AON function when the application in the electronic device does not use the AON function.
12. The device according to claim 7, characterized in that The acquisition module is further used to acquire second sensor information of the electronic device, where the second sensor information includes gravity acceleration and three-axis acceleration; The control device further includes a determination module, which is used to determine whether the user has raised his wrist according to the second sensor information; The determination module is further configured to, when it is determined that the user has performed the wrist raising action, determine that the electronic device is not in the motion state.
13. An electronic device, characterized in that: include: 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 camera control method as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Shooting method based on multi-camera system, and a terminal
CN106131434A
Motion detection method and device based on image sequence
CN108933897A
Automatic user adaptive triggering
CN117692757A
Mobile terminal and method for controlling the same
US20190058834A1