METHOD AND APPARATUS FOR TERMINAL TO DETERMINE APPROACH OF OBJECT
First Claim
1. A method, executed by a terminal, for determining whether an object is approaching, comprising:
- reading, by an infrared receiver, a first infrared intensity value when an infrared emitting diode does not work;
reading, by the infrared receiver, a second infrared intensity value when the infrared emitting diode works;
obtaining, for an intensity value of a reflected infrared ray, a first difference value between the second infrared intensity value and the first infrared intensity value;
determining whether a second difference value between the intensity value of the reflected infrared ray and an infrared intensity threshold that is stored by the terminal itself is greater than a preset second threshold; and
when the second difference value is greater than the preset second threshold, determining that an object is approaching the terminal.
4 Assignments
0 Petitions
Accused Products
Abstract
Embodiments of the present invention provide a method and an apparatus for a terminal to determine whether an object is approaching, wherein the method includes: reading, by an infrared receiver, a first infrared intensity value when an infrared emitting diode does not work, and reading, by the infrared receiver, a second infrared intensity value when the infrared emitting diode works; obtaining a first difference value between the second infrared intensity value and the first infrared intensity value as an intensity value of a reflected infrared ray; determining whether a second difference value between the intensity value of the reflected infrared ray and an infrared intensity threshold is greater than a preset second threshold; and determining that an object is approaching the terminal when the second difference value is greater than the preset second threshold value. The present invention enables each terminal to accurately determine whether there is an object approaching.
7 Citations
9 Claims
-
1. A method, executed by a terminal, for determining whether an object is approaching, comprising:
-
reading, by an infrared receiver, a first infrared intensity value when an infrared emitting diode does not work; reading, by the infrared receiver, a second infrared intensity value when the infrared emitting diode works; obtaining, for an intensity value of a reflected infrared ray, a first difference value between the second infrared intensity value and the first infrared intensity value; determining whether a second difference value between the intensity value of the reflected infrared ray and an infrared intensity threshold that is stored by the terminal itself is greater than a preset second threshold; and when the second difference value is greater than the preset second threshold, determining that an object is approaching the terminal. - View Dependent Claims (2, 3)
-
-
4. An apparatus for a terminal to determine whether an object is approaching, comprising:
-
an infrared receiver, configured to read a first infrared intensity value when an infrared emitting diode does not work and to read a second infrared intensity value when the infrared emitting diode works; an obtaining module, configured to obtain a first difference value between the second infrared intensity value and the first infrared intensity value as an intensity value of a reflected infrared ray; a judging module, configured to determine whether a second difference value between the intensity value of a reflected infrared ray and an infrared intensity threshold that is stored by the terminal itself is greater than a preset second threshold; and a first determining module, configured to, when the second difference value is greater than the preset second threshold, determine that there is an object approaching the terminal. - View Dependent Claims (5, 6, 7)
-
-
8. An apparatus for a terminal to determine whether an object is approaching, comprising:
-
a reading module, configured to, when an infrared emitting diode of the terminal is activated, receive an infrared ray from outside, to read an intensity value of the received infrared ray, and to cache the intensity value of the received infrared ray; a calculating module, configured to, when an additional infrared ray is received from the outside, read an intensity value of the additional infrared ray, and calculate a difference between the intensity value of the additional infrared ray and the cached intensity value; and a second determining module, configured to, when the calculated difference value is greater than a preset second threshold, determine that an object is approaching the terminal. - View Dependent Claims (9)
-
Specification