diff options
Diffstat (limited to 'SD-VBS/common/toolbox/toolbox_basic/io/readpdmc.m')
-rwxr-xr-x | SD-VBS/common/toolbox/toolbox_basic/io/readpdmc.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/SD-VBS/common/toolbox/toolbox_basic/io/readpdmc.m b/SD-VBS/common/toolbox/toolbox_basic/io/readpdmc.m new file mode 100755 index 0000000..37910b9 --- /dev/null +++ b/SD-VBS/common/toolbox/toolbox_basic/io/readpdmc.m | |||
@@ -0,0 +1,12 @@ | |||
1 | function I = readpfm(filename) | ||
2 | |||
3 | fid = fopen(filename,'r'); | ||
4 | |||
5 | A = fscanf(fid,'%d',2); | ||
6 | I = fscanf(fid,'%d',[A(2),A(1)]); | ||
7 | %I = fscanf(fid,'%d',[300,1000]); | ||
8 | I = I'; | ||
9 | |||
10 | %I = fscanf(fid,'%f',A(2)*A(1));I = reshape(I,A(1),A(2)); | ||
11 | |||
12 | fclose(fid); | ||