原txt文本内容
bbox1.txt
D:\VStest\xiazai\code_point\CASIA-maxpy-clean\0000045\001.jpg 67 181 79 194
D:\VStest\xiazai\code_point\CASIA-maxpy-clean\0000045\002.jpg 71 186 79 195
D:\VStest\xiazai\code_point\CASIA-maxpy-clean\0000045\003.jpg 65 178 78 191
D:\VStest\xiazai\code_point\CASIA-maxpy-clean\0000045\004.jpg
D:\VStest\xiazai\code_point\CASIA-maxpy-clean\0000045\005.jpg
D:\VStest\xiazai\code_point\CASIA-maxpy-clean\0000045\006.jpg 70 182 79 191
......
修改后txt文本内容
NewData.txt
0000045\001.jpg 67 181 79 194
0000045\002.jpg 71 186 79 195
0000045\003.jpg 65 178 78 191
0000045\004.jpg
0000045\005.jpg
0000045\006.jpg 70 182 79 191
0000045\007.jpg
0000045\008.jpg 66 180 77 191
0000045\009.jpg 68 174 82 188
0000045\011.jpg
0000045\012.jpg 59 174 81 196
0000045\013.jpg 63 173 76 186
0000045\014.jpg
0000045\015.jpg 63 178 76 191
......
</

本文介绍如何使用MATLAB读取TXT文本内容,进行修改,并将修改后的数据保存到新的TXT文件中。示例中展示了读取名为bbox1.txt的文件,去除路径并保存为NewData.txt,包含图像文件名和坐标信息。
最低0.47元/天 解锁文章
1167

被折叠的 条评论
为什么被折叠?



