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/read_pmm.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 SD-VBS/common/toolbox/toolbox_basic/io/read_pmm.m (limited to 'SD-VBS/common/toolbox/toolbox_basic/io/read_pmm.m') diff --git a/SD-VBS/common/toolbox/toolbox_basic/io/read_pmm.m b/SD-VBS/common/toolbox/toolbox_basic/io/read_pmm.m new file mode 100755 index 0000000..9e2eed1 --- /dev/null +++ b/SD-VBS/common/toolbox/toolbox_basic/io/read_pmm.m @@ -0,0 +1,12 @@ +function I = read_pmm(fname) + +fid = fopen(fname,'r'); + +[A] = fscanf(fid,'%d\n',3); + +I = fscanf(fid,'%d',prod(A)); + + +I = reshape(I,A(2),A(1))'; + +I = squeeze(I); -- cgit v1.2.2