From f618466c25d43f3bae9e40920273bf77de1e1149 Mon Sep 17 00:00:00 2001 From: leochanj105 Date: Mon, 19 Oct 2020 23:09:30 -0400 Subject: initial sd-vbs initial sd-vbs add sd-vbs sd-vbs --- SD-VBS/common/toolbox/toolbox_basic/io/readpfm.m | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 SD-VBS/common/toolbox/toolbox_basic/io/readpfm.m (limited to 'SD-VBS/common/toolbox/toolbox_basic/io/readpfm.m') diff --git a/SD-VBS/common/toolbox/toolbox_basic/io/readpfm.m b/SD-VBS/common/toolbox/toolbox_basic/io/readpfm.m new file mode 100755 index 0000000..48ecd78 --- /dev/null +++ b/SD-VBS/common/toolbox/toolbox_basic/io/readpfm.m @@ -0,0 +1,10 @@ +function I = readpfm(filename) + +fid = fopen(filename,'r'); + +A = fscanf(fid,'%d',2); +I = fscanf(fid,'%f',[A(1),A(2)]); + +%I = fscanf(fid,'%f',A(2)*A(1));I = reshape(I,A(1),A(2)); + +fclose(fid); -- cgit v1.2.2