how to do convolution without commands

3 ビュー (過去 30 日間)
Sivakumar Rajagopal
Sivakumar Rajagopal 2020 年 4 月 3 日
I=img;
b=rgb2gray(I); [Gx,Gy]=imgradientxy(b); figure();
[Gmag, Gdir] = imgradient(Gx,Gy);
gx=[-1 0 1; -2 0 2; -1 0 1];
gy=transpose(gx);
gi=gray2ind(b);
Fx=conv2(double(b),gx,'same')
In the above coding how to do convolution without conv2

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 4 月 3 日
  3 件のコメント
Ameer Hamza
Ameer Hamza 2020 年 4 月 3 日
See the calculation of res2. That code compares built-in convolution with for loop.
Sivakumar Rajagopal
Sivakumar Rajagopal 2020 年 4 月 6 日
Ok. Thanks.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by