[問題]維度的讀取問題

看板MATLAB作者 (cloud)時間11年前 (2013/12/27 18:03), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
大家好, 我是之前問過spe檔案讀取連續圖片偏移問題的同學, 現在判別他是1024*1024的大小共計19張,每次讀取x軸偏移兩個pixel的狀況, 1st =http://ppt.cc/l9T1 10th = http://ppt.cc/olNm 19th = http://ppt.cc/c8su 請問是否可以用"多讀取兩行的方法但是不顯示在圖片上"的方法來解決偏移的問題, 嘗試新增A來讀取stripDim會有一個dimension mismatch的問題, 想請問版友該怎麼修改或者我應該從別的地方下手, 以下為READSPE檔的部分程式,完整檔網頁=> http://ppt.cc/D0ag stripDim = getData(fd, '2A', 'uint16'); %first dim pixelDim = getData(fd, '290', 'uint16'); %second dim nDim = getData(fd, '5A6', 'uint32'); %third dim dataType = getData(fd, '6C', 'uint16'); % Get the pixel data type fseek(fd, hex2dec('1004'), 'bof'); % Get the image image = zeros([pixelDim,stripDim,nDim]); A = zeros([pixelDim,2,nDim]); %嘗試新增的部分 switch dataType case 0 % single precision float (4 bytes) image = single(image); %maintain datatype in function output for i=1:nDim image(:,:,i) = fread(fd, [stripDim,pixelDim], 'float32')'; A(:,:,i) = fread(fd, [2,pixelDim], 'float32')'; %嘗試新增的部分 end 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.106.71

01/02 13:57, , 1F
已解決問題(藉由換掉A的形式)
01/02 13:57, 1F
文章代碼(AID): #1IlL1shS (MATLAB)
文章代碼(AID): #1IlL1shS (MATLAB)