Does im2col function or similar function accept stride as parameter?
2 ビュー (過去 30 日間)
古いコメントを表示
I'm looking for a function similar to im2col(), which accept stride as parameter. For example, I have a matrix as shown:
input_mat =
1 6 11 16 21
2 7 12 17 22
3 8 13 18 23
4 9 14 19 24
5 10 15 20 25
Given stride_col = 2, stride_row = 2, (i.e. sliding image neighborhood by 2 pixels) I want the output matrix be like
1 3 11 13
2 4 12 14
3 5 13 15
6 8 16 18
7 9 17 19
8 10 18 20
11 13 21 23
12 14 22 24
13 15 23 25
I tried im2col() but I can't get the correct result.
Am I miss something? Or otherwise is there any function can do the similar things?
Thanks.
0 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!