Camera control method and device, vehicle, medium and product

By using the state information during the movement process (such as motor operating conditions and speed) in the camera to be calibrated, the problems of low calibration efficiency and high technical threshold in the camera movable range in the prior art are solved, and a more efficient and accurate calibration process is achieved.

CN120128784APending Publication Date: 2025-06-10BYD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510148022.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

In the prior art, the calibration of the lifting and lowering range of the vehicle camera has the problems of high technical threshold and low efficiency, and it needs to rely on professional tools and maintenance personnel for inspection.

Method used

By controlling the camera movement when the camera is in the to be calibrated state, it is calibrated according to the first state information of the camera during movement (such as the operating conditions and rotation speed of the motor).

Benefits of technology

It reduces the difficulty and technical threshold for calibrating the movable range of the camera, improves calibration efficiency, and ensures the correlation between the accuracy of the calibration results and the camera status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120128784A_ABST
    Figure CN120128784A_ABST
Patent Text Reader

Abstract

The invention discloses a camera control method and device, an electronic device, a vehicle, a computer readable storage medium and a computer program product, and the method comprises the steps: controlling a camera to move under the condition that the camera is in a to-be-calibrated state, and carrying out the calibration of the camera according to the first state information of the camera in the moving process, and calibrating the movable range of the camera. Therefore, under the condition that the movable camera is in the to-be-calibrated state, the camera can be controlled to move, and the movable range of the camera is calibrated according to the first state information of the camera, so that the movable range calibration is realized based on the camera, the movable range calibration efficiency of the camera is improved to a certain extent, and the calibration accuracy of the camera is improved. And the calibrated movable range of the camera can be related to the state of the camera, so that the accurate calibration of the movable range of the camera can be ensured to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of cameras, and particularly relates to a control method for a camera, a control device, an electronic device, a vehicle, a computer-readable storage medium, and a computer program product. Background Art

[0002] In the related art, multiple cameras are usually installed in a vehicle for the vehicle to perceive the outside world. For example, a retractable camera on an in-vehicle entertainment screen is used to capture the facial image of a user. However, the retractable range of such a retractable camera may change due to factors such as the number of times the camera is used. The change in the retractable range usually needs to be detected by maintenance personnel with the help of professional tools, which has a certain technical threshold and low efficiency. Summary of the Invention

[0003] The present application provides a control method for a camera, a control device, an electronic device, a vehicle, a computer-readable storage medium, and a computer program product.

[0004] An embodiment of the present application provides a control method for a camera, where the camera is movable. The method includes:

[0005] When the camera is in a state to be calibrated, controlling the camera to move;

[0006] Calibrating the movable range of the camera according to first state information of the camera during the movement.

[0007] In this way, in the embodiment of the present application, when the movable camera is in a state to be calibrated, the camera can be controlled to move, and the movable range of the camera is calibrated according to the first state information of the camera during the movement, so that the calibration of the movable range of the camera can be realized based on the camera itself. The difficulty of calibrating the movable range of the camera and the technical threshold required for calibrating the movable range of the camera are both reduced. Furthermore, the calibration efficiency of the movable range of the camera can be improved to a certain extent. And, since the movable range of the camera can be calibrated based on the first state information of the camera during the movement, the calibrated movable range of the camera can be related to the state of the camera itself, so that the accurate calibration of the movable range of the camera can be ensured to a certain extent.

[0008] In some embodiments of the present application, the camera includes a camera body and a motor, the motor drives the camera body to move, and the first state information includes the working condition of the motor and / or the rotation speed of the motor.

[0009] Thus, in the embodiments of the present application, the movable range of the camera can be calibrated by the working condition and / or rotation speed of the motor capable of driving the camera body, which ensures the accurate calibration of the movable range of the camera to a certain extent.

[0010] In some embodiments of the present application, calibrating the movable range of the camera according to the first state information of the camera during the movement includes:

[0011] Calibrating the movable range according to the target rotation speed of the motor, where the target rotation speed is the rotation speed of the motor when it is in a stalled condition during the movement of the camera body, and the rotation speed of the motor is related to the position of the camera body.

[0012] Thus, in the embodiments of the present application, the movable range of the camera can be calibrated by the rotation speed of the motor when it is in a stalled condition during the movement of the camera body, which ensures the accurate calibration of the movable range of the camera to a certain extent.

[0013] In some embodiments of the present application, during the movement of the camera body, if the change amount of the rotation speed of the motor is less than a preset amount within a preset time period, the motor is in the stalled condition.

[0014] Thus, in the embodiments of the present application, it can be determined that the motor is in the stalled condition when the change amount of the rotation speed of the motor is less than the preset amount, enabling the determination of the stalled condition of the motor.

[0015] In some embodiments of the present application, the motor drives the camera body to move along a preset direction. Calibrating the movable range according to the target rotation speed of the motor includes:

[0016] Calibrating the movable range according to the first target rotation speed and the second target rotation speed of the motor, where the first target rotation speed is the rotation speed of the motor when it is in a stalled condition during the forward movement of the camera body along the preset direction, and the second target rotation speed is the rotation speed of the motor when it is in a stalled condition during the reverse movement of the camera body along the preset direction.

[0017] Thus, in the embodiments of the present application, the movable range of the camera can be calibrated according to the first target rotation speed of the motor when it is in a stalled condition during the forward movement of the camera body along the preset direction and the second target rotation speed of the motor when it is in a stalled condition during the reverse movement of the camera body along the preset direction, thereby realizing the calibration of the movable range of the camera.

[0018] In some embodiments of the present application, the target rotational speed includes a plurality of rotational speed sampling values, and the motor drives the camera body to move in a preset direction. Calibrating the movable range according to the target rotational speed of the motor includes:

[0019] Calibrating the movable range according to the average value of the plurality of rotational speed sampling values.

[0020] In this way, in the embodiments of the present application, the average value of the plurality of rotational speed sampling values when the motor is in a stall condition can be used to calibrate the movable range of the camera, thereby ensuring the accurate calibration of the movable range of the camera.

[0021] In some embodiments of the present application, the method further includes:

[0022] When the calibration of the movable range is completed, it is determined that the camera is in a calibrated state.

[0023] In this way, in the embodiments of the present application, after the calibration of the movable range of the camera is completed, it can be determined that the status setting of the camera is the calibrated state, thereby avoiding the situation where the vehicle calibrates the movable range of the camera again due to the camera status not being changed in time.

[0024] In some embodiments of the present application, the method further includes:

[0025] In response to a camera movement instruction, controlling the camera to move to the target position indicated by the camera movement instruction.

