i want to create a block of size W * W is centered at pixel (i; j) in the image.

4 views (last 30 days)
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

Answers (1)

Image Analyst
Image Analyst on 2 Dec 2013
Edited: Image Analyst on 2 Dec 2013
windowHalfWidth = floor(W/2);
oneBlock = grayImage(i-windowHalfWidth : i+windowHalfWidth, j-windowHalfWidth : j+windowHalfWidth);

Categories

Find more on Images in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!