#include <MotionRecognition.h>
Inheritance diagram for MotionRecognition:
Public Member Functions | |
MotionRecognition (const SensorBehaviorControlInterfaces &interfaces) | |
Constructor. | |
Vector2< double > | getAngleYZ (Vector2< int > pCentered) |
transforms pixelcoordinates to grad | |
int | isDiff (Image &image1, Image &image2, Vector2< int > p1, Vector2< int > p2) |
Vector2< int > | getCenteredCoor (Vector2< int > p) |
shifts coordinatesource from top-left to center of image | |
Vector2< double > | getCoorInmm (Vector2< int > p) |
transforms pixelcoordinates to mm | |
Vector2< int > | getCoorInPixel (Vector2< double > p) |
transforms pixelcoordinates to mm | |
Vector2< int > | getPixelFlow (Vector2< double > pCentered, double z, Vector3< double > cameraMovement, Vector3< double > cameraRotation) |
calculates xy-shift of a pixel | |
Vector2< int > | getNewPixelPos (Vector2< int > p, Vector3< double > cameraMovement, Vector3< double > cameraRotation) |
calculates newPixelposition after movement and rotation of the camera | |
double | getCameraZ (Vector2< double > angleYZ) |
calculates distance from camera to object (xy-plain) | |
Vector3< double > | getCameraTranslation (Vector3< double > robotTranslation) |
calculates cameratranslation | |
Vector3< double > | getCameraTranslation (double bounce) |
Vector3< double > | getCameraRotation (double bounce) |
Vector3< double > | getRobotTranslationFromOdometry () |
Vector3< double > | getRobotTranslationFromBounce (double bounce) |
Vector3< double > | getRobotRotationFromOdometry () |
Vector3< double > | getRobotRotationFromBounce (double bounce) |
Vector3< double > | getRobotTranslationForRotation (double robotRotationZ) |
int | pixelInImage (Vector2< int > p) |
double | getPixelDiff (Vector2< int > raster, double bounce, Image &image1, Image &image2, int draw) |
double | getPixelDiff (Vector2< int > raster, double bounce, Image &image1, Image &image2) |
void | drawPixelFlow (Vector3< double > cameraTranslation, Vector3< double > cameraRotation) |
void | drawDynamicDiff (Image &image1, Image &image2, double timeDiff) |
virtual void | execute () |
Executes the module. | |
virtual bool | handleMessage (InMessage &message) |
Called from a MessageQueue to distribute messages. | |
DECLARE_DEBUG_IMAGE (imageMotionRecognition) | |
DECLARE_DEBUG_IMAGE (imageProcessorGradients) | |
Private Attributes | |
OdometryData | previousOdometry |
Vector2< double > | pixelDimensions |
Image | imageBuffer [IMAGEBUFFERSIZE] |
unsigned long | imageTimes [IMAGEBUFFERSIZE] |
int | start |
int | currentImage |
int | imagesLeft |
Image | motionRecognitionImage |
Image | processorGradientsImage |
Definition at line 32 of file MotionRecognition.h.
|
Constructor.
Definition at line 12 of file MotionRecognition.cpp. References BRENNWEITE, Image::cameraInfo, currentImage, IMAGEBUFFERSIZE, imagesLeft, CameraInfo::openingAngleHeight, CameraInfo::openingAngleWidth, pixelDimensions, CameraInfo::resolutionHeight, and CameraInfo::resolutionWidth. |
|
transforms pixelcoordinates to grad
Definition at line 62 of file MotionRecognition.cpp. References Image::cameraInfo, CameraInfo::openingAngleHeight, CameraInfo::openingAngleWidth, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Vector2< V >::x, and Vector2< V >::y. Referenced by getNewPixelPos(). |
|
Definition at line 55 of file MotionRecognition.cpp. References Image::image, Vector2< V >::x, and Vector2< V >::y. Referenced by getPixelDiff(). |
|
shifts coordinatesource from top-left to center of image
Definition at line 47 of file MotionRecognition.cpp. References Image::cameraInfo, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Vector2< V >::x, and Vector2< V >::y. Referenced by getNewPixelPos(). |
|
transforms pixelcoordinates to mm
Definition at line 38 of file MotionRecognition.cpp. References pixelDimensions, Vector2< double >::x, Vector2< V >::x, Vector2< double >::y, and Vector2< V >::y. Referenced by getNewPixelPos(). |
|
transforms pixelcoordinates to mm
Definition at line 42 of file MotionRecognition.cpp. References pixelDimensions, Vector2< double >::x, Vector2< V >::x, Vector2< double >::y, and Vector2< V >::y. Referenced by getPixelFlow(). |
|
calculates xy-shift of a pixel
translationskoeffizienten Brennweite der Kamera rotationskoeffizenten Definition at line 69 of file MotionRecognition.cpp. References getCoorInPixel(), Vector2< V >::x, Vector3< V >::x, Vector2< V >::y, Vector3< V >::y, and Vector3< V >::z. Referenced by getNewPixelPos(). |
Here is the call graph for this function:
|
calculates newPixelposition after movement and rotation of the camera
transformiere p in Kamerazentrierte transformiere in Grad berechne z Koordinate der xy-Ebene berechne Fluss in Pixeln Definition at line 89 of file MotionRecognition.cpp. References getAngleYZ(), getCameraZ(), getCenteredCoor(), getCoorInmm(), and getPixelFlow(). Referenced by drawPixelFlow(), and getPixelDiff(). |
Here is the call graph for this function:
|
calculates distance from camera to object (xy-plain)
Definition at line 28 of file MotionRecognition.cpp. References Matrix3x3< double >::c, DISTANCE_INFINITY, Pose3D::rotation, Pose3D::translation, and Vector3< double >::z. Referenced by getNewPixelPos(). |
|
calculates cameratranslation
Definition at line 104 of file MotionRecognition.cpp. References RotationMatrix::invert(), and Pose3D::rotation. Referenced by drawDynamicDiff(), getCameraRotation(), getCameraTranslation(), and getPixelDiff(). |
Here is the call graph for this function:
|
Definition at line 152 of file MotionRecognition.cpp. References getCameraTranslation(), getRobotTranslationFromBounce(), and getRobotTranslationFromOdometry(). |
Here is the call graph for this function:
|
Definition at line 158 of file MotionRecognition.cpp. References getCameraTranslation(), getRobotRotationFromBounce(), and getRobotRotationFromOdometry(). Referenced by drawDynamicDiff(), and getPixelDiff(). |
Here is the call graph for this function:
|
Definition at line 131 of file MotionRecognition.cpp. References getRobotTranslationForRotation(), previousOdometry, Pose2D::rotation, Pose2D::translation, Vector2< V >::x, and Vector2< V >::y. Referenced by getCameraTranslation(). |
Here is the call graph for this function:
|
Definition at line 140 of file MotionRecognition.cpp. Referenced by getCameraTranslation(). |
|
Definition at line 144 of file MotionRecognition.cpp. References previousOdometry, and Pose2D::rotation. Referenced by getCameraRotation(). |
|
Definition at line 148 of file MotionRecognition.cpp. References fromDegrees(). Referenced by getCameraRotation(). |
Here is the call graph for this function:
|
Definition at line 109 of file MotionRecognition.cpp. References Pose3D::translation, and Vector3< double >::x. Referenced by getRobotTranslationFromOdometry(). |
|
Definition at line 125 of file MotionRecognition.cpp. References Image::cameraInfo, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Vector2< V >::x, and Vector2< V >::y. Referenced by getPixelDiff(). |
|
Definition at line 164 of file MotionRecognition.cpp. References Image::cameraInfo, getCameraRotation(), getCameraTranslation(), getNewPixelPos(), Image::image, isDiff(), motionRecognitionImage, pixelInImage(), processorGradientsImage, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Vector2< V >::x, and Vector2< V >::y. Referenced by drawDynamicDiff(), and getPixelDiff(). |
Here is the call graph for this function:
|
Definition at line 191 of file MotionRecognition.cpp. References getPixelDiff(). |
Here is the call graph for this function:
|
Definition at line 114 of file MotionRecognition.cpp. References Image::cameraInfo, DOT, getNewPixelPos(), LINE, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Vector2< V >::x, and Vector2< V >::y. Referenced by drawDynamicDiff(). |
Here is the call graph for this function:
|
Definition at line 195 of file MotionRecognition.cpp. References Image::cameraInfo, drawPixelFlow(), getCameraRotation(), getCameraTranslation(), getPixelDiff(), Image::image, INIT_DEBUG_IMAGE, motionRecognitionImage, processorGradientsImage, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, and SEND_DEBUG_IMAGE. Referenced by execute(). |
Here is the call graph for this function:
|
Executes the module.
Implements Module. Definition at line 238 of file MotionRecognition.cpp. References currentImage, DEBUG_DRAWING_FINISHED, drawDynamicDiff(), SystemCall::getCurrentSystemTime(), HeadControlMode::headControlMode, IMAGEBUFFERSIZE, imagesLeft, imageTimes, MotionRequest::motionType, and previousOdometry. |
Here is the call graph for this function:
|
Called from a MessageQueue to distribute messages. Use message.getMessageID to decide if the message is relavant for the MesssageHandler derivate. Use message.bin, message.text or message.config as In streams to get the data from.
Reimplemented from Module. Definition at line 262 of file MotionRecognition.cpp. |
|
|
|
|
|
Definition at line 134 of file MotionRecognition.h. Referenced by execute(), getRobotRotationFromOdometry(), and getRobotTranslationFromOdometry(). |
|
Definition at line 135 of file MotionRecognition.h. Referenced by getCoorInmm(), getCoorInPixel(), and MotionRecognition(). |
|
Definition at line 136 of file MotionRecognition.h. |
|
Definition at line 137 of file MotionRecognition.h. Referenced by execute(). |
|
Definition at line 138 of file MotionRecognition.h. |
|
Definition at line 138 of file MotionRecognition.h. Referenced by execute(), and MotionRecognition(). |
|
Definition at line 138 of file MotionRecognition.h. Referenced by execute(), and MotionRecognition(). |
|
Definition at line 141 of file MotionRecognition.h. Referenced by drawDynamicDiff(), and getPixelDiff(). |
|
Definition at line 141 of file MotionRecognition.h. Referenced by drawDynamicDiff(), and getPixelDiff(). |