Electronic equipment control method and shooting equipment
By collecting attitude information at multiple different times when the electronic device switches states, the attitude of the target moment is calculated, which solves the problem of attitude calculation error and improves the attitude accuracy and imaging direction accuracy of the electronic device when switching states.
Patent Information
- Application Number
- CN202410757864.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-12
AI Technical Summary
When the electronic device switches states, the posture calculation error is large, which affects the performance of the device. Especially when the action camera switches from the off state to the recording state, it may lead to incorrect imaging direction and poor anti-shake function.
By collecting attitude information at multiple different times when a trigger operation is detected, including gyroscope data in the first time period and the second time period, the attitude information at the target time is calculated, and the rotation matrix is constructed using the angular velocity parameters and acceleration parameters to determine The direction of gravity ensures the accuracy of the posture.
It achieves rapid and accurate adjustment of the posture of electronic equipment, improves the accuracy of image or video direction, reduces posture errors when starting up, and enhances the accuracy of horizon correction.
Smart Images

Figure CN118741302A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image processing, and in particular to an electronic device control method and an electronic device. Background Art
[0002] When using an electronic device, an accelerometer at a single moment is used to determine the attitude of the electronic device. However, when the electronic device switches from one state to another, a large attitude calculation error may occur, affecting the operation of the electronic device.
[0003] Taking sports cameras as an example, when the electronic device goes directly from the off state to the recording state, the posture calculation error will affect the anti-shake, imaging direction error and other problems. Summary of the invention
[0004] Based on this, it is necessary to provide an electronic device control method and a shooting device to address the above technical problems, which can quickly and accurately determine the posture of the electronic device.
[0005] In a first aspect, the present application provides a method for controlling an electronic device, the control method comprising:
[0006] In the case of detecting a trigger operation, confirming the posture of the electronic device at a target time according to the posture information collected by the electronic device at multiple different times; wherein the trigger operation is used to instruct the electronic device to switch from a first state to a second state, and the power consumption of the second state is greater than the power consumption of the first state;
[0007] The electronic device is controlled to operate according to the posture at the target moment.
[0008] In one of the embodiments, in the first state, the posture sensor of the electronic device is in a power-off state; the method further includes:
[0009] When a trigger operation is detected, when the electronic device switches from the first state to the second state, the posture sensor switches from the power-off state to the power-on state, and in the power-on state, collects the posture information at the multiple different moments.
[0010] In one of the embodiments, the plurality of posture information at different moments include: posture information in a first time period, the first time period being before the target moment.
[0011] In one embodiment, the first time period is after the initialization of the posture sensor of the electronic device is completed, and the first time period is before the initialization of the imaging component of the electronic device is completed.
[0012] In one embodiment, the posture detection method further includes: collecting gyroscope data in the first time period; and confirming the target posture of the electronic device at the target time according to the collected posture information of the electronic device at multiple different times, including:
[0013] Calculate the first alignment posture information at the target moment corresponding to each posture information in the first time period according to the gyroscope data in the first time period;
[0014] The target posture information is calculated based on the plurality of the first alignment posture information.
[0015] In one embodiment, the step of calculating the first alignment posture information at the target moment corresponding to each posture information in the first time period according to the gyroscope data in the first time period includes:
[0016] Determine the angular velocity parameter increments at adjacent moments according to the angular velocity parameters corresponding to each moment, and construct a rotation matrix based on each of the angular velocity parameter increments;
[0017] Based on the rotation matrix, the acceleration parameters at each moment are aligned to the target moment to obtain the rotated acceleration parameters corresponding to each moment.
[0018] In one embodiment, calculating the target posture information according to the plurality of the first alignment posture information includes:
[0019] The target posture information is confirmed according to the characteristic values of the first alignment posture information and / or the collection posture information at the target moment; wherein the characteristic values include: a mean value and a weighted mean value.
[0020] In one embodiment, the plurality of posture information at different times includes:
[0021] The posture information of a second time period, wherein the second time period is after the target time.
[0022] In one embodiment, collecting the gyroscope data of the second time period; and determining the target posture of the electronic device at the target time according to the collected posture information of the electronic device at multiple different times, comprises:
[0023] Calculating the target time alignment posture information corresponding to each posture information in the second time period according to the gyroscope data in the second time period;
[0024] The target posture information is adjusted according to the plurality of the second alignment posture information.
[0025] In one embodiment, the target posture information includes the gravity direction of the target at that moment.
[0026] In one embodiment, the electronic device includes a photographing device; the first state includes any one of a power-off state, a standby state, and a sleep state of the electronic device.
[0027] In one embodiment, the second state includes a power-on state of the electronic device; the trigger instruction includes: an operation of triggering the power-on of the electronic device; and / or,
[0028] The second state includes a preview state of the electronic device, and the trigger operation includes an operation of triggering the electronic device to enter a shooting mode; and / or,
[0029] The second state includes a recording state of the electronic device, and the trigger operation includes an operation of triggering the quick shooting function.
[0030] In one embodiment, the second state is a recording state, and controlling the electronic device to operate according to the posture at the target moment includes:
[0031] According to the posture of the target at the moment, the filming direction of the target video is controlled, and / or the display direction of the target video is displayed on the display screen of the electronic device.
[0032] In one embodiment, controlling the filming direction of the target video according to the posture of the target at the moment includes:
[0033] According to the posture of the target at that moment, the shooting device is controlled to be in a horizontal shooting mode or a vertical shooting mode, so as to capture the target video in the horizontal shooting mode or the vertical shooting mode;
[0034] In the horizontal shooting mode, the aspect ratio of the target video is greater than 1; in the vertical shooting mode, the aspect ratio of the target video is less than 1.
[0035] In one embodiment, controlling the filming direction of the target video according to the posture of the target at the moment includes:
[0036] According to the posture at the target moment, the screen direction of the video to be processed at the target moment is controlled to obtain the target video, and the screen of the target video at the target moment is aligned with the horizon.
[0037] In one embodiment, the second state is a recording state, and controlling the electronic device to operate according to the posture at the target moment includes:
[0038] According to the target posture data, jitter compensation data of the imaging component of the electronic device corresponding to the target moment and / or other moments after the target moment is calculated, and stabilization processing is performed on the captured video of the electronic device according to the jitter compensation data.
[0039] In a second aspect, the present application further provides an electronic device control device, the device comprising:
[0040] A posture calculation module, used to confirm the posture of the electronic device at a target time according to the posture information collected by the electronic device at multiple different times when a trigger operation is detected; wherein the trigger operation is used to instruct the electronic device to switch from a first state to a second state, and the power consumption of the second state is greater than the power consumption of the first state;
[0041] The posture control module is used to control the operation of the electronic device according to the posture at the target moment.
[0042] In a third aspect, the present application further provides a photographing device. The electronic device comprises:
[0043] case;
[0044] A posture sensor is used to collect posture information collected at multiple different times;
[0045] An interactive component, used to control the electronic device to switch from a first state to a second state;
[0046] A memory storing an electronic device control program;
[0047] One or more processors are connected to the posture sensor and the interactive component, and when the processor executes the electronic device control program, the steps of the method in any one of the embodiments of the first aspect are implemented.
[0048] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method in any one of the embodiments of the first aspect are implemented.
[0049] The above-mentioned electronic device control method can collect the posture information of the electronic device at multiple different times when detecting a change in the working model or working state of the electronic device, so that the posture at the target time can be confirmed and corrected according to multiple known posture information, thereby realizing rapid adjustment of the posture of the electronic device and improving the accuracy of the posture information of the electronic device. In addition, the accuracy of the direction in which the electronic device collects images or videos is ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 is a flow chart of a method for controlling an electronic device in one embodiment;
[0051] Figure 2 is a schematic diagram of a method for calculating a target posture in one embodiment;
[0052] Figure 3is a schematic diagram of an electronic device control device in one embodiment;
[0053] Figure 4 FIG. 4 is a schematic diagram of the structure of an electronic device in an embodiment. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0055] In the related art, an accelerometer at a single moment is used to determine the posture of a motion camera. When the camera is turned on in motion, there is a large posture determination error, which may cause the direction of the film to be wrong or the horizon to be tilted.
[0056] In some scenarios, the electronic device is a sports camera, which is provided with an image sensor, an optical lens, a processor, and a posture sensor; wherein the posture sensor may include a gyroscope, an accelerometer, a magnetometer, and the like.
[0057] In some embodiments, the action camera includes a snapshot mode, that is, when the camera is in the off state and detects that a snapshot element (such as a button, touch, or vibration sensor) is triggered, the camera enters the recording state from the off state. At this time, if the posture detection is inaccurate, it will cause the film to be in the wrong direction, or the anti-shake, horizon correction and other functions will not work well.
[0058] To solve the technical defects in the related art, in one embodiment, Figure 1 As shown, a method for controlling an electronic device is provided, which can be applied to sports cameras, as well as smart electronic devices with photo taking and video recording functions such as mobile phones and smart watches. The method includes steps S11 and S12; specifically:
[0059] Step S11, when a trigger operation is detected, confirm the posture of the electronic device at the target time according to the posture information collected by the electronic device at multiple different times; wherein the trigger operation is used to instruct the electronic device to switch from a first state to a second state, and the power consumption of the second state is greater than the power consumption of the first state.
[0060] For example, taking the above method applied to a sports camera as an example, the above trigger operation may be a trigger operation caused by a user's control operation on the electronic device. For example, the trigger operation may be based on the user's operation on the screen or function controls of the electronic device, so that the electronic device switches from a low-power state such as a shutdown state, a standby state, or a sleep state to a high-power state such as a shooting mode, a video recording mode, or a quick shooting function mode.
[0061] Alternatively, in some exemplary embodiments, the trigger operation may also be a trigger operation caused by the switching of the electronic device's autonomous working mode or working state due to a scene change or a posture change. For example, when the electronic device detects a change from a static state to a moving state, it may switch from a low-power state such as a standby state or a sleep state to a high-power state such as a shooting mode, a video recording mode, or a quick shooting function mode.
[0062] When the electronic device recognizes that a trigger operation is currently occurring, it can start collecting posture information; and use the multiple posture information currently collected to calculate the posture information at the target moment.
[0063] In an exemplary embodiment, the electronic device includes a photographing device; the first state includes any one of a power-off state, a standby state, and a sleep state of the electronic device.
[0064] Exemplarily, the second state includes a power-on state of the electronic device; and the trigger instruction includes: an operation of triggering the power-on of the electronic device.
[0065] For example, taking the electronic device as a sports camera equipped with a camera component, when the user presses the power button to turn on the electronic device, the electronic device switches from an off state to an on state, which can trigger the electronic device to collect posture information at multiple different times.
[0066] Exemplarily, the second state includes a preview state of the electronic device, and the triggering operation includes an operation of triggering the electronic device to enter a shooting mode.
[0067] For example, when the electronic device is currently in standby or dormant mode, when the user operates the electronic device to enter a photo taking or video recording mode and enters a preview interface, the electronic device can be triggered to start collecting gesture information.
[0068] Exemplarily, the second state includes a recording state of the electronic device, and the triggering operation includes an operation of triggering the quick shooting function.
[0069] For example, when a user operates an electronic device to enter a quick capture function, the electronic device can be triggered to collect posture information at multiple different times. The quick capture function can be automatically entered after the electronic device is turned on from a powered-off state; or, in a dormant state, the user clicks on the electronic device screen to select the quick capture function.
[0070] In an exemplary embodiment, in the first state, the posture sensor of the electronic device is in a power-off state. The method further comprises: when a trigger operation is detected, when the electronic device switches from the first state to the second state, the posture sensor switches from the power-off state to the power-on state, and in the power-on state, collects the posture information at the multiple different moments.
[0071] Specifically, the first state mentioned above can be a shutdown state, or one of a standby state and a dormant state; correspondingly, the posture sensor of the electronic device can be in a power-off state at this time. For example, taking the first state as the shutdown state as an example, when the electronic device is in the shutdown state, the posture sensor corresponds to the power-off state. When the user controls the electronic device to turn on, the electronic device is powered on, and the electronic device changes from the first state to the second state; synchronously, after the electronic device is turned on, the posture sensor is powered on, so that the posture sensor changes from the power-off state to the power-on state, and the posture sensor performs initialization after powering on, and starts working and generates posture information after the initialization is completed. At this time, after the electronic device is turned on, it recognizes that a trigger operation has occurred, and after the posture sensor is powered on, the posture information of multiple consecutive moments collected by the posture sensor is obtained.
[0072] In an exemplary embodiment, the plurality of posture information at different moments include: posture information in a first time period, the first time period being before the target moment.
[0073] Exemplarily, the first time period is after the initialization of the posture sensor of the electronic device is completed, and the first time period is before the initialization of the imaging component of the electronic device is completed.
[0074] Specifically, after the electronic device is powered on, the attitude sensor is powered on so that the attitude sensor performs an initialization operation; after completing the initialization operation, the attitude sensor can output attitude information at a fixed frequency; the attitude information can include accelerometer data, gyroscope data and corresponding timestamp data. After the electronic device is powered on, the user can manually select the photo function or the video recording function, so as to power on and initialize the imaging component; or, it can be pre-configured that the electronic device automatically enters the quick shooting mode after being turned on, and the imaging component is powered on and initialized after the electronic device is turned on. The moment when the attitude sensor is initialized can be used as the starting moment of the first time period, and the moment when the imaging component is initialized can be used as the end moment of the first time period; thus, the attitude information output by the attitude sensor in the time period can be used as attitude information at multiple different moments.
[0075] In an exemplary embodiment, the method further comprises: collecting gyroscope data in the first time period. Figure 2 As shown, the step of confirming the target posture of the electronic device at the target time according to the posture information collected from the electronic device at multiple different times includes:
[0076] Step S21, calculating the first alignment posture information at the target moment corresponding to each posture information in the first time period according to the gyroscope data in the first time period;
[0077] Step S22: Calculate the target posture information according to the plurality of the first alignment posture information.
[0078] Exemplarily, after the initialization operation is completed, the attitude sensor of the electronic device can output attitude information at a fixed frequency, including accelerometer data, gyroscope data and corresponding timestamp data. Among them, a data queue can be pre-constructed in the memory for writing the attitude information corresponding to the first time period. After the attitude sensor completes the initialization operation, the gyroscope data generated by the attitude sensor can be read and written into the data queue. In addition, the gyroscope data corresponding to the first time period can be determined based on the timestamp data. For the gyroscope data in the first time period, alignment processing can be performed to rotate all the gyroscope data at each moment to the same moment and align them to that moment.
[0079] Exemplarily, in step S21, the step of calculating the first alignment posture information at the target moment corresponding to each posture information in the first time period according to the gyroscope data in the first time period includes:
[0080] Step S211, determining the angular velocity parameter increments at adjacent moments according to the angular velocity parameters corresponding to each moment, and constructing a rotation matrix based on each of the angular velocity parameter increments;
[0081] Step S212: Based on the rotation matrix, align the acceleration parameters at each moment to the target moment to obtain the rotated acceleration parameters corresponding to each moment.
[0082] Specifically, the velocity parameter increments between adjacent moments can be calculated based on the angular velocity parameters at each moment, thereby constructing a rotation matrix. For example, let the current moment be N, the previous moment be N-1, and so on to the 0th moment. The rotation matrix from the N-1th moment to the Nth moment is By using the angular velocity output by the gyroscope for recursion, the angular velocity increment at adjacent moments can be obtained; the angular velocity increment is then used to construct the quaternion increment or rotation matrix at adjacent moments.
[0083] Exemplarily, when performing data alignment, the IMU coordinate system at adjacent moments may be aligned to the IMU coordinate system at the target moment.
[0084] After obtaining the rotation matrix of the adjacent time, the acceleration parameter after rotation at this moment can be calculated based on the rotation matrix and the acceleration parameter at this moment. For example, the original accelerometer data at the Nth moment is , the accelerometer data at the N-1th moment can be aligned to the Nth moment, and the rotated accelerometer is marked as ; And so on, we can finally get the rotated accelerometer sequence at all times: , … , Among them, the acceleration parameter after rotation can be used as the first alignment posture information towards the target moment.
[0085] Exemplarily, in step S22, the target posture information is calculated based on multiple first alignment posture information, including: confirming the target posture information based on the characteristic values of the first alignment posture information and / or the collection posture information at the target moment; wherein the characteristic values include: mean, weighted mean.
[0086] Exemplarily, the target posture information includes the gravity direction of the target at that moment.
[0087] Specifically, after obtaining the acceleration parameters after rotation, the average value or weighted average value of all the rotation-aligned accelerometer data can be calculated at the appropriate time to calculate the average gravity direction, that is: ;
[0088] And use and the gravity direction vector [0,0,1] determine the target posture information of the electronic device at the target time.
[0089] Step S12, controlling the electronic device to operate according to the posture at the target moment.
[0090] Exemplarily, after determining the posture information of the electronic device at the target time, the operation of the electronic device can be controlled based on the posture information. For example, the display direction of the content on the screen of the electronic device can be adjusted or corrected according to the posture information. The above-mentioned target time can be the starting time when the electronic device enters the shooting mode or the quick shooting function mode and starts to take pictures or record videos.
[0091] When the electronic device switches from the first state to the second state, the posture information of the electronic device at multiple different times is collected, and the acceleration information at multiple times is used to calculate the average value of the accelerometer, so that the accurate initial gravity direction can be determined by using the average value of the accelerometer and the gravity direction vector, and then the posture of the electronic device is determined. By using multiple segments of acceleration data to determine the initial posture of the electronic device at the time of powering on, the attitude error caused by external movement is effectively reduced, and the accuracy of the video orientation at powering on and the accuracy in the correction mode under the horizon are increased.
[0092] In an exemplary embodiment, the second state is a video recording state. Controlling the operation of the electronic device according to the posture of the target moment includes: controlling the filming direction of the target video according to the posture of the target moment, and / or controlling the display direction of the target video on the display screen of the electronic device.
[0093] Specifically, when the user controls the electronic device to use the recording function or the photo taking function, the display direction of the image in the display interface of the electronic device can be controlled based on the currently calculated target moment posture information. For example, the display direction of the video in the display interface of the electronic device can be controlled to be vertically upward, so that when the shooting module of the electronic device is tilted, the display direction of the current display content in the display interface of the electronic device can still be guaranteed to be the correct direction.
[0094] In addition, based on the currently calculated posture information of the target moment, the imaging direction of the video data currently shot by the electronic device can also be controlled; for example, the imaging direction can be adjusted to be vertically upward.
[0095] In an exemplary embodiment, the filming direction of the target video is controlled according to the posture of the target at the moment, including: according to the posture of the target at the moment, controlling the shooting device to be in a horizontal shooting mode or a vertical shooting mode, so as to capture the target video in the horizontal shooting mode or the vertical shooting mode; wherein, in the horizontal shooting mode, the aspect ratio of the target video is greater than 1; and in the vertical shooting mode, the aspect ratio of the target video is less than 1.
[0096] Specifically, according to the current posture information or model configuration information of the electronic device, the electronic device can be configured to be in horizontal shooting mode or vertical shooting mode. After determining the posture of the electronic device at the target moment, the electronic device can be adjusted to use the horizontal shooting mode or the vertical shooting mode. For example, the electronic device defaults to the vertical shooting mode; after the electronic device enters the video recording mode, if it is determined that the current posture of the electronic device is a normal posture according to the posture information at the target moment, it can be confirmed to use the vertical shooting mode; or, if the current posture of the electronic device is identified as tilted or horizontally placed according to the posture information at the target moment, the electronic device can be controlled to use the horizontal shooting mode.
[0097] In an exemplary embodiment, the filming direction of the target video is controlled according to the posture of the target moment, including: according to the posture of the target moment, the screen direction of the video to be processed at the target moment is controlled to obtain the target video, and the screen of the target video at the target moment is aligned with the horizon.
[0098] For example, the video to be processed may be a video in the preview interface. When recording using an electronic device, the direction of the video screen may be adjusted according to the posture of the electronic device at the target moment; for example, the video screen may be controlled to be aligned with the horizon.
[0099] In an exemplary embodiment, the second state is a video recording state. Controlling the operation of the electronic device according to the posture at the target moment includes: calculating jitter compensation data of an imaging component of the electronic device corresponding to the target moment and / or other moments after the target moment according to the target posture data, and performing stabilization processing on the captured video of the electronic device according to the jitter compensation data.
[0100] For example, the jitter compensation data may be the motion compensation data of the imaging component. Specifically, the current jitter degree of the imaging component, such as the jitter direction and jitter intensity, may be estimated based on the target posture data; the jitter compensation data of the imaging component lens and / or image sensor may be calculated based on the current jitter degree, and the camera lens or image sensor may be controlled to move to offset the jitter, thereby achieving optical image stabilization. Alternatively, the displacement and displacement direction of the stabilization platform may be controlled based on the target posture data, thereby achieving mechanical image stabilization of the imaging component.
[0101] In an exemplary embodiment, the plurality of posture information at different moments include: posture information in a second time period, where the second time period is after the target moment.
[0102] Exemplarily, the method further includes: collecting gyroscope data of the second time period.
[0103] The method of confirming the target posture of the electronic device at the target time based on the collected posture information of the electronic device at multiple different times includes: calculating the target moment alignment posture information corresponding to each posture information in the second time period based on the gyroscope data in the second time period; and adjusting the target posture information based on multiple pieces of the second alignment posture information.
[0104] Specifically, the second time period mentioned above can be a preset time length after the target moment. For example, the length of the second time period can be preconfigured, for example, the length of the second time period can be configured to be 5 seconds or 3 seconds. After the target moment, the gyroscope data of the attitude sensor at multiple moments in the second time period can continue to be obtained, and the angular velocity parameter increments of adjacent moments can be determined according to the angular velocity parameters corresponding to each moment, and a rotation matrix can be constructed based on each angular velocity parameter increment; then, based on the rotation matrix, the acceleration parameters of each moment are aligned to the target moment, so as to obtain the acceleration parameters corresponding to each moment after rotation as the second alignment attitude information. The average gravity direction of the current moment is recursively calculated based on the acceleration parameters after rotation, and the attitude information of the current moment is quickly adjusted based on the average gravity and the gravity direction vector.
[0105] Consider that the initial attitude quaternion or attitude matrix determined by the average gravity calculated based on a small amount of data at the initial moment may be inaccurate. In this case, the average gravity calculation can be continued at each moment after the target moment to correct the initially determined attitude quaternion or rotation matrix. Considering the calculation accuracy, the length of the second time period can be configured to be less than or equal to 5s. The attitude quaternion determined by the initial average gravity is assumed to be q0, then q0 can be used to adjust the integral result of the initial gyroscope angle increment, assuming that the quaternion determined by the average gravity at the 5th second is q final , we can use q final Adjust the integral result of the gyroscope angle increment at this time, so as to further optimize the attitude data.
[0106] In an embodiment of the present application, when the state of the electronic device changes, after the posture sensor is powered on, the posture information of the electronic device at multiple different times is actively collected for a period of time before the imaging component is initialized, and the posture information is used to calculate the posture at the target time, so as to use multiple segments of acceleration data to determine the initial posture of the camera at the time of power-on, thereby reducing the posture error caused by external motion, reducing the posture error when the electronic device is turned on in a moving state, and making the camera posture more accurate. It can increase the accuracy of the video orientation when it is turned on, and the accuracy in the correction mode under the horizon. In addition, when the initial posture error is large, the posture information of the second time period is collected again and the posture at the target time is optimized, thereby reducing the impact of the error, and finally adjusting to the accurate posture orientation.
[0107] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0108] Based on the same inventive concept, the embodiment of the present application also provides an electronic device control device for implementing the electronic device control method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more electronic device control device embodiments provided below can refer to the limitations of the electronic device control method above, and will not be repeated here.
[0109] In one embodiment, Figure 3 As shown, an electronic equipment control device 30 is provided, comprising:
[0110] The posture calculation module 301 is used to confirm the posture of the electronic device at a target time according to the posture information collected by the electronic device at multiple different times when a trigger operation is detected; wherein the trigger operation is used to instruct the electronic device to switch from a first state to a second state, and the power consumption of the second state is greater than the power consumption of the first state;
[0111] The device control module 302 is used to control the operation of the electronic device according to the posture at the target moment.
[0112] Each module in the above electronic device control device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0113] In one embodiment, a shooting device is provided, which may be a smart terminal device such as a mobile phone, a camera, a sports camera, or a drone with photo and video recording functions. Figure 4As shown, the shooting device includes a housing 401, and a system bus 404, a posture sensor 405, and a processor 407 arranged in the housing 401; a lens assembly 402, a display unit 401, and an interactive component 406 may also be arranged on the housing 401. In addition, the shooting device may also have a memory, an input / output interface, and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through the system bus, and the communication interface, the display unit, and the interactive component can be connected to the system bus through the input / output interface. Among them, the processor of the shooting device is used to provide computing and control capabilities. The interactive component can be used to control the shooting device to switch from a first state to a second state. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the shooting device is used to exchange information between the processor and the external device. The communication interface of the shooting device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an electronic device control method can be implemented. The display unit of the computer device is used to form a visually visible picture, and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen; the interactive component of the electronic device can be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.
[0114] Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0115] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0116] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0117] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0118] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magneto resistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0119] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0120] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for controlling an electronic device, It is characterized in that include: In the case of detecting a trigger operation, confirming the posture of the electronic device at a target time according to the posture information collected by the electronic device at multiple different times; wherein the trigger operation is used to instruct the electronic device to switch from a first state to a second state, and the power consumption of the second state is greater than the power consumption of the first state; The electronic device is controlled to operate according to the posture at the target moment.
2. The electronic device control method according to claim 1, It is characterized in that In the first state, the posture sensor of the electronic device is in a power-off state; the method further includes: When a trigger operation is detected, when the electronic device switches from the first state to the second state, the posture sensor switches from the power-off state to the power-on state, and in the power-on state, collects the posture information at the multiple different moments.
3. The electronic device control method according to claim 1, It is characterized in that The plurality of posture information at different times include: The posture information of a first time period, wherein the first time period is before the target time.
4. The electronic device control method according to claim 3, It is characterized in that The first time period is after the initialization of the posture sensor of the electronic device is completed, and the first time period is before the initialization of the imaging component of the electronic device is completed.
5. The electronic device control method according to claim 3, It is characterized in that The method further includes: collecting gyroscope data in the first time period; and confirming the target posture of the electronic device at the target time according to the posture information collected at multiple different times of the electronic device, including: Calculate the first alignment posture information at the target moment corresponding to each posture information in the first time period according to the gyroscope data in the first time period; The target posture information is calculated based on the plurality of the first alignment posture information.
6. The electronic device control method according to claim 5, It is characterized in that The step of calculating the first alignment posture information at the target moment corresponding to each posture information in the first time period according to the gyroscope data in the first time period includes: Determine the angular velocity parameter increments at adjacent moments according to the angular velocity parameters corresponding to each moment, and construct a rotation matrix based on each of the angular velocity parameter increments; Based on the rotation matrix, the acceleration parameters at each moment are aligned to the target moment to obtain the rotated acceleration parameters corresponding to each moment.
7. The electronic device control method according to claim 5, It is characterized in that Calculating the target posture information according to the plurality of the first alignment posture information includes: The target posture information is confirmed according to the characteristic values of the first alignment posture information and / or the collection posture information at the target moment; wherein the characteristic values include: a mean value and a weighted mean value.
8. The electronic device control method according to claim 3, It is characterized in that The plurality of posture information at different times include: The posture information of a second time period, wherein the second time period is after the target time.
9. The electronic device control method according to claim 8, It is characterized in that The method further comprises: collecting gyroscope data of the second time period; The step of determining the target posture of the electronic device at the target time according to the collected posture information of the electronic device at multiple different times includes: Calculating the second alignment posture information at the target moment corresponding to each posture information in the second time period according to the gyroscope data in the second time period; The target posture information is adjusted according to the plurality of the second alignment posture information.
10. The electronic device control method according to claim 1, It is characterized in that The target posture information includes the gravity direction of the target at that moment.
11. The electronic device control method according to any one of claims 1 to 10, It is characterized in that The electronic device includes a photographing device; the first state includes any one of a power-off state, a standby state, and a sleep state of the electronic device.
12. The electronic device control method according to claim 11, It is characterized in that The second state includes a power-on state of the electronic device; the trigger instruction includes: an operation of triggering the power-on of the electronic device; and / or, The second state includes a preview state of the electronic device, and the trigger operation includes an operation of triggering the electronic device to enter a shooting mode; and / or, The second state includes a recording state of the electronic device, and the trigger operation includes an operation of triggering the quick shooting function.
13. The electronic device control method according to claim 11, It is characterized in that The second state is a recording state; The step of controlling the electronic device to operate according to the posture at the target moment includes: According to the posture of the target at the moment, the filming direction of the target video is controlled, and / or the display direction of the target video displayed on the display screen of the electronic device is controlled.
14. The method for controlling an electronic device according to claim 13, It is characterized in that According to the posture of the target at the moment, the filming direction of the target video is controlled, including: According to the posture of the target at that moment, the shooting device is controlled to be in a horizontal shooting mode or a vertical shooting mode, so as to capture the target video in the horizontal shooting mode or the vertical shooting mode; In the horizontal shooting mode, the aspect ratio of the target video is greater than 1; in the vertical shooting mode, the aspect ratio of the target video is less than 1.
15. The method for controlling an electronic device according to claim 13, It is characterized in that According to the posture of the target at the moment, the filming direction of the target video is controlled, including: According to the posture at the target moment, the screen direction of the video to be processed at the target moment is controlled to obtain the target video; wherein the screen of the target video at the target moment is aligned with the horizon.
16. The electronic device control method according to claim 11, It is characterized in that The second state is a recording state; The step of controlling the electronic device to operate according to the posture at the target moment includes: According to the target posture data, jitter compensation data of the imaging component of the electronic device corresponding to the target moment and / or other moments after the target moment is calculated, and stabilization processing is performed on the captured video of the electronic device according to the jitter compensation data.
17. A photographing device, It is characterized in that include: case; A posture sensor is used to collect posture information collected at multiple different times; An interactive component, used to control the camera to switch from a first state to a second state; A memory storing an electronic device control program; One or more processors are connected to the posture sensor and the interactive component, and when the processor executes the electronic device control program, the electronic device control method as described in any one of claims 1-16 is implemented.
Citation Information
Patent Citations
Information processing method and electronic equipment
CN107450660A
Image acquisition method and device based on posture recognition and electronic equipment
CN109714539A
Vehicle-mounted screen picture projection correction method and device
CN114007054A
Shooting method and device
CN115278049A
Posture detection method and device for electronic equipment
CN115937321A
