Sliding window in 2 images to create a third

조회 수: 1 (최근 30일)
DANIELA PALACIOS
DANIELA PALACIOS 2016년 11월 28일
답변: Nirja Mehta 2016년 12월 1일
Dear Matlab people.
I have 2 images or lets say 2 matrices of the same size with values ranging from 0-1. I need to apply different window sizes (3x3, 21x21) and with in these windows applx the following formula. I1 is the image 1 or matrix 1 and I2 is the matrix 2. Please ignore the * in the formula, here it represents something else.

답변 (1개)

Nirja Mehta
Nirja Mehta 2016년 12월 1일
i1 = randn([100 100]);
i2 = randn([100 100]);
R = 3;
C = 21;
num = 0;
for i = 1:R
for j = 1:C
num = num + abs(i1(i,j)*i2(i,j));
end
end
You can calculate the denominator, likewise.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by