stlplus的path functions

    //在当前根目录下(即是当前工作目录,F:\code\test_openmvg\test_openmvg),
	//再加上一个括号里面调用的路径,获得一个新的路径,新的路径被简化了,去掉了相对路径里面的.                            或..
	std::string folderToPath = stlplus::folder_to_path(string("./imageData"));
	//参数1为root目录,参数2为folder目录
	//好像依然是在工作目录下加上了root和folder目录 神奇
	std::string folderToPath2 =                                 stlplus::folder_to_path(string("F:\image_data_filter"),string("./CPU"));
	//直接搞一个文件
	std::string filespecToPath = stlplus::filespec_to_path("01_concat.jpg");
	//full→relative
	std::string folderToRelativePath = stlplus::folder_to_relative_path("F:\image_data_filter");
	
	
	
	
	std::string sfileDatabaseDir = stlplus::folder_up(string(databaseDir),4) + 
		"/openmvg_master/src/openMVG/exif/sensor_width_database/";
	const std::string sInputDir = stlplus::folder_up(string(THIS_SOURCE_DIR))
		+ "/imageData/360_school/";
	Image<RGBColor> image;
	const string jpg_filenameL = sInputDir + "R0010939.JPG";
	const string jpg_filenameR = sInputDir + "R0010940.JPG";
	std::string sfileDatabase = sfileDatabaseDir + "sensor_width_camera_database.txt";
	
	cout << stlplus::is_file(filespecToPath) << endl;
	cout << stlplus::is_file(sfileDatabase) << endl;
	cout << stlplus::is_file(jpg_filenameL) << endl;

	cout << folderToPath << endl;
	cout << folderToPath2 << endl;
	cout << filespecToPath << endl;
	cout << folderToRelativePath << endl;
	cout << sfileDatabaseDir << endl;
	cout << sfileDatabase << endl;
1
1
1
F:\code\test_openmvg\test_openmvg\imageData\
F:\code\test_openmvg\test_openmvg\image_data_filter\CPU\
F:\code\test_openmvg\test_openmvg\01_concat.jpg
image_data_filter\
F:\/openmvg_master/src/openMVG/exif/sensor_width_database/
F:\/openmvg_master/src/openMVG/exif/sensor_width_database/sensor_width_camera_database.txt

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值