Fix build of apps and samples

pull/695/head
Andrey Kamaev 12 years ago
parent 688d170de7
commit 29cfeb7cee
  1. 2
      apps/sft/include/sft/common.hpp
  2. 8
      samples/cpp/latentsvm_multidetect.cpp
  3. 6
      samples/cpp/linemod.cpp
  4. 4
      samples/cpp/peopledetect.cpp
  5. 4
      samples/cpp/stitching_detailed.cpp
  6. 2
      samples/cpp/video_dmtx.cpp

@ -54,7 +54,7 @@ namespace sft
using cv::Mat;
struct ICF;
typedef std::string string;
typedef cv::String string;
typedef std::vector<ICF> Icfvector;
typedef std::vector<sft::string> svector;

@ -47,7 +47,7 @@ static void detectAndDrawObjects( Mat& image, LatentSvmDetector& detector, const
cout << "Detection time = " << tm.getTimeSec() << " sec" << endl;
const vector<string> classNames = detector.getClassNames();
const vector<String> classNames = detector.getClassNames();
CV_Assert( colors.size() == classNames.size() );
for( size_t i = 0; i < detections.size(); i++ )
@ -63,7 +63,7 @@ static void detectAndDrawObjects( Mat& image, LatentSvmDetector& detector, const
}
}
static void readDirectory( const string& directoryName, vector<string>& filenames, bool addDirectoryName=true )
static void readDirectory( const string& directoryName, vector<String>& filenames, bool addDirectoryName=true )
{
filenames.clear();
@ -123,7 +123,7 @@ int main(int argc, char* argv[])
if( argc > 4 ) numThreads = atoi(argv[4]);
}
vector<string> images_filenames, models_filenames;
vector<String> images_filenames, models_filenames;
readDirectory( images_folder, images_filenames );
readDirectory( models_folder, models_filenames );
@ -134,7 +134,7 @@ int main(int argc, char* argv[])
exit(-1);
}
const vector<string>& classNames = detector.getClassNames();
const vector<String>& classNames = detector.getClassNames();
cout << "Loaded " << classNames.size() << " models:" << endl;
for( size_t i = 0; i < classNames.size(); i++ )
{

@ -130,7 +130,7 @@ static void writeLinemod(const cv::Ptr<cv::linemod::Detector>& detector, const s
cv::FileStorage fs(filename, cv::FileStorage::WRITE);
detector->write(fs);
std::vector<std::string> ids = detector->classIds();
std::vector<cv::String> ids = detector->classIds();
fs << "classes" << "[";
for (int i = 0; i < (int)ids.size(); ++i)
{
@ -177,7 +177,7 @@ int main(int argc, char * argv[])
{
detector = readLinemod(argv[1]);
std::vector<std::string> ids = detector->classIds();
std::vector<cv::String> ids = detector->classIds();
num_classes = detector->numClasses();
printf("Loaded %s with %d classes and %d templates\n",
argv[1], num_classes, detector->numTemplates());
@ -260,7 +260,7 @@ int main(int argc, char * argv[])
// Perform matching
std::vector<cv::linemod::Match> matches;
std::vector<std::string> class_ids;
std::vector<cv::String> class_ids;
std::vector<cv::Mat> quantized_images;
match_timer.start();
detector->match(sources, (float)matching_threshold, matches, class_ids, quantized_images);

@ -84,13 +84,13 @@ int main(int argc, char** argv)
}
std::string src = parser.get<std::string>("frame");
std::vector<std::string> frames;
std::vector<cv::String> frames;
cv::glob(parser.get<std::string>("frame"), frames);
std::cout << "collected " << src << " " << frames.size() << " frames." << std::endl;
for (int i = 0; i < (int)frames.size(); ++i)
{
std::string& frame_sourse = frames[i];
std::string frame_sourse = frames[i];
cv::Mat frame = cv::imread(frame_sourse);
if(frame.empty())

@ -121,7 +121,7 @@ static void printUsage()
// Default command line args
vector<string> img_names;
vector<String> img_names;
bool preview = false;
bool try_gpu = false;
double work_megapix = 0.6;
@ -446,7 +446,7 @@ int main(int argc, char* argv[])
// Leave only images we are sure are from the same panorama
vector<int> indices = leaveBiggestComponent(features, pairwise_matches, conf_thresh);
vector<Mat> img_subset;
vector<string> img_names_subset;
vector<String> img_names_subset;
vector<Size> full_img_sizes_subset;
for (size_t i = 0; i < indices.size(); ++i)
{

@ -53,7 +53,7 @@ namespace
break;
cv::Mat gray;
cv::cvtColor(frame,gray,CV_RGB2GRAY);
vector<string> codes;
vector<String> codes;
Mat corners;
findDataMatrix(gray, codes, corners);
drawDataMatrixCodes(frame, codes, corners);

Loading…
Cancel
Save