[0026] In this way, in the embodiments of the present application, in response to a camera movement instruction, the camera can be controlled to move to the target position indicated by the camera movement instruction, thereby realizing the movement control of the camera.

[0027] In some embodiments of the present application, the method further includes:

[0028] During the process of the camera moving to the target position, determining the calibration status of the camera according to the second status information of the camera, where the calibration status includes a calibrated state and a to-be-calibrated state.

[0029] In this way, in the embodiments of the present application, the calibration status of the camera can be determined according to the second status information during the process of moving to the target position, thereby realizing the determination of the calibration status of the camera.

[0030] In some embodiments of the present application, the camera includes a camera body and a motor, the motor drives the camera body to move, the second state information includes the operating condition of the motor and / or the rotational speed of the motor, and during the process of the camera moving towards the target position, determining the calibration state of the camera according to the second state information of the camera includes:

[0031] Determining the calibration state according to a third target rotational speed of the motor, where the third target rotational speed is the rotational speed of the motor when it is in a stalled condition during the process of the camera body moving towards the target position.

[0032] In this way, in the embodiments of the present application, the calibration state of the camera can be determined according to the third target rotational speed of the motor when it is in a stalled condition during the process of the camera body moving towards the target position, which to a certain extent ensures the reliable determination of the calibration state of the camera.

[0033] In some embodiments of the present application, determining the calibration state according to the third target rotational speed of the motor includes:

[0034] When the third target rotational speed does not match the calibration rotational speed corresponding to the target position, determining that the camera is in the to-be-calibrated state; and / or,

[0035] When the third target rotational speed matches the calibration rotational speed, determining that the camera is in the calibrated state.

[0036] In this way, in the embodiments of the present application, it is possible to determine that the camera is in the to-be-calibrated state when the third target rotational speed does not match the calibration rotational speed corresponding to the target position, and / or determine that the camera is in the calibrated state when the third target rotational speed matches the calibration rotational speed, thereby realizing the determination of the calibration state of the camera.

[0037] In some embodiments of the present application, when the difference between the third target rotational speed and the calibration rotational speed is within a preset range, the third target rotational speed matches the calibration rotational speed; and / or, when the difference between the third target rotational speed and the calibration rotational speed is not within the preset range, the third target rotational speed does not match the calibration rotational speed.

[0038] In this way, in the embodiments of the present application, it is possible to determine that the third target rotational speed matches the calibration rotational speed when the difference between the third target rotational speed and the calibration rotational speed is within the preset range, and / or determine that the third target rotational speed does not match the calibration rotational speed when the difference between the third target rotational speed and the calibration rotational speed is not within the preset range, thereby ensuring the reliable determination of the calibration state of the camera.

[0039] In some embodiments of the present application, the second status information includes the continuous movement time of the camera.

[0040] Thus, in the embodiments of the present application, the calibration status of the camera can be determined according to the continuous movement time of the camera during the movement of the camera towards the target position, ensuring the robust determination of the calibration status to a certain extent.

[0041] In some embodiments of the present application, during the movement of the camera towards the target position, determining the calibration status of the camera according to the second status information of the camera includes:

[0042] When the continuous movement time is greater than or equal to the preset time and the camera does not reach the target position, determining that the camera is in the to-be-calibrated state; and / or,

[0043] When the camera reaches the target position before the continuous movement time is greater than or equal to the preset time, determining that the camera is in the to-be-calibrated state.

[0044] Thus, in the embodiments of the present application, it is possible to determine that the camera is in the to-be-calibrated state when the continuous movement time is greater than or equal to the preset time and the camera does not reach the target position, and / or to determine that the camera is in the to-be-calibrated state when the camera reaches the target position before the continuous movement time is greater than or equal to the preset time, thereby realizing the determination of the calibration status of the camera based on the continuous movement time of the camera.

[0045] The embodiments of the present application provide a control device, which includes a processing unit configured to control the movement of the camera and calibrate the movable range of the camera according to the first status information of the camera during the movement when the camera is in the to-be-calibrated state.

[0046] The embodiments of the present application provide an electronic device, including a memory and a processor. When a computer program stored in the memory is executed by the processor, the above-mentioned control method of the camera is implemented.

[0047] The embodiments of the present application provide a vehicle, including the above-mentioned electronic device or control device.

[0048] The embodiments of the present application provide a computer-readable storage medium, which stores a computer program. When the computer program is executed by one or more processors, the above-mentioned control method of the camera is implemented.

[0049] Embodiments of the present application provide a computer program product, including a computer program / instructions, which implement the above-mentioned control method of the camera when executed by a processor.

[0050] The control device, electronic device, vehicle, computer-readable storage medium, and computer program product provided by the embodiments of the present application can control the movement of the camera when the movable camera is in a state to be calibrated, and calibrate the movable range of the camera according to the first state information during the movement of the camera, so that the calibration of the movable range of the camera can be realized based on the camera itself. The calibration difficulty of the movable range of the camera and the technical threshold required for calibrating the movable range of the camera are both reduced. Furthermore, the calibration efficiency of the movable range of the camera can be improved to a certain extent. And, since the movable range of the camera can be calibrated based on the first state information during the movement of the camera, the calibrated movable range of the camera can be related to the state of the camera itself, so that the accurate calibration of the movable range of the camera can be ensured to a certain extent.

[0051] Additional aspects and advantages of the embodiments of the present application will be given in part in the following description, become apparent in part from the following description, or be understood through the practice of the embodiments of the present application. Description of the Drawings

[0052] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the description of the embodiments in conjunction with the following drawings, where:

[0053] Figure 1 is a schematic flowchart of the control method of the camera in some embodiments of the present application;

[0054] Figure 2 is a schematic diagram of an application scenario in some embodiments of the present application;

[0055] Figure 3 is a schematic flowchart of the control method of the camera in some embodiments of the present application;

[0056] Figure 4 is a schematic flowchart of the control method of the camera in some embodiments of the present application;

[0057] Figure 5 is a schematic flowchart of the control method of the camera in some embodiments of the present application;

[0058] Figure 6 is a schematic flowchart of the control method of the camera in some embodiments of the present application. Detailed Embodiments

[0059] Embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary only for explaining the embodiments of the present application and should not be construed as limiting the embodiments of the present application.

[0060] With the emergence of user requirements and the development of vehicle electronic technology, an in-vehicle entertainment screen can be combined with a retractable camera to work together, or rather, the in-vehicle entertainment screen can use the retractable camera to complete specific vehicle functions. It should be noted that before using the retractable camera, it is usually necessary to calibrate the retractable range of the retractable camera, that is, to measure in advance the highest and lowest points that the retractable camera can reach.

[0061] However, as the number of times the retractable camera is used gradually increases, the retractable range of the retractable camera may change due to device wear or external interference. Therefore, the calibration of the retractable range of the retractable camera usually faces the following three problems, namely: First, missed calibration, which requires rework; Second, the retractable range changes due to manual disassembly or replacement of the camera, which requires rework. Third, the retractable range of the camera changes over time and with the number of uses, which requires rework.

[0062] Furthermore, in the related art, it is usually necessary for an engineer to operate on-site, such as sending CAN (Controller Area Network) commands through the upper computer to trigger the calibration of the camera. After waiting for the calibration to complete, check the status returned by the host to the upper computer to determine whether the calibration is successful. If the calibration is not successful, send the command again until the calibration is successful. It can be understood that throughout the process, it is necessary to ensure the good use of the upper computer tool environment, and also ensure the robustness of the CAN network communication, and the operation is complex, time-consuming and laborious.

[0063] Based on the above possible problems, please refer to Figure 1 , embodiments of the present application provide a control method for a camera, the camera is movable, and the method includes:

[0064] 01: When the camera is in a state to be calibrated, control the camera to move;

[0065] 02: Calibrate the movable range of the camera according to the first state information of the camera during the movement.

[0066] An embodiment of the present application provides a control device. The control method of the camera according to the embodiment of the present application can be implemented by the control device according to the embodiment of the present application. Specifically, the control device includes a processing unit. The processing unit is configured to control the movement of the camera when the camera is in a state to be calibrated, and calibrate the movable range of the camera according to the first state information of the camera during the movement.

[0067] An embodiment of the present application further provides an electronic device, which includes a memory and a processor. The control method of the camera according to the embodiment of the present application can be implemented by the electronic device according to the embodiment of the present application. Specifically, a computer program is stored in the memory, and the processor is configured to control the movement of the camera when the camera is in a state to be calibrated, and calibrate the movable range of the camera according to the first state information of the camera during the movement.

[0068] Specifically, in the embodiment of the present application, a vehicle (or a control device in the vehicle, or an electronic device in the vehicle) can control the movement of the camera when the camera is in a state to be calibrated, and calibrate the movable range of the camera according to the first state information of the camera during the movement, such as the movement speed, the movement amount, etc., so as to complete the calibration of the movable range of the camera.

[0069] In this way, in the embodiment of the present application, when the movable camera is in a state to be calibrated, the movement of the camera can be controlled, and the movable range of the camera can be calibrated according to the first state information of the camera during the movement, so that the calibration of the movable range of the camera can be realized based on the camera itself. The calibration difficulty of the movable range of the camera and the technical threshold required for calibrating the movable range of the camera are both reduced. Furthermore, the calibration efficiency of the movable range of the camera can be improved to a certain extent. And since the movable range of the camera can be calibrated based on the first state information of the camera during the movement, the calibrated movable range of the camera can be related to the state of the camera itself, so that the accurate calibration of the movable range of the camera can be guaranteed to a certain extent.

[0070] In one example, the camera has a lifting function or a telescopic function, and thus can move along a predetermined direction, such as the direction of gravity, the horizontal direction.

[0071] In one example, the first state information includes, but is not limited to, the current position of the camera, the moved distance, the state information indicating whether the camera can move, etc.

[0072] In one example, the camera has a lifting function, and the first state information is the current position of the camera and the state information indicating whether the camera is movable. Furthermore, when the vehicle starts to lift the camera until the state information of the camera changes from "movable" to "immovable", the current position is P1. Combining with the current position P2 when the camera starts to lower until the state information of the camera changes from "movable" to "immovable", the movable range of the camera is calibrated as [P2, P1].

[0073] In some embodiments of the present application, the camera includes a camera body and a motor, and the motor drives the camera body to move. The first state information includes the operating condition of the motor and / or the rotational speed of the motor.

[0074] Specifically, in the embodiments of the present application, the camera consists of two parts. One is the camera body with a camera function and variable position, and the other is the motor, which is used to drive the camera body to move so as to change the position of the camera body. Correspondingly, in the embodiments of the present application, the first state information includes the operating condition of the motor and / or the rotational speed of the motor.

[0075] It can be understood that since the camera body is driven by the motor to move, the operating state of the motor is related to the displacement state and the movable range of the camera body. For example, when the camera body moves to the limit position, the motor is in a stalled condition. Also, as the moving distance of the camera body increases, the difficulty of the motor driving the camera body to move becomes higher. Correspondingly, to ensure that the motor can normally drive the camera body to move, the rotational speed of the motor is positively correlated with the moving distance of the camera body.

[0076] In one example, the camera further includes a rotational speed sensor, which can be used to detect the rotational speed of the motor.

[0077] In one example, the rotational speed sensor is a Hall sensor.

[0078] In this way, in the embodiments of the present application, the movable range of the camera can be calibrated by the operating condition and / or rotational speed of the motor that can drive the camera body to move, which to a certain extent ensures the accurate calibration of the movable range of the camera.

[0079] In some embodiments of the present application, step 02 includes:

[0080] Calibrate the movable range according to the target rotational speed of the motor, where the target rotational speed is the rotational speed when the motor is in a stalled condition during the movement of the camera body, and the rotational speed of the motor is related to the position of the camera body.

[0081] The processing unit according to the embodiment of the present application is configured to calibrate the movable range according to the target speed of the motor, where the target speed is the speed of the motor when it is in a stalled condition during the movement of the camera body, and the speed of the motor is related to the position of the camera body.

[0082] The processor according to the embodiment of the present application is further configured to calibrate the movable range according to the target speed of the motor, where the target speed is the speed of the motor when it is in a stalled condition during the movement of the camera body, and the speed of the motor is related to the position of the camera body.

[0083] Specifically, in the embodiment of the present application, the vehicle can record the motor speed of the motor when it is in a stalled condition during the movement of the camera body, that is, the target speed, and calibrate the movable range of the camera according to the target speed.

[0084] It should be noted that in the embodiment of the present application, the speed of the motor is related to the position of the camera body, or rather, the speed of the motor is different when the camera body moves to different positions. In one example, the position of the camera body and the speed of the motor can be associated through a mapping table.

[0085] It should also be noted that in the embodiment of the present application, when the motor is in a stalled condition, it indicates that the camera body has moved to the limit position, or rather, when the camera body moves to the limit position, the camera body will hinder the operation of the motor, thereby causing the motor to be in a stalled condition.

