|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
imshow(lena_laplacian_g1_a1_opt);
title('Laplacian Processing Image Lena with g1(α=1)','Color','r'); %加标题
%使用g1(m,n) alpha=2进行处理并显示
subplot(2,2,3);
for i = 2:1:255
for j = 2:1:255
laplacian_x = imadd(lena_img(i+1,j),lena_img(i-1,j));
laplacian_x = imsubtract(laplacian_x,imadd(lena_img(i,j),lena_img(i,j)));
laplacian_y = imadd(lena_img(i,j+1),lena_img(i,j-1));
laplacian_y = imsubtract(laplacian_y,imadd(lena_img(i,j),lena_img(i,j)));
laplacian_operator = imadd(laplacian_x,laplacian_y);
lena_laplacian_g1_a2_opt(i,j) = imsubtract(lena_img(i,j),imadd(laplacian_operator,laplacian_operator));
end
end
imshow(lena_laplacian_g1_a2_opt);
上面代码执行效率很低,一运行,CPU 100% ,不能退出
[ 本帖最后由 eight 于 2007-11-27 09:37 编辑 ] |
|