sliding window operation in image

조회 수: 2 (최근 30일)
VIJENDRA
VIJENDRA 2014년 6월 26일
댓글: Image Analyst 2014년 10월 10일
I have an image of size 256*256, i want to use 3*3 window which slides over image and change the value of central pixel as sum of neighbouring 8 pixels. Please Help.

채택된 답변

Image Analyst
Image Analyst 2014년 6월 26일
Try conv2(), imfilter(), nlfilter(), or, if you want to move in "jumps" instead of by one pixel, blockproc().
  댓글 수: 3
VIJENDRA
VIJENDRA 2014년 10월 9일
one can use nlfilter or blockprop.
Image Analyst
Image Analyst 2014년 10월 10일
Sorry, for some reason I didn't see your follow up question from June until now. Please see my demo of nlfilter where you can have it perform your own custom operation/filter on the window at each location.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by