[0086] Therefore, in the embodiment of the present application, the vehicle can determine the limit position of the camera through the speed of the motor when it is in a stalled condition, thereby completing the calibration of the movable range of the camera.

[0087] In one example, the movable range of the camera is characterized by the motor speed. For example, when the camera body moves from the initial position to the limit position, the motor is in a stalled condition, and at this time, the speed of the motor is R, then the movable range of the camera can be calibrated as [0, R].

[0088] In this way, in the embodiment of the present application, the movable range of the camera can be calibrated through the speed of the motor when it is in a stalled condition during the movement of the camera body, which ensures the accurate calibration of the movable range of the camera to a certain extent.

[0089] In some embodiments of the present application, during the movement of the camera body, if the change amount of the motor speed is less than the preset amount within the preset time, the motor is in a stalled condition.

[0090] Specifically, in the embodiments of the present application, the vehicle can determine whether the change amount of the motor speed is less than a preset amount within a certain time period according to the motor speed at each time point during the movement of the camera, so as to determine whether the motor is in a stalled condition.

[0091] In one example, the preset amount is 2000 r / s (revolutions per second).

[0092] In one example, the preset duration is 5 s (seconds).

[0093] In this way, in the embodiments of the present application, it can be determined that the motor is in a stalled condition when the change amount of the motor speed is less than the preset amount, enabling the determination of the motor stalled condition to be realized.

[0094] In some embodiments of the present application, the motor drives the camera body to move along a preset direction. Furthermore, the step of calibrating the movable range according to the target speed of the motor includes:

[0095] Calibrate the movable range according to the first target speed and the second target speed of the motor, where the first target speed is the speed of the motor when it is in a stalled condition during the forward movement of the camera body along the preset direction, and the second target speed is the speed of the motor when it is in a stalled condition during the reverse movement of the camera body along the preset direction.

[0096] The processing unit of the embodiments of the present application is configured to calibrate the movable range according to the first target speed and the second target speed of the motor, where the first target speed is the speed of the motor when it is in a stalled condition during the forward movement of the camera body along the preset direction, and the second target speed is the speed of the motor when it is in a stalled condition during the reverse movement of the camera body along the preset direction.

[0097] The processor of the embodiments of the present application is further configured to calibrate the movable range according to the first target speed and the second target speed of the motor, where the first target speed is the speed of the motor when it is in a stalled condition during the forward movement of the camera body along the preset direction, and the second target speed is the speed of the motor when it is in a stalled condition during the reverse movement of the camera body along the preset direction.

[0098] Specifically, in the embodiments of the present application, the camera can move along the forward direction of the preset direction and can also move along the reverse direction of the preset direction. Furthermore, the vehicle can calibrate the movable range of the camera body according to the first target speed of the motor when it is in a stalled condition during the forward movement of the camera body along the preset direction and the second target speed of the motor when it is in a stalled condition during the reverse movement of the camera body along the preset direction.

[0099] For example, when the camera moves in the positive direction of the preset direction, if the rotational speed of the motor in the locked-rotor condition is R1, and when the camera moves in the negative direction of the preset direction, if the rotational speed of the motor in the locked-rotor condition is R2, the vehicle can calibrate the maximum movable position when the camera body moves in the positive direction of the preset direction as R1, and calibrate the maximum movable position when the camera body moves in the negative direction of the preset direction as R2, thereby completing the calibration of the movable range of the camera.

[0100] In one example, the preset direction is the direction of gravity, horizontal movement, etc.

[0101] Thus, in the embodiment of the present application, the movable range of the camera can be calibrated according to the first target rotational speed of the motor in the locked-rotor condition when the camera body moves in the positive direction of the preset direction, and the second target rotational speed of the motor in the locked-rotor condition when the camera body moves in the negative direction of the preset direction, thereby realizing the calibration of the movable range of the camera.

[0102] In some embodiments of the present application, the target rotational speed includes multiple rotational speed sampling values, and the motor drives the camera body to move in the preset direction. Furthermore, the step of calibrating the movable range according to the target rotational speed of the motor includes:

[0103] Calibrate the movable range according to the average value of multiple rotational speed sampling values.

[0104] The processing unit in the embodiment of the present application is configured to calibrate the movable range according to the average value of multiple rotational speed sampling values.

[0105] The processor in the embodiment of the present application is further configured to calibrate the movable range according to the average value of multiple rotational speed sampling values.

[0106] Specifically, to ensure the accurate calibration of the movable range of the camera, in the embodiment of the present application, the rotational speed of the motor can be sampled multiple times when the motor is locked-rotor, and the movable range of the camera can be calibrated according to the average value of multiple motor rotational speed values obtained from the multiple samplings.

[0107] For example, in the case where the camera can move in the positive direction of the preset direction and can also move in the negative direction of the preset direction, during the process of the camera moving in the positive direction of the preset direction, the motor in the locked-rotor condition is sampled multiple times to obtain three rotational speed values, namely R 11 、R 12 、R 13 . And, during the process of the camera moving in the negative direction of the preset direction, the motor in the locked-rotor condition is sampled multiple times to obtain three rotational speed values, namely R 21 、R 22 、R23 Thus, the vehicle can calibrate the maximum movable position when the camera body moves in the positive direction of the preset direction as (R 11 +R 12 +R 13 ) / 3, and calibrate the maximum movable position when the camera body moves in the negative direction of the preset direction as (R 21 +R 22 +R 23 ) / 3, thereby completing the calibration of the movable range of the camera.

[0108] In this way, in the embodiment of the present application, the average value of multiple rotational speed sampling values when the motor is in the locked-rotor working condition can be used to calibrate the movable range of the camera, so as to ensure the accurate calibration of the movable range of the camera.

[0109] In some embodiments of the present application, the control method of the camera further includes:

[0110] When the calibration of the movable range is completed, it is determined that the camera is in the calibrated state.

[0111] The processing unit according to the embodiment of the present application is configured to determine that the camera is in the calibrated state when the calibration of the movable range is completed.

[0112] The processor according to the embodiment of the present application is further configured to determine that the camera is in the calibrated state when the calibration of the movable range is completed.

[0113] Specifically, in the embodiment of the present application, after the calibration of the movable range of the camera is completed, the vehicle can set the state of the camera to the calibrated state, thereby avoiding the situation that the vehicle calibrates the movable range of the camera again due to the failure to change the state of the camera in time.

[0114] In this way, in the embodiment of the present application, after the calibration of the movable range of the camera is completed, it can be determined that the state of the camera is set to the calibrated state, thereby avoiding the situation that the vehicle calibrates the movable range of the camera again due to the failure to change the state of the camera in time.

[0115] To more clearly illustrate the calibration process of the movable range of the camera in the embodiment of the present application, please refer to Figure 2 and Figure 3 , Figure 2 is a schematic diagram of an application scenario in some embodiments of the present application, Figure 3 is a schematic flowchart of the control method of the camera in some embodiments of the present application. Specifically, as Figure 2, in the embodiment of the present application, the vehicle includes a vehicle electronic control unit (Electronic Control Unit, ECU) 101, a microcontroller unit (Microcontroller Unit, MCU) 102, and a camera 103. Among them, the vehicle electronic control unit 101 and the microcontroller unit 102 can communicate through a CAN network, and the microcontroller unit 102 can control the lifting of the camera 103. The vehicle electronic control unit 101 is used to issue a gear signal. After the gear signal changes from the OFF gear signal to the ON gear signal, the microcontroller unit 102 detects the camera position status flag. If the camera position status flag is abnormal, it means that the camera is in a state to be calibrated, so camera calibration is performed.

[0116] As Figure 3 shown, in the embodiment of the present application, the electronic controller 102 can first control the camera to descend and stop the motor operation when detecting motor stall. Then, control the motor to run and sample the motor speed N times through the Hall sensor to obtain N sets of Hall values. Next, take the average of these N sets of Hall values as the bottom position of the camera 103 and store it in the EEPROM (Electrically Erasable Programmable Read-Only Memory). Subsequently, the microcontroller unit 102 controls the camera 103 to rise and stops the motor operation when detecting motor stall. Then, control the motor to run and sample the motor speed N times through the Hall sensor to obtain N sets of Hall values, and take the average of these N sets of Hall values as the top position of the camera 103 and store it in the EEPROM. Thus, the calibration of the camera 103 is completed, and the camera 103 position status is set to normal.

[0117] More specifically, first, the camera 103 position calibration starts, and the camera 103 is controlled to descend.

[0118] Next, during the descent of the camera 103, read the Hall sensor value T_xy, and judge whether the change amount of T_xy within the preset duration is less than 2000. If so, it is considered that the motor is in a stall condition, otherwise, the motor operation is maintained.

[0119] Then, after judging that the motor is in a stall condition, stop the descent of the camera 103.

[0120] Then, collect the T_xy at the current moment and record the T_xy at the current moment as the bottom position of the camera 103.

[0121] Then, after completing the recording of the bottom position, control the camera 103 to rise.

[0122] Subsequently, during the upward movement of the camera 103, the Hall sensor value T_xy is read, and it is determined whether the change amount of T_xy within a preset time period is less than 2000. If so, it is considered that the motor is in a stalled condition; otherwise, the motor operation is maintained.

[0123] After that, after determining that the motor is in a stalled condition, the upward movement of the camera 103 is stopped.

[0124] Then, T_xy at the current moment is collected, and T_xy at the current moment is recorded as the top position of the camera 103.

[0125] Finally, after completing the recording of the top position of the camera 103, the calibration of the movable range of the camera 103 is completed, and the position status flag of the camera 103 is set to normal.

[0126] In some embodiments of the present application, the control method of the camera further includes:

[0127] In response to a camera movement instruction, control the camera to move to the target position indicated by the camera movement instruction.

[0128] The processing unit according to the embodiment of the present application is configured to control the camera to move to the target position indicated by the camera movement instruction in response to the camera movement instruction.

[0129] The processor according to the embodiment of the present application is further configured to control the camera to move to the target position indicated by the camera movement instruction in response to the camera movement instruction.

[0130] Specifically, in the embodiment of the present application, when the vehicle receives a camera movement instruction, it parses the camera movement instruction to determine the target position that the camera needs to reach, and then controls the camera to move to the target position.

[0131] In this way, in the embodiment of the present application, in response to the camera movement instruction, the camera can be controlled to move to the target position indicated by the camera movement instruction, thereby realizing the movement control of the camera.

[0132] In some embodiments of the present application, the control method of the camera further includes:

[0133] During the process of the camera moving to the target position, determine the calibration status of the camera according to the second status information of the camera, where the calibration status includes a calibrated status and a to-be-calibrated status.

[0134] The processing unit according to the embodiment of the present application is configured to determine the calibration status of the camera according to the second status information of the camera during the process of the camera moving to the target position, where the calibration status includes a calibrated status and a to-be-calibrated status.

[0135] The processor according to the embodiment of the present application is further configured to determine the calibration state of the camera according to the second state information of the camera during the process of the camera moving to the target position, where the calibration state includes a calibrated state and a to-be-calibrated state.

[0136] Specifically, in the embodiment of the present application, during the process of the camera moving to the target position, the vehicle can determine whether there is an error in the previously calibrated movable range of the camera according to the second operating state information of the camera, so as to determine the calibration state of the camera.

[0137] For example, when the second operating state information of the camera includes the moving position and moving state of the camera, if during the process of the camera moving from the initial position, when the moving state of the camera changes from the "movable state" to the "immovable state", the position difference between the moving position and the "maximum position in the previously calibrated movable range of the camera" is greater than a preset threshold, it indicates that there is an error in the calibration of the movable range of the camera, and thus it is determined that the camera is in the to-be-calibrated state.

[0138] On the contrary, if the position difference between the moving position when the moving state of the camera changes from the "movable state" to the "immovable state" and the "maximum position in the previously calibrated movable range of the camera" is less than the preset threshold, it indicates that the calibration of the movable range of the camera is correct, and thus it is determined that the camera is in the calibrated state.

[0139] In this way, in the embodiment of the present application, the calibration state of the camera can be determined according to the second state information during the process of moving to the target position, thereby realizing the determination of the calibration state of the camera.

[0140] In one example, when the camera is in the calibrated state, the vehicle can, after receiving a camera movement instruction, control the camera to move to the target position corresponding to the camera movement instruction at a first rate. In contrast, when the camera is in the to-be-calibrated state, the vehicle can control the camera to move at a second rate and calibrate the movable range of the camera according to the first state information during the movement of the camera. Wherein, the first rate is greater than the second rate.

[0141] It can be understood that during the process of calibrating the movable range of the camera, when controlling the camera to move at a lower rate (i.e., the second rate less than the first rate), the calibration of the movable range of the camera can be completed relatively accurately. In contrast, when the calibration of the movable range of the camera is completed, when controlling the camera to move at a higher rate (i.e., the first rate greater than the second rate), the camera can quickly respond to the camera movement instruction.

[0142] Further, when the camera includes a camera body and a motor, and the motor drives the camera body to move, when the camera is in a calibrated state, the vehicle can control the motor to drive the camera body to move at a first rate at a first rotational speed. In contrast, when the camera is in a calibrated state, the vehicle can control the motor to drive the camera body to move at a second rate at a second rotational speed. Wherein, the first rotational speed is greater than the second rotational speed.

[0143] In some embodiments of the present application, the camera includes a camera body and a motor, the motor drives the camera body to move, the second state information includes the operating condition and / or the rotational speed of the motor. Furthermore, the step of determining the calibrated state of the camera according to the second state information of the camera during the movement of the camera to the target position includes:

[0144] Determine the calibrated state according to the third target rotational speed of the motor, where the third target rotational speed is the rotational speed of the motor in a stalled condition during the movement of the camera body to the target position.

[0145] Specifically, in the embodiments of the present application, the camera consists of two parts. One is the camera body with a camera function and variable position, and the other is the motor, which is used to drive the camera body to move so as to change the position of the camera body. Correspondingly, in the embodiments of the present application, the second state information includes the operating condition and / or the rotational speed of the motor.

[0146] It can be understood that since the camera body is driven by the motor to move, the operating state of the motor can be related to the displacement state and the movable range of the camera body. For example, when the camera body moves to the limit position, the motor is in a stalled condition. Another example is that as the moving distance of the camera body increases, the difficulty of the motor driving the camera body to move becomes higher. Correspondingly, to ensure that the motor can drive the camera body to move normally, the rotational speed of the motor is positively correlated with the moving distance of the camera body.

[0147] It can also be understood that when the motor is in a stalled condition, it indicates that the camera body has moved to the limit position. Therefore, at this time, the vehicle can judge the third target rotational speed of the motor in the stalled condition and judge whether the previously calibrated movable range of the camera is incorrect.

[0148] For example, if during the movement of the camera starting from the initial position, the third target rotational speed when the motor stalls is R3, the vehicle can determine the moving position PT corresponding to R3 through a pre-constructed "motor rotational speed - camera moving position mapping table".

[0149] However, if the vehicle determines that the position difference between the moving position PT and the "maximum position in the movable range of the camera during the last calibration" is greater than a preset threshold, it indicates that the calibration of the movable range of the camera is incorrect, and thus the camera is determined to be in a state to be calibrated.

[0150] Conversely, if the position difference between the moving position PT and the "maximum position in the movable range of the camera during the last calibration" is less than the preset threshold, it indicates that the calibration of the movable range of the camera is correct, and thus the camera is determined to be in a calibrated state.

[0151] In one example, the camera further includes a rotational speed sensor, which can be used to detect the rotational speed of the motor.

[0152] In one example, the rotational speed sensor is a Hall sensor.

[0153] In this way, in the embodiment of the present application, the calibration state of the camera can be determined by the third target rotational speed of the motor when the camera body is moving to the target position and the motor is in a locked-rotor working condition, which ensures the reliable determination of the calibration state of the camera to a certain extent.

[0154] In some embodiments of the present application, the step of determining the calibration state according to the third target rotational speed of the motor includes:

[0155] When the third target rotational speed does not match the calibration rotational speed corresponding to the target position, it is determined that the camera is in a state to be calibrated; and / or,

[0156] When the third target rotational speed matches the calibration rotational speed, it is determined that the camera is in a calibrated state.

[0157] The processing unit according to the embodiment of the present application is configured to determine that the camera is in a state to be calibrated when the third target rotational speed does not match the calibration rotational speed corresponding to the target position, and / or determine that the camera is in a calibrated state when the third target rotational speed matches the calibration rotational speed.

[0158] The processor according to the embodiment of the present application is further configured to determine that the camera is in a state to be calibrated when the third target rotational speed does not match the calibration rotational speed corresponding to the target position, and / or determine that the camera is in a calibrated state when the third target rotational speed matches the calibration rotational speed.

[0159] Specifically, in the embodiment of the present application, the vehicle can combine the calibration rotational speed obtained by calibrating the rotational speed of the motor when the camera body is at the target position during the last calibration of the movable range of the camera with the third target rotational speed of the motor during the movement of the camera body based on the camera movement instruction to determine whether the last calibration of the movable range of the camera is incorrect.

[0160] In one example, when the calibrated speed is not equal to the third target speed, the calibrated speed and the third target speed do not form a match. Furthermore, when the calibrated speed is not equal to the third target speed, the vehicle can determine that the previous calibration of the camera's movable range is incorrect, and then set the calibration status of the camera to the to-be-calibrated status, thereby starting a new round of calibration of the camera's movable range. In contrast, when the calibrated speed is equal to the third target speed, the vehicle can determine that the previous calibration of the camera's movable range is correct, and then set the calibration status of the camera to the calibrated status.

[0161] Thus, in the embodiment of the present application, it is possible to determine that the camera is in the to-be-calibrated status when the third target speed does not match the calibrated speed corresponding to the target position, and / or determine that the camera is in the calibrated status when the third target speed matches the calibrated speed, thereby realizing the determination of the calibration status of the camera.

[0162] In some embodiments of the present application, when the difference between the third target speed and the calibrated speed is within a preset range, the third target speed and the calibrated speed form a match; and / or, when the difference between the third target speed and the calibrated speed is not within the preset range, the third target speed and the calibrated speed do not form a match.

[0163] Specifically, in some embodiments of the present application, to ensure the accurate determination of the calibration status of the camera, the vehicle can determine whether the above-mentioned third target speed and the above-mentioned calibrated speed form a match based on a preset allowable range.

[0164] For example, let the third target speed be T and the calibrated speed be T'. Then: if the difference |T - T'| between the third target speed T and the calibrated speed T' is within the preset range, the third target speed T and the calibrated speed T' form a match, the previous calibration of the camera's movable range is correct, and then the calibration status of the camera is set to the calibrated status.

[0165] In contrast, if the difference |T - T'| between the third target speed T and the calibrated speed T' is not within the preset range, the third target speed T and the calibrated speed T' do not form a match, the previous calibration of the camera's movable range is incorrect, and then the calibration status of the camera is set to the to-be-calibrated status.

[0166] In one example, the preset range is [0, 2000].

[0167] Thus, in the embodiments of the present application, it is possible to determine that the third target speed and the calibration speed form a match when the difference between the third target speed and the calibration speed is within a preset range, and / or determine that the third target speed and the calibration speed do not form a match when the difference between the third target speed and the calibration speed is not within the preset range, thereby ensuring the reliable determination of the camera calibration state.

