How to design convolution kernals?
이전 댓글 표시
Design convolution kernels
i. Translating image
ii. Invert the image
iii. Rectify the image
iv. Subtract from each pixel the value of the mean of the contiguous surrounding pixels.
v. Highlight vertical edges by taking a derivative in the horizontal direction only.
vi. Embossing effect below and to the right of image features.
vii. Flip the image left to right.
viii. Make a single kernel to cascade operations i) and ii) above.
Invent and implement and algorithm to determine the amount and direction of shift between the images in ct.jpg and ctshift.jpg.
Please provide a listing of your code, and the shift in both i and j.
댓글 수: 6
Bjorn Gustavsson
2022년 10월 13일
This is one example of how I make a QD low-pass filtering kernel:
fK1 = [.25 .75 1 .75 .25];
fK = conv2(fK/3,fK'/3,'full');
That should illustrate that step in your homework.
HTH
Jiby
2022년 10월 13일
Bjorn Gustavsson
2022년 10월 14일
Sure use that convolution-kernel on your homework assignment image and see what it produces. Then modify it somewhat and see what a convolution with that modified kernel leads to. Then read the textbook and lecture notes, think and ponder.
To increase your chances to get detailed code solving your homework tast you should heed the advice by Steven Lords comment here.
DGM
2022년 10월 14일
Look up a Prewitt or Roberts filter, figure out why it does what it does. Can it be used to answer one of these?
What does fk = [0 0 0 0 1] do?
Consider fk = [0 0 0; 0 1 0; 0 0 0] - [1 1 1; 1 0 1; 1 1 1]/8. Which case does that satisfy? Do you see why?
Remember that convolution is associative; that should provide a means to answer #8.
Note that image()/imagesc()/imshow() will truncate values if they're outside the expected display range, so don't let that confuse you.
Jiby
2022년 10월 15일
Jiby
2022년 10월 15일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!