CN116722785A - Automatic calibration method and device for motor rotation direction - Google Patents

Automatic calibration method and device for motor rotation direction Download PDF

Info

Publication number
CN116722785A
CN116722785A CN202310754455.1A CN202310754455A CN116722785A CN 116722785 A CN116722785 A CN 116722785A CN 202310754455 A CN202310754455 A CN 202310754455A CN 116722785 A CN116722785 A CN 116722785A
Authority
CN
China
Prior art keywords
motor
camera
rotation
signal
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310754455.1A
Other languages
Chinese (zh)
Other versions
CN116722785B (en
Inventor
胡旭华
董涵
唐矗
蒲立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jijia Technology Co ltd
Original Assignee
Beijing Jijia Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jijia Technology Co ltd filed Critical Beijing Jijia Technology Co ltd
Priority to CN202310754455.1A priority Critical patent/CN116722785B/en
Publication of CN116722785A publication Critical patent/CN116722785A/en
Application granted granted Critical
Publication of CN116722785B publication Critical patent/CN116722785B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P23/00Arrangements or methods for the control of AC motors characterised by a control method other than vector control
    • H02P23/24Controlling the direction, e.g. clockwise or counterclockwise
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P13/00Indicating or recording presence, absence, or direction, of movement
    • G01P13/02Indicating direction only, e.g. by weather vane
    • G01P13/04Indicating positive or negative direction of a linear movement or clockwise or anti-clockwise direction of a rotational movement
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P23/00Arrangements or methods for the control of AC motors characterised by a control method other than vector control
    • H02P23/14Estimation or adaptation of motor parameters, e.g. rotor time constant, flux, speed, current or voltage

Abstract

The application provides an automatic calibration method and device for a motor rotation direction, and relates to the technical field of motor control. The method comprises the steps of S1, receiving a motor calibration signal, and determining the expected movement direction of the motor based on a signal that the motor rotates in a preset direction; s2, acquiring a plurality of pieces of continuous image data acquired by a camera driven by the motor; s3, determining an optical flow field of the image data based on an optical flow method; s4, determining the actual movement direction of the camera according to the optical flow field; and S5, comparing the expected movement direction with the actual movement direction, and changing a positive and negative rotation control mode of the motor when the expected movement direction is inconsistent with the actual movement direction. The application can automatically judge the steering of the motor and calibrate the rotation direction of the camera, thereby solving the problem of abnormal steering of products caused by the assembly and the reverse motor wire of workers.

Description

Automatic calibration method and device for motor rotation direction
Technical Field
The application relates to the technical field of motor control, in particular to a method and a device for automatically calibrating the rotation direction of a motor.
Background
For the intelligent camera product of the two-axis rotatable head shaking machine existing in the market, the camera of the product is respectively controlled by two motors to rotate in the horizontal direction and the vertical direction. Because the steering connection modes of different motors are different, but the appearance of joints is quite similar, workers are easy to mislead the direction of the motors to be reversed on an assembly line, and the problem that a large number of intelligent camera products encounter abnormal steering of cameras when leaving factories is caused. The solutions on the market today can be largely divided into the following categories:
1. and purchasing the screened motors with uniform wiring modes.
2. And checking the steering of the motors one by workers.
3. And manufacturing an expensive calibration test tool to perform motor self-calibration.
The first two types of schemes have low productivity and require a lot of manpower or purchasing cost. The third type of scheme has certain automatic intelligence, and the auxiliary calibration tool of the motor needs to consume a lot of manufacturing cost. Therefore, a hypothesis verification thought based on combination of motor direction intervention control and optical flow method picture motion direction analysis and estimation is provided, and a system scheme for automatically completing motor steering calibration is realized.
Disclosure of Invention
In order to solve at least one of the technical problems, the application provides a system scheme for automatically completing motor steering calibration by adopting an assumption verification thought based on combination of motor direction intervention control and optical flow method picture motion direction analysis and estimation.
In a first aspect of the present application, a method for automatically calibrating a rotational direction of a motor includes: s1, receiving a motor calibration signal, and determining an expected movement direction of a motor based on a signal that the motor rotates in a preset direction; s2, acquiring a plurality of pieces of continuous image data acquired by a camera driven by the motor; s3, determining an optical flow field of the image data based on an optical flow method; s4, determining the actual movement direction of the camera according to the optical flow field; and S5, comparing the expected movement direction with the actual movement direction, and changing a positive and negative rotation control mode of the motor when the expected movement direction is inconsistent with the actual movement direction.
Preferably, before step S1, the method further includes: step S11, acquiring a signal which is given by a user and used for controlling the motor to rotate and rotates in a preset direction; step S12, determining the motor state, wherein the motor state comprises a primary rotation state and a secondary rotation state, the primary rotation state is a state that the motor is firstly connected with the signal rotating in the preset direction after being electrified, and the secondary rotation state is a state that the motor is connected with the signal rotating in the preset direction for more than the second time; and step S13, when the motor state is the primary rotation, giving the motor calibration signal, when the motor state is the secondary rotation state, determining whether the motor calibration signal is given according to a vibration signal for representing the vibration of the camera, and when the vibration signal exists, giving the motor calibration signal.
Preferably, step S13 further includes: step S131, acquiring a conventional motion speed average value of a camera corresponding to an optical flow field in a motor rotation process before receiving the signal rotating to a preset direction; step S132, continuously obtaining a real-time motion speed average value of the camera through an optical flow field according to a set time interval; step S133, when the real-time moving speed average exceeds the set multiple of the normal moving speed average, the vibration signal is given.
Preferably, in step S133, the vibration signal is given when the following formula is satisfied:
//>
wherein m pixel points are shared under the two-dimensional coordinate system of the image acquired by the camera,representing the instant of the a-th pixel point in the image acquired by the camera at set time intervalsThe speed of the movement is determined by the speed of the movement,and the instantaneous motion speed of an a pixel point in the image acquired by the camera in the rotation process of the motor is represented.
In a second aspect of the present application, there is provided an automatic motor rotation direction calibration apparatus, comprising: the expected motion direction determining module is used for receiving a motor calibration signal and determining the expected motion direction of the motor based on the signal that the motor rotates to a preset direction; the image acquisition module is used for acquiring a plurality of pieces of continuous image data acquired by a camera driven by the motor; the optical flow field calculation module is used for determining an optical flow field of the image data based on an optical flow method; the actual motion direction determining module is used for determining the actual motion direction of the camera according to the optical flow field; and the motor adjusting module is used for comparing the expected movement direction with the actual movement direction, and changing the forward and reverse rotation control mode of the motor when the expected movement direction is inconsistent with the actual movement direction.
Preferably, the expected movement direction determining module includes: a predetermined direction rotation signal acquisition unit for acquiring a signal given by a user for controlling rotation of the motor to rotate in a predetermined direction; a motor state determining unit, configured to determine the motor state, where the motor state includes a first rotation state and a second rotation state, the first rotation state is a state in which the motor is first connected to the signal rotated in the predetermined direction after being energized, and the second rotation state is a state in which the motor is second or more connected to the signal rotated in the predetermined direction; and the motor calibration signal generation unit is used for giving the motor calibration signal when the motor state is primary rotation, determining whether the motor calibration signal is given according to a vibration signal used for representing that the camera vibrates when the motor state is secondary rotation, and giving the motor calibration signal when the vibration signal exists.
Preferably, the motor calibration signal generating unit includes: a conventional motion speed average value obtaining subunit, configured to obtain a conventional motion speed average value of the camera corresponding to the optical flow field in the rotation process of the motor before the signal rotating to the predetermined direction is received; the real-time motion speed average value acquisition subunit is used for continuously acquiring the real-time motion speed average value of the camera through the optical flow field according to a set time interval; and the vibration signal generation subunit is used for giving the vibration signal when the real-time motion speed average value exceeds the set multiple of the conventional motion speed average value.
Preferably, in the vibration signal generation subunit, the vibration signal is given when the following formula is satisfied:/ />
wherein m pixel points are shared under the two-dimensional coordinate system of the image acquired by the camera,representing the instantaneous speed of motion of the a-th pixel point in the image acquired by the camera at set time intervals,and the instantaneous motion speed of an a pixel point in the image acquired by the camera in the rotation process of the motor is represented.
In a third aspect of the application, a computer device comprises a processor, a memory and a computer program stored on the memory and executable on the processor, the processor executing the computer program for implementing the motor rotation direction auto-calibration method according to any one of the above.
In a fourth aspect of the present application, a readable storage medium stores a computer program for implementing the motor rotation direction automatic calibration method as described above when executed by a processor.
The application can automatically judge the steering of the motor and calibrate the rotation direction of the camera, thereby solving the problem of abnormal steering of products caused by the assembly and the reverse motor wire of workers.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of the motor rotation direction auto-calibration method of the present application.
Fig. 2 is a schematic diagram of an image optical flow field acquired by a camera under motor motion.
FIG. 3 is a schematic diagram of an image optical flow field acquired by a camera under another motion of a motor.
Fig. 4 is a schematic diagram of a computer device suitable for use in implementing an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application become more apparent, the technical solutions in the embodiments of the present application will be described in more detail with reference to the accompanying drawings in the embodiments of the present application. In the drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The described embodiments are some, but not all, embodiments of the application. The embodiments described below by referring to the drawings are exemplary and intended to illustrate the present application and should not be construed as limiting the application. All other embodiments, based on the embodiments of the application, which are apparent to those of ordinary skill in the art without inventive faculty, are intended to be within the scope of the application. Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
According to a first aspect of the present application, as shown in fig. 1, a method for automatically calibrating a rotation direction of a motor includes:
s1, receiving a motor calibration signal, and determining an expected movement direction of a motor based on a signal that the motor rotates in a preset direction;
s2, acquiring a plurality of pieces of continuous image data acquired by a camera driven by the motor;
s3, determining an optical flow field of the image data based on an optical flow method;
s4, determining the actual movement direction of the camera according to the optical flow field;
and S5, comparing the expected movement direction with the actual movement direction, and changing a positive and negative rotation control mode of the motor when the expected movement direction is inconsistent with the actual movement direction.
In this embodiment, first, in step S1, the motor is controlled to rotate in a preset direction, a series of motor actions which may conform to the expected steering, and the camera is clear in imaging and the moving direction of the picture can be estimated are generated, and the image is acquired in step S2. And then in the step S3 and the step S4, the motion direction is calculated, analyzed and estimated through an optical flow method, and in the step S5, the expected direction is compared and controlled to generate parameter information whether to change the motor steering control mode or not, so that the motor automatic calibration based on the closed-loop automatic control system is realized.
According to the application, a steering assumption is provided by controlling and intervening the motor motion, the actual motion steering is analyzed by an optical flow method, the accuracy of the motion steering is compared and verified, the motor steering control mode is changed, the related thought scheme of automatic calibration of the motor steering is realized, and the judgment and automatic calibration of the rotation directions of the camera in the horizontal and vertical directions can be realized.
According to the technical scheme, the bidirectional rotary motion calibration of the two-axis camera holder can be realized by continuously controlling the rotation of the two motors and the bidirectional estimation of the optical flow motion of the camera pictures, and the method can be used for automatic calibration of the motion steering of the wheeled robot.
The optical flow (Optical flow or optic flow) is a concept in detecting the movement of an object in the view field. To describe the movement of an observed object, surface or edge caused by movement relative to an observer. Optical flow methods are very useful in pattern recognition, computer vision, and other image processing fields, for motion detection, object cutting, computation of collision time and object expansion, motion compensation coding, or stereo measurement through object surfaces and edges, etc. In step S3, the optical flow field is a two-dimensional vector field reflecting the gray scale trend of each point on the image, and can be regarded as an instantaneous velocity field generated by the movement of the pixel with gray scale on the image plane. The information contained in the method is the instantaneous motion speed vector information of each image speed point. The change of the camera can also cause the generation of optical flow, which is mainly represented by lens zooming, lens zooming out, camera rotation, horizontal scanning or a plurality of the above, and when moving objects exist in a scene, the situation that partial optical flow in an optical flow field is inconsistent with surrounding optical flow obviously occurs. Fig. 2 shows a schematic view of an optical flow field of a camera driven by a motor to translate from right to left, and fig. 3 shows a schematic view of an optical flow field of a camera driven by a motor to translate from bottom to top. It will be appreciated that the actual direction of rotation of the motor can be determined by the optical flow field.
When calculating the optical flow field through step S3, the motor is usually required to drive the camera to generate small-amplitude motion, but detection is not required when the motor is controlled each time, so the application further sets a determining program before step S1, for determining whether the motor rotation control needs to calibrate the motor rotation direction, and in particular, before step S1, the application further includes:
step S11, acquiring a signal which is given by a user and used for controlling the motor to rotate and rotates in a preset direction;
step S12, determining the motor state, wherein the motor state comprises a primary rotation state and a secondary rotation state, the primary rotation state is a state that the motor is firstly connected with the signal rotating in the preset direction after being electrified, and the secondary rotation state is a state that the motor is connected with the signal rotating in the preset direction for more than the second time;
and step S13, when the motor state is the primary rotation, giving the motor calibration signal, when the motor state is the secondary rotation state, determining whether the motor calibration signal is given according to a vibration signal for representing the vibration of the camera, and when the vibration signal exists, giving the motor calibration signal.
In step S13, the present application considers that there are two situations in which the calibration of the motor rotation direction is required, one is that the calibration of the motor rotation direction is required when the motor is first powered on and rotated, because there may be a reverse rotation situation caused by the installation of the motor or the camera before the motor is powered on, and the calibration is not required when the motor is rotated again, and the motor operation can be directly performed according to the signal given by the user and rotated in the predetermined direction. The second is that after the motor is powered on, although the motor is started and stopped through a plurality of times of motor rotation, the motor or the camera is possibly subjected to maintenance or other maintenance operations in a state that the camera or the motor is kept powered on, and the operation can also cause the motor to reversely rotate, so that whether the operation is performed or not can be determined through a vibration signal, and if the vibration signal exists, the motor steering correction is performed once.
In some alternative embodiments, step S13 further comprises:
step S131, acquiring a conventional motion speed average value of a camera corresponding to an optical flow field in a motor rotation process before receiving the signal rotating to a preset direction;
step S132, continuously obtaining a real-time motion speed average value of the camera through an optical flow field according to a set time interval;
step S133, when the real-time moving speed average exceeds the set multiple of the normal moving speed average, the vibration signal is given.
In the embodiment, whether the camera or the motor is subjected to larger displacement is determined according to the change condition of the optical flow field in the picture acquired by the camera, if the picture acquired by the camera shows the situation that the image change is very large, namely, the real-time moving speed average value exceeds the set multiple of the conventional moving speed average value, the camera or the motor is considered to be subjected to larger displacement, and in order to prevent the situation that the rotation and the control of the motor are inconsistent, the motor steering correction is needed to be carried out once again.
In some alternative embodiments, in step S133, the vibration signal is given when the following formula is satisfied:
/ />
wherein, the liquid crystal display device comprises a liquid crystal display device,m pixel points are shared under the two-dimensional coordinate system of the image acquired by the camera,representing the instantaneous speed of motion of the a-th pixel point in the image acquired by the camera at set time intervals,and the instantaneous motion speed of an a pixel point in the image acquired by the camera in the rotation process of the motor is represented.
In practice, the setting multiple in step S13 is only 2, and it can be basically determined that the optical flow field is greatly changed, and it is very likely that the camera or the motor is subjected to live maintenance, but the setting multiple in step S13 is set to 10, mainly considering the optical flow field change caused by camera motion and possibly the optical flow field change caused by scene motion, but moving objects are not present in the scene opposite to the camera at any time, and most of the images of the positions in the images acquired by the camera are fixed, so that the setting multiple is not too high, and it is reasonable to determine that the setting multiple is 10 through test analysis.
The application has the following advantages:
1. the motor direction is not required to be marked, a special motor or a camera calibration tool is not required, and only automatic calibration software is required to be loaded, so that parameters of a motor steering control mode are modified.
2. The automatic intelligent camera product embedded system only needs to initiate a motor steering self-calibration program when being started for the first time, the whole calibration process can be automatically completed without personnel intervention, and labor force is saved.
3. The camera is strong and stable, and the video imaging quality and the optical flow estimation effect are guaranteed by accurately controlling the movement of the camera, so that the movement direction of a camera picture is judged more accurately, and the calibration effect has stronger stability.
4. The risk is low, the motors with different models are purchased, and the consistency of the rotation direction of the product camera can still be ensured.
The second aspect of the present application provides an automatic motor rotation direction calibration device corresponding to the above method, mainly comprising: the expected motion direction determining module is used for receiving a motor calibration signal and determining the expected motion direction of the motor based on the signal that the motor rotates to a preset direction; the image acquisition module is used for acquiring a plurality of pieces of continuous image data acquired by a camera driven by the motor; the optical flow field calculation module is used for determining an optical flow field of the image data based on an optical flow method; the actual motion direction determining module is used for determining the actual motion direction of the camera according to the optical flow field; and the motor adjusting module is used for comparing the expected movement direction with the actual movement direction, and changing the forward and reverse rotation control mode of the motor when the expected movement direction is inconsistent with the actual movement direction.
In some alternative embodiments, the expected motion direction determination module includes: a predetermined direction rotation signal acquisition unit for acquiring a signal given by a user for controlling rotation of the motor to rotate in a predetermined direction; a motor state determining unit, configured to determine the motor state, where the motor state includes a first rotation state and a second rotation state, the first rotation state is a state in which the motor is first connected to the signal rotated in the predetermined direction after being energized, and the second rotation state is a state in which the motor is second or more connected to the signal rotated in the predetermined direction; and the motor calibration signal generation unit is used for giving the motor calibration signal when the motor state is primary rotation, determining whether the motor calibration signal is given according to a vibration signal used for representing that the camera vibrates when the motor state is secondary rotation, and giving the motor calibration signal when the vibration signal exists.
In some alternative embodiments, the motor calibration signal generating unit includes: a conventional motion speed average value obtaining subunit, configured to obtain a conventional motion speed average value of the camera corresponding to the optical flow field in the rotation process of the motor before the signal rotating to the predetermined direction is received; the real-time motion speed average value acquisition subunit is used for continuously acquiring the real-time motion speed average value of the camera through the optical flow field according to a set time interval; and the vibration signal generation subunit is used for giving the vibration signal when the real-time motion speed average value exceeds the set multiple of the conventional motion speed average value.
In some alternative embodiments, in the vibration signal generation subunit, the vibration signal is given when the following formula is satisfied:
/ />
wherein m pixel points are shared under the two-dimensional coordinate system of the image acquired by the camera,representing the instantaneous speed of motion of the a-th pixel point in the image acquired by the camera at set time intervals,and the instantaneous motion speed of an a pixel point in the image acquired by the camera in the rotation process of the motor is represented.
In a third aspect of the application, a computer device comprises a processor, a memory, and a computer program stored on the memory and executable on the processor, the processor executing the computer program for implementing a method for automatically calibrating the rotational direction of a motor.
In a fourth aspect of the present application, a readable storage medium stores a computer program for implementing the motor rotation direction automatic calibration method as described above when executed by a processor. The computer-readable storage medium may be contained in the apparatus described in the above embodiment; or may be present alone without being fitted into the device. The computer readable storage medium carries one or more programs which, when executed by the apparatus, process data as described above.
Referring now to FIG. 4, there is illustrated a schematic diagram of a computer device 400 suitable for use in implementing embodiments of the present application. The computer device shown in fig. 4 is only one example and should not be construed as limiting the functionality and scope of use of embodiments of the present application.
As shown in fig. 4, the computer device 400 includes a Central Processing Unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 403. In the RAM403, various programs and data required for the operation of the device 400 are also stored. The CPU401, ROM402, and RAM403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output portion 407 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage section 408 including a hard disk or the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. The drive 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 409 and/or installed from the removable medium 411. The above-described functions defined in the method of the present application are performed when the computer program is executed by a Central Processing Unit (CPU) 401. The computer storage medium of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules or units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware. The modules or units described may also be provided in a processor, the names of which do not in some cases constitute a limitation of the module or unit itself.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present application should be included in the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. An automatic motor rotation direction calibration method is characterized by comprising the following steps:
s1, receiving a motor calibration signal, and determining an expected movement direction of a motor based on a signal that the motor rotates in a preset direction;
s2, acquiring a plurality of pieces of continuous image data acquired by a camera driven by the motor;
s3, determining an optical flow field of the image data based on an optical flow method;
s4, determining the actual movement direction of the camera according to the optical flow field;
and S5, comparing the expected movement direction with the actual movement direction, and changing a positive and negative rotation control mode of the motor when the expected movement direction is inconsistent with the actual movement direction.
2. The method for automatically calibrating a rotational direction of a motor according to claim 1, further comprising, prior to step S1:
step S11, acquiring a signal which is given by a user and used for controlling the motor to rotate and rotates in a preset direction;
step S12, determining the motor state, wherein the motor state comprises a primary rotation state and a secondary rotation state, the primary rotation state is a state that the motor is firstly connected with the signal rotating in the preset direction after being electrified, and the secondary rotation state is a state that the motor is connected with the signal rotating in the preset direction for more than the second time;
and step S13, when the motor state is the primary rotation, giving the motor calibration signal, when the motor state is the secondary rotation state, determining whether the motor calibration signal is given according to a vibration signal for representing the vibration of the camera, and when the vibration signal exists, giving the motor calibration signal.
3. The automatic motor rotation direction calibration method according to claim 2, wherein step S13 further comprises:
step S131, acquiring a conventional motion speed average value of a camera corresponding to an optical flow field in a motor rotation process before receiving the signal rotating to a preset direction;
step S132, continuously obtaining a real-time motion speed average value of the camera through an optical flow field according to a set time interval;
step S133, when the real-time moving speed average exceeds the set multiple of the normal moving speed average, the vibration signal is given.
4. A motor rotation direction automatic calibration method according to claim 3, wherein in step S133, the vibration signal is given when the following formula is satisfied:
//>
wherein m pixel points are shared under the two-dimensional coordinate system of the image acquired by the camera,representing the instantaneous speed of motion of the a-th pixel point in the image acquired by the camera at set time intervals,and the instantaneous motion speed of an a pixel point in the image acquired by the camera in the rotation process of the motor is represented.
5. An automatic motor rotation direction calibration device, comprising:
the expected motion direction determining module is used for receiving a motor calibration signal and determining the expected motion direction of the motor based on the signal that the motor rotates to a preset direction;
the image acquisition module is used for acquiring a plurality of pieces of continuous image data acquired by a camera driven by the motor;
the optical flow field calculation module is used for determining an optical flow field of the image data based on an optical flow method;
the actual motion direction determining module is used for determining the actual motion direction of the camera according to the optical flow field;
and the motor adjusting module is used for comparing the expected movement direction with the actual movement direction, and changing the forward and reverse rotation control mode of the motor when the expected movement direction is inconsistent with the actual movement direction.
6. The motor rotational direction automatic calibration device according to claim 5, wherein the expected movement direction determination module includes:
a predetermined direction rotation signal acquisition unit for acquiring a signal given by a user for controlling rotation of the motor to rotate in a predetermined direction;
a motor state determining unit, configured to determine the motor state, where the motor state includes a first rotation state and a second rotation state, the first rotation state is a state in which the motor is first connected to the signal rotated in the predetermined direction after being energized, and the second rotation state is a state in which the motor is second or more connected to the signal rotated in the predetermined direction;
and the motor calibration signal generation unit is used for giving the motor calibration signal when the motor state is primary rotation, determining whether the motor calibration signal is given according to a vibration signal used for representing that the camera vibrates when the motor state is secondary rotation, and giving the motor calibration signal when the vibration signal exists.
7. The motor rotation direction automatic calibration device according to claim 6, wherein the motor calibration signal generation unit includes:
a conventional motion speed average value obtaining subunit, configured to obtain a conventional motion speed average value of the camera corresponding to the optical flow field in the rotation process of the motor before the signal rotating to the predetermined direction is received;
the real-time motion speed average value acquisition subunit is used for continuously acquiring the real-time motion speed average value of the camera through the optical flow field according to a set time interval;
and the vibration signal generation subunit is used for giving the vibration signal when the real-time motion speed average value exceeds the set multiple of the conventional motion speed average value.
8. The motor rotation direction automatic calibration device according to claim 7, wherein in the vibration signal generation subunit, the vibration signal is given when the following formula is satisfied:
//>
wherein m pixel points are shared under the two-dimensional coordinate system of the image acquired by the camera,representing the instantaneous speed of motion of the a-th pixel point in the image acquired by the camera at set time intervals,and the instantaneous motion speed of an a pixel point in the image acquired by the camera in the rotation process of the motor is represented.
9. A computer device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the processor executing the computer program for implementing the motor rotation direction auto-calibration method according to any one of claims 1-4.
10. A readable storage medium storing a computer program, wherein the computer program is executed by a processor for implementing the motor rotation direction automatic calibration method according to any one of claims 1-4.
CN202310754455.1A 2023-06-26 2023-06-26 Automatic calibration method and device for motor rotation direction Active CN116722785B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310754455.1A CN116722785B (en) 2023-06-26 2023-06-26 Automatic calibration method and device for motor rotation direction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310754455.1A CN116722785B (en) 2023-06-26 2023-06-26 Automatic calibration method and device for motor rotation direction

Publications (2)

Publication Number Publication Date
CN116722785A true CN116722785A (en) 2023-09-08
CN116722785B CN116722785B (en) 2024-02-23

Family

ID=87869508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310754455.1A Active CN116722785B (en) 2023-06-26 2023-06-26 Automatic calibration method and device for motor rotation direction

Country Status (1)

Country Link
CN (1) CN116722785B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012166776A (en) * 2011-01-26 2012-09-06 Toyota Motor Corp Electric power steering device
KR101820125B1 (en) * 2017-10-17 2018-01-18 태양정보시스템(주) System for auto correcting error of increasing mapping and editing condition
US20200014912A1 (en) * 2018-07-06 2020-01-09 Samsung Electronics Co., Ltd. Calibration device and method of operating the same
CN110880184A (en) * 2019-10-03 2020-03-13 上海淡竹体育科技有限公司 Method and device for carrying out automatic camera inspection based on optical flow field
US20210305924A1 (en) * 2020-03-24 2021-09-30 Kabushiki Kaisha Yaskawa Denki Motor control apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012166776A (en) * 2011-01-26 2012-09-06 Toyota Motor Corp Electric power steering device
KR101820125B1 (en) * 2017-10-17 2018-01-18 태양정보시스템(주) System for auto correcting error of increasing mapping and editing condition
US20200014912A1 (en) * 2018-07-06 2020-01-09 Samsung Electronics Co., Ltd. Calibration device and method of operating the same
CN110880184A (en) * 2019-10-03 2020-03-13 上海淡竹体育科技有限公司 Method and device for carrying out automatic camera inspection based on optical flow field
US20210305924A1 (en) * 2020-03-24 2021-09-30 Kabushiki Kaisha Yaskawa Denki Motor control apparatus

Also Published As

Publication number Publication date
CN116722785B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
EP1608160A1 (en) Projector and image correction method
CN109377551B (en) Three-dimensional face reconstruction method and device and storage medium thereof
CN108761994B (en) Detection method and device for assembly of camera module and virtual reality equipment
CN113418543A (en) Method and device for detecting automatic driving sensor, electronic equipment and storage medium
CN104679225A (en) Method and device for adjusting screen of mobile terminal and mobile terminal
CN106570907B (en) Camera calibration method and device
CN110796738B (en) Three-dimensional visualization method and device for state tracking of inspection equipment
CN111145345A (en) Tunnel construction area three-dimensional model construction method and system
EP3633606A1 (en) Information processing device, information processing method, and program
WO2019244944A1 (en) Three-dimension reconstruction method and three-dimension reconstruction device
CN105354813B (en) Holder is driven to generate the method and device of stitching image
Lemkens et al. Multi RGB-D camera setup for generating large 3D point clouds
CN110248148B (en) Method and device for determining positioning parameters
CN114821497A (en) Method, device and equipment for determining position of target object and storage medium
CN112560769B (en) Method for detecting obstacle, electronic device, road side device and cloud control platform
CN116722785B (en) Automatic calibration method and device for motor rotation direction
CN111586383B (en) Method and device for projection and projection equipment
CN110740315B (en) Camera correction method and device, electronic equipment and storage medium
JP2007010419A (en) Three-dimensional shape of object verifying system
CN113108919B (en) Human body temperature detection method, device and storage medium
CN111627021B (en) Terminal middle frame appearance detection method, system and controller
CN111787239A (en) Video shooting device and three-dimensional imaging method thereof
CN110675445A (en) Visual positioning method, device and storage medium
CN113068006B (en) Image presentation method and device
WO2024024090A1 (en) Component count device and robot system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant