Added Depth information to ImageView's keypoint items

This commit is contained in:
Mathieu Labbe
2015-05-05 11:39:30 -04:00
parent 0b5d6c84b1
commit b2bfa91153
10 changed files with 76 additions and 36 deletions

View File

@@ -74,9 +74,9 @@ public:
void setGraphicsViewScaled(bool scaled);
void setBackgroundColor(const QColor & color);
void setFeatures(const std::multimap<int, cv::KeyPoint> & refWords, const QColor & color = Qt::yellow);
void setFeatures(const std::vector<cv::KeyPoint> & features, const QColor & color = Qt::yellow);
void addFeature(int id, const cv::KeyPoint & kpt, QColor color);
void setFeatures(const std::multimap<int, cv::KeyPoint> & refWords, const cv::Mat & depth = cv::Mat(), const QColor & color = Qt::yellow);
void setFeatures(const std::vector<cv::KeyPoint> & features, const cv::Mat & depth = cv::Mat(), const QColor & color = Qt::yellow);
void addFeature(int id, const cv::KeyPoint & kpt, float depth, QColor color);
void addLine(float x1, float y1, float x2, float y2, QColor color);
void setImage(const QImage & image);
void setImageDepth(const QImage & image);

View File

@@ -41,7 +41,7 @@ namespace rtabmap {
class RTABMAPGUI_EXP KeypointItem : public QGraphicsEllipseItem
{
public:
KeypointItem(int id, const cv::KeyPoint & kpt, const QColor & color = Qt::green, QGraphicsItem * parent = 0);
KeypointItem(int id, const cv::KeyPoint & kpt, float depth = 0, const QColor & color = Qt::green, QGraphicsItem * parent = 0);
virtual ~KeypointItem();
void setColor(const QColor & color);
@@ -61,6 +61,7 @@ private:
cv::KeyPoint _kpt;
QGraphicsRectItem * _placeHolder;
int _width;
float _depth;
};
}