using convolution on a basic matrix block
2 ビュー (過去 30 日間)
古いコメントを表示
Hi, In my program I have to use a mask and use conv2 on a big matrix (can be 20,000x20,000). this big matrix is built from smaller basic matrix, where i use the repmat to create the bigger one. I want to find a way to use conv2 on the smaller matix to save computing time and the use the repmat fuction. the problem is that the result in not the same even if I use 'same'. the reason is that at the boundries of the smaller matrix the mask only "feels" the end of the matrix thus the overlap becomes smaller, while in the bigger one the mask will also "feels" the continuation. I have thought of using a bigger basic matrix and after convolution take only the inner part of it and the duplicating it, but i fear of discontinuation. What I need is that the end of the top and bottom boundaries to be a continuation of each other, and the same goes for left and right boundaries. suggestions???
0 件のコメント
回答 (2 件)
Image Analyst
2017 年 12 月 17 日
Not sure what you want. Do you want that the window shrinks as you get close to the edge? Or it pretends that there is data outside the image? Both conv2() and imfilter() have a number of options for handling computation near the edges. Perhaps you want the 'replicate', 'circular', or 'symmetric' option of imfilter().
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!