i want to create a block of size W * W is centered at pixel (i; j) in the image.
4 次查看(过去 30 天)
显示 更早的评论
hi friends i am having a problem and like to solve it step by step
i want to create a block of size W*W and then make it centered at pixel(i,j) of an image. this is the first step i want to do now..
any links , code , tutorials will make me happy and appreciate your answer,
plz help me guys
0 个评论
回答(1 个)
Image Analyst
2013-12-2
编辑:Image Analyst
2013-12-2
windowHalfWidth = floor(W/2);
oneBlock = grayImage(i-windowHalfWidth : i+windowHalfWidth, j-windowHalfWidth : j+windowHalfWidth);
For blocks covering the entire image, see the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_split_an_image_into_non-overlapping_blocks.3F
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!