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!