Electronic device control method, photographing device
Patent Information
- Application Number
- CN202410757864.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2044-06-12
AI Technical Summary
但是,当电子设备在一个状态切换到另外一个状态时,可能出现较大的姿态计算误差,影响电子设备的工作
[0049] The aforementioned electronic device control method, when detecting a change in the working model or state of the electronic device, can collect attitude information of the electronic device at multiple different times. This allows for the confirmation and correction of the attitude at the target time based on multiple known attitude information, thereby achieving rapid adjustment of the electronic device's attitude and improving the accuracy of its attitude information. This, in turn, ensures the accuracy of the orientation of the images or videos acquired by the electronic device.
Smart Images

Figure CN118741302B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an electronic device control method and an electronic device. Background Technology
[0002] During the use of electronic devices, the attitude of the device is determined using an accelerometer at a single moment. 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 action cameras as an example, when electronic devices go directly from the off state to the recording state, errors in attitude calculation can cause problems such as image stabilization and incorrect imaging direction. Summary of the Invention
[0004] Therefore, it is necessary to provide an electronic device control method and imaging device that can quickly and accurately determine the posture of the electronic device in response to the above-mentioned technical problems.
[0005] In a first aspect, this application provides a method for controlling an electronic device, the method comprising:
[0006] Upon detecting a trigger operation, the attitude of the electronic device at the target time is confirmed based on attitude 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 that of the first state;
[0007] The electronic device is controlled to operate based on the posture at the target time.
[0008] In one embodiment, in the first state, the attitude sensor of the electronic device is in a power-off state; the method further includes:
[0009] When a trigger operation is detected, the electronic device switches from the first state to the second state, and the attitude sensor switches from the power-off state to the power-on state. In the power-on state, the attitude information at multiple different times is collected.
[0010] In one embodiment, the attitude information at multiple different times includes: attitude information for a first time period, which is prior to the target time.
[0011] In one embodiment, the first time period occurs after the attitude sensor of the electronic device has been initialized, and before the imaging component of the electronic device has been initialized.
[0012] In one embodiment, the attitude detection method further includes: acquiring gyroscope data during the first time period; and confirming the target attitude of the electronic device at the target time based on the attitude information acquired at multiple different times of the electronic device, including:
[0013] Based on the gyroscope data of the first time period, calculate the first aligned attitude information of the target time corresponding to each attitude information of the first time period;
[0014] The target pose information is calculated based on multiple first alignment pose information.
[0015] In one embodiment, calculating the first aligned attitude information at the target time corresponding to each attitude information in the first time period based on the gyroscope data of the first time period includes:
[0016] Based on the angular velocity parameters corresponding to each moment, determine the increment of the angular velocity parameters at adjacent moments, 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 time moment are aligned with the target time moment to obtain the rotated acceleration parameters corresponding to each time moment.
[0018] In one embodiment, the target pose information is calculated based on a plurality of first alignment pose information, including:
[0019] The target attitude information is confirmed based on the feature values of the first alignment attitude information and / or the acquired attitude information at the target time; wherein, the feature values include: mean and weighted mean.
[0020] In one embodiment, the attitude information at multiple different times includes:
[0021] The attitude information for the second time period, which is after the target time.
[0022] In one embodiment, gyroscope data is collected during the second time period; the step of confirming the target attitude of the electronic device at the target time based on the attitude information collected at multiple different times of the electronic device includes:
[0023] Based on the gyroscope data of the second time period, calculate the target time alignment attitude information corresponding to each attitude information of the second time period;
[0024] The target pose information is adjusted based on multiple second alignment pose information.
[0025] In one embodiment, the target attitude information includes the target's gravity direction at a given time.
[0026] In one embodiment, the electronic device includes a camera; the first state includes any one of the electronic device's power-off state, standby state, and hibernation state.
[0027] In one embodiment, the second state includes the power-on state of the electronic device; the triggering instruction includes: triggering the power-on operation of the electronic device; and / or,
[0028] The second state includes the preview state of the electronic device, and the triggering operation includes triggering the electronic device to enter the shooting mode; and / or,
[0029] The second state includes the recording state of the electronic device, and the triggering operation includes the 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 time includes:
[0031] Based on the posture at the target time, the orientation of the target video is controlled, and / or the display screen of the electronic device displays the display orientation of the target video.
[0032] In one embodiment, controlling the orientation of the target video based on the pose at the target time includes:
[0033] Depending on the target's posture at that moment, control the shooting device to be in horizontal or vertical shooting mode, so as to capture target video in either horizontal or 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 orientation of the target video based on the pose at the target time includes:
[0036] Based on the pose at the target time, the orientation of the video to be processed at the target time is controlled to obtain the target video, and the target video is aligned with the horizon at the target time.
[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 time includes:
[0038] Based on the target attitude data, the jitter compensation data of the imaging component of the electronic device corresponding to the target time and / or other times after the target time is calculated, and the video acquired by the electronic device is stabilized based on the jitter compensation data.
[0039] Secondly, this application also provides an electronic device control apparatus, the apparatus comprising:
[0040] The attitude calculation module is used to determine the attitude of the electronic device at a target time based on attitude 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 that of the first state.
[0041] An attitude control module is used to control the operation of the electronic device based on the attitude at the target time.
[0042] Thirdly, this application also provides a shooting device. The electronic device includes:
[0043] case;
[0044] An attitude sensor is used to collect attitude information at multiple different times.
[0045] Interactive components are used to control electronic devices to switch from a first state to a second state;
[0046] A memory, wherein the memory stores an electronic device control program;
[0047] One or more processors are connected to the attitude sensor and the interaction component, and when the processor executes the electronic device control program, it implements the steps of the method in any embodiment of the first aspect.
[0048] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the method in any embodiment of the first aspect.
[0049] The aforementioned electronic device control method, when detecting a change in the working model or state of the electronic device, can collect attitude information of the electronic device at multiple different times. This allows for the confirmation and correction of the attitude at the target time based on multiple known attitude information, thereby achieving rapid adjustment of the electronic device's attitude and improving the accuracy of its attitude information. This, in turn, ensures the accuracy of the orientation of the images or videos acquired by the electronic device. Attached Figure Description
[0050] Figure 1 This is a flowchart illustrating an electronic device control method in one embodiment;
[0051] Figure 2 This is a schematic diagram of a target pose calculation method in one embodiment;
[0052] Figure 3This is a schematic diagram of an electronic device control device in one embodiment;
[0053] Figure 4 This is a schematic diagram of the configuration of an electronic device in one embodiment. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0055] In related technologies, the attitude of a motion camera is determined by using an accelerometer at a single moment. When the camera is turned on while in motion, there is a large attitude determination error, which results in incorrect image orientation or a tilted horizon.
[0056] In some scenarios, the electronic device is an action camera, which is equipped with an image sensor, an optical lens, a processor, and an attitude sensor; wherein, the attitude sensor may include a gyroscope, an accelerometer, and a magnetometer, etc.
[0057] In some embodiments, the action camera includes a quick-capture mode, that is, when the camera is powered off, it enters the recording state when it detects that a quick-capture device (such as a button, touch, or vibration sensor) is triggered. If the attitude detection is inaccurate at this time, it will lead to incorrect orientation of the footage, or poor performance of functions such as image stabilization and horizon correction.
[0058] To address the technical deficiencies in related technologies, in one embodiment, such as Figure 1 As shown, an electronic device control method is provided, which can be applied to action cameras, as well as smart electronic devices with photo and video recording functions such as mobile phones and smartwatches. The method includes steps S11-S12; specifically:
[0059] Step S11: When a trigger operation is detected, the attitude of the electronic device at the target time is confirmed based on the attitude 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 an action camera, the triggering operation can be a triggering operation caused by the user's control operation of the electronic device. For example, the triggering operation can be based on the user's operation of the screen and function controls of the electronic device, causing the electronic device to switch from a low-power state such as power off, standby, or sleep state to a high-power state such as shooting mode, video recording mode, or fast shooting function mode.
[0061] Alternatively, in some exemplary embodiments, the aforementioned triggering operation may also be a triggering operation caused by the electronic device switching its autonomous operating mode or state due to changes in scene or posture. For example, it may be a switch from a low-power state such as standby or sleep state to a high-power state such as shooting mode, video recording mode, or quick shooting function mode when the electronic device detects a change from a static state to a moving state.
[0062] When an electronic device detects a trigger operation, it can begin collecting attitude information and use the collected attitude information to calculate the attitude information at the target time.
[0063] In one exemplary embodiment, the electronic device includes a camera; the first state includes any one of the electronic device's power-off state, standby state, and hibernation state.
[0064] For example, the second state includes the power-on state of the electronic device; the triggering instruction includes: triggering the power-on operation of the electronic device.
[0065] For example, taking an electronic device as an action camera equipped with a camera component, when the user presses the power button to turn on the electronic device, the electronic device switches from the off state to the on state, which can trigger the electronic device to collect posture information at multiple different times.
[0066] For example, the second state includes the preview state of the electronic device, and the triggering operation includes triggering the electronic device to enter the shooting mode.
[0067] For example, if an electronic device is currently in standby or sleep mode, when the user operates the electronic device to enter photo or video recording mode and enters the preview interface, the electronic device can be triggered to start collecting posture information.
[0068] For example, the second state includes the recording state of the electronic device, and the triggering operation includes the operation of triggering the quick shooting function.
[0069] For example, when a user operates an electronic device to enter the quick shooting function, the device can be triggered to collect posture information at multiple different times. This could be achieved by the device automatically entering the quick shooting function after being powered on from a power-off state; or by the user selecting the quick shooting function by tapping the screen of the electronic device while it is in sleep mode.
[0070] In an exemplary embodiment, in the first state, the attitude sensor of the electronic device is in a power-off state. The method further includes: when the electronic device switches from the first state to the second state upon detecting a trigger operation, the attitude sensor switches from a power-off state to a power-on state, and in the power-on state, the attitude information at the plurality of different times is collected.
[0071] Specifically, the aforementioned first state can be a power-off state, or a standby state, or a hibernation state; correspondingly, the attitude sensor of the electronic device can be in a power-off state at this time. For example, taking the power-off state as the first state, the attitude sensor is in a power-off state when the electronic device is powered off. When the user controls the electronic device to power 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 powered on, the attitude sensor is powered on, causing the attitude sensor to change from a power-off state to a power-on state. After the attitude sensor is powered on, it performs initialization, and after the initialization is completed, it starts working and generates attitude information. At this time, after the electronic device is powered on, it recognizes that a trigger operation has occurred, and after the attitude sensor is powered on, it acquires the attitude information collected by the attitude sensor at multiple consecutive moments.
[0072] In an exemplary embodiment, the attitude information at multiple different times includes: attitude information for a first time period, which is prior to the target time.
[0073] For example, the first time period occurs after the attitude sensor of the electronic device has been initialized, and before the imaging component of the electronic device has been initialized.
[0074] Specifically, after the electronic device is powered on, the attitude sensor is also powered on, causing it to perform an initialization operation. After completing the initialization, the attitude sensor can output attitude information at a fixed frequency. This 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 or video recording function to power on and initialize the imaging component; alternatively, the electronic device can be pre-configured to automatically enter a quick shooting mode upon power-on, in which case the imaging component will be powered on and initialized immediately upon power-on. The moment the attitude sensor completes initialization can be used as the start time of the first time period, and the moment the imaging component completes initialization can be used as the end time of the first time period; thus, the attitude information output by the attitude sensor within this time period can be used as attitude information at multiple different times.
[0075] In one exemplary embodiment, the method further includes: acquiring gyroscope data during the first time period. (See reference...) Figure 2 As shown, determining the target attitude of the electronic device at the target time based on attitude information collected at multiple different times includes:
[0076] Step S21: Based on the gyroscope data of the first time period, calculate the first aligned attitude information of the target time corresponding to each attitude information of the first time period.
[0077] Step S22: Calculate the target pose information based on multiple first alignment pose information.
[0078] For example, after initialization, the attitude sensor of an electronic device can output attitude information at a fixed frequency, including accelerometer data, gyroscope data, and corresponding timestamp data. A data queue can be pre-built in memory to write the attitude information corresponding to a first time period. After the attitude sensor completes initialization, the gyroscope data generated by the attitude sensor can be read and written to this data queue. Furthermore, the gyroscope data corresponding to the first time period can be determined based on the timestamp data. For the gyroscope data within the first time period, alignment processing can be performed, rotating all gyroscope data from different times to align with that time.
[0079] For example, in step S21, calculating the first aligned attitude information of the target time corresponding to each attitude information in the first time period based on the gyroscope data of the first time period includes:
[0080] Step S211: Determine the increment of angular velocity parameters at adjacent times based on the angular velocity parameters corresponding to each time moment, and construct 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 time point to the target time point to obtain the rotational acceleration parameters corresponding to each time point.
[0082] Specifically, based on the angular velocity parameters at each moment, the velocity parameter increments between adjacent moments can be calculated, thus constructing a rotation matrix. For example, let the current moment be N, the previous moment be N-1, and so on up to moment 0. Then the rotation matrix from moment N-1 to moment N is... By recursively calculating the angular velocity output by the gyroscope, the angular velocity increments at adjacent moments can be obtained; then, the quaternion increments or rotation matrices at adjacent moments can be constructed using the angular velocity increments.
[0083] For example, when performing data alignment, the IMU coordinate system at adjacent times can be aligned to the IMU coordinate system at the target time.
[0084] After obtaining the rotation matrices for adjacent time points, the acceleration parameters after rotation at that time point can be calculated based on the rotation matrices and the acceleration parameters at that time point. For example, let the original accelerometer data at time N be... Then the accelerometer data at time N-1 can be aligned to time N, and the rotated accelerometer is marked as... ; and so on, until the final accelerometer sequence after rotation at all moments can be obtained: , ... , The acceleration parameters after rotation can be used as the first alignment attitude information at the moment of target alignment.
[0085] For example, in step S22, calculating the target posture information based on multiple first alignment posture information includes: confirming the target posture information based on the feature values of the first alignment posture information and / or the acquired posture information at the target time; wherein, the feature values include: mean and weighted mean.
[0086] For example, the target attitude information includes the target's gravity direction at a given time.
[0087] Specifically, after obtaining the acceleration parameters after rotation, the average or weighted average of all rotated and aligned accelerometer data can be calculated at an appropriate time to determine the average gravitational direction, i.e.: ;
[0088] and utilize The gravitational direction vector [0,0,1] determines the target attitude information of the electronic device at the target time.
[0089] Step S12: Control the electronic device to operate according to the attitude at the target time.
[0090] For example, after determining the posture information of the electronic device at a target time, the operation of the electronic device can be controlled based on this posture information. For instance, the display orientation of the content on the screen of the electronic device can be adjusted or corrected based on the posture information. The target time can be the starting moment when the electronic device enters shooting mode or quick shooting mode and begins taking a photo or recording video.
[0091] By collecting attitude information of the electronic device at multiple different moments when it switches from a first state to a second state, and using the acceleration information from these multiple moments to calculate the average value of the accelerometer readings, the accurate initial gravity orientation can be determined using the average accelerometer readings and the gravity direction vector, thereby determining the attitude of the electronic device. By using multiple acceleration data segments to determine the initial attitude of the electronic device at power-on, the attitude determination error caused by external motion is effectively reduced, increasing the accuracy of the video orientation at power-on and the accuracy in the horizon correction mode.
[0092] In one exemplary embodiment, the second state is a recording state. Controlling the electronic device to operate based on the posture at the target time includes: controlling the orientation of the target video frame based on the posture at the target time, and / or controlling the display orientation of the target video on the electronic device's screen.
[0093] Specifically, when a user controls an electronic device to use its recording or photo-taking functions, the display orientation of the image on the device's screen can be controlled based on the currently calculated pose information at the target moment. For example, the video display orientation on the device's screen can be controlled to be vertically upward, thus ensuring that the current content displayed on the device's screen is in the correct orientation even when the device's camera module is tilted.
[0094] Furthermore, based on the attitude information of the target moment currently calculated, the imaging direction of the video data currently captured by the electronic device can also be controlled; for example, the imaging direction can be adjusted to vertically upward.
[0095] In an exemplary embodiment, controlling the orientation of the target video based on the pose at the target time includes: controlling the shooting device to be in horizontal or vertical shooting mode based on the pose at the target time, so as to capture the target video in either horizontal or 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, based on the current posture information or model configuration information of the electronic device, it can be configured to use either horizontal or vertical shooting mode. After determining the posture of the electronic device at the target time, the current shooting mode can be adjusted. For example, the electronic device defaults to vertical shooting mode; after entering recording mode, if the posture information at the target time indicates that the current posture of the electronic device is normal, then vertical shooting mode can be used; or, if the posture information at the target time indicates that the current posture of the electronic device is tilted or horizontal, then horizontal shooting mode can be used.
[0097] In an exemplary embodiment, controlling the orientation of the target video based on the pose at the target time includes: controlling the orientation of the video to be processed at the target time based on the pose at the target time to obtain the target video, wherein the target video is aligned with the horizon at the target time.
[0098] For example, the video to be processed can be the video in the preview interface. When recording with an electronic device, the orientation of the video frame can be adjusted according to the posture of the electronic device at the target time; for example, controlling the video frame to align with the horizon.
[0099] In one exemplary embodiment, the second state is a recording state. Controlling the electronic device to operate based on the pose at the target time includes: calculating jitter compensation data for the imaging component of the electronic device at the target time and / or other times after the target time based on the target pose data, and stabilizing the captured video of the electronic device based on the jitter compensation data.
[0100] For example, shake compensation data can be motion compensation data for the imaging component. Specifically, the current degree of shake of the imaging component, such as shake direction and shake intensity, can be estimated based on the target attitude data. Based on the current degree of shake, shake compensation data for the imaging component lens and / or image sensor can be calculated, and the camera lens or image sensor can be moved to counteract the shake, thus achieving optical image stabilization. Alternatively, the displacement and direction of the stabilization platform can be controlled based on the target attitude data to achieve mechanical image stabilization of the imaging component.
[0101] In one exemplary embodiment, the attitude information at multiple different times includes: attitude information at a second time period, which is after the target time.
[0102] For example, the method further includes: acquiring gyroscope data during the second time period.
[0103] The step of determining the target attitude of the electronic device at a target time based on the attitude information collected at multiple different times of the electronic device includes: calculating the target time alignment attitude information corresponding to each attitude information in the second time period based on the gyroscope data in the second time period; and adjusting the target attitude information based on multiple second alignment attitude information.
[0104] Specifically, the aforementioned second time period can be a preset duration following the target time. For example, the length of the second time period can be pre-configured, such as 5 seconds or 3 seconds. After the target time, gyroscope data from the attitude sensor at multiple moments within the second time period can be acquired. Based on the angular velocity parameters corresponding to each moment, the increment of the angular velocity parameters at adjacent moments is determined, and a rotation matrix is constructed based on each angular velocity parameter increment. Then, based on the rotation matrix, the acceleration parameters at each moment are aligned with the target time, thereby obtaining the rotated acceleration parameters corresponding to each moment, which serve as the second aligned attitude information. The average gravity direction at the current moment is recursively calculated based on the rotated acceleration parameters, and the attitude information at the current moment is quickly adjusted based on the average gravity and gravity direction vector.
[0105] The initial attitude quaternion or attitude matrix determined by the average gravity calculated from limited data at the initial moment may be inaccurate. In this case, the average gravity can be calculated for each subsequent moment after the target moment to correct the initially determined attitude quaternion or rotation matrix. To ensure computational accuracy, the length of the second time interval can be configured to be less than or equal to 5 seconds. Assuming the initial attitude quaternion determined by the average gravity is q0, q0 can be used to adjust the integral result of the initial gyroscope angle increment. Let's assume the quaternion determined by the average gravity at the 5th second is q... final Then q can be used final Adjust the integral result of the gyroscope angle increment at this point. This will allow for further optimization of the attitude data.
[0106] In this embodiment, when the electronic device undergoes a state change, after the attitude sensor is powered on but before the imaging component completes initialization, the device actively acquires attitude information at multiple different times. This attitude information is then used to calculate the attitude at the target time, thereby determining the initial attitude of the camera at startup using multiple acceleration data segments. This reduces the attitude determination error caused by external motion, lowers the attitude determination error when the electronic device is powered on while in motion, and makes the camera attitude more accurate. This increases the accuracy of the video orientation at startup and the accuracy in the below-the-horizon correction mode. Furthermore, if the initial attitude determination error is large, subsequent acquisition of attitude information in a second time period and optimization of the attitude at the target time further mitigates the impact of this error and ultimately adjusts the attitude orientation to an accurate one.
[0107] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0108] Based on the same inventive concept, this application also provides an electronic device control apparatus for implementing the aforementioned electronic device control method. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the electronic device control apparatus provided below can be found in the limitations of the electronic device control method described above, and will not be repeated here.
[0109] In one embodiment, such as Figure 3 As shown, an electronic device control device 30 is provided, comprising:
[0110] The attitude calculation module 301 is used to determine the attitude of the electronic device at a target time based on attitude 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 that of the first state.
[0111] The device control module 302 is used to control the operation of the electronic device according to the attitude at the target time.
[0112] Each module in the aforementioned electronic device control unit can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the 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, camera, action camera, or drone with photo and video recording functions. (Reference) Figure 4As shown, the shooting device includes a housing 401, and a system bus 404, an attitude sensor 405, and a processor 407 disposed within the housing 401. A lens assembly 402, a display unit 401, and an interaction component 406 may also be disposed on the housing 401. Furthermore, the shooting device may also include a memory, an input / output interface, and a communication interface. The processor, memory, and input / output interface are connected via the system bus, and the communication interface, display unit, and interaction component are connected to the system bus via the input / output interface. The processor of the shooting device provides computing and control capabilities. The interaction component can be used to control the shooting device to switch from a first state to a second state. The memory of this electronic device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the shooting device is used for exchanging information between the processor and external devices. The communication interface of the shooting device is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by a processor, this computer program can implement a method for controlling an electronic device. The display unit of this computer device is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen; the interactive components of the electronic device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the casing 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 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which 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 different component arrangements.
[0115] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0116] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[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, data stored, data displayed, 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 related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0118] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media 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), magnetic 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. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0119] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for controlling an electronic device, characterized in that, include: Upon detecting a trigger operation, the attitude of the electronic device at a target time is confirmed based on attitude 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, the power consumption of the second state being greater than the power consumption of the first state; the attitude at the target time is determined based on the first aligned attitude information at the target time and / or the feature values of the collected attitude information at the target time. The electronic device is controlled to operate based on the attitude at the target time. The attitude information collected at multiple different times includes: attitude information for a first time period, which is before the target time. The method further includes: collecting gyroscope data during the first time period; The step of determining the attitude of the electronic device at a target time based on attitude information collected at multiple different times includes: calculating the first aligned attitude information of the target time corresponding to each attitude information in the first time period based on gyroscope data in the first time period; and calculating the attitude of the target time based on multiple first aligned attitude information.
2. The electronic device control method according to claim 1, characterized in that, In the first state, the attitude sensor of the electronic device is powered off; the method further includes: When a trigger operation is detected, the electronic device switches from the first state to the second state, and the attitude sensor switches from the power-off state to the power-on state. In the power-on state, the attitude information at multiple different times is collected.
3. The electronic device control method according to claim 1, characterized in that, The first time period is after the attitude sensor of the electronic device has been initialized, and before the imaging component of the electronic device has been initialized.
4. The electronic device control method according to claim 1, characterized in that, The step of calculating the first aligned attitude information of the target time corresponding to each attitude information in the first time period based on the gyroscope data of the first time period includes: Based on the angular velocity parameters corresponding to each moment, determine the increment of the angular velocity parameters at adjacent moments, and construct a rotation matrix based on each of the angular velocity parameter increments; Based on the rotation matrix, the acceleration parameters at each time moment are aligned with the target time moment to obtain the rotated acceleration parameters corresponding to each time moment.
5. The electronic device control method according to claim 1, characterized in that, The feature values include: mean and weighted mean.
6. The electronic device control method according to claim 1, characterized in that, The attitude information collected at multiple different times includes: The attitude information for the second time period, which is after the target time.
7. The electronic device control method according to claim 6, characterized in that, The method further includes: collecting gyroscope data during the second time period; The step of determining the attitude of the electronic device at a target time based on attitude information collected at multiple different times includes: Based on the gyroscope data of the second time period, calculate the second alignment attitude information of the target time corresponding to each attitude information of the second time period; The orientation at the target time is adjusted based on multiple second alignment orientation information.
8. The electronic device control method according to claim 1, characterized in that, The attitude at the target time includes the direction of gravity at the target time.
9. The electronic device control method according to any one of claims 1-8, characterized in that, The electronic device includes a camera; the first state includes any one of the electronic device's power-off state, standby state, and hibernation state.
10. The electronic device control method according to claim 9, characterized in that, The second state includes the powered-on state of the electronic device; the triggering operation includes: triggering the electronic device to power on; and / or, The second state includes the preview state of the electronic device, and the triggering operation includes triggering the electronic device to enter the shooting mode; and / or, The second state includes the recording state of the electronic device, and the triggering operation includes triggering the quick shooting function.
11. The electronic device control method according to claim 9, characterized in that, The second state is the recording state; Controlling the electronic device to operate based on the attitude at the target time includes: Based on the posture at the target time, control the orientation of the target video, and / or control the display orientation of the target video on the screen of the electronic device.
12. The electronic device control method according to claim 11, characterized in that, Based on the pose at the target time, control the orientation of the target video segment, including: Depending on the target's posture at that moment, control the shooting device to be in horizontal or vertical shooting mode, so as to capture target video in either horizontal or 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.
13. The electronic device control method according to claim 11, characterized in that, Based on the pose at the target time, control the orientation of the target video segment, including: Based on the pose at the target time, the orientation of the video to be processed at the target time is controlled to obtain the target video; wherein the target video is aligned with the horizon at the target time.
14. The electronic device control method according to claim 8, characterized in that, The second state is the recording state; Controlling the electronic device to operate based on the attitude at the target time includes: Based on the attitude at the target time, calculate the jitter compensation data of the imaging component of the electronic device at the target time and / or other times after the target time, and perform stabilization processing on the video acquired by the electronic device based on the jitter compensation data.
15. A shooting device, characterized in that, include: case; An attitude sensor is used to collect attitude information at multiple different times. Interactive components are used to control the shooting device to switch from the first state to the second state; A memory, wherein the memory stores an electronic device control program; One or more processors are connected to the attitude sensor and the interaction component, and when the processor executes the electronic device control program, it implements the electronic device control method as described in any one of claims 1-14.
Citation Information
Patent Citations
Shooting method and device
CN115278049A
Processing method and electronic equipment
CN116009710A