필터 지우기
필터 지우기

how to multiply an image by a cosine(x) function?

조회 수: 1 (최근 30일)
TULIKA
TULIKA 2014년 7월 3일
댓글: TULIKA 2014년 7월 3일
i've tried but there shows some dimension problem....plzz give an exam
  댓글 수: 2
Geoff Hayes
Geoff Hayes 2014년 7월 3일
Tulika - please update your question to include the code you have used to apply the cosine function. As well, if there is an error message, include that as well.
TULIKA
TULIKA 2014년 7월 3일
f=zeros(600,600); f(50:80,1:50)=1; f(10:100,50:150)=1; f(1:600,180:210)=1; f(20:120,250:350)=1; f(40:80,350:380)=1; f(1:80,380:410)=1; f(40:80,410:450)=1; f(5:100,450:550)=1; f(1:600,570:590)=1; f(200:300,50:150)=1; f(300:350,70:120)=1; f(350:400,1:180)=1; f(200:300,250:350)=1; f(240:260,350:400)=1; f(260:600,380:400)=1; f(430:530,50:150)=1; f(320:420,250:350)=1; f(360:380,350:380)=1; f(340:400,400:450)=1; f(330:410,450:560)=1; f(220:300,480:580)=1; f(300:330,510:560)=1; f(440:540,450:550)=1; figure,imshow(f,'InitialMagnification','fit'); x=linspace(-pi, pi, 100); sf=6; sinewave=sin(x*sf); onematrix=ones(size(sinewave)); sinewave2D=(onematrix'*sinewave); imagesc(sinewave2D); imagesc(sinewave2D) colormap(gray) axiss off; axis off; x=linspace(-pi, pi, 100); sf=6; sinewave=sin(x*sf); onematrix=ones(size(sinewave)); sinewave2D=(onematrix'*sinewave); imagesc(sinewave2D) A=(f.*sinewave2D); A=immultiply(f,sinewave2D); A=(f. *sinewave2D);
i dont kno what is the problem i'm very new to matlab

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2014년 7월 3일
See attached test.m which will produce this image.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by