Suspension control method and device, electronic equipment and storage medium
By obtaining the perspective information of video image frames in the car to control the suspension motion, the problem of poor video playback experience in the prior art is solved, and a more immersive video viewing effect is achieved.
Patent Information
- Application Number
- CN202510515487.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-07-11
AI Technical Summary
The existing car video playback function cannot provide an immersive viewing experience, and the user experience is poor.
By acquiring the multi-frame image frames of the target video, the image acquisition viewing angle information is determined, and the motion of the vehicle suspension is controlled based on the information so that the suspension follows the change of the video image acquisition viewing angle.
It improves the immersive experience of video viewing and improves the user's experience.
Smart Images

Figure CN120287781A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle control, and particularly to a suspension control method, device, electronic device, and storage medium. Background Art
[0002] With the development of automobiles towards intelligence, networking, and multi-functionality, users' requirements for automobile use are constantly increasing. A vehicle is not only a means of transportation but also needs to meet people's entertainment requirements. Currently, the video playback function of automobiles is relatively single, unable to provide users with an immersive experience when watching videos, and the experience is poor. Summary of the Invention
[0003] Based on this, a suspension control method, device, electronic device, and storage medium are provided to solve the above technical problems.
[0004] In a first aspect, a suspension control method is provided, including:
[0005] Obtaining a target video; the target video includes multiple image frames;
[0006] Determining the image acquisition perspective information of each of the image frames;
[0007] When playing the target video on the vehicle, controlling the suspension movement of the vehicle according to the image acquisition perspective information.
[0008] In one embodiment, the determining the image acquisition perspective information of each of the image frames includes:
[0009] Obtaining the camera internal parameters of the target video;
[0010] For each of the image frames, calculating a rotation matrix of a first camera coordinate system of the image frame relative to a second camera coordinate system of an adjacent image frame of the image frame according to the coordinates of pixel points in the image frame, the coordinates of corresponding pixel points in the adjacent image frame of the image frame, and the camera internal parameters;
[0011] Calculating a rotation angle of the first camera coordinate system relative to the second camera coordinate system according to the rotation matrix; the image acquisition perspective information includes the rotation angle.
[0012] In one embodiment, the obtaining the camera internal parameters of the target video includes:
[0013] Determining matching pixel point pairs between an adjacent image frame of the image frame and the image frame;
[0014] Calculating the camera internal parameters of the target video based on the matching pixel point pairs.
[0015] In one embodiment, controlling the suspension movement of the vehicle according to the image acquisition perspective information includes:
[0016] Determining the movement parameters of the suspension of the vehicle according to the rotation angles corresponding to the respective image frames;
[0017] Controlling the suspension movement according to the movement parameters.
[0018] In one embodiment, determining the movement parameters of the suspension of the vehicle according to the rotation angles corresponding to the respective image frames includes:
[0019] Determining the movement direction and / or movement distance of the suspension of the vehicle according to the rotation angles corresponding to the respective image frames;
[0020] Controlling the suspension movement according to the movement parameters includes:
[0021] Controlling the suspension movement according to the movement direction and / or movement distance.
[0022] In one embodiment, determining the movement parameters of the suspension of the vehicle according to the rotation angles corresponding to the respective image frames includes:
[0023] For each of the image frames, determining the target height position of the suspension of the vehicle according to the rotation angle of the image frame; the movement parameters include the target height position;
[0024] Controlling the suspension movement according to the movement parameters includes:
[0025] Obtaining the current height position of the suspension;
[0026] Generating a suspension control signal according to the target height position and the current height position;
[0027] Controlling the suspension movement according to the suspension control signal.
[0028] In one embodiment, determining the target height position of the suspension of the vehicle according to the rotation angle of the image frame includes:
[0029] Determining the target height position of the suspension according to the rotation angle, a preset length parameter, a preset scaling factor, and a preset reference height position of the suspension of the vehicle.
[0030] In one embodiment, the rotation angle includes a pitch angle θ and a roll angle Determining the target height position of the suspension of the vehicle according to the rotation angle, a preset length parameter, a preset scaling factor, and a preset suspension reference height position includes:
[0031] According to the formula calculate the first target height position Poistion1 of the first suspension of the vehicle, where Poistion0 represents the preset reference height position, K represents the preset scaling factor, a represents the first preset length parameter, and b represents the second preset length parameter;
[0032] According to the formula calculate the second target height position Poistion2 of the second suspension of the vehicle;
[0033] According to the formula calculate the third target height position Poistion3 of the third suspension of the vehicle;
[0034] According to the formula calculate the fourth target height position Poistion4 of the fourth suspension of the vehicle.
[0035] In one embodiment, generating a suspension control signal according to the target height position and the current height position includes:
[0036] Determine the target control sequence when the value of the objective function is minimized according to the current height position and a preset suspension state prediction model; the suspension state prediction model is a model for predicting the height position of the suspension at the next moment according to the height position of the suspension at the current moment and the control input vector at the current moment; the objective function is a function for characterizing the error between the target height position of the suspension at a future time point and the height position predicted by the suspension state prediction model;
[0037] Determine the signal corresponding to the first control input vector in the target control sequence as the suspension control signal.
[0038] In a second aspect, the present application provides a suspension control device, and the device includes:
[0039] An acquisition module, configured to acquire a target video; the target video includes multiple image frames;
[0040] A determination module, configured to determine the image acquisition perspective information of each of the image frames;
[0041] A control module, configured to control the movement of the suspension of the vehicle according to the image acquisition perspective information when playing the target video on the vehicle.
[0042] In a third aspect, the present application provides an electronic device, including a processor and a memory, where a computer program is stored in the memory, and the processor executes the computer program to implement the suspension control method in the first aspect above.
[0043] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the suspension control method of the first aspect described above is implemented.
[0044] Through the suspension control method, device, electronic device, and storage medium provided by the present application, a target video is obtained. The target video includes multiple image frames. The image acquisition perspective information of each image frame is determined. When the target video is played on a vehicle, the suspension movement of the vehicle is controlled according to the image acquisition perspective information. Since the image acquisition perspective information essentially reflects the situation of the image acquisition perspective corresponding to the image frame, during the process of playing the target video, the suspension movement is controlled according to the situation of the image acquisition perspective, achieving the effect that the suspension follows the image acquisition perspective of the target video, enhancing the immersive experience of video viewing, and improving the user experience.
[0045] Other features and advantages of the present application will be described in the subsequent specification, and part of them will become obvious from the specification, or will be understood by implementing the present application. The objectives and other advantages of the present application can be achieved and obtained through the structures specifically pointed out in the written specification, claims, and drawings. It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. Description of the Drawings
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0047] Figure 1 It is a schematic flowchart of the suspension control method in Embodiment 1;
[0048] Figure 2 It is a schematic flowchart of determining the image acquisition perspective information in Embodiment 1;
[0049] Figure 3 It is a schematic structural diagram of the suspension control device in Embodiment 2;
[0050] Figure 4 It is a schematic structural diagram of the electronic device in Embodiment 3. Detailed Embodiments
[0051] To make the objectives, technical solutions, and advantages of this application more clearly understood, the following further details this application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for explaining this application and are not used to limit this application.
[0052] Embodiment 1:
[0053] This application's embodiment provides a suspension control method. Please refer to Figure 1 as shown, including:
[0054] S11: Obtain a target video; the target video includes multiple image frames.
[0055] S12: Determine the image acquisition perspective information of each image frame.
[0056] S13: When playing the target video on the vehicle, control the movement of the vehicle's suspension according to the image acquisition perspective information.
[0057] Next, the above steps will be introduced in detail.
[0058] The target video in this application's embodiment can be a video stored locally in the vehicle. For example, it can be a video captured by the vehicle. The vehicle can obtain the target video through its own image acquisition device. During the process of image acquisition by the vehicle, the image acquisition perspective can be switched so that the obtained target video has different perspectives. Of course, the target video can also be a video received by the vehicle from an external device. For example, the vehicle can receive the target video sent by the cloud or a mobile terminal.
[0059] Preferably, the target video in this application's embodiment can be a video with a changing image acquisition perspective. In this way, the movement of the suspension can be controlled according to the visual change situation. Therefore, the image acquisition perspectives of at least two image frames in the target video are different. Exemplarily, the target video is a first-perspective video.
[0060] The image acquisition perspective information of an image frame can be any information that can reflect the image acquisition perspective of this image frame. For example, it can be the visual rotation angle of this image frame relative to a reference frame, that is, the rotation angle. The reference frame can be an image frame adjacent to this image frame in the target video.
[0061] Specifically, in one embodiment, please refer to Figure 2 as shown, step S12 can include the following sub-steps:
[0062] S121: Obtain the camera internal parameters of the target video.
[0063] S122: For each image frame, calculate the rotation matrix of the first camera coordinate system of the image frame relative to the second camera coordinate system of the adjacent image frame of the image frame according to the coordinates of the pixel points in the image frame, the coordinates of the corresponding pixel points in the adjacent image frame of the image frame, and the camera internal parameters.
[0064] S123: Calculate the rotation angle of the first camera coordinate system relative to the second camera coordinate system according to the rotation matrix; the image acquisition perspective information includes the rotation angle.
[0065] For step S121, when the camera internal parameters of the target video are known, the camera internal parameters can be directly obtained. If the camera internal parameters of the target video are unknown, the camera internal parameters can be calculated through the following steps:
[0066] Sub-step one: Determine the matching pixel point pairs between the adjacent image frame of the image frame and the image frame.
[0067] Sub-step two: Calculate the camera internal parameters of the target video based on the matching pixel point pairs.
[0068] For sub-step one, a feature detection algorithm can be used to extract features from the adjacent image frame and the image frame, perform inter-frame matching based on the feature extraction results, and use a pair of key points with matching features as the matching pixel point pairs. For example, the ORB (Oriented FAST and Rotated BRIEF) algorithm can be used to extract the features of the current image frame and the previous image frame, and the FLANN (Fast Library for Approximate Nearest Neighbors) matcher can be used to match the feature points of the adjacent frames to generate the matching pixel point pairs (x i , x' i ). x i represents the feature vector of a pixel point in the image frame, and x' i represents the feature vector of the corresponding matching pixel point in the adjacent image frame.
[0069] The camera internal parameters in the above sub-step two can include the camera internal parameter matrix K. Specifically, the calculation can be performed through the following method:
[0070] Use the RANSAC (Random Sample Consensus) algorithm combined with the eight-point method to solve the fundamental matrix F.
[0071] The constraint formula is:
[0072] Through the matching pixel point pairs in sub-step one and the above constraint formula, the corresponding fundamental matrix F can be solved for each image frame.
[0073] Based on the fundamental matrix corresponding to different image frames, a system of equations regarding the focal length is constructed, and thus the focal length of the camera (i.e., the image acquisition device) can be obtained. Furthermore, the internal parameter matrix K of the camera can be obtained:
[0074]
[0075] where f x and f y respectively represent the focal lengths of the camera in the x-axis and y-axis directions, and c x and c y respectively represent the coordinates of the principal point in the x-axis and y-axis of the image frame. The center point of the image frame can be used as the principal point.
[0076] It can be understood that the obtained internal parameter matrix K of the camera can be directly substituted into step S122 for subsequent calculations; or the obtained internal parameter matrix K of the camera can be optimized to obtain the optimal internal parameter matrix K of the camera, and the optimal internal parameter matrix K is substituted into step S122 for subsequent calculations.
[0077] Specifically, the initialized K can be used as the target to be optimized, the reprojection error in all image frames is minimized, and a non-linear optimization algorithm is used to solve it to obtain the optimal internal parameter matrix K of the camera.
[0078] In step S122, the Perspective-n-Point (PnP) algorithm can be used to solve the rotation matrix of the first camera coordinate system relative to the second camera coordinate system.
[0079] Exemplarily, the inlier pairs can be screened from the matching pixel point pairs corresponding to the image frame according to the RANSAC algorithm: a certain number of matching pixel point pairs are randomly sampled from the matching pixel point pairs, the candidate rotation matrix R and translation vector t are calculated based on the sampled matching pixel point pairs, the matching pixel point pairs that satisfy the current R and t are obtained from the matching pixel point pairs, and it is determined whether the number of matching pixel point pairs that satisfy the current R and t meets the preset number threshold. If so, the currently sampled matching pixel point pairs are used as inliers for subsequent calculations. If the requirements are not met, sampling and verification are repeated until the requirements are met, and the corresponding inlier pairs are screened out.
[0080] Then, the rotation matrix is solved according to the inlier pairs and the PnP algorithm. The solution formula of PnP is:
[0081]
[0082] where n represents the number of inlier pairs, and x i is the coordinate of the pixel point belonging to the inlier pair in the current image frame, and p iare the coordinates of corresponding pixel points in adjacent image frames, K is the camera internal parameter matrix, R and t are the rotation matrix and translation vector of an image frame relative to its adjacent image frame, that is, the rotation matrix and translation vector of the first coordinate system of the image frame relative to the second coordinate system of its adjacent image frame.
[0083] In step S123, using the inverse trigonometric function, the corresponding rotation angle can be calculated according to the rotation matrix. It should be noted that the rotation angle in the embodiments of the present application includes at least one of the roll angle, yaw angle, and pitch angle.
[0084] The above content introduces the method for determining the image acquisition viewing angle information. Next, the method for controlling the suspension movement of the vehicle according to the image acquisition viewing angle information will be specifically described.
[0085] Step S13 in the embodiments of the present application may include the following steps:
[0086] Determine the motion parameters of the vehicle's suspension according to the rotation angles corresponding to each image frame;
[0087] Control the suspension movement according to the motion parameters.
[0088] It can be understood that in the embodiments of the present application, for each image frame, a motion parameter can be determined according to the rotation angle, and each suspension of the vehicle can be controlled to perform synchronous movement according to the motion parameter.
[0089] In order to further enhance the immersive experience of video viewing, the corresponding motion parameters can be calculated for each vehicle suspension according to the rotation angle corresponding to each image frame, and the movement of each vehicle suspension can be controlled according to the motion parameter.
[0090] In one embodiment, the method for determining the motion parameters may include:
[0091] Determine the motion direction and / or motion distance of the vehicle's suspension according to the rotation angles corresponding to each image frame; the motion parameters include the motion direction and / or motion distance.
[0092] In this embodiment, there is no need to obtain the current position information of the suspension. After determining the motion direction and / or motion distance of the suspension, the motion direction and / or motion distance of the suspension can be directly determined according to the rotation angle, and then the suspension movement can be directly controlled based on the motion direction and / or motion distance.
[0093] It can be understood that since this method does not require attention to the current position information of the suspension, in some embodiments, after the vehicle obtains the target video and before playing the target video, the above method can be used to generate the motion parameters of the vehicle suspension for the target video, and the target video and the motion parameters are stored in an associated manner. When playing the target video, the motion parameters pre-generated for the target video can be directly obtained according to the associated storage relationship to control the suspension movement. Compared with calculating the motion parameters every time the target video is played, it can save computing resources and improve the system operation efficiency.
[0094] Specifically, for each image frame, the motion direction and / or motion distance of the suspension can be calculated using trigonometric functions and a preset length parameter.
[0095] For example, the motion direction and / or motion distance of the suspension can be calculated according to the formula d = Kh sin∝, where K represents a preset scaling factor, h represents a preset length parameter, and ∝ represents the rotation angle, which can be any one of the yaw angle, roll angle, and pitch angle. In this example, |d| can be used as the motion distance of the suspension, and the motion direction of the suspension can be determined according to the sign of d. For example, when d is negative, the motion direction of the suspension is determined to be upward, and when d is positive, the motion direction of the suspension is determined to be downward. The preset length parameter in the above formula is a preset length value, which can be the length between the front axle and the rear axle of the vehicle, or the height difference between the highest height position and the lowest height position that the suspension can reach, or other values set.
[0096] It should be noted that the above only lists an example of calculating the motion direction and / or motion distance, and the motion direction and / or motion distance can also be calculated by other methods. For example, the motion direction and / or motion distance can be calculated according to at least two of the yaw angle, roll angle, and pitch angle.
[0097] In one embodiment, the method for determining the motion parameters may include:
[0098] For each image frame, determine the target height position of the vehicle's suspension according to the rotation angle of the image frame; the motion parameters include the target height position.
[0099] Then, controlling the suspension movement according to the motion parameters includes:
[0100] Obtain the current height position of the suspension;
[0101] Generate a suspension control signal according to the target height position and the current height position;
[0102] Control the suspension movement according to the suspension control signal.
[0103] Since the suspension control signal needs to be determined in combination with the current height position of the suspension in this embodiment, the above steps of determining the motion parameters can be executed when playing the target video.
[0104] Specifically, when playing the target video, the target video can be analyzed in real time to output the corresponding suspension control signal. The specific process can be as follows: perform video decoding on the target video, perform real-time stream processing, then grayscale, de-distort, and adjust the resolution of each frame of the image. Then, adopt the producer-consumer model to separate the decoding thread from the SLAM (Simultaneous Localization and Mapping) calculation thread. Whenever a new frame arrives, push it to the SLAM calculation queue to calculate the suspension control signal.
[0105] In this embodiment, the target height position of the suspension can be determined according to the rotation angle, the preset length parameter, the preset scaling factor, and the preset reference height position of the vehicle's suspension.
[0106] It should be noted that the preset scaling factor, the preset length parameter, the preset scaling factor, and the preset reference height position in the embodiments of the present application can all be flexibly set by developers.
[0107] Exemplarily, the target height position of the suspension can be calculated according to the formula Poistion p = Poistion0 + Kasinθ. In this formula, Poistion p represents the target height position, Poistion0 represents the preset reference height position, a represents the first preset length parameter, K represents the preset scaling factor, and θ is the roll angle.
[0108] Exemplarily, the intermediate height position between the highest height position and the lowest height position that the suspension can reach can be used as the preset height position.
[0109] It should be noted that since the projection of the yaw angle on the z-axis is 0, preferably, the pitch angle and / or the roll angle can be selected to calculate the motion parameters.
[0110] Specifically, for each image frame, when the rotation angle includes the pitch angle θ and the roll angle , the target height position of the vehicle's suspension can be calculated in the following manner:
[0111] According to the formula calculate the first target height position Poistion1 of the first suspension of the vehicle, where b represents the second preset length parameter;
[0112] According to the formula Calculate the second target height position Poistion2 of the second suspension of the vehicle;
[0113] According to the formula Calculate the third target height position Poistion3 of the third suspension of the vehicle;
[0114] According to the formula Calculate the fourth target height position of the fourth suspension of the vehicle.
[0115] Both the above-mentioned first preset length parameter and the second preset length parameter can be flexibly set by developers. For example, the first preset length parameter and the second preset length parameter can be two of the body length, body width, front and rear wheelbases, left and right wheelbases, and the difference between the highest height position and the lowest height position that the suspension can reach. Of course, they can also be set to other values.
[0116] The above-mentioned formulas for calculating the target height position are respectively set for each suspension. Therefore, according to the rotation angle of the same image frame, different motion parameters can be determined for each suspension respectively, so that each suspension moves independently according to the rotation angle, achieving effects such as tilting and jittering of the vehicle body, making the overall motion mode of the vehicle body adapt to the change of the image acquisition perspective of the target video, and enhancing the immersive experience of users when watching the video.
[0117] It should be noted that in some embodiments, other formulas can also be used to calculate the target height position of the suspension. For example, according to the formula Calculate the first target height position Poistion1 of the first suspension of the vehicle; according to the formula Calculate the second target height position Poistion2 of the second suspension of the vehicle; according to the formula Calculate the third target height position Poistion3 of the third suspension of the vehicle; according to the formula Calculate the fourth target height position Poistion4 of the fourth suspension of the vehicle; where Poistion 01 、Poistion 02 、Poistion 03 and Poistion 04 respectively represent the preset reference height positions set for the first suspension, the second suspension, the third suspension, and the fourth suspension, K1, K2, K3, and K4 respectively represent the preset scaling factors set for the first suspension, the second suspension, the third suspension, and the fourth suspension, and h1, h2, h3, and h4 respectively represent the preset length parameters set for the first suspension, the second suspension, the third suspension, and the fourth suspension.
[0118] To ensure the accuracy and stability of the generated suspension control signal, in some embodiments, the suspension control signal may be generated in the following manner:
[0119] According to the current height position and a preset suspension state prediction model, determine the target control sequence when the value of the objective function is minimized; the suspension state prediction model is a model for predicting the height position of the suspension at the next moment based on the height position of the suspension at the current moment and the control input vector at the current moment; the objective function is a function used to characterize the error between the target height position of the suspension at a future time point and the height position predicted by the suspension state prediction model;
[0120] Determine the signal corresponding to the first control input vector in the target control sequence as the suspension control signal.
[0121] Exemplarily, the suspension state prediction model may be:
[0122] x k+1 = Ax k + Bu k
[0123] where A represents the state transition matrix, B represents the control input matrix, x k+1 represents the state vector of the suspension at time k + 1, that is, the height position of the suspension at time k + 1, x k represents the state vector of the suspension at time k, that is, the height position of the suspension at time k, u k represents the control input vector of the suspension at time k, that is, the suspension control signal at time k.
[0124] Exemplarily, the objective function may be:
[0125]
[0126] Exemplarily, the constraint is: 0 ≤ x i (j) ≤ 120, u min ≤ u i (j) ≤ u max ;
[0127] where Q and Q N are state weight matrices, that is, diagonal positive definite matrices, R represents the input weight matrix, N represents the prediction horizon, x(j) represents the state vector of the suspension at time j predicted by the suspension state prediction model, x(N) represents the state vector of the suspension at time N predicted by the suspension state prediction model, x ref (j) represents the target height position of the suspension at time j, x ref(N) represents the target height position of the suspension at time N. Specifically, it can be obtained by calculating the target height position of the suspension according to the rotation angle as described above. u(j) represents the control input vector of the suspension at time j.
[0128] By solving the above objective function, a series of optimal control input vectors when the value of the objective function is minimized are obtained, which form a target control sequence. The signal corresponding to the optimal control input vector u1 at the first moment is used as the suspension control signal and output to the corresponding suspension to complete the control of the suspension.
[0129] In the embodiment of the present application, the suspension control signal is generated through the above suspension state prediction model and objective function, ensuring that the suspension can move accurately and synchronously, guaranteeing a smooth transition of the suspension and avoiding sudden movements.
[0130] It should be understood that although the steps in the above flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0131] Embodiment 2:
[0132] Based on the same inventive concept, please refer to Figure 3 As shown, the embodiment of the present application provides a suspension control device, including:
[0133] An acquisition module 301, configured to acquire a target video; the target video includes multiple image frames;
[0134] A determination module 302, configured to determine the image acquisition perspective information of each of the image frames;
[0135] A control module 303, configured to control the movement of the suspension of the vehicle according to the image acquisition perspective information when playing the target video on the vehicle.
[0136] In one embodiment, the determination module 302 is configured to obtain the intrinsic parameters of the camera for the target video; for each of the image frames, calculate a rotation matrix of a first camera coordinate system of the image frame relative to a second camera coordinate system of an adjacent image frame of the image frame according to the coordinates of the pixel points in the image frame, the coordinates of the corresponding pixel points in the adjacent image frame of the image frame, and the intrinsic parameters of the camera; calculate a rotation angle of the first camera coordinate system relative to the second camera coordinate system according to the rotation matrix; and the image acquisition perspective information includes the rotation angle.
[0137] In one embodiment, the determination module 302 is configured to determine a pair of matching pixel points between an adjacent image frame of the image frame and the image frame; and calculate the intrinsic parameters of the camera for the target video based on the pair of matching pixel points.
[0138] In one embodiment, the control module 303 is configured to determine motion parameters of the suspension of the vehicle according to the rotation angles corresponding to the respective image frames; and control the suspension movement according to the motion parameters.
[0139] In one embodiment, the control module 303 is configured to determine a motion direction and / or a motion distance of the suspension of the vehicle according to the rotation angles corresponding to the respective image frames; the motion parameters include the motion direction and / or the motion distance; and control the suspension movement according to the motion direction and / or the motion distance.
[0140] In one embodiment, for each of the image frames, the control module 303 is configured to determine a target height position of the suspension of the vehicle according to the rotation angle of the image frame; the motion parameters include the target height position; obtain the current height position of the suspension; generate a suspension control signal according to the target height position and the current height position; and control the suspension movement according to the suspension control signal.
[0141] In one embodiment, the control module 303 is configured to determine the target height position of the suspension according to the rotation angle, a preset length parameter, a preset scaling factor, and a preset reference height position of the suspension of the vehicle.
[0142] In one embodiment, the rotation angle includes a pitch angle θ and a roll angle The control module 303 is configured to calculate a first target height position Postion1 of a first suspension of the vehicle according to the formula where Poistion0 represents the preset reference height position, K represents the preset scaling factor, a represents a first preset length parameter, and b represents a second preset length parameter; calculate a second target height position Poistion2 of a second suspension of the vehicle according to the formula calculate according to the formula Calculate the third target height position Position3 of the third suspension of the vehicle; according to the formula Calculate the fourth target height position Position4 of the fourth suspension of the vehicle.
[0143] In one embodiment, the control module 303 is configured to determine an objective control sequence when the value of the objective function is minimized according to the current height position and a preset suspension state prediction model; the suspension state prediction model is a model for predicting the height position of the suspension at the next moment according to the height position of the suspension at the current moment and the control input vector at the current moment; the objective function is a function for characterizing the error between the target height position of the suspension at a future time point and the height position predicted by the suspension state prediction model; determine the signal corresponding to the first control input vector in the objective control sequence as the suspension control signal.
[0144] It should be understood that for the sake of brevity of description, the content described in some embodiments will not be repeated in this embodiment.
[0145] Embodiment Three:
[0146] Please refer to Figure 4 As shown, the embodiment of the present application provides an electronic device, including a processor 401 and a memory 402. A computer program is stored in the memory 402. The processor 401 executes the computer program. The processor executes the computer program to implement the steps of the method introduced above, which will not be repeated here.
[0147] The processor 401 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 401 may be a general-purpose processor, including a CPU (Central Processing Unit, central processor), an NP (Network Processor, network processor), etc.; it may also be a DSP (Digital Signal Processor, digital signal processor), an ASIC (Application Specific Integrated Circuit, application-specific integrated circuit), an FPGA (Field Programmable Gate Array, off-the-shelf programmable gate array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0148] The memory 402 may include, but is not limited to, RAM (Random Access Memory), ROM (Read Only Memory), PROM (Programmable Read Only Memory), EPROM (Erasable Programmable Read-Only Memory), and EEPROM (Electrically Erasable Programmable Read Only Memory), etc.
[0149] Those skilled in the art can understand that Figure 4 the structure shown in Figure 4 is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the electronic devices to which the solution of this application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0150] Based on the same inventive concept, the embodiments of this application also provide a computer-readable storage medium, such as a floppy disk, optical disc, hard disk, flash memory, USB flash drive, SD (Secure Digital) card, MMC (Multi-Media Card), etc. One or more programs for implementing the above steps are stored in the computer storage medium. These one or more programs can be executed by one or more processors to implement the steps of the methods in the above embodiments, which will not be elaborated here.
[0151] Based on the same inventive concept, the embodiments of this application also provide a computer program product, including a computer program, and the computer program implements the method described in any one of the above when executed by a processor.
[0152] Among them, the program code for the computer program product for executing this application can be written in any combination of one or more programming languages. The program code can be executed entirely on the user device, partially on the user device, executed as an independent software package, partially on the user device and partially on a remote device, or executed entirely on a remote device.
[0153] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program code.
[0154] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer-readable storage media according to the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the function specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 block or multiple blocks.
[0155] These computer program instructions can also be stored in a computer-readable memory capable of guiding a computer or other programmable data processing devices to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the function specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 block or multiple blocks.
[0156] These computer program instructions can also be loaded onto a computer or other programmable data processing devices, such that a series of user operation steps are executed on the computer or other programmable devices to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable devices provide steps for implementing the function specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 block or multiple blocks.
[0157] It should be noted that the illustrations provided in this embodiment only schematically illustrate the basic concept of the present application. Therefore, only the components related to the present application are shown in the drawings, rather than being drawn according to the number, shape, and size of the components in actual implementation. The type, quantity, and ratio of each component in actual implementation can be arbitrarily changed, and the component layout type may also be more complex. The structures, ratios, sizes, etc. shown in the drawings of this specification are only used to cooperate with the content disclosed in the specification for those familiar with this technology to understand and read, and are not used to limit the conditions under which the present application can be implemented. Therefore, they do not have a substantial technical meaning. Any modification of the structure, change in the proportional relationship, or adjustment of the size, without affecting the efficacy that the present application can produce and the purpose that can be achieved, should still fall within the scope covered by the technical content disclosed in the present application. At the same time, the terms such as "upper", "lower", "left", "right", "middle", and "one" cited in this specification are only for the convenience of clear narration and are not used to limit the scope under which the present application can be implemented. The change or adjustment of their relative relationship, without substantial change in the technical content, should also be regarded as the scope under which the present application can be implemented.
[0158] References to "embodiments" in this document mean that the specific features, structures, or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase does not necessarily refer to the same embodiment each time it appears in the text, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will understand explicitly and implicitly that the embodiments described herein can be combined with other embodiments.
[0159] As shown herein, unless the context clearly indicates otherwise, words such as "a", "an", "one", and / or "the" are not specifically singular and may also include the plural. Generally speaking, the terms "including" and "comprising" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.
[0160] The definitions included in this document, as used herein, the terms "having", "may have", "including", or "may include" indicate the existence of the corresponding functions, operations, elements, etc. in this document, and do not limit the existence of one or more other functions, operations, elements, etc. In addition, it should be understood that, as used herein, the terms "including" or "having" indicate the existence of the features, numbers, steps, operations, elements, components, or combinations thereof described in the specification, and do not exclude the existence or addition of one or more other features, numbers, steps, operations, elements, components, or combinations thereof.
[0161] In the embodiments of the present application, prefix words such as "first" and "second" are only used to distinguish different described objects, and have no restrictive effect on the position, order, priority, quantity, content, etc. of the described objects. The use of prefix words such as ordinal numbers for distinguishing described objects in the embodiments of the present application does not constitute a limitation on the described objects. For the description of the described objects, reference should be made to the description in the claims or the context of the embodiments, and no redundant limitation should be constituted due to the use of such prefix words. In addition, in the description of this embodiment, unless otherwise specified, the meaning of "a plurality" is two or more than two.
[0162] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, 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, it should be considered as the scope described in this specification.
[0163] The above-described embodiments only represent several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several deformations and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A suspension control method, characterized in that, Including: Obtain a target video; The target video includes multiple image frames; Determine the image acquisition perspective information of each of the image frames; When playing the target video on a vehicle, control the suspension movement of the vehicle according to the image acquisition perspective information.
2. The suspension control method according to claim 1, characterized in that, The determining the image acquisition perspective information of each of the image frames includes: Obtain the camera internal parameters of the target video; For each of the image frames, calculate the rotation matrix of the first camera coordinate system of the image frame relative to the second camera coordinate system of the adjacent image frame of the image frame according to the coordinates of the pixel points in the image frame, the coordinates of the corresponding pixel points in the adjacent image frame of the image frame, and the camera internal parameters; Calculate the rotation angle of the first camera coordinate system relative to the second camera coordinate system according to the rotation matrix; the image acquisition perspective information includes the rotation angle.
3. The suspension control method according to claim 2, wherein The obtaining the camera internal parameters of the target video includes: Determine the matching pixel point pairs between the adjacent image frame of the image frame and the image frame; Calculate the camera internal parameters of the target video based on the matching pixel point pairs.
4. The suspension control method according to claim 2, wherein The controlling the suspension movement of the vehicle according to the image acquisition perspective information includes: Determine the movement parameters of the suspension of the vehicle according to the rotation angles corresponding to the respective image frames; Control the suspension movement according to the movement parameters.
5. The suspension control method according to claim 4, wherein The determining the movement parameters of the suspension of the vehicle according to the rotation angles corresponding to the respective image frames includes: Determine the movement direction and / or movement distance of the suspension of the vehicle according to the rotation angles corresponding to the respective image frames; the movement parameters include the movement direction and / or movement distance; The controlling the suspension movement according to the movement parameters includes: Control the suspension movement according to the movement direction and / or movement distance.
6. The suspension control method according to claim 4, wherein The determining the movement parameters of the suspension of the vehicle according to the rotation angles corresponding to the respective image frames includes: For each of the image frames, determine the target height position of the suspension of the vehicle according to the rotation angle of the image frame; the movement parameters include the target height position; The controlling the suspension movement according to the movement parameters includes: Obtain the current height position of the suspension; Generate a suspension control signal according to the target height position and the current height position; Control the suspension movement according to the suspension control signal.
7. The suspension control method according to claim 6, characterized in that, The determining the target height position of the suspension of the vehicle according to the rotation angle of the image frame includes: Determine the target height position of the suspension according to the rotation angle, a preset length parameter, a preset scaling factor, and a preset reference height position of the suspension of the vehicle.
8. The suspension control method according to claim 7, characterized in that The rotation angle includes a pitch angle θ and a roll angle Determining a target height position of the vehicle's suspension according to the rotation angle, a preset length parameter, a preset scaling factor, and a preset suspension reference height position includes: According to the formula calculate the first target height position Poistion1 of the first suspension of the vehicle, where Poistion0 represents the preset reference height position, K represents the preset scaling factor, a represents the first preset length parameter, and b represents the second preset length parameter; According to the formula Calculate the second target height position Position2 of the second suspension of the vehicle; According to the formula calculate the third target height position Position3 of the third suspension of the vehicle; According to the formula calculate the fourth target height position Poistion4 of the fourth suspension of the vehicle.
9. The suspension control method according to claim 6, characterized in that, The generating a suspension control signal according to the target height position and the current height position includes: Determine an objective control sequence when the value of the objective function is minimized according to the current height position and a preset suspension state prediction model; the suspension state prediction model is a model for predicting the height position of the suspension at the next moment according to the height position of the suspension at the current moment and the control input vector at the current moment; the objective function is a function for characterizing the error between the target height position of the suspension at a future time point and the height position predicted by the suspension state prediction model. Determine the signal corresponding to the first control input vector in the objective control sequence as the suspension control signal.
10. A suspension control device, characterized in that, The device includes: An acquisition module, configured to acquire a target video; the target video includes multiple image frames. A determination module, configured to determine the image acquisition perspective information of each of the image frames. A control module, configured to control the movement of the suspension of the vehicle according to the image acquisition perspective information when playing the target video on the vehicle.
11. An electronic device, characterized in that, It includes a processor and a memory, and a computer program is stored in the memory. The processor executes the computer program to implement the method according to any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by at least one processor, the method according to any one of claims 1-9 is implemented.