[0168] In some embodiments of the present application, the second status information includes the continuous movement time of the camera.

[0169] Specifically, in the embodiments of the present application, the vehicle can also determine whether the previous calibration of the camera's movable range is incorrect according to the continuous movement time of the camera during the movement of the camera towards the target position.

[0170] In one example, the vehicle can also parse the camera movement instruction to obtain the expected continuous movement time of the camera. Furthermore, if the continuous movement time of the camera is greater than the expected continuous movement time during the movement of the camera towards the target position, it is determined that the previous calibration of the camera's movable range is incorrect. Conversely, if the continuous movement time of the camera is less than or equal to the expected continuous movement time, it is determined that the previous calibration of the camera's movable range is correct.

[0171] Thus, in the embodiments of the present application, the calibration state of the camera can be determined according to the continuous movement time of the camera during the movement of the camera towards the target position, which ensures the robust determination of the calibration state to a certain extent.

[0172] In some embodiments of the present application, during the movement of the camera towards the target position, determining the calibration state of the camera according to the second status information of the camera includes:

[0173] When the camera does not reach the target position when the continuous movement time is greater than or equal to the preset time, it is determined that the camera is in a state to be calibrated; and / or,

[0174] When the camera reaches the target position before the continuous movement time is greater than or equal to the preset time, it is determined that the camera is in a state to be calibrated.

[0175] The processing unit according to the embodiments of the present application is configured to determine that the camera is in a state to be calibrated when the camera does not reach the target position when the continuous movement time is greater than or equal to the preset time, and / or determine that the camera is in a state to be calibrated when the camera reaches the target position before the continuous movement time is greater than or equal to the preset time.

[0176] The processor according to the embodiment of the present application is further configured to determine that the camera is in a state to be calibrated when the continuous movement time is greater than or equal to a preset time and the camera does not reach the target position, and / or determine that the camera is in a state to be calibrated when the camera reaches the target position before the continuous movement time is greater than or equal to the preset time.

[0177] Specifically, in the embodiment of the present application, if the continuous movement time of the camera is greater than or equal to the preset time and the camera does not reach the target position expected by the camera movement instruction, it is determined that the previous calibration of the movable range of the camera is incorrect, so the camera is set to the state to be calibrated. On the contrary, if the camera reaches the target position expected by the camera movement instruction before the continuous movement time of the camera is greater than or equal to the preset time, it is determined that the previous calibration of the movable range of the camera is correct, so the camera is set to the calibrated state.

[0178] In one example, the preset time is determined according to the moving distance of the camera.

[0179] In one example, when the vehicle receives a camera movement instruction, it can parse the camera movement instruction to determine the target position that the camera needs to reach. Then, the vehicle calculates the continuous movement time required for the camera to reach the target position from the current position based on the current position of the camera, the previously parsed target position, and the pre-determined camera movement speed, so as to obtain the above preset time.

[0180] In one example, the position of the camera body is related to the motor speed. Furthermore, the vehicle can determine whether the camera moves to the target position according to the motor speed, or rather, according to the actual speed of the camera body during the movement and the expected speed when the camera is at the target position that has been pre-calibrated, determine whether the difference between the actual speed and the expected speed is less than a preset value. If so, it is considered that the camera reaches the target position, otherwise it is considered that the camera does not reach the target position.

[0181] In this way, in the embodiment of the present application, it can be determined that the camera is in a state to be calibrated when the continuous movement time is greater than or equal to the preset time and the camera does not reach the target position, and / or determine that the camera is in a state to be calibrated when the camera reaches the target position before the continuous movement time is greater than or equal to the preset time, thereby realizing the determination of the camera calibration state based on the continuous movement time of the camera.

[0182] For a clearer illustration of the process of determining the camera calibration state in the embodiment of the present application, please refer to Figure 2 and Figure 4 , Figure 4 which is the flowchart of the control method of the camera in some embodiments of the present application, that is, as Figure 2 andFigure 4 As shown, after the camera application sends an ascending command, the microcontroller unit 102 controls the camera 103 to ascend. After the camera 103 ascends to the top, the motor Hall value is collected, and the collected motor Hall value is compared with the motor Hall value calibrated last time. If the motor Hall value currently collected is much different from the motor Hall value calibrated last time, the camera position state is set to abnormal, that is, the calibration state of the camera is set to the pending calibration state.

[0183] Specifically, in the implementation manner of the present application, when the camera position state is normal, that is, the calibration state of the camera is set to the calibrated state, the camera 103 operates normally and waits to receive a camera lifting instruction.

[0184] Subsequently, a camera application up command is received.

[0185] Then, the camera 103 is controlled to rise.

[0186] Then, during the rising process of the camera 103, it is determined whether the continuous rising time of the camera 103 exceeds the expected time, and whether the motor is in a stalled condition.

[0187] Next, if the continuous rising time of the camera 103 exceeds the expected time, or if the motor is in a stalled condition, the camera 103 is controlled to stop rising.

[0188] Next, after the camera 103 stops rising, the value of the Hall sensor is collected, and the collected Hall value is compared with the Hall value calibrated last time.

[0189] Afterwards, it is determined whether the collected Hall value is significantly different from the Hall value calibrated last time, if not, the process ends.

[0190] Finally, if the collected Hall value is much different from the Hall value calibrated last time, the camera position state is set to abnormal, that is, the calibration state of the camera is set to the pending calibration state.

[0191] To more clearly illustrate the implementation of the present application, the following is an example of a liftable camera in a vehicle. For details, please refer to Figure 2 , Figure 3 , Figure 4 , Figure 5 and Figure 6 , Figure 5 and Figure 6 All of them are flowchart diagrams of camera control methods in certain implementation modes of the present application.

[0192] Specifically, Figure 5As shown, in the embodiment of the present application, the control logic of the camera mainly includes three parts. First, when the vehicle gear is switched from the OFF gear to the ON gear, then the in-vehicle host queries the abnormal position of the camera, and finally the camera position calibration is performed.

[0193] As Figure 6 shown, first, the vehicle gear is switched from the off gear to the on gear, and the electronic controller 101, the microcontroller unit 102, and the camera 103 of the vehicle are powered on.

[0194] Subsequently, the microcontroller unit 102 reads the camera position status flag stored in the EPPROM.

[0195] Then, it is determined whether the camera position status flag is in an abnormal state.

[0196] Next, if the camera position status flag is abnormal, the camera calibration flag bit is set to TRUE, and the camera calibration process as Figure 3 shown will be entered. If the camera position status flag is normal, the camera module operates normally and waits for the camera application instruction.

[0197] Finally, it is queried whether the camera position calibration flag is TRUE. If the camera position calibration flag is TRUE, the camera calibration status determination process as Figure 4 shown will be entered.

[0198] It can be understood that for the traditional solution in the related art where on-site engineers use a CAN box to connect to the vehicle controller CAN network and send calibration commands to complete camera calibration, this traditional solution is complex in operation, time-consuming and laborious, and is prone to missed operations that will cause production problems. In contrast, the camera calibration process triggered by vehicle signals provided in the embodiment of the present application can complete the automatic calibration of the camera with high efficiency, thereby saving a large amount of manpower, material resources and time costs.

[0199] It can also be understood that the embodiment of the present application uses the vehicle off gear to on gear as the trigger condition for triggering camera position calibration, thereby reducing the manual participation link. At the same time, during the use of the camera, the Hall value after the camera lift stops is compared with the stored Hall value. If the Hall values differ greatly, it is used as another condition for triggering camera calibration. Furthermore, the camera position calibration can be performed after both of these conditions are met.

[0200] Thus, the embodiment of the present application can ensure the convenient, fast, safe and reliable calibration of the camera, and can solve the problems of missed camera calibration, camera replacement, and position change caused by long-term use, thereby effectively improving the product R & D efficiency and saving manpower costs and time costs.

[0201] An embodiment of the present application further provides a vehicle, which includes the above-mentioned electronic device or the above-mentioned control device

[0202] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by one or more processors, implements the above-mentioned control method of the camera.

[0203] An embodiment of the present application further provides a computer program product, including a computer program / instructions, which, when executed by a processor, implements the above-mentioned control method of the camera.

[0204] In the description of this specification, the descriptions with reference to terms such as "specifically", "further", "specially", "understandably", etc. mean that the specific features, structures, materials or characteristics described in connection with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic expressions of the above terms are not necessarily intended to refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0205] Any process or method description shown in the flowchart or described in other ways herein can be understood as representing a module, segment or part of code including one or more executable instructions for implementing a specific logical function or process, and the scope of the preferred embodiments of the present application includes additional implementations, where the functions can be executed in a substantially simultaneous manner or in the reverse order according to the functions involved, rather than in the order shown or discussed, which should be understood by those skilled in the technical field to which the embodiments of the present application belong.

[0206] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present application.

Claims

1. A camera control method, characterized in that: The camera is movable, and the method comprises: When the camera is in a state to be calibrated, controlling the camera to move; The movable range of the camera is calibrated according to the first state information of the camera during the movement.

2. The method according to claim 1, characterized in that The camera includes a camera body and a motor, the motor drives the camera body to move, and the first state information includes the working condition of the motor and / or the rotation speed of the motor.

3. The method according to claim 2, characterized in that The step of calibrating the movable range of the camera according to the first state information of the camera during the movement process includes: The movable range is calibrated according to a target rotational speed of the motor, wherein the target rotational speed is the rotational speed of the motor in a stalled condition during movement of the camera body, and the rotational speed of the motor is related to the position of the camera body.

4. The method according to claim 3, characterized in that During the movement of the camera body, if the change in the rotation speed of the motor is less than a preset amount within a preset time period, the motor is in the stalled condition.

5. The method according to claim 3, characterized in that: The motor drives the camera body to move along a preset direction, and the movable range is calibrated according to the target rotation speed of the motor, including: The movable range is calibrated according to the first target speed and the second target speed of the motor, wherein the first target speed is the speed of the motor under a stalled condition when the camera body moves in a positive direction along a preset direction, and the second target speed is the speed of the motor under a stalled condition when the camera body moves in a negative direction along a preset direction.

6. The method according to claim 3, characterized in that: The target speed includes a plurality of speed sampling values, the motor drives the camera body to move along a preset direction, and the movable range is calibrated according to the target speed of the motor, including: The movable range is calibrated according to an average of a plurality of the rotation speed sampling values.

7. The method according to claim 1, characterized in that The method further comprises: When the calibration of the movable range is completed, it is determined that the camera is in a calibrated state.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: In response to a camera movement instruction, the camera is controlled to move toward a target position indicated by the camera movement instruction.

9. The method according to claim 8, characterized in that The method further comprises: During the process of the camera moving toward the target position, a calibration state of the camera is determined according to the second state information of the camera, wherein the calibration state includes a calibrated state and a to-be-calibrated state.

10. The method according to claim 9, characterized in that The camera includes a camera body and a motor, the motor drives the camera body to move, the second state information includes a working condition of the motor and / or a rotation speed of the motor, and in the process of the camera moving toward the target position, determining the calibration state of the camera according to the second state information of the camera, including: The calibration state is determined according to a third target rotational speed of the motor, wherein the third target rotational speed is a rotational speed of the motor in a stalled condition during the process of the camera body moving toward the target position.

11. The method according to claim 10, characterized in that The step of determining the calibration state according to the third target speed of the motor includes: In a case where the third target rotation speed does not match the calibration rotation speed corresponding to the target position, determining that the camera is in the pending calibration state; and / or, When the third target rotation speed matches the calibrated rotation speed, it is determined that the camera is in the calibrated state.

12. The method according to claim 11, characterized in that When the difference between the third target speed and the calibrated speed is within a preset range, the third target speed matches the calibrated speed; and / or when the difference between the third target speed and the calibrated speed is not within the preset range, the third target speed does not match the calibrated speed.

13. The method according to claim 9, characterized in that The second state information includes a continuous movement time of the camera.

14. The method according to claim 13, characterized in that The step of determining the calibration state of the camera according to the second state information of the camera during the process of the camera moving toward the target position includes: If the camera has not reached the target position when the continuous moving time is greater than or equal to the preset time, determining that the camera is in the pending calibration state; and / or, When the camera reaches the target position before the continuous moving time is greater than or equal to the preset time, it is determined that the camera is in the pending calibration state.

15. A control device, characterized in that: The device includes a processing unit, which is configured to control the movement of the camera when the camera is in a state to be calibrated, and to calibrate the movable range of the camera according to first state information of the camera during the movement.

16. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 to 14 is implemented.

17. A vehicle, characterized in that: The vehicle comprises a camera and also comprises the device of claim 15 or 16.

18. 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 one or more processors, the method according to any one of claims 1 to 14 is implemented.

19. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 14 is implemented.