problem of applying block processing function
显示 更早的评论
my image is gray scale image of 100*120. my programme is
*fun=@(x) x.*2;
B = blkproc(I,[4 4],[1 1],fun);*
when i'm looking for 1st sub block it gives only a single number, it equals to the twice of (1,1) pixel value of original image. can't i get the twice of 1st 4*4 block.is it possible or not.
采纳的回答
It gives a single number but you can multiply by ones(blockSize) to expand it. See the attached demos scripts.
8 个评论
can you please edit my codes.thanks.
my 1st sub block is[1 12 3 5;34 78 9 4;1 2 3 4;5 6 7 8]; when i'm run my programme,it gives only 2 for the out put of B(1,1).but i want to get this[2 24 6 10;68 156 18 8;2 4 6 8;10 12 14 16].how can i get this.
Image Analyst
2013-9-20
编辑:Image Analyst
2013-9-20
I don't know what you're doing. You didn't attach your code. Can't you figure it out from the two examples I gave you? No need to accept an answer until your problem is solved.
sorry.i dont know how to figure out this.
Figure what? Figure out how to download and run the two well-commented examples I included? Just click on the filenames, type control-a, control-c, go to an empty/new editor window in MATLAB, and type control-v, then click the green triangle. Go here for more help http://www.mathworks.com/matlabcentral/answers/8026-best-way-s-to-master-matlab
It gives the error message ??? Undefined function or method 'blockproc' for input arguments of type 'function_handle'.
Error in ==> Untitled at 44 blockyImage8 = blockproc(single(grayImage), blockSize, medianFilterFunction);
You must have a really, really old version of MATLAB. It had a different name back then, something like blkproc, blkprc, or something like that. You need to find out what it's called in your ancient version of MATLAB. Or just upgrade.
I,m working with R2009a,it uses blkproc. but is there any method in matlab to find the old codes.
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息
另请参阅
2013-9-20
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
