How to prevent conv2d from changing image size
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Nour Aburaed
el 22 de Abr. de 2019
Comentada: Nour Aburaed
el 22 de Abr. de 2019
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 comentarios
Respuesta aceptada
Walter Roberson
el 22 de Abr. de 2019
Editada: Walter Roberson
el 22 de Abr. de 2019
conv2(A, B, 'same') or conv2(A, B, 'valid')
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!