convn in 3D
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
mathango
il 26 Apr 2016
Risposto: Image Analyst
il 27 Apr 2016
Hi, Here is my solution for finite difference method using conv2 for 2D matrix let,
x= 1: 10;
y= 1: 10;
A = zeros[x,y];
for my equation of Anew(j,i)=A(j+1,i) + A(j,i-1) + A(j,i) ; I derive matrix B = [0 1 0; 0 1 1; 0 0 0]. therefore when I do conv2(A,B'simple') I get the Anew equation. I derived B matrix by assuming that rows are j+1, j, j-1 and columns are i+1, i, i-1 . It works fine for 2D matrix. How do I work out the matrix B for 3D matrix of A. Say A = zeros(k,j,i), and let the equation be Anew(k,j,i)=A(k+1,j+1,i) + A(k,j,i-1) + A(k,j,i) how to derive and express matrix B?
0 Commenti
Risposta accettata
Image Analyst
il 27 Apr 2016
I don't know why you call it a difference when you're adding the numbers together, which causes a blur in the image. Anyway, with a 3x3x3 kernel, you have 27 elements and you have to decide which ones you want to set to +1 or -1. It's easy - just follow the same process you did for 2-D.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Fourier Analysis and Filtering in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!