How to prevent conv2d from changing image size
조회 수: 14 (최근 30일)
이전 댓글 표시
I have an image of size 330x363 uint8. I am convoluting it with 11x11 filter using conv2. The resulting image gets padded with zeros from top (6 pixels), bottom (4 pixels), left (6 pixels), right (4 pixels). Is there a way to prevent this padding from happening? Is it a good practice to crop the resulting image after the convolution?
댓글 수: 0
채택된 답변
Walter Roberson
2019년 4월 22일
편집: Walter Roberson
2019년 4월 22일
conv2(A, B, 'same') or conv2(A, B, 'valid')
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!