MATLAB【十四】————调用深度库生成exe,批量运行三层文件夹下图片,保存结果
运行路径:D:\matlab\cmd_batch_processing
文件夹架构:
clear;
clc;
close all;%% crop the im into 256*256oriDataPath = 'D:\matlab\cmd_batch_processing\data\';
targetPathOri = 'D:\matlab\cmd_batch_processing\result\';report_path ='D:\matlab\cmd_batch_processing\report.txt';
tracejson_path ='D:\matlab\cmd_batch_processing\trace.json';imgDataDirList = dir(oriDataPath); % 遍历所有文件
layer_1_list = imgDataDirList(3:end);
%
for i = 1:length(layer_1_list)layer_1_list_folder =layer_1_list(i,:).folder; layer_1_list_name =layer_1_list(i,:).name; layer_2_list = dir( fullfile(layer_1_list_folder,layer_1_list_name));layer_2_list = layer_2_list(3:end); for i2 = 1:length(layer_2_list)layer_2_list_folder=layer_2_list(i2,:).folder; layer_2_list_name =layer_2_list(i2,:).name; layer_3_list = dir( fullfile(layer_2_list_folder,layer_2_list_name));layer_3_list = layer_3_list(3:end); for i3 = 1:length(layer_3_list)layer_3_list_folder=layer_3_list(i3,:).folder; layer_3_list_name =layer_3_list(i3,:).name; data_type=split(layer_3_list_name,'.');if((strcmp(data_type(2),'bmp')))image_path = [layer_3_list_folder,'\',layer_3_list_name]; [status,result] = system(['D:\matlab\cmd_batch_processing\RelWithDebInfo\depth_magic_runner.exe "',image_path,'" --config "D:\matlab\cmd_batch_processing\config"']) ;
% [status,result] = system(['D:\softinstall\msys2\home\Administrator\workplacwe\build\bin\RelWithDebInfo\generate_reference_data.exe "D:\matlab\vescl\gauss\0.png" --config "D:\matlab\vescl\gauss\vcsel_config(single_plane)"'],'-echo') ;
% [status,result] = system(['D:\matlab\cmd_batch_processing\RelWithDebInfo\depth_magic_runner.exe "Z:\junfeng\temprature_compensate_figures\fatman mini#25\data\',num2str(x(t),'%.0f'),'\.*.raw" --config "C:\Users\Administrator\Desktop\data\晚上\Thinmanmini#071#0420\Thinmanmini#071#0420"']) ;
% [status,result] = system(['D:\matlab\cmd_batch_processing\RelWithDebInfo\depth_magic_runner.exe "Z:\junfeng\temprature_compensate_figures\fatman mini#25\data\',num2str(x(t),'%.0f'),'\.*.raw" --config "D:\matlab\cmd_batch_processing\config"']) ;pause(0.001);
% image_name_str = strsplit(image_name,'.');new_name= ([layer_1_list_name,'_',layer_2_list_name,'_',data_type(1)]);new_name=strcat(new_name(1),new_name(2),new_name(3),new_name(4),new_name(5));%%修改图片保存文件的名称movefile("debug_output",string(new_name),'f');%改名pause(0.001);movefile(string(new_name),targetPathOri,'f');%移动
% movefile(report_path,targetPathOri,'f');
% movefile(tracejson_path,targetPathOri,'f');pause(0.001); end endend
end
clc;
close all;
clear % file_path = 'C:\Users\Administrator\Desktop\vescl\base_5scene_6yoffset\';% 图像文件夹路径
file_path = 'C:\Users\Administrator\Desktop\vescl\master_test\';% 图像文件夹路径
img_list = dir(strcat(file_path,'*.bmp'));%获取该文件夹中所有jpg格式的图像
img_list_length = length(img_list);%获取图像总数量sourcePath='D:\matlab\vescl\debug_output';%数据保存路径
targetPathOri=file_path;
% targetPathOri='C:\Users\Administrator\Desktop\vescl_after\result\';if img_list_length > 0 %有满足条件的图像for j = 1:img_list_length %逐一读取图像image_name = img_list(j).name;% 图像名image = imread(strcat(file_path,image_name));fprintf('%d %d %s\n',j,strcat(file_path,image_name));% 显示正在处理的图像名%图像处理过程 省略
% [status,result] = system('D:\softinstall\msys2\home\Administrator\workplacwe\build\bin\RelWithDebInfo\depth_magic_runner.exe "C:\Users\Administrator\Desktop\vescl_test\basesample_5scene3distance\400to3\result1\ref.bmp" --config "C:\Users\Administrator\Desktop\vescl_test\vcsel_config_ref"','-echo');
% [status,result] = system(['D:\softinstall\msys2\home\Administrator\workplacwe\build\bin\RelWithDebInfo\depth_magic_runner.exe "C:\Users\Administrator\Desktop\vescl\result1\',image_name,'" --config "C:\Users\Administrator\Desktop\vescl_test\vcsel_config_ref"']) ; [status,result] = system(['D:\matlab\vescl\master_test\depth_magic_runner.exe "D:\data\N101\aquaman-N101方块件#0923\30\raw\',image_name,'" --config "D:\data\N101\config_new_proj"']) ; pause(0.001);image_name_str = strsplit(image_name,'.');movefile("debug_output",string(image_name_str(1)),'f');%改名pause(0.001);movefile(string(image_name_str(1)),targetPathOri,'f');%移动pause(0.001); end
end
相关文章:

JDK1.8学习
2019独角兽企业重金招聘Python工程师标准>>> List<OrderGoodsDetail> olist BeanMapper.mapList(list,OrderGoodsDetail.class);List<String> list2 Arrays.asList("123", "45634", "7892", "abch", "s…

HDFS的数据流
目录 HDFS写数据流程 剖析文件写入 网络拓扑-节点距离计算 机架感知(副本存储节点选择) Hadoop2.7.2 副本节点选择 HDFS读数据流程 HDFS写数据流程 剖析文件写入 1)客户端通过Distributed FileSystem模块向NameNode请求上传文件&#x…

Js----闭包
1、闭包的概念:(我找了很多,看大家的理解) A:闭包是指可以包含自由(未绑定到特定对象)变量的代码块; 这些变量不是在这个代码块内或者任何全局上下文中定义的,而是在定义代码块的环境中定义(局部…

【C++】【四】企业链表
// 企业链表.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // 链表改进版 企业常用#include <iostream> #include<stdlib.h>//链表小节点 不包含数据域 typedef struct linknode {struct linknode* next; }linknode; //链表节点 数据指…

GoldenGate的Logdump工具使用简介
Logdump工具是GoldenGate提供的一个用于查询、分析、过滤、查看和保存存储在trail文件或extract文件中的数据的工具。1、启动Logdump工具[oraclerhel6 ~]$ cd /ogg [oraclerhel6 ogg]$ ./logdumpOracle GoldenGate Log File Dump Utility for Oracle Version 12.2.0.1.1 OGGCOR…

scala惰性函数
惰性计算(尽可能延迟表达式求值)是许多函数式编程语言的特性。惰性集合在需要时提供其元素,无需预先计算它们,这带来了一些好处。首先,您可以将耗时的计算推迟到绝对需要的时候。其次,您可以创造无限个集合…

计算机组成原理-第3章-3.1
|--总线:本质上就是一组连线,通路 |--发展过程: 分散连接时代: 运算器为中心 ↓ 存储器为中心 ↓ 中断,DMA的出现修正 ↓ 依旧无法解决效率问题 总线连接时代: 以CPU为核心,双总线:M…

【C++】【三】单向链表
// 单向链表.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 //#include <iostream> #include<stdlib.h>typedef struct LINKNODE {void* data;struct LINKNODE* next; }linknode;typedef struct LINKLIST {LINKNODE* head;int size; }lin…

gulp相关说明
1.当你按下ctrls 或切换到浏览器,浏览器将会会自动刷新 如果你修改的是html文件将会刷新网页如果你修改的是css或less,这个less文件或css文件将会被重载而不是刷新整个页面(这个特性在写单页面应用时尤为实用)2.模板引入 考虑以下…
IDEA中提示:Warning:java: 源值1.5已过时, 将在未来所有发行版中删除
问题描述: 运行Java Web项目时,IDEA中提示:Warning:java: 源值1.5已过时, 将在未来所有发行版中删除解决方法: 1. 打开【File】—【Project Structure】,找到以下两个地方: Project Structure->Proje…

mysql 数据库乱码
mysql 数据库乱码 转载自https://www.cnblogs.com/gne-hwz/p/8748028.html 如有侵权,请联系。 遇到这种情况,现有项目的数据库已经建好,数据表也已经创建完成。 问题来的,数据库不能插入中文,调试时候发现中文数据从发…

【C++】【二】动态数组-Dynamic_linklist
// dynamicArray.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <stdlib.h> #include <iostream>typedef struct DYNAMICARRAY {int* paddr;int size;int capacity; }dynamiCarray;dynamiCarray* Init_dynamiCarray() {dynam…

在MySQL和PostgreSQL之外,为什么阿里要研发HybridDB数据库?
编者按\\在大数据火遍IT界之前,大家对数据信息的挖掘通常聚焦在BI(Business Intelligence)之上。BI具有着明确的分析需求,清晰地知道需要处理哪些信息,并且如何最终获得多维度的SQL类型数据,这种多维度的分…

Linux命令-安装zip和unzip命令
1 [rootiz2zeea05by6vofxzsoxdbz elasticsearch]# unzip elasticsearch-6.2.4.zip 2 -bash: unzip: command not found 如果你如法使用unzip命令解压.zip文件,可能是你没有安装unzip软件,下面是安装方法 命令: yum list | grep zip/unzip …

【C++】【五】循环链表
数据结构:具体的高效有序的管理内存的方法。 链表:数据结构的一种 节点:每一块内存 每一个节点可以是裸指针 也可以是结构体 ,结合企业链表的思路可以将类型强转,完成高效的访问。main.cc // 单向循环链表.cpp …

IntelliJ IDEA 设置项目编码
2019独角兽企业重金招聘Python工程师标准>>> IntelliJ IDEA-> Editor->File Encodings 转载于:https://my.oschina.net/bigxuan/blog/804345

util.sh 脚本
#!/bin/bash for i in zzzhadoop101 zzzhadoop102 zzzhadoop103 doecho " $i "ssh $i /opt/module/jdk1.8.0_144/bin/jps donebin目录是在环境变量里的,所以在哪都可以执行 /home/zzz/bin目录下touch util.sh [zzzhadoop101 bin]$ touch …

bzoj3467: Crash和陶陶的游戏
就一篇题解: BZOJ3467 : Crash和陶陶的游戏 - weixin_34248487的博客 - CSDN博客 1.离线,建出Atrie树;B树的倍增哈希数组,节点按照到根路径字典序排序 2.处理A节点对应前缀对应B中的极长可以匹配的区间。在父亲节点区间内二分即可…

载入图像并且显示
#include <opencv2/opencv.hpp> using namespace cv;void main( ) { const char *fileName "1.jpg";Mat srcImage imread("1.jpg");imshow(fileName,srcImage);waitKey(0); }

alter system switch logfile与alter system archive log current的区别
以前知道 ALTER SYSTEM SWITCH LOGFILE对单实例数据库或RAC中的当前实例执行日志切换, ALTER SYSTEM ARCHIVE LOG CURRENT会对数据库中的所有实例执行日志切换, 所以在RAC环境上大多时间一般使用后者,而今天遇到了不管执行多少次ALTER SYSTEM…

【C++】【六】约瑟夫问题
核心代码: int index 1;clinknode* pcur list->head.next;while (Size_circlelinkist(list)>1){if (index N) {mynum* temnum (mynum*)pcur;printf("%d ", temnum->val);clinknode* pnext pcur->next;RemoveByValue_circlelinkist(list…

第六章:内核数据结构
6.1链表链表表示一种存放和操作的可变数据元素的数据结构。链表与静态数组不同的是它包含的元素是动态创建并且插入链表的,在编译时不必知道具体需要多少个元素。另外链表中每个元素的创建时间各不相同,所以它们在内存中无需占用连续的空间。链表中每个元…

【C++】【七】栈的实现
栈的线性表实现 stack_liner_stack.h #ifndef STACK_LINER_H #define STACK_LINER_H #include <stdlib.h> #define MAX_SIZE 1024 #define stack_liner_false 0 #define stack_liner_true 1typedef struct STACK_LINER_H {void* data[MAX_SIZE];int size; }stack_liner…

推荐两款简单好用的图片放大jquery插件
一、zoomfiy.js 推荐可以从这里下载 使用说明: 使用该jquery 插件引入该插件的js:zoomfiy.js 或 min引入该插件的css:zoomfiy.css 或 min前后顺序都可js里加入 调用插件的函数 $(这里写要放大的图片).zoomify();如果有ajax 新生成的图片,要在ajax里再次调…

对图像的缩放与旋转
#include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" int main( ) {// 读取图像cv::Mat srcImage cv::imread("..\\images\\flower3.jpg");// 图像读取是否成功if( !srcImage.data ) return 1; // 对图像的缩放与旋…

工具库 --- Validator (JS正则)
工具库 --- Validator 今天写的是一个正则验证类 单例模式 工具库地址:github.com/WeForStudy/… npm地址:www.npmjs.com/package/slm… 单例模式 减少不必要的对象生存,减少资源的占用 由于只需要new一次,项目中其他项目共用一个…

【C++】【九】栈的应用
【C】【九】栈的应用 就近匹配原理及其步骤: 中缀转后缀:

linux中错误日志等级
info:仅是一些基本的讯息说明而已;notice:比 info 还需要被注意到的一些信息内容;warning 或 warn:警示讯息,可能有问题,但是还不至于影响到某个 daemon 作。err 或 error :一些重大…

Mat类简略结构
class CV_EXPORTS Mat { public:int flags; // 标志位 int dims ; // 数组的维数int rows,cols; uchar *data ; // 指向数据的指针int * refcount ; // 指针的引用计数器 阵列指向用户分配的数据时,当指针为 NULL };