CN106370883B - Speed measurement method and terminal - Google Patents

Speed measurement method and terminal Download PDF

Info

Publication number
CN106370883B
CN106370883B CN201610796173.8A CN201610796173A CN106370883B CN 106370883 B CN106370883 B CN 106370883B CN 201610796173 A CN201610796173 A CN 201610796173A CN 106370883 B CN106370883 B CN 106370883B
Authority
CN
China
Prior art keywords
speed
image
measured
distance
terminal
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.)
Active
Application number
CN201610796173.8A
Other languages
Chinese (zh)
Other versions
CN106370883A (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.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen 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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201610796173.8A priority Critical patent/CN106370883B/en
Publication of CN106370883A publication Critical patent/CN106370883A/en
Application granted granted Critical
Publication of CN106370883B publication Critical patent/CN106370883B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P3/00Measuring linear or angular speed; Measuring differences of linear or angular speeds
    • G01P3/64Devices characterised by the determination of the time taken to traverse a fixed distance
    • G01P3/68Devices characterised by the determination of the time taken to traverse a fixed distance using optical means, i.e. using infrared, visible, or ultraviolet light

Abstract

The embodiment of the invention provides a speed measuring method and a terminal, wherein the method comprises the following steps: the terminal captures a first image including an object to be speed-measured by using a first camera, and captures a second image including the object to be speed-measured by using a second camera when a preset shooting interval is passed; the terminal obtains the moving distance of the object to be speed-measured in the preset photographing interval according to the first image and the second image; and the terminal determines the moving speed of the object to be tested according to the moving distance and the preset photographing interval. According to the embodiment of the invention, the speed can be conveniently and accurately measured by using the double cameras of the terminal, and the playability and the practicability of the terminal are improved.

Description

Speed measurement method and terminal
Technical Field
The invention relates to the technical field of photographing, in particular to a speed measuring method and a terminal.
Background
With the increasing popularization of terminals such as smart phones and tablet computers, and the portability of the terminals and the imaging quality of the equipped cameras are gradually improved, taking pictures by using the terminals becomes the first choice of more and more users. However, the camera on the current terminal is generally limited to photographing, video recording and the like, and the function is single and the playability is not strong.
Disclosure of Invention
The embodiment of the invention provides a speed measuring method and a terminal, which can conveniently and accurately measure speed by using double cameras of the terminal, and improve the playability and the practicability of the terminal.
A first aspect of an embodiment of the present invention provides a speed measurement method, including:
the terminal captures a first image including an object to be speed-measured by using a first camera, and captures a second image including the object to be speed-measured by using a second camera when a preset photographing interval is passed.
And the terminal acquires the moving distance of the object to be tested in the preset photographing interval according to the first image and the second image.
And the terminal determines the moving speed of the object to be tested according to the moving distance and the preset photographing interval.
Optionally, before the terminal captures a first image including an object to be speed-measured by using a first camera, the method further includes:
and the terminal determines the preset photographing interval according to the selected speed measuring scene.
Optionally, the obtaining, by the terminal, the moving distance of the object to be speed-measured in the preset photographing interval according to the first image and the second image includes:
and the terminal analyzes the first image to obtain a first distance between the terminal and the object to be tested when the first image is captured.
And the terminal analyzes the second image to obtain a second distance between the terminal and the object to be tested when the second image is captured.
The terminal obtains a first included angle between a connecting line between the terminal and the object to be speed-measured when the first image is captured and a connecting line between the terminal and the object to be speed-measured when the second image is captured.
And the terminal calculates the moving distance of the object to be measured in the preset photographing interval according to the first distance, the second distance and the first included angle.
Optionally, the obtaining, by the terminal, the moving distance of the object to be speed-measured in the preset photographing interval according to the first image and the second image includes:
and when the terminal captures the first image, acquiring a third distance from the terminal to the object to be tested by using an infrared sensor.
And when the terminal captures the second image, acquiring a fourth distance between the terminal and the object to be tested by using the infrared sensor.
And the terminal acquires a second included angle between a connecting line between the terminal and the object to be speed-measured when the first image is captured and a connecting line between the terminal and the object to be speed-measured when the second image is captured.
And the terminal calculates the moving distance of the object to be measured in the preset photographing interval according to the third distance, the fourth distance and the second included angle.
Optionally, the determining, by the terminal, the moving speed of the object to be speed-measured according to the moving distance and the preset photographing interval includes:
and the terminal judges whether the moving distance is within a preset distance range.
And if the moving distance is within the preset distance range, the terminal determines the moving speed of the object to be tested according to the moving distance and the preset photographing interval.
If the moving distance is not within the preset distance range, the terminal adjusts the preset photographing interval, the first camera is utilized to capture a third image of the object to be measured in speed, the second camera is utilized to capture a fourth image of the object to be measured in speed when the preset photographing interval is adjusted, the moving distance of the object to be measured in speed is obtained after the object to be measured is adjusted in the preset photographing interval according to the third image and the fourth image, and the moving speed of the object to be measured is determined according to the moving distance of the object to be measured in speed adjusted in the preset photographing interval and the preset photographing interval after the object to be measured is adjusted in speed.
A second aspect of an embodiment of the present invention provides a terminal, including:
the capturing module is used for capturing a first image including an object to be speed-measured by using the first camera and capturing a second image including the object to be speed-measured by using the second camera when a preset photographing interval is passed.
And the acquisition module is used for acquiring the moving distance of the object to be tested in the preset photographing interval according to the first image and the second image.
And the determining module is used for determining the moving speed of the object to be measured according to the moving distance and the preset photographing interval.
Optionally, the determining module is further configured to determine the preset photographing interval according to the selected speed measurement scene.
Optionally, the obtaining module includes:
and the analysis unit is used for analyzing the first image and acquiring a first distance between the first image and the object to be tested when the capture module captures the first image.
The analysis unit is further configured to analyze the second image, and obtain a second distance between the capture module and the object to be speed-measured when the capture module captures the second image.
The acquisition unit is used for acquiring a first included angle between a connecting line between the acquisition module and the object to be tested when the first image is captured and a connecting line between the acquisition module and the object to be tested when the second image is captured.
And the calculating unit is used for calculating the moving distance of the object to be measured in the preset photographing interval according to the first distance, the second distance and the first included angle.
Optionally, the obtaining module includes:
and the acquisition unit is used for acquiring a third distance between the acquisition unit and the object to be speed-measured by utilizing an infrared sensor when the first image is captured by the capture module.
The acquiring unit is further configured to acquire a fourth distance from the object to be speed-measured by using the infrared sensor when the capturing module captures the second image.
The acquiring unit is further configured to acquire a second included angle between a connection between the capturing module and the object to be speed-measured when the capturing module captures the first image and a connection between the capturing module and the object to be speed-measured when the capturing module captures the second image.
And the calculating unit is used for calculating the moving distance of the object to be measured in the preset photographing interval according to the third distance, the fourth distance and the second included angle.
Optionally, the specific manner of determining the moving speed of the object to be speed-measured by the determining module according to the moving distance and the preset photographing interval is as follows:
and judging whether the moving distance is within a preset distance range.
And if the moving distance is within the preset distance range, determining the moving speed of the object to be tested according to the moving distance and the preset photographing interval.
If the moving distance is not within the preset distance range, adjusting the preset photographing interval, capturing a third image including the object to be measured in speed by using the first camera, capturing a fourth image including the object to be measured in speed by using the second camera when the adjusted preset photographing interval is experienced, acquiring the moving distance of the object to be measured in the adjusted preset photographing interval according to the third image and the fourth image, and determining the moving speed of the object to be measured according to the moving distance of the object to be measured in the adjusted preset photographing interval and the adjusted preset photographing interval.
A third aspect of an embodiment of the present invention provides a terminal, including: treater, first camera and second camera, wherein:
the processor is used for capturing a first image including an object to be speed-measured by using the first camera, and capturing a second image including the object to be speed-measured by using the second camera when a preset photographing interval is passed.
The processor is further configured to obtain a moving distance of the object to be speed-measured within the preset photographing interval according to the first image and the second image.
The processor is further configured to determine a moving speed of the object to be speed-measured according to the moving distance and the preset photographing interval.
In the embodiment of the invention, the terminal captures a first image comprising an object to be speed-measured by using the first camera, and captures a second image comprising the object to be speed-measured by using the second camera when waiting for a preset photographing interval, and the moving distance of the object to be speed-measured in the preset photographing interval can be obtained according to the first image and the second image, so that the moving speed of the object to be speed-measured can be determined according to the moving distance and the preset photographing interval, the speed can be measured conveniently and accurately by using the double cameras of the terminal, and the playability and the practicability of the terminal are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a velocity measurement method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of a photographed image according to an embodiment of the present invention;
FIG. 3 is another schematic diagram of a photographed image provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of a photographed image according to an embodiment of the present invention;
fig. 5 is a schematic flow chart of a speed measuring method according to a second embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal according to a first embodiment of the present invention;
fig. 7 is a schematic structural diagram of a terminal according to a second embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminal described in the embodiment of the present invention may specifically be a smart phone with dual cameras, a tablet computer, a Mobile Internet Device (MID), a smart wearable device, and the like.
Fig. 1 is a schematic flow chart of a velocity measurement method according to a first embodiment of the present invention. The speed measurement method described in this embodiment includes the following steps:
101. the terminal captures a first image including an object to be speed-measured by using a first camera, and captures a second image including the object to be speed-measured by using a second camera when a preset photographing interval is passed.
The terminal can provide multiple speed measuring scenes for a user to select, different speed measuring scenes can correspond to different preset speed measuring intervals, specifically, the speed measuring scene with the speed to be measured moving faster can be obtained, the preset speed measuring interval is shorter, so that the two cameras at the terminal can capture images including the speed to be measured, for example, when the speed measuring scene is used for measuring the speed of a scooter, the preset speed measuring interval can be set to be at a millisecond ms level (such as 50ms), and when the speed measuring scene is used for measuring the running speed of pedestrians, the preset speed measuring interval can be set to be at a second s level (such as 2 s).
Specifically, after detecting that the user starts the speed measuring function, the terminal prompts the user to select a speed measuring scene and obtains the preset photographing interval corresponding to the speed measuring scene selected by the user, the user aligns the first camera and the second camera of the terminal with the object to be speed-measured by adjusting the attitude, the position and the like of the terminal, and when detecting that the user triggers a speed-measuring starting instruction, for example, the user can trigger the speed measuring instruction by clicking/long-pressing/strongly pressing the photographing button or inputting voice/gesture and the like, the terminal captures a first image including the object to be speed-measured by using the first camera, starts timing by taking the moment of capturing the first image as a time starting point, and when the timing duration reaches the preset photographing interval, capturing a second image comprising the object to be speed-measured by using the second camera, thereby obtaining two images comprising the object to be speed-measured at different moments.
102. And the terminal acquires the moving distance of the object to be tested in the preset photographing interval according to the first image and the second image.
Specifically, the terminal may analyze the first image, and calculate a first distance between the terminal and the object to be speed-measured when the first image is captured, by using the focal length of the first camera and the distance between the object to be speed-measured in the first image and the terminal. Likewise, the terminal may parse the second image, and calculate a second distance to the object to be speed-measured when capturing the second image, using the focal length of the second camera and the distance between the object to be speed-measured in the second image and the terminal.
Further, the terminal may synthesize the first image and the second image, and determine a first included angle between two connecting lines between the terminal and the object to be speed-measured in the synthesized image, so that the moving distance of the object to be speed-measured in the preset photographing interval may be calculated according to the first distance, the second distance, and the first included angle by using a cosine law.
For the calculation of the first included angle, the terminal may obtain a coordinate of the terminal in the composite image and two coordinates of the object to be speed-measured at two moments, and the terminal and the object to be speed-measured at the two moments form a triangle in the composite image, so that the first included angle of two connecting lines between the terminal and the object to be speed-measured may be obtained according to the coordinate of the terminal and the two coordinates of the object to be speed-measured at the two moments.
In some possible embodiments, the terminal may use the infrared sensor to emit infrared rays to the object to be speed-measured when capturing the first image, may obtain a third distance between the terminal and the object to be speed-measured when capturing the first image according to a time elapsed from the infrared ray being emitted by the infrared sensor to the infrared ray being reflected by the object to be speed-measured being received and the speed of light, and may obtain a fourth distance between the terminal and the object to be speed-measured when capturing the second image and determine a second included angle between two lines between the terminal and the object to be speed-measured by using the same method, so that a moving distance of the object to be speed-measured within the preset photographing interval may be calculated according to the third distance, the fourth distance, and the second included angle by using a cosine law.
103. And the terminal determines the moving speed of the object to be tested according to the moving distance and the preset photographing interval.
In some feasible embodiments, the terminal may continuously capture two images including the object to be speed-measured by using the first camera, the two images are numbered as image 1 and image 2 according to the sequence of the capture time, when the terminal experiences the preset photographing interval, the two images including the object to be speed-measured may also be continuously captured by using the second camera, and the two images are numbered as image 3 and image 4 according to the sequence of the capture time, so that the terminal may respectively obtain two moving distances of the object to be speed-measured within the preset photographing interval by using the two groups of images, namely image 1, image 3, image 2 and image 4.
Further, the terminal may determine the moving speed of the object to be speed-measured according to the mean value of the moving distances and the preset photographing interval after the obtained two moving distances are averaged, or may determine the two moving speeds of the object to be speed-measured according to the moving distances and the preset photographing interval, respectively, and then average the two moving speeds to serve as the moving speed of the object to be speed-measured.
For example, taking the example that the object to be speed-measured is an automobile, the preset photographing interval is Δ t, and when the terminal detects that the user triggers a speed measurement starting instruction, the terminal captures a first image including the automobile by using the first camera, as shown in fig. 2. The terminal starts timing with the time of capturing fig. 2 as a time starting point, and captures a second image including the automobile by using the second camera when the timing duration reaches delta t, as shown in fig. 3. The terminal can resolve fig. 2 and calculate the actual distance b from the car at the time of capturing fig. 2 using the focal length of the first camera and the distance of the car from the terminal in fig. 2. Likewise, the terminal can resolve fig. 3, calculate the actual distance c from the car at the time of capturing fig. 3 using the focal length of the second camera and the distance of the car from the terminal in fig. 3.
Further, the terminal may synthesize fig. 2 and fig. 3 to obtain a composite image, as shown in fig. 4, calculate an angle a between two connecting lines between the terminal and the vehicle in fig. 4, so as to calculate the moving distance a of the vehicle within Δ t according to b, c and the angle a by using the cosine law,
Figure BDA0001108100550000071
therefore, the moving speed V of the automobile can be obtained according to the moving distance a and the moving distance delta t of the automobile in delta t, and V is a/delta t.
In the embodiment of the invention, the terminal captures a first image comprising an object to be speed-measured by using the first camera, and captures a second image comprising the object to be speed-measured by using the second camera when waiting for a preset photographing interval, and the moving distance of the object to be speed-measured in the preset photographing interval can be obtained according to the first image and the second image, so that the moving speed of the object to be speed-measured can be determined according to the moving distance and the preset photographing interval, the speed can be measured conveniently and accurately by using the double cameras of the terminal, and the playability and the practicability of the terminal are improved.
Fig. 5 is a schematic flow chart of a speed measuring method according to a second embodiment of the present invention. The speed measurement method described in this embodiment includes the following steps:
501. the terminal captures a first image including an object to be speed-measured by using a first camera, and captures a second image including the object to be speed-measured by using a second camera when the terminal experiences the preset photographing interval.
The terminal can provide multiple speed measuring scenes for a user to select, different speed measuring scenes can correspond to different preset speed measuring intervals, specifically, the speed measuring scene which is faster when the speed measuring object moves can be detected, the preset speed measuring interval is shorter, so that images including the speed measuring object can be captured by two cameras at the terminal, for example, when the speed measuring scene is the speed of a scooter, the preset speed measuring interval can be set to be an ms level (such as 50ms), and when the speed measuring scene is the running speed of a pedestrian, the preset speed measuring interval can be set to be an s level (such as 2 s).
502. And the terminal acquires the moving distance of the object to be tested in the preset photographing interval according to the first image and the second image.
503. The terminal judges whether the moving distance is within a preset distance range, if so, the step 504 is executed; if not, executing steps 505-507.
The preset distance ranges corresponding to different speed measuring scenes can be set to determine whether the moving distance of the object to be measured in the preset photographing interval is reasonable or not, and the situation that the speed measuring result is not accurate enough due to too large or too small moving distance is prevented. For example, when the speed measurement scene is to measure the speed of a vehicle in a aerocar, the preset distance range may be larger, for example, 20m to 50m, and when the speed measurement scene is to measure the running speed of a pedestrian, the preset distance range may be smaller, for example, 5m to 10 m.
In a specific implementation, the terminal determines whether the moving distance is within the preset distance range, and if the moving distance is within the preset distance range, the terminal obtains a reasonable moving distance of the object to be speed-measured within the preset photographing interval, and executes step 504; and if the moving distance is not within the preset distance range, the terminal obtains an unreasonable moving distance of the object to be speed-measured within the preset photographing interval, and the steps 505 to 507 are executed.
504. And the terminal determines the moving speed of the object to be tested according to the moving distance and the preset photographing interval.
505. The terminal adjusts the preset photographing interval, the first camera is used for capturing a third image of the object to be measured in speed, and the second camera is used for capturing a fourth image of the object to be measured in speed after the adjustment of the preset photographing interval.
Specifically, if the moving distance of the object to be speed-measured obtained by the terminal in the preset photographing interval is unreasonable, the preset photographing interval may be adjusted based on the fact that the moving distance is directly related to the preset photographing interval, specifically, the preset photographing interval is adjusted to be smaller when the moving distance is greater than the upper limit of the preset distance range, and the preset photographing interval is adjusted to be larger when the moving distance is less than the lower limit of the preset distance range. The terminal captures a third image including the object to be speed-measured by using the first camera again, and captures a fourth image including the object to be speed-measured by using the second camera again when the adjusted preset photographing interval is met.
In some possible embodiments, the terminal may further determine whether the moving distance of the object to be speed-measured in the preset photographing interval is reasonable by determining whether an included angle a between two connecting lines between the terminal and the object to be speed-measured is within a preset angle range (e.g., 30-120 degrees), that is, when the included angle a is too large or too small, the moving distance of the object to be speed-measured in the preset photographing interval is unreasonable, and when the included angle a is larger than an upper limit of the preset angle range, the preset photographing interval is decreased, and when the included angle a is smaller than a lower limit of the preset angle range, the preset photographing interval is increased, so that the included angle a in an image captured by using the adjusted preset photographing interval is within the preset angle range.
506. And the terminal acquires the moving distance of the object to be tested in the adjusted preset photographing interval according to the third image and the fourth image.
507. And the terminal determines the moving speed of the object to be measured according to the adjusted moving distance of the object to be measured in the preset photographing interval and the adjusted preset photographing interval.
In a specific implementation, the terminal may obtain, by using the method in step 102 of the first embodiment of the speed measuring method shown in fig. 1, the moving distance of the object to be speed-measured in the adjusted preset photographing interval according to the third image and the fourth image, and then the terminal determines the moving speed of the object to be speed-measured according to the moving distance of the object to be speed-measured in the adjusted preset photographing interval and the adjusted preset photographing interval.
It should be noted that, the terminal may execute steps 503, 505, and 506 in a loop, that is, adjust the preset photographing interval for multiple times until the obtained moving distance of the object to be speed-measured in the adjusted preset photographing interval is within the preset distance range, which may ensure that the moving distance is within a reasonable range, and further ensure the accuracy of the speed measurement result of the object to be speed-measured.
In the embodiment of the invention, the terminal captures a first image including an object to be speed-measured by using a first camera, captures a second image including the object to be speed-measured by using a second camera when waiting for a preset photographing interval, can obtain the moving distance of the object to be speed-measured in the preset photographing interval according to the first image and the second image, and directly determines the moving speed of the object to be speed-measured according to the moving distance and the preset photographing interval if the moving distance is in a preset distance range. If the moving distance is not within the preset distance range, the preset photographing interval is adjusted until the moving distance of the object to be measured, which is determined again by the adjusted preset photographing interval, is within the preset distance range, and the moving speed of the object to be measured is calculated according to the moving distance of the object to be measured within the adjusted preset photographing interval and the adjusted preset photographing interval, so that the speed can be measured conveniently and accurately by using the double cameras of the terminal, and the playability and the practicability of the terminal are improved.
Fig. 6 is a schematic structural diagram of a terminal according to a first embodiment of the present invention. The terminal described in this embodiment includes:
the capturing module 601 is configured to capture a first image including an object to be speed-measured by using a first camera, and capture a second image including the object to be speed-measured by using a second camera when a preset photographing interval is elapsed.
An obtaining module 602, configured to obtain, according to the first image and the second image, a moving distance of the object to be speed-measured in the preset photographing interval.
The determining module 603 is configured to determine a moving speed of the object to be speed-measured according to the moving distance and the preset photographing interval.
In some possible embodiments, the determining module 603 is further configured to determine the preset photographing interval according to a selected speed measurement scenario.
In some possible embodiments, the obtaining module 602 includes:
the analyzing unit 6020 is configured to analyze the first image and obtain a first distance from the object to be speed-measured when the capturing module captures the first image.
The analyzing unit 6020 is further configured to analyze the second image and obtain a second distance from the object to be speed-measured when the capturing module captures the second image.
An obtaining unit 6021, configured to obtain a first included angle between a connection line between the capturing module and the object to be speed-measured when the capturing module captures the first image and a connection line between the capturing module and the object to be speed-measured when the capturing module captures the second image.
A calculating unit 6022, configured to calculate a moving distance of the object to be speed-measured in the preset photographing interval according to the first distance, the second distance, and the first included angle.
In some possible embodiments, the obtaining module 602 includes:
an obtaining unit 6021, configured to obtain a third distance from the object to be speed-measured by using an infrared sensor when the capturing module captures the first image.
The obtaining unit 6021 is further configured to obtain a fourth distance from the object to be speed-measured by using the infrared sensor when the capturing module captures the second image.
The obtaining unit 6021 is further configured to obtain a second included angle between a connection between the capturing module and the object to be speed-measured when the capturing module captures the first image and a connection between the capturing module and the object to be speed-measured when the capturing module captures the second image.
A calculating unit 6022, configured to calculate a moving distance of the object to be speed-measured in the preset photographing interval according to the third distance, the fourth distance, and the second included angle.
In some feasible embodiments, the specific way for determining the moving speed of the object to be speed-measured by the determining module 603 according to the moving distance and the preset photographing interval is as follows:
and judging whether the moving distance is within a preset distance range.
And if the moving distance is within the preset distance range, determining the moving speed of the object to be tested according to the moving distance and the preset photographing interval.
If the moving distance is not within the preset distance range, adjusting the preset photographing interval, capturing a third image including the object to be measured in speed by using the first camera, capturing a fourth image including the object to be measured in speed by using the second camera when the adjusted preset photographing interval is experienced, acquiring the moving distance of the object to be measured in the adjusted preset photographing interval according to the third image and the fourth image, and determining the moving speed of the object to be measured according to the moving distance of the object to be measured in the adjusted preset photographing interval and the adjusted preset photographing interval.
It should be noted that the functions of each functional module and unit of the terminal in the embodiment of the present invention may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
In the embodiment of the invention, the terminal captures a first image comprising an object to be speed-measured by using the first camera, and captures a second image comprising the object to be speed-measured by using the second camera when waiting for a preset photographing interval, and the moving distance of the object to be speed-measured in the preset photographing interval can be obtained according to the first image and the second image, so that the moving speed of the object to be speed-measured can be determined according to the moving distance and the preset photographing interval, the speed can be measured conveniently and accurately by using the double cameras of the terminal, and the playability and the practicability of the terminal are improved.
Fig. 7 is a schematic structural diagram of a terminal according to a second embodiment of the present invention. The terminal described in this embodiment includes: a processor 701, a user interface 702, a network interface 703, and a memory 704. The processor 701, the user interface 702, the network interface 703 and the memory 704 in the terminal may be connected by a bus or other means, and fig. 7 shows an example of the connection by a bus in the embodiment of the present invention.
The user interface 702 is a medium for implementing interaction and information exchange between a user and a terminal, and may specifically include a Display screen (Display) for output, a touch screen, a Keyboard (Keyboard) for input, a camera for capturing an image, and the like. The processor 701 (or CPU) is a computing core and a control core of the terminal, and can analyze various instructions in the terminal and process various data of the terminal, such as: the CPU can be used for analyzing a power-on and power-off instruction sent to the terminal by a user and controlling the terminal to carry out power-on and power-off operation; the following steps are repeated: the CPU may transmit various types of interactive data between the internal structures of the terminal, and so on. A Memory (Memory)704 is a Memory device in the terminal for storing programs and data. It is understood that the memory 704 may comprise a built-in memory of the terminal, and may also comprise an extended memory supported by the terminal. The memory 704 provides storage space that stores the operating system of the terminal, which may include, but is not limited to: a Windows system (an operating system), an Android system, an IOS system, and the like. The processor 701 is used to execute programs stored in the memory 704. Wherein:
the processor 701 is configured to capture a first image including an object to be speed-measured by using a first camera, and capture a second image including the object to be speed-measured by using a second camera when a preset photographing interval is elapsed.
The processor 701 is further configured to obtain a moving distance of the object to be speed-measured in the preset photographing interval according to the first image and the second image.
The processor 701 is further configured to determine a moving speed of the object to be speed-measured according to the moving distance and the preset photographing interval.
In some possible embodiments, the processor 701 is further configured to determine the preset photographing interval according to a selected speed measurement scenario.
In some feasible embodiments, the specific way for the processor 701 to obtain the moving distance of the object to be speed-measured in the preset photographing interval according to the first image and the second image is as follows:
and analyzing the first image to obtain a first distance between the first image and the object to be tested when the first image is captured.
And analyzing the second image to obtain a second distance between the second image and the object to be tested when the second image is captured.
And acquiring a first included angle between a connecting line between the first image and the object to be tested when the first image is captured and a connecting line between the second image and the object to be tested when the second image is captured.
And calculating the moving distance of the object to be measured in the preset photographing interval according to the first distance, the second distance and the first included angle.
In some feasible embodiments, the specific way for the processor 701 to obtain the moving distance of the object to be speed-measured in the preset photographing interval according to the first image and the second image is as follows:
and acquiring a third distance from the object to be speed-measured by using an infrared sensor when the first image is captured.
And acquiring a fourth distance between the second image and the object to be speed-measured by using the infrared sensor when the second image is captured.
And acquiring a second included angle between a connecting line between the first image and the object to be tested and a connecting line between the second image and the object to be tested when the second image is captured.
And calculating the moving distance of the object to be measured in the preset photographing interval according to the third distance, the fourth distance and the second included angle.
In some possible embodiments, the specific manner in which the processor 701 determines the moving speed of the object to be speed-measured according to the moving distance and the preset photographing interval is as follows:
and judging whether the moving distance is within a preset distance range.
And if the moving distance is within the preset distance range, determining the moving speed of the object to be tested according to the moving distance and the preset photographing interval.
If the moving distance is not within the preset distance range, adjusting the preset photographing interval, capturing a third image including the object to be measured in speed by using the first camera, capturing a fourth image including the object to be measured in speed by using the second camera when the adjusted preset photographing interval is experienced, acquiring the moving distance of the object to be measured in the adjusted preset photographing interval according to the third image and the fourth image, and determining the moving speed of the object to be measured according to the moving distance of the object to be measured in the adjusted preset photographing interval and the adjusted preset photographing interval.
In a specific implementation, the processor 701, the user interface 702, and the network interface 703 described in this embodiment of the present invention may execute the implementation of the terminal described in the speed measurement method provided in fig. 1 and fig. 5 in this embodiment of the present invention, and may also execute the implementation of the terminal described in fig. 6 in this embodiment of the present invention, which is not described herein again.
In the embodiment of the invention, the terminal captures a first image comprising an object to be speed-measured by using the first camera, and captures a second image comprising the object to be speed-measured by using the second camera when waiting for a preset photographing interval, and the moving distance of the object to be speed-measured in the preset photographing interval can be obtained according to the first image and the second image, so that the moving speed of the object to be speed-measured can be determined according to the moving distance and the preset photographing interval, the speed can be measured conveniently and accurately by using the double cameras of the terminal, and the playability and the practicability of the terminal are improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The speed measuring method and the terminal provided by the embodiment of the invention are described in detail, a specific example is applied in the text to explain the principle and the implementation of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (5)

1. A method of measuring a speed, comprising:
the terminal determines a preset photographing interval according to the selected speed measuring scene, and different speed measuring scenes correspond to different preset photographing intervals;
the terminal captures a first image including an object to be speed-measured by using a first camera, and captures a second image including the object to be speed-measured by using a second camera when the terminal experiences the preset photographing interval;
the terminal obtains the moving distance of the object to be speed-measured in the preset photographing interval according to the first image and the second image;
the terminal obtains the moving distance of the object to be speed-measured in the preset photographing interval according to the first image and the second image, and the method comprises the following steps:
when the terminal captures the first image, acquiring a third distance between the terminal and the object to be speed-measured by using an infrared sensor;
when the terminal captures the second image, acquiring a fourth distance between the terminal and the object to be speed-measured by using the infrared sensor;
the terminal acquires a second included angle between a connecting line between the terminal and the object to be speed-measured when the first image is captured and a connecting line between the terminal and the object to be speed-measured when the second image is captured;
the terminal calculates the moving distance of the object to be measured in the preset photographing interval according to the third distance, the fourth distance and the second included angle;
the terminal judges whether the moving distance is within a preset distance range;
if the moving distance is within the preset distance range, the terminal determines the moving speed of the object to be speed-measured according to the moving distance and the preset photographing interval;
if the moving distance is not within the preset distance range, the terminal adjusts the preset photographing interval, the first camera is utilized to capture a third image of the object to be measured in speed, the second camera is utilized to capture a fourth image of the object to be measured in speed when the preset photographing interval is adjusted, the moving distance of the object to be measured in speed is obtained after the object to be measured is adjusted in the preset photographing interval according to the third image and the fourth image, and the moving speed of the object to be measured is determined according to the moving distance of the object to be measured in speed adjusted in the preset photographing interval and the preset photographing interval after the object to be measured is adjusted in speed.
2. The method according to claim 1, wherein the terminal obtains the moving distance of the object to be speed-measured in the preset photographing interval according to the first image and the second image, and the method comprises the following steps:
the terminal analyzes the first image to obtain a first distance between the terminal and the object to be tested when the first image is captured;
the terminal analyzes the second image to obtain a second distance between the terminal and the object to be tested when the second image is captured;
the terminal acquires a first included angle between a connecting line between the terminal and the object to be speed-measured when the first image is captured and a connecting line between the terminal and the object to be speed-measured when the second image is captured;
and the terminal calculates the moving distance of the object to be measured in the preset photographing interval according to the first distance, the second distance and the first included angle.
3. A terminal, comprising:
the determining module is used for determining a preset photographing interval according to the selected speed measuring scene, wherein different speed measuring scenes correspond to different preset photographing intervals;
the capturing module is used for capturing a first image comprising an object to be speed-measured by using a first camera and capturing a second image comprising the object to be speed-measured by using a second camera when the preset shooting interval is passed;
the acquisition module is used for acquiring the moving distance of the object to be speed-measured in the preset photographing interval according to the first image and the second image;
wherein the acquisition module comprises:
the acquisition unit is used for acquiring a third distance between the acquisition unit and the object to be speed-measured by using an infrared sensor when the first image is captured by the capture module;
the acquisition unit is further configured to acquire a fourth distance from the object to be speed-measured by using the infrared sensor when the second image is captured by the capture module;
the acquiring unit is further configured to acquire a second included angle between a connection between the capturing module and the object to be speed-measured when the capturing module captures the first image and a connection between the capturing module and the object to be speed-measured when the capturing module captures the second image;
the calculating unit is used for calculating the moving distance of the object to be measured in the preset photographing interval according to the third distance, the fourth distance and the second included angle;
the determining module is further configured to determine whether the moving distance is within a preset distance range, and if the moving distance is within the preset distance range, determine the moving speed of the object to be speed-measured according to the moving distance and the preset photographing interval; if the moving distance is not within the preset distance range, adjusting the preset photographing interval, capturing a third image including the object to be measured in speed by using the first camera, capturing a fourth image including the object to be measured in speed by using the second camera when the adjusted preset photographing interval is experienced, acquiring the moving distance of the object to be measured in the adjusted preset photographing interval according to the third image and the fourth image, and determining the moving speed of the object to be measured according to the moving distance of the object to be measured in the adjusted preset photographing interval and the adjusted preset photographing interval.
4. The terminal of claim 3, wherein the obtaining module comprises:
the analysis unit is used for analyzing the first image to obtain a first distance between the first image and the object to be tested when the capture module captures the first image;
the analysis unit is further configured to analyze the second image to obtain a second distance between the capture module and the object to be speed-measured when the capture module captures the second image;
the acquisition unit is used for acquiring a first included angle between a connecting line between the acquisition module and the object to be speed-measured when the acquisition module captures the first image and a connecting line between the acquisition module and the object to be speed-measured when the acquisition module captures the second image;
and the calculating unit is used for calculating the moving distance of the object to be measured in the preset photographing interval according to the first distance, the second distance and the first included angle.
5. A terminal, comprising: treater, first camera and second camera, wherein:
the processor is used for determining a preset photographing interval according to the selected speed measuring scene, and different speed measuring scenes correspond to different preset photographing intervals;
the processor is further configured to capture a first image including an object to be speed-measured by using the first camera, and capture a second image including the object to be speed-measured by using the second camera when a preset photographing interval is experienced;
the processor is further configured to obtain a moving distance of the object to be speed-measured within the preset photographing interval according to the first image and the second image;
the specific way for the processor to obtain the moving distance of the object to be speed-measured in the preset photographing interval according to the first image and the second image is as follows:
acquiring a third distance between the first image and the object to be speed-measured by using an infrared sensor when the first image is captured;
when the second image is captured, acquiring a fourth distance between the second image and the object to be speed-measured by using the infrared sensor;
acquiring a second included angle between a connecting line between the first image and the object to be speed-measured when the first image is captured and a connecting line between the second image and the object to be speed-measured when the second image is captured;
calculating the moving distance of the object to be measured in the preset photographing interval according to the third distance, the fourth distance and the second included angle;
the processor is further configured to determine whether the moving distance is within a preset distance range, and if the moving distance is within the preset distance range, determine a moving speed of the object to be speed-measured according to the moving distance and the preset photographing interval; if the moving distance is not within the preset distance range, adjusting the preset photographing interval, capturing a third image including the object to be measured in speed by using the first camera, capturing a fourth image including the object to be measured in speed by using the second camera when the adjusted preset photographing interval is experienced, acquiring the moving distance of the object to be measured in the adjusted preset photographing interval according to the third image and the fourth image, and determining the moving speed of the object to be measured according to the moving distance of the object to be measured in the adjusted preset photographing interval and the adjusted preset photographing interval.
CN201610796173.8A 2016-08-31 2016-08-31 Speed measurement method and terminal Active CN106370883B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610796173.8A CN106370883B (en) 2016-08-31 2016-08-31 Speed measurement method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610796173.8A CN106370883B (en) 2016-08-31 2016-08-31 Speed measurement method and terminal

Publications (2)

Publication Number Publication Date
CN106370883A CN106370883A (en) 2017-02-01
CN106370883B true CN106370883B (en) 2020-05-19

Family

ID=57899952

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610796173.8A Active CN106370883B (en) 2016-08-31 2016-08-31 Speed measurement method and terminal

Country Status (1)

Country Link
CN (1) CN106370883B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107255812A (en) * 2017-06-30 2017-10-17 努比亚技术有限公司 Speed-measuring method, mobile terminal and storage medium based on 3D technology
CN108398574A (en) * 2018-01-19 2018-08-14 张家港工领信息科技有限公司 A kind of positioning and monitoring method based on infrared ray
CN111307047A (en) * 2020-03-19 2020-06-19 南京信息工程大学 Portable dual-purpose instrument for measuring height and speed and use method thereof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005260885A (en) * 2004-03-15 2005-09-22 Kyocera Mita Corp Communication terminal device
CN102098377A (en) * 2010-12-02 2011-06-15 惠州Tcl移动通信有限公司 Mobile phone and speed measurement method thereof
CN104155470A (en) * 2014-07-15 2014-11-19 华南理工大学 Detecting method and system based on binocular camera for real-time vehicle speed

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005260885A (en) * 2004-03-15 2005-09-22 Kyocera Mita Corp Communication terminal device
CN102098377A (en) * 2010-12-02 2011-06-15 惠州Tcl移动通信有限公司 Mobile phone and speed measurement method thereof
CN104155470A (en) * 2014-07-15 2014-11-19 华南理工大学 Detecting method and system based on binocular camera for real-time vehicle speed

Also Published As

Publication number Publication date
CN106370883A (en) 2017-02-01

Similar Documents

Publication Publication Date Title
EP2927634B1 (en) Single-camera ranging method and system
US9900500B2 (en) Method and apparatus for auto-focusing of an photographing device
CN108600612B (en) Photographing method and mobile terminal
RU2612892C2 (en) Method and device of auto focus
US10277889B2 (en) Method and system for depth estimation based upon object magnification
US20140037135A1 (en) Context-driven adjustment of camera parameters
CN110933303B (en) Photographing method and electronic equipment
CN105915803B (en) Photographing method and system based on sensor
CN106370883B (en) Speed measurement method and terminal
CN112414400B (en) Information processing method and device, electronic equipment and storage medium
CN114267041A (en) Method and device for identifying object in scene
CN108600628B (en) Image capturing method and device, terminal and readable medium
WO2015078189A1 (en) Interface adjustment method and mobile device
CN112291473B (en) Focusing method and device and electronic equipment
CN104063041A (en) Information processing method and electronic equipment
CN107667522B (en) Method and apparatus for forming moving image
JP6483661B2 (en) Imaging control apparatus, imaging control method, and program
US20230048952A1 (en) Image registration method and electronic device
CN103369127A (en) Electronic devices and image capturing methods
CN114040107B (en) Intelligent automobile image shooting system, intelligent automobile image shooting method, intelligent automobile image shooting vehicle and intelligent automobile image shooting medium
KR102350182B1 (en) System for virtual fitting service and method of thereof
CN111212239B (en) Exposure time length adjusting method and device, electronic equipment and storage medium
CN115037869A (en) Automatic focusing method and device, electronic equipment and computer readable storage medium
CN110012208B (en) Photographing focusing method and device, storage medium and electronic equipment
CN111757005A (en) Shooting control method and device, computer readable medium and electronic equipment

Legal Events

Date Code Title Description
C06 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