output coordinates with conv2

7 次查看(过去 30 天)
The are three shape options for the output of a 2D convolution made with conv2: 'full', 'same' and 'valid'. Only 'valid' provides the valid zone of the convolution. Let's say S1 is associated to coordinates or meshgrid arrays X1 and Y1, and S2 to X2 and Y2, let's say S = conv2(S1,S2,'valid). X1, Y1, X2 and Y2 are defined in the same frame. What are the X and Y coordinates of S?
Thank you !
Loic

采纳的回答

Ajay Pattassery
Ajay Pattassery 2020-2-17
编辑:Ajay Pattassery 2020-2-17
I assume you want to find the output size after 2D convolution with an argument as ‘valid’.
In the case where
S = conv2(S1, S2, 'valid')
The output size o = (i-k) + 1
Where i is the size of the input matrix. k is the kernel size. (Here i corresponds to S1 and k to S2)
In this case, S1 is of size (X1, Y1) and S2 is of size (X2, Y2)
Hence output size 0 = (X1 - X2 + 1) in the x-direction and similarly
output along the y-direction is (Y1-Y2 + 1)
That is, the output size will be (X1-X2+1, Y1-Y2+1).

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by