Fixed some warnings...
git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@35 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
@@ -173,7 +173,7 @@ void AddObjectDialog::setState(int state)
|
||||
cv::DescriptorExtractor * extractor = Settings::createDescriptorsExtractor();
|
||||
extractor->compute(cvImage_, selectedKeypoints, descriptors);
|
||||
delete extractor;
|
||||
if(selectedKeypoints.size() != descriptors.rows)
|
||||
if(selectedKeypoints.size() != (unsigned int)descriptors.rows)
|
||||
{
|
||||
printf("ERROR : keypoints=%lu != descriptors=%d\n", selectedKeypoints.size(), descriptors.rows);
|
||||
}
|
||||
@@ -231,8 +231,8 @@ void AddObjectDialog::update(const cv::Mat & image)
|
||||
|
||||
CvRect AddObjectDialog::computeROI(const std::vector<cv::KeyPoint> & kpts)
|
||||
{
|
||||
CvRect roi;
|
||||
int x1,x2,h1,h2;
|
||||
CvRect roi = cvRect(0,0,0,0);
|
||||
int x1=0,x2=0,h1=0,h2=0;
|
||||
for(unsigned int i=0; i<kpts.size(); ++i)
|
||||
{
|
||||
float radius = kpts.at(i).size / 2;
|
||||
|
||||
+2
-2
@@ -50,8 +50,8 @@ void Camera::takeImage()
|
||||
if(img &&
|
||||
Settings::getCamera_imageWidth().toInt() &&
|
||||
Settings::getCamera_imageHeight().toInt() &&
|
||||
Settings::getCamera_imageWidth().toInt() != (unsigned int)img->width &&
|
||||
Settings::getCamera_imageHeight().toInt() != (unsigned int)img->height)
|
||||
Settings::getCamera_imageWidth().toInt() != img->width &&
|
||||
Settings::getCamera_imageHeight().toInt() != img->height)
|
||||
{
|
||||
// declare a destination IplImage object with correct size, depth and channels
|
||||
cv::Mat imgMat(cvSize(Settings::getCamera_imageWidth().toInt(), Settings::getCamera_imageHeight().toInt()),
|
||||
|
||||
+5
-5
@@ -324,7 +324,7 @@ void MainWindow::update(const cv::Mat & image)
|
||||
cv::DescriptorExtractor * extractor = Settings::createDescriptorsExtractor();
|
||||
extractor->compute(img, keypoints, descriptors);
|
||||
delete extractor;
|
||||
if(keypoints.size() != descriptors.rows)
|
||||
if((int)keypoints.size() != descriptors.rows)
|
||||
{
|
||||
printf("ERROR : kpt=%lu != descriptors=%d\n", keypoints.size(), descriptors.rows);
|
||||
}
|
||||
@@ -359,7 +359,7 @@ void MainWindow::update(const cv::Mat & image)
|
||||
std::vector<cv::Point2f> mpts_1, mpts_2;
|
||||
std::vector<int> indexes_1, indexes_2;
|
||||
std::vector<uchar> outlier_mask;
|
||||
for(unsigned int i=0; i<dataTree_.rows; ++i)
|
||||
for(int i=0; i<dataTree_.rows; ++i)
|
||||
{
|
||||
// Check if this descriptor matches with those of the objects
|
||||
// Apply NNDR
|
||||
@@ -382,7 +382,7 @@ void MainWindow::update(const cv::Mat & image)
|
||||
if(i+1 >= dataRange_.at(j))
|
||||
{
|
||||
QLabel * label = ui_->dockWidget_objects->findChild<QLabel*>(QString("%1detection").arg(objects_.at(j)->id()));
|
||||
if(mpts_1.size() >= Settings::getHomography_minimumInliers().toInt())
|
||||
if(mpts_1.size() >= Settings::getHomography_minimumInliers().toUInt())
|
||||
{
|
||||
cv::Mat H = findHomography(mpts_1,
|
||||
mpts_2,
|
||||
@@ -392,7 +392,7 @@ void MainWindow::update(const cv::Mat & image)
|
||||
int inliers=0, outliers=0;
|
||||
QColor color((Qt::GlobalColor)(j % 12 + 7 ));
|
||||
color.setAlpha(alpha);
|
||||
for(int k=0; k<mpts_1.size();++k)
|
||||
for(unsigned int k=0; k<mpts_1.size();++k)
|
||||
{
|
||||
if(outlier_mask.at(k))
|
||||
{
|
||||
@@ -407,7 +407,7 @@ void MainWindow::update(const cv::Mat & image)
|
||||
// COLORIZE
|
||||
if(inliers >= Settings::getHomography_minimumInliers().toInt())
|
||||
{
|
||||
for(int k=0; k<mpts_1.size();++k)
|
||||
for(unsigned int k=0; k<mpts_1.size();++k)
|
||||
{
|
||||
if(outlier_mask.at(k))
|
||||
{
|
||||
|
||||
+3
-3
@@ -168,7 +168,7 @@ void ObjWidget::setSizedFeatures(bool on)
|
||||
_sizedFeatures->setChecked(on);
|
||||
if(graphicsViewInitialized_)
|
||||
{
|
||||
for(unsigned int i=0; i<keypointItems_.size() && i<keypoints_.size(); ++i)
|
||||
for(unsigned int i=0; i<(unsigned int)keypointItems_.size() && i<keypoints_.size(); ++i)
|
||||
{
|
||||
float size = 14;
|
||||
if(on && keypoints_[i].size>14.0f)
|
||||
@@ -254,7 +254,7 @@ void ObjWidget::resetKptsColor()
|
||||
rectItems_.clear();
|
||||
}
|
||||
|
||||
void ObjWidget::setKptColor(unsigned int index, const QColor & color)
|
||||
void ObjWidget::setKptColor(int index, const QColor & color)
|
||||
{
|
||||
if(index < kptColors_.size())
|
||||
{
|
||||
@@ -311,7 +311,7 @@ void ObjWidget::save(QDataStream & streamPtr) const
|
||||
{
|
||||
streamPtr << id_ << detectorType_ << descriptorType_;
|
||||
streamPtr << (int)keypoints_.size();
|
||||
for(int j=0; j<keypoints_.size(); ++j)
|
||||
for(unsigned int j=0; j<keypoints_.size(); ++j)
|
||||
{
|
||||
streamPtr << keypoints_.at(j).angle <<
|
||||
keypoints_.at(j).class_id <<
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public:
|
||||
const cv::Mat & descriptors,
|
||||
const IplImage * image);
|
||||
void resetKptsColor();
|
||||
void setKptColor(unsigned int index, const QColor & color);
|
||||
void setKptColor(int index, const QColor & color);
|
||||
void setGraphicsViewMode(bool on);
|
||||
void setAutoScale(bool autoScale);
|
||||
void setSizedFeatures(bool on);
|
||||
|
||||
@@ -74,7 +74,7 @@ void ParametersToolBox::setupUi()
|
||||
if(currentItem == 0 || currentItem->objectName().compare(group) != 0)
|
||||
{
|
||||
currentItem = new QWidget(this);
|
||||
int index = this->addItem(currentItem, group);
|
||||
this->addItem(currentItem, group);
|
||||
currentItem->setObjectName(group);
|
||||
QVBoxLayout * layout = new QVBoxLayout(currentItem);
|
||||
currentItem->setLayout(layout);
|
||||
|
||||
Reference in New Issue
Block a user