필터 지우기
필터 지우기

image manipulation with moving window.

조회 수: 3 (최근 30일)
mahesh chathuranga
mahesh chathuranga 2013년 10월 4일
댓글: Image Analyst 2013년 10월 4일
i have a image of 256*256 and i have a moving window with (5*5).i want to move this moving window through out my original image,then i want to obtain new image.it's replace the one 5*5 block of the original image into one pixel.is there any method to insert some specific functions to the moving window.(like mean,median)

답변 (1개)

Image Analyst
Image Analyst 2013년 10월 4일
Try this:
% Sliding mean:
windowSize = 5;
kernel = ones(windowSize, windowSize);
outputImage = conv2(double(grayImage), kernel, 'same');
If you want median, you can use blockproc (let me know if you need demos), or you can use nlfilter() in the Image Processing Toolbox if you want to do some custom operations within the window.
  댓글 수: 2
mahesh chathuranga
mahesh chathuranga 2013년 10월 4일
can you please give me demos.thank you
Image Analyst
Image Analyst 2013년 10월 4일

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

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by