求助。。MATLAB运行错误。。
%函数功能:本函数用于DCT域的信息隐藏%输入格式为:[count,msg,data]=hidedctadv('lenna.jpg','1.jpg','1.txt',1986,1)
function [count,msg,result] =hidedctadv(image,imagegoal,msg,key,alpha)
frr=fopen(msg,'r');
[msg,count]=fread(frr,'ubit1');
fclose(frr);
data()=imread(image);
data()=double(data())/255;
data=data()(;,;,1);
T=dctmtx(8);
DCTrgb=blkproc(data,[8 8],'P1*x*P2',T,T');
[row,col]=size(DCTrgb);
row=floor(row/8);
col=floor(col/8);
a=zeros([row col]);
[k1,k2]=randinterval(a,count,key);
for i=1:count
k1(1,i)=(k1(1,i)-1)*8+1;
k2(1,i)=(k2(1,i)-1)*8+1;
end
temp=0;
for i=1:count
if msg(i,1)==0
if DCTrgb(k1(i)+4,k2(i)+1)>DCTrgb(k1(i)+3,k2(i)+2)
temp=DCTrgb(k1(i)+4,k2(i)+1);
DCTrgb(k1(i)+4,k2(i)+1)=DCTrgb(k1(i)+3,k2(i)+2);
DCTrgb(k1(i)+3,k2(i)+2)=temp;
end
else
if DCTrgb(k1(i)+4,k2(i)+1)<DCTrgb(k1(i)+3,k2(i)+2)
temp=DCTrgb(k1(i)+4,k2(i)+1);
DCTrgb(k1(i)+4,k2(i)+1)=DCTrgb(k1(i)+3,k2(i)+2);
DCTrgb(k1(i)+3,k2(i)+2)=temp;
end
end
if DCTrgb(k1(i)+4,k2(i)+1)>DCTrgb(k1(i)+3,k2(i)+2)
DCTrgb(k1(i)+3,k2(i)+2)=DCTrgb(k1(i)+3,k2(i)+2)-alpha;
else
DCTrgb(k1(i)+4,k2(i)+1)=DCTrgb(k1(i)+4,k2(i)+1)-alpha;
end
end
DCTrgb1=DCTrgb;
data=blkproc(DCTrgb,[8 8],'P1*x*P2',T',T);
result(:,:,1)=data;
imwrite(result,imagegoal);
程序如上
MATLAB一点不会 为了做这个课程设计才刚下的
照着把这个程序打上去了
出现了如下错误:
?? Error: File: E:\新建文件夹\work\Untitled2.m Line: 10 Column: 6
Expected a variable, function, or constant, found ")".
请高手解决。。解决成功一定加高分!多谢!