Warning apparatus and warning method
View Patent ↗A warning apparatus includes a processor and a memory. The processor is configured to detect whether there is an object in front of the warning apparatus, calculate, when there is an object detected in front of the warning apparatus, a distance between the object and the warning apparatus, determine whether the calculated distance is less than a safe distance, and control the warning apparatus, when the calculated distance is less than the safe distance, to output a first control signal to control warning equipment to output a first warning.
1. A warning method implemented in a warning apparatus, the method comprising:
detecting, by the warning apparatus, whether there is an object in front of the warning apparatus;
calculating, when there is an object detected in front of the warning apparatus, a distance between the object and the warning apparatus;
determining whether the calculated distance is less than a safe distance;
controlling the warning apparatus, when the calculated distance is less than the safe distance, to output a first control signal to control warning equipment to output a first warning;
detecting whether the warning apparatus has been impacted; and
controlling the warning apparatus, when the warning apparatus has been detected to have been impacted, to output a second control signal to control the warning equipment to output a second warning; wherein:
before detecting whether there is an object in front of the warning apparatus, the warning apparatus is placed at a predetermined distance behind a car.
2. The warning method of claim 1 , wherein after whether there is an object in front of the warning apparatus is detected, further comprising:
obtaining, when an object is detected in front of the warning apparatus, image information of the object;
determining, according to the image information, whether the object is a car, and calculating, when the object is determined to be a car, a distance between the object and the warning apparatus.
3. The warning method of claim 2 , wherein when the object is determined to not be a car, the distance between the object and the warning apparatus is not calculated.
4. A warning apparatus comprising:
a processor;
a memory configured to store a plurality of instructions, which when executed by the processor, cause the processor to:
detect whether there is an object in front of the warning apparatus;
calculate, when there is an object detected in front of the warning apparatus, a distance between the object and the warning apparatus;
determine whether the calculated distance is less than a safe distance;
control the warning apparatus, when the calculated distance is less than the safe distance, to output a first control signal to control warning equipment to output a first warning;
detect whether the warning apparatus has been impacted; and
control the warning apparatus, when the warning apparatus has been detected to have been impacted, to output a second control signal to control the warning equipment to output a second warning; wherein before detecting whether there is an object in front of the warning apparatus, the warning apparatus is placed at a predetermined distance behind a car.
5. The warning apparatus of claim 4 , wherein after whether there is an object in front of the warning apparatus is detected, the processor is further configured to:
obtain, when an object is detected in front of the warning apparatus, image information of the object;
determine, according to the image information, whether the object is a car, and
calculate, when the object is determined to be a car, a distance between the object and the warning apparatus.
6. The warning apparatus of claim 5 , wherein when the object is determined to not be a car, the distance between the object and the warning apparatus is not calculated.