Electronic device and method for measuring distance using image thereof
First Claim
1. An electronic device, comprising:
- an inertial-measurement unit, configured to detect a pitch angle of the electronic device;
a camera device, configured to focus on a target object to capture an object image, wherein the camera device has a focusing-distance range, the focusing-distance range comprising an upper focusing distance and a lower focusing distance;
a storage device, configured to store an operating system and an image-distance-measuring program; and
a processor, configured to perform the image-distance-measuring program to perform the steps of;
obtaining a lens-focal-length parameter corresponding to the object image from the operating system performed by the processor;
calculating a plurality of terminal parameters corresponding to the pitch angle according to the lens-focal-length parameter and the pitch angle of the electronic device;
converting the terminal parameters corresponding to the pitch angle to a plurality of linear parameters corresponding to the pitch angle; and
calculating an object distance between the target object and the camera device according to a linear equation of the linear parameters, the upper focusing distance, and the lower focusing distance.
1 Assignment
0 Petitions
Accused Products
Abstract
An electronic device is provided. The electronic device includes: an inertial measurement unit, a camera device, and a processor. The inertial-measurement unit is configured to detect a pitch angle of the electronic device. The camera device is configured to focus on a target object to capture an object image. The processor is configured to execute an image-distance-measuring program to perform the following steps: obtaining a lens-focal-length parameter corresponding to the object image from an operating system performed by the electronic device; calculating a plurality of terminal parameters corresponding to the pitch angle according to the lens-focal-length parameter and the pitch angle; converting the terminal parameters to a plurality of linear parameters; and calculating an object distance between the target object and the camera device according to a linear equation of the linear parameters, and the upper focusing distance, and the lower focusing distance.
-
Citations
12 Claims
-
1. An electronic device, comprising:
-
an inertial-measurement unit, configured to detect a pitch angle of the electronic device; a camera device, configured to focus on a target object to capture an object image, wherein the camera device has a focusing-distance range, the focusing-distance range comprising an upper focusing distance and a lower focusing distance; a storage device, configured to store an operating system and an image-distance-measuring program; and a processor, configured to perform the image-distance-measuring program to perform the steps of; obtaining a lens-focal-length parameter corresponding to the object image from the operating system performed by the processor; calculating a plurality of terminal parameters corresponding to the pitch angle according to the lens-focal-length parameter and the pitch angle of the electronic device; converting the terminal parameters corresponding to the pitch angle to a plurality of linear parameters corresponding to the pitch angle; and calculating an object distance between the target object and the camera device according to a linear equation of the linear parameters, the upper focusing distance, and the lower focusing distance. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method for measuring a distance using an image, for use in an electronic device, wherein the electronic device comprises an inertial-measurement unit and a camera device, the method comprising:
-
utilizing the inertial-measurement unit to detect a pitch angle of the electronic device; utilizing the camera device to focus on a target object to shoot an object image, wherein the camera device has a focusing-distance range which comprises an upper focusing distance and a lower focusing distance; obtaining a lens-focal-length parameter corresponding to the object image from an operating system performed by the electronic device; calculating a plurality of terminal parameters corresponding to the pitch angle according to the lens-focal-length parameter and the pitch angle of the electronic device; converting the terminal parameters corresponding to the pitch angle to a plurality of linear parameters corresponding to the pitch angle; and calculating an object distance between the target object and the camera device according to a linear equation of the linear parameters, the upper focusing distance, and the lower focusing distance. - View Dependent Claims (8, 9, 10, 11, 12)
-
Specification