#include <ImageProcessing.hpp>
Public Member Functions | |
BVImageProcessor () | |
TrackedFeature | getTracklet () |
bool | isTracking () |
bool | processROI (TrackerROI &roi) |
void | setPosition (const SonarHead &cnt) |
void | setTarget (const SonarHead &cnt) |
~BVImageProcessor () | |
Private Member Functions | |
void | _update (const SonarHead &head) |
cv::Mat | adjust (cv::Mat &original) |
bool | associate (boost::shared_ptr< std::vector< TrackedFeature > > features) |
std::pair< double, double > | deg2meter (double difflat, double difflon, double lat) |
cv::Mat | histthresh (const cv::Mat &img, float min, float max, uchar max_val) |
boost::shared_ptr< std::vector < TrackedFeature > > | label (cv::Mat &binary) |
void | llz2xy (const SonarHead &head, TrackedFeature &tracklet) |
std::pair< double, double > | meter2deg (double x, double y, double lat) |
void | meter2pixel (TrackerROI &roi, TrackedFeature &tracklet) |
void | pixel2meter (TrackerROI &roi, TrackedFeature &tracklet) |
cv::Mat | threshold (cv::Mat &adjusted) |
void | xy2llz (const SonarHead &head, TrackedFeature &tracklet) |
Private Attributes | |
bool | foundVehicle |
bool | hasTarget |
bool | hasVehicle |
cv::Mat | R |
double | resolution |
double | roi_len |
cv::Mat | roiImg |
cv::Point | roiOffset |
TrackedFeature | target |
TrackedFeature | tracklet |
The class incorporates the image processing for the NURC BlueView tracking system.
Definition at line 46 of file ImageProcessing.hpp.
Generic constructor.
Definition at line 46 of file ImageProcessing.cpp.
Generic destructor.
Definition at line 53 of file ImageProcessing.cpp.
void BVImageProcessor::_update | ( | const SonarHead & | head | ) | [private] |
This method updates the rotation matrix NED->XYZ conversion
Definition at line 443 of file ImageProcessing.cpp.
cv::Mat BVImageProcessor::adjust | ( | cv::Mat & | original | ) | [private] |
This method does the prefiltering
Definition at line 146 of file ImageProcessing.cpp.
bool BVImageProcessor::associate | ( | boost::shared_ptr< std::vector< TrackedFeature > > | features | ) | [private] |
Associate detections with one or more targets
features | Features found in the image |
Definition at line 246 of file ImageProcessing.cpp.
std::pair< double, double > BVImageProcessor::deg2meter | ( | double | difflat, |
double | difflon, | ||
double | lat | ||
) | [private] |
Degree to meter conversion.
difflat | North distance in degree |
difflon | East distance in degree |
lat | Latitude position in decimal degrees |
These conversion where taken of Wikipedia :) http://en.wikipedia.org/wiki/Geographic_coordinate_system#Cartesian_coordinates
Definition at line 497 of file ImageProcessing.cpp.
Return the info about the tracked feature
Definition at line 87 of file ImageProcessing.hpp.
cv::Mat BVImageProcessor::histthresh | ( | const cv::Mat & | img, |
float | min, | ||
float | max, | ||
uchar | max_val | ||
) | [private] |
Hysteresis threshold
img | Image to be processed |
min | Minimum threshold |
max | Maximum threshold |
max_val | Value to assign |
Definition at line 166 of file ImageProcessing.cpp.
bool labust::blueview::BVImageProcessor::isTracking | ( | ) | [inline] |
Checks if the tracker has found the vehicle
Definition at line 82 of file ImageProcessing.hpp.
boost::shared_ptr< std::vector< TrackedFeature > > BVImageProcessor::label | ( | cv::Mat & | binary | ) | [private] |
This method does the analysis
Definition at line 215 of file ImageProcessing.cpp.
void BVImageProcessor::llz2xy | ( | const SonarHead & | head, |
TrackedFeature & | tracklet | ||
) | [private] |
This method converts the estimated world lat-lon-z feature coordinates to the in x-y coordianates in the sonar head.
head | The sonar head information |
tracklet | The tracked feature information |
Definition at line 335 of file ImageProcessing.cpp.
std::pair< double, double > BVImageProcessor::meter2deg | ( | double | x, |
double | y, | ||
double | lat | ||
) | [private] |
Meters to degree conversion.
x | North distance in meters |
y | East distance in meters |
lat | Latitude position in decimal degrees |
These conversion where taken of Wikipedia :) http://en.wikipedia.org/wiki/Geographic_coordinate_system#Cartesian_coordinates
Definition at line 483 of file ImageProcessing.cpp.
void BVImageProcessor::meter2pixel | ( | TrackerROI & | roi, |
TrackedFeature & | tracklet | ||
) | [inline, private] |
Caluclate the pixel position based on ROI information and sonar head X-Y position
Definition at line 415 of file ImageProcessing.cpp.
void BVImageProcessor::pixel2meter | ( | TrackerROI & | roi, |
TrackedFeature & | tracklet | ||
) | [inline, private] |
Caluclate the pixel position back to sonar head X-Y position
Definition at line 430 of file ImageProcessing.cpp.
bool BVImageProcessor::processROI | ( | TrackerROI & | roi | ) |
Main method for processing an ROI. Currently no automatic detection is supported. You need to set the initial vehicle position.
roi | The ROI object. |
Definition at line 56 of file ImageProcessing.cpp.
void BVImageProcessor::setPosition | ( | const SonarHead & | cnt | ) |
Set manually the inital vehicle contact.
cnt | Conntact information in the SonarHead structure |
Definition at line 297 of file ImageProcessing.cpp.
void BVImageProcessor::setTarget | ( | const SonarHead & | cnt | ) |
Set manually the inital vehicle contact.
cnt | Conntact information in the SonarHead structure |
Definition at line 316 of file ImageProcessing.cpp.
cv::Mat BVImageProcessor::threshold | ( | cv::Mat & | adjusted | ) | [private] |
This method does the thresholding
Definition at line 156 of file ImageProcessing.cpp.
void BVImageProcessor::xy2llz | ( | const SonarHead & | head, |
TrackedFeature & | tracklet | ||
) | [private] |
This method converts the features x-y coordinates in the sonar head to the world lat-lon-z.
head | The sonar head information |
tracklet | The tracked feature information |
Definition at line 389 of file ImageProcessing.cpp.
bool labust::blueview::BVImageProcessor::foundVehicle [private] |
Flag to indicate processing found the vehicle
Definition at line 202 of file ImageProcessing.hpp.
bool labust::blueview::BVImageProcessor::hasTarget [private] |
Target found indicator.
Definition at line 206 of file ImageProcessing.hpp.
bool labust::blueview::BVImageProcessor::hasVehicle [private] |
Flag to indicate vehicle set point
Definition at line 198 of file ImageProcessing.hpp.
cv::Mat labust::blueview::BVImageProcessor::R [private] |
Rotation matrix NED->XYZ
Definition at line 194 of file ImageProcessing.hpp.
double labust::blueview::BVImageProcessor::resolution [private] |
Meter resolution
Definition at line 190 of file ImageProcessing.hpp.
double labust::blueview::BVImageProcessor::roi_len [private] |
Size of the region of interest
Definition at line 186 of file ImageProcessing.hpp.
cv::Mat labust::blueview::BVImageProcessor::roiImg [private] |
Internal roi
Definition at line 178 of file ImageProcessing.hpp.
Internal roi offset
Definition at line 182 of file ImageProcessing.hpp.
Target feature information
Definition at line 174 of file ImageProcessing.hpp.
Tracked feature information
Definition at line 170 of file ImageProcessing.hpp.