矩阵的卷积运算图解与MATLAB图像卷…

    xiaoxiao2021-03-25  220

    卷积操作算法,在计算机领域多用于减少图像复杂度从而降低计算负担,在图像上具有处处不变性。 一.卷积的计算 卷积核(模版)x卷积对象矩阵 二.MATLAB下的卷积图像处理 核x图像 %读取图片 I=imread('img03.jpg'); %图像锐化核 x1=[-1 -1 -1;  -1 9 -1;   -1 -1 -1]; %浮雕化核叠加 x2=[-1 -1 0 ;     -1 1 1;       0 1 1];     %边缘检测核 x3 =[       0     0     0     0     0;       0     0     0     0     0;     -1     -1     2     0     0;       0     0     0     0     0;       0     0     0     0     0];    %imfilter函数计算  %imfilter(图形矩阵,卷积核矩阵)     Out1 = imfilter(I,x1);   Out2 = imfilter(I,x2);   Out3 = imfilter(I,x3);    %按照2x2进行显示 subplot(221);imshow(I); subplot(222);imshow(Out1); subplot(223);imshow(Out2); subplot(224);imshow(Out3);
    转载请注明原文地址: https://ju.6miu.com/read-575.html

    最新回复(0)