[問題] 彩色影像做SVD出錯!?已回收

看板MATLAB作者 (jy99)時間13年前 (2011/08/05 18:42), 編輯推噓2(201)
留言3則, 1人參與, 最新討論串1/2 (看更多)
各位大大請問一下 彩色影像做SVD出現以下錯誤 ??? Out of memory. Type HELP MEMORY for your options. Telecommunication_G=a2*Z2*c2'; 看不出問題點在哪 有沒有大大可以幫忙一下 程式如下: function [ Z Z2 Z3 ] = SVD_RGB( ); data = imread('路徑'); height=length(data(:,1,1)); width=length(data(1,:,1)); R = data(:,:,1); G = data(:,:,2); B = data(:,:,3); R = double(R) ; G = double(G) ; B = double(B) ; [a,Z,c] = svd(R); [a2,Z2,c2]=svd(G); [a3,Z3,c3]=svd(B); Telecommunication_R=a*Z*c'; Telecommunication_G=a2*Z2*c2'; Telecommunication_B=a3*Z3*c3'; Telecommunication_R=uint8(Telecommunication_R); Telecommunication_G=uint8(Telecommunication_G); Telecommunication_B=uint8(Telecommunication_B); Telecommunication(:,:,1)=Telecommunication_R; Telecommunication(:,:,2)=Telecommunication_G; Telecommunication(:,:,3)=Telecommunication_B; imwrite(Telecommunication,路徑) ; -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 203.64.100.4

08/06 00:25, , 1F
use whos to check the variable memory space
08/06 00:25, 1F

08/06 00:28, , 2F
seems like you can do RGB separately and clear unused
08/06 00:28, 2F

08/06 00:28, , 3F
variables
08/06 00:28, 3F
文章代碼(AID): #1EEyZy-Z (MATLAB)
文章代碼(AID): #1EEyZy-Z (MATLAB)