|
TinyRobotics
|
Simple obstacle detection algorithm for grayscale camera images. More...
#include <CameraObstacleDetector.h>


Classes | |
| struct | Result |
Public Member Functions | |
| CameraObstacleDetector (uint8_t threshold=60, float trigger=0.15f) | |
| Result | process (const uint8_t *image, size_t width, size_t height) |
Public Member Functions inherited from MessageSource | |
| void | subscribe (MessageHandler &handler, MessageOrigin origin=MessageOrigin::Undefined, MessageContent content=MessageContent::Undefined) |
| Subscribe a message handler to this source, with optional filtering. | |
| void | unsubscribeAll () |
| Remove all registered message handlers. | |
| void | sendMessage (Message< float > &msg) |
| Publish a message to all registered handlers. | |
| void | sendMessage (const Message< Coordinate< float > > &msg) |
| Publish a message to all registered handlers. | |
| void | sendMessage (const Message< GPSCoordinate > &msg) |
| Publish a message to all registered handlers. | |
| void | sendMessage (const Message< MotionState3D > &msg) |
| Overload for MotionState3D messages. | |
Protected Attributes | |
| uint8_t | _threshold |
| float | _trigger |
Protected Attributes inherited from MessageSource | |
| std::vector< MessageHandlerEntry > | messageHandlers_ |
Simple obstacle detection algorithm for grayscale camera images.
This class scans a central region of a grayscale image (e.g., from a camera or vision sensor) to detect the presence of dark obstacles based on pixel intensity and density. It is useful for basic obstacle avoidance in robotics.
Features:
Usage Example: