Performing 2D convolution
이전 댓글 표시
Hello,
I am new to image processing and had a conceptual question. I am currently trying to perform a 2D convolution of an image and a kernel (filter) in simulink using the 2D convolution block. I have code that transposes the image, then flips it, then performs the 2D convolution with the kernel. However from my (very limited) understanding convolution already flips the filter that I want to apply. I was told that the output of me transposing and flipping the image, then convolving with the kernel looks correct, however from my understanding I would be transposing and flipping the image once then convolving, which involves another flip, so therefore not actually convolving? I have read that this would just produce instead a correlation?
Hoping someone who knows more may be able to help give me a better understanding.
Thank you!
채택된 답변
추가 답변 (1개)
Image Analyst
2025년 9월 9일
0 개 추천
@William Rose gave a good answer. Bottom line, I wouldn't do anything to your image in advance. Simply call conv2 and pass it the original image. Or you can call imfilter. It doesn't flip the kernel (not sure you need to, and don't for simple things like low pass or high pass filters) and imfilter gives you additional options for how edge computations are computed.
카테고리
도움말 센터 및 File Exchange에서 Image Filtering에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
