icub-client
|
Bridge module between the interactive object learning and recognition system (iol) and yarp database of object properties Version:1.0 More...
Namespaces | |
Bridge | |
Classes | |
class | IOLObject |
class | IOL2OPCBridge |
Bridge module between the interactive object learning and recognition system (iol) and yarp database of object properties Version:1.0
This module provides wrappers of procedures to acquire perceived information from iol and store them in opc database.
class IOLObject |
Public Member Functions | |
IOLObject (const int filter_order=1, const double presenceTmo_=0.0, const string &trackerType_="BOOSTING", const double trackerTmo_=0.0) | |
void | heartBeat () |
heartBeat current time value More... | |
bool | isDead () |
isDead duration comparison procedure with presenceTmo More... | |
void | filt (const Vector &x, Vector &xFilt, const Vector &d, Vector &dFilt) |
filt apply the median filter More... | |
void | prepare () |
prepare initialize the tracker More... | |
void | latchBBox (const CvRect &bbox) |
latchBBox assign tracker with bounding box value More... | |
void | track (const Image &img) |
track procdure to start tracking an image More... | |
bool | is_tracking (CvRect &bbox) const |
is_tracking procedure to check the tracking state More... | |
Protected Types | |
enum | { idle, init, no_need, tracking } |
Protected Attributes | |
MedianFilter | filterPos |
median filter for position of object More... | |
MedianFilter | filterDim |
median filter for object dimension More... | |
bool | init_filters |
double | presenceTmo |
current set timeout More... | |
double | presenceTimer |
current timer More... | |
string | trackerType |
int | trackerState |
tracker state: idle, init, no_need or tracking More... | |
double | trackerTmo |
set value of tracker timout More... | |
double | trackerTimer |
current value of tracker timer More... | |
cv::Rect2d | trackerResult |
cv::Ptr< cv::Tracker > | tracker |
|
protected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
class IOL2OPCBridge |
Public Member Functions | |
bool | train_object (const string &name) |
Add a new object to the object-recognition database based on the selected blob. More... | |
bool | remove_object (const string &name) |
Remove object with a given name from the object-recognition database. More... | |
bool | remove_all () |
Remove all objects from the object-recognition database. More... | |
bool | change_name (const string &old_name, const string &new_name) |
Change the name of an object. More... | |
bool | set_object_persistence (const string &sw) |
Enable/disable object persistence. More... | |
string | get_object_persistence () |
Return current status of object persistence. More... | |
void | pause () |
Pause module. More... | |
void | resume () |
Resume module. More... | |
Public Member Functions inherited from iol2opc_IDL | |
iol2opc_IDL () | |
virtual bool | read (yarp::os::ConnectionReader &connection) override |
virtual std::vector< std::string > | help (const std::string &functionName="--all") |
Protected Member Functions | |
void | yInfoGated (const char *msg,...) const |
string | findName (const Bottle &scores, const string &tag) |
findName Find name of a blob or set it OBJECT_UNKNOWN More... | |
Bottle | skimBlobs (const Bottle &blobs) |
skimBlobs Remove blobs which are too far away in the Cartesian space wrt Root frame More... | |
bool | thresBBox (CvRect &bbox, const Image &img) |
thresBBox Constrain a bounding box with respect to an image size More... | |
Bottle | getBlobs () |
getBlobs Wrapper to get blobs information from the blobExtractor port More... | |
CvPoint | getBlobCOG (const Bottle &blobs, const unsigned int i) |
getBlobCOG Get the blob center of the object defined by i More... | |
bool | getBlobPoints (const CvPoint &cog, deque< CvPoint > &blobPoints) |
getBlobPoints Obtain CvPoints belonging to a blob defined by cog, from lbpExtract More... | |
bool | getSuperQuadric (const CvPoint &point, Vector &pos, Vector &dim) |
getSuperQuadric Obtain superquadric-model of an object, defined by point More... | |
bool | get3DPosition (const CvPoint &point, Vector &x) |
get3DPosition Get the 3D point coordinate in Root frame through SFM More... | |
bool | get3DPositionAndDimensions (const CvRect &bbox, Vector &x, Vector &dim) |
get3DPositionAndDimensions Get the 3D point coordinate and dimension in Root frame through SFM More... | |
Vector | calibPosition (const Vector &x) |
bool | getClickPosition (CvPoint &pos) |
getClickPosition Get the position on image that user clicks on More... | |
void | acquireImage () |
acquireImage Get calibrated image from the left camera of iCub More... | |
void | drawBlobs (const Bottle &blobs, const unsigned int i, const Bottle &scores) |
drawBlobs Add bounding box and name of object in output image shown through port imgRtLocOut More... | |
void | rotate (cv::Mat &src, const double angle, cv::Mat &dst) |
rotate Create new OpenCV matrix by rotating an original one an angle in 2D, a wrapper of cv::warpAffine More... | |
void | drawScoresHistogram (const Bottle &blobs, const Bottle &scores, const int i) |
drawScoresHistogram Draw histogram of objects' scores More... | |
int | findClosestBlob (const Bottle &blobs, const CvPoint &loc) |
findClosestBlob Find the closest blob to location More... | |
int | findClosestBlob (const Bottle &blobs, const Vector &loc) |
findClosestBlob Find the closest blob to location More... | |
Bottle | classify (const Bottle &blobs) |
classify Classify an object using himrepClassifier More... | |
void | train (const string &object, const Bottle &blobs, const int i) |
train Training himrepClassifier by sending an object by name and its bounding box More... | |
void | doLocalization () |
doLocalization The whole procedure to classify objects, from getting image to draw bounding boxes arround objects More... | |
void | updateOPC () |
updateOPC The whole procedure to update OPC, including naming known and unknown objects, drawing bounding boxes around objects More... | |
ObjectArea | getReachableArea (const yarp::sig::VectorOf< double > &objpos) |
getReachableArea Analyse if an object is inside which region: Human, Shared, Robot or Not-Reachable More... | |
bool | configure (ResourceFinder &rf) |
void | setBounds (ResourceFinder &rf, Vector &bounds, string configName, double std_lower, double std_upper) |
setBounds Set min & max for a vector More... | |
bool | interruptModule () |
bool | close () |
bool | attach (RpcServer &source) |
double | getPeriod () |
bool | updateModule () |
Protected Attributes | |
RpcServer | rpcPort |
rpc server to receive user request More... | |
RpcClient | rpcClassifier |
rpc client port to send requests to himrepClassifier More... | |
RpcClient | rpcGet3D |
rpc client port to send requests to SFM More... | |
OPCClient * | opc |
OPC client object. More... | |
RpcClient | rpcGetSPQ |
rpc client port to send requests to superquadric-model and receive superquadric parameters More... | |
RpcClient | rpcGetBlobPoints |
rpc client port to send requests to lbpExtract and receive all points of a blob More... | |
BufferedPort< Bottle > | blobExtractor |
buffered port of input of received blobs from lbpExtract More... | |
BufferedPort< Bottle > | histObjLocPort |
buffered port of input of localized objects from iol localizer More... | |
BufferedPort< Bottle > | getClickPort |
buffered port of input of clicked position More... | |
BufferedPort< Bottle > | objLocOut |
buffered port of output of localized objects More... | |
BufferedPort< ImageOf< PixelBgr > > | imgIn |
buffered port of input calibrated image from left camera of iCub More... | |
BufferedPort< ImageOf< PixelBgr > > | imgRtLocOut |
buffered port of output image for real-time objects localization More... | |
BufferedPort< ImageOf< PixelBgr > > | imgTrackOut |
buffered port of output image of tracked object More... | |
BufferedPort< ImageOf< PixelBgr > > | imgSelBlobOut |
buffered port of output image inside the selected blob (by clicking on) More... | |
BufferedPort< ImageOf< PixelBgr > > | imgHistogram |
buffered port of output image of histogram of classification scores. More... | |
Port | imgClassifier |
port of output image to himrefClassifier More... | |
RtLocalization | rtLocalization |
OpcUpdater | opcUpdater |
int | opcMedianFilterOrder |
ClassifierReporter | classifierReporter |
ImageOf< PixelBgr > | imgRtLoc |
Image for real-time objects localization. More... | |
Mutex | mutexResources |
Mutex | mutexResourcesOpc |
Mutex | mutexResourcesSFM |
Mutex | mutexResourcesSPQ |
double | period |
bool | verbose |
bool | empty |
bool | object_persistence |
bool | useSPQ |
boolean flag to enable/disable using Superquadric-model for object pose and size estimation More... | |
bool | connectedSPQ |
boolean flag to check internal connection to Superquadric-model More... | |
double | presence_timeout |
string | tracker_type |
double | tracker_timeout |
VectorOf< int > | tracker_min_blob_size |
minimum size of tracker blob More... | |
map< string, IOLObject > | db |
Bridge::State | state |
IOLObject | onlyKnownObjects |
map< string, Filter * > | histFiltersPool |
int | histFilterLength |
deque< CvScalar > | histColorsCode |
double | blobs_detection_timeout |
double | lastBlobsArrivalTime |
time stamp of last received blob More... | |
Bottle | lastBlobs |
Bottle contains last blob information. More... | |
Bottle | opcBlobs |
Bottle contains received blobs of objects from OPC. More... | |
Bottle | opcScores |
Bottle contains received (class) score of objects from OPC. More... | |
Vector | skim_blobs_x_bounds |
Yarp Vector of min, max bounding in x-axis to reduce the blob detection. More... | |
Vector | skim_blobs_y_bounds |
Yarp Vector of min, max bounding in y-axis to reduce the blob detection. More... | |
Vector | histObjLocation |
Vector | human_area_x_bounds |
Yarp Vector of min, max bounding of human region in x-axis. More... | |
Vector | human_area_y_bounds |
Yarp Vector of min, max bounding of human region in y-axis. More... | |
Vector | robot_area_x_bounds |
Yarp Vector of min, max bounding of robot region in x-axis. More... | |
Vector | robot_area_y_bounds |
Yarp Vector of min, max bounding of robot region in y-axis. More... | |
Vector | shared_area_x_bounds |
Yarp Vector of min, max bounding of shared region in x-axis. More... | |
Vector | shared_area_y_bounds |
Yarp Vector of min, max bounding of shared region in y-axis. More... | |
CvPoint | clickLocation |
Friends | |
class | RtLocalization |
class | OpcUpdater |
class | ClassifierReporter |
|
protected |
acquireImage Get calibrated image from the left camera of iCub
Definition at line 438 of file module.cpp.
|
protected |
Definition at line 1334 of file module.cpp.
|
protected |
|
virtual |
Change the name of an object.
old_name | is the object which name is to be changed |
new_name | is the new object name |
Reimplemented from iol2opc_IDL.
Definition at line 1444 of file module.cpp.
|
protected |
classify Classify an object using himrepClassifier
blobs | Yarp Bottle contains information of the estimated object bounding boxes: top left x, y, bottom right x, y. This will be sent to himrepClassifier for object detection |
Definition at line 693 of file module.cpp.
|
protected |
Definition at line 1176 of file module.cpp.
|
protected |
Definition at line 1016 of file module.cpp.
|
protected |
doLocalization The whole procedure to classify objects, from getting image to draw bounding boxes arround objects
Definition at line 757 of file module.cpp.
|
protected |
drawBlobs Add bounding box and name of object in output image shown through port imgRtLocOut
blobs | Yarp Bottle contains information of the estimated object bounding boxes: top left x, y, bottom right x, y |
i | integer value as index of the blob to draw the bounding box |
scores | Bottle contains classified results from himrepClassifier, |
Definition at line 453 of file module.cpp.
|
protected |
drawScoresHistogram Draw histogram of objects' scores
blobs | Yarp Bottle contains information of the estimated object bounding boxes: top left x, y, bottom right x, y |
i | integer value as index of the blob to draw the bounding box |
scores | Bottle contains classified results from himrepClassifier, |
Definition at line 513 of file module.cpp.
|
protected |
findClosestBlob Find the closest blob to location
blobs | Yarp Bottle contains information of the estimated object bounding box: top left x, y, bottom right x, y |
loc | A CvPoint contains 2D coordinate of pixel expressed the location |
Definition at line 636 of file module.cpp.
|
protected |
findClosestBlob Find the closest blob to location
blobs | Yarp Bottle contains information of the estimated object bounding boxes: top left x, y, bottom right x, y |
loc | A Vector contains 3D coordinate of the location in the Root frame |
Definition at line 664 of file module.cpp.
|
protected |
findName Find name of a blob or set it OBJECT_UNKNOWN
scores | Bottle contains classified results from himrepClassifier, |
tag | input string contains blob name, i.e. "blob_<i>" with i as index of a blob in set of results from getBlobs() |
Definition at line 46 of file module.cpp.
|
protected |
get3DPosition Get the 3D point coordinate in Root frame through SFM
point | A CvPoint for the estimated coordinate of an image pixel. |
x | Vector for 3D point coordinate. If SFM return more than one 3D point as result, the coordinate is average of all result |
Definition at line 339 of file module.cpp.
|
protected |
get3DPositionAndDimensions Get the 3D point coordinate and dimension in Root frame through SFM
bbox | A CvRect for bounding box of object |
x | Vector for 3D point coordinate. If SFM return more than one 3D point as result, the coordinate is average of all result |
dim | Vector for 3D dimensions of object, calculated using coordinates of points from SFM |
Definition at line 392 of file module.cpp.
|
virtual |
Return current status of object persistence.
Reimplemented from iol2opc_IDL.
Definition at line 1520 of file module.cpp.
|
protected |
getBlobCOG Get the blob center of the object defined by i
blobs | Yarp Bottle contains information of the estimated object bounding boxes: top left x, y, bottom right x, y |
i | integer value to define object |
Definition at line 169 of file module.cpp.
|
protected |
getBlobPoints Obtain CvPoints belonging to a blob defined by cog, from lbpExtract
cog | CvPoint of center of mass of the blob |
blobPoints | A set of CvPoints of the blob |
Definition at line 214 of file module.cpp.
|
protected |
getBlobs Wrapper to get blobs information from the blobExtractor port
Definition at line 141 of file module.cpp.
|
protected |
getClickPosition Get the position on image that user clicks on
pos | A CvPoint contains 2D coordinate of the estimated pixel that user clicks on |
Definition at line 193 of file module.cpp.
|
protected |
Definition at line 1228 of file module.cpp.
|
protected |
getReachableArea Analyse if an object is inside which region: Human, Shared, Robot or Not-Reachable
objpos | Vector of object position |
Definition at line 792 of file module.cpp.
|
protected |
getSuperQuadric Obtain superquadric-model of an object, defined by point
point | CvPoint of center of mass of the blob |
pos | A Yarp Vector of the object pose estimation, calculated by the superquadric-model |
dim | A Yarp Vector of the object dimension estimation, calculated by the superquadric-model |
Definition at line 255 of file module.cpp.
|
protected |
Definition at line 1143 of file module.cpp.
|
virtual |
|
virtual |
Remove all objects from the object-recognition database.
Reimplemented from iol2opc_IDL.
Definition at line 1414 of file module.cpp.
|
virtual |
Remove object with a given name from the object-recognition database.
name | is the object name |
Reimplemented from iol2opc_IDL.
Definition at line 1382 of file module.cpp.
|
virtual |
|
protected |
rotate Create new OpenCV matrix by rotating an original one an angle in 2D, a wrapper of cv::warpAffine
src | Original OpenCV matrix |
angle | Double value for rotated angle |
dst | New rotated OpenCV matrix |
Definition at line 502 of file module.cpp.
|
virtual |
Enable/disable object persistence.
sw | can be "on"|"off". |
Reimplemented from iol2opc_IDL.
Definition at line 1506 of file module.cpp.
|
protected |
setBounds Set min & max for a vector
rf | ResourceFinder object |
bounds | Vector to set bounds to |
configName | string value for name of the parameter in config file |
std_lower | double value for min bound |
std_upper | double value for max bound |
Definition at line 985 of file module.cpp.
|
protected |
skimBlobs Remove blobs which are too far away in the Cartesian space wrt Root frame
blobs | Original Yarp Bottle contains all blobs |
Definition at line 97 of file module.cpp.
|
protected |
thresBBox Constrain a bounding box with respect to an image size
bbox | CvRect define the bounding box |
img | Image with information used to constrain the bounding box |
Definition at line 121 of file module.cpp.
|
protected |
train Training himrepClassifier by sending an object by name and its bounding box
object | string value contains name of object to train |
blobs | Yarp Bottle contains information of the estimated object bounding boxes: top left x, y, bottom right x, y |
i | integer value for the corresponding blob of the object needed to train |
Definition at line 723 of file module.cpp.
|
virtual |
Add a new object to the object-recognition database based on the selected blob.
If the object is already existing, its recognition is improved.
name | is the object name |
Reimplemented from iol2opc_IDL.
Definition at line 1341 of file module.cpp.
|
protected |
Definition at line 1235 of file module.cpp.
|
protected |
updateOPC The whole procedure to update OPC, including naming known and unknown objects, drawing bounding boxes around objects
Definition at line 808 of file module.cpp.
|
protected |
Definition at line 30 of file module.cpp.
|
friend |
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |