run_shape_context.cpp
Go to the documentation of this file.
00001 #include <cpl_visual_features/features/shape_context.h>
00002 #include <ros/ros.h>
00003 using namespace cpl_visual_features;
00004 
00005 int main(int argc, char** argv)
00006 {
00007   // load images from disk
00008   cv::Mat imageA;
00009   cv::Mat imageB;
00010 
00011   if (argc < 3)
00012   {
00013     imageA = cv::imread("/home/rahul/Desktop/video000.bmp");
00014     imageB = cv::imread("/home/rahul/Desktop/video001.bmp");
00015   }
00016   else
00017   {
00018     imageA = cv::imread(argv[1]);
00019     imageB = cv::imread(argv[2]);
00020   }
00021 
00022   cv::Mat imageA1(imageA.size(), imageA.type());
00023   cv::Mat imageB1(imageB.size(), imageB.type());
00024 
00025   // convert from color to grayscale, needed by Canny
00026   cv::cvtColor(imageA, imageA1, CV_RGB2GRAY);
00027   cv::cvtColor(imageB, imageB1, CV_RGB2GRAY);
00028   cv::imshow("ImageA", imageA1);
00029   cv::imshow("ImageB", imageB1);
00030   float score = compareShapes(imageA1, imageB1, 9e5, false, "/u/thermans/Desktop/");
00031   ROS_INFO_STREAM("Object match with score: " << score);
00032 
00033   return 0;
00034 }


cpl_visual_features
Author(s): Tucker Hermans
autogenerated on Wed Nov 27 2013 11:52:36