日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

MATLAB【十四】————调用深度库生成exe,批量运行三层文件夹下图片,保存结果

發(fā)布時間:2023/11/27 生活经验 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 MATLAB【十四】————调用深度库生成exe,批量运行三层文件夹下图片,保存结果 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

?運行路徑:D:\matlab\cmd_batch_processing

文件夾架構(gòu):

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);%獲取圖像總數(shù)量sourcePath='D:\matlab\vescl\debug_output';%數(shù)據(jù)保存路徑
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

?

?

總結(jié)

以上是生活随笔為你收集整理的MATLAB【十四】————调用深度库生成exe,批量运行三层文件夹下图片,保存结果的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。