MATLAB: How to Slide a 3X3 window across a pixel of the image in matlab. slide window I have an binary image I want to slide 3*3 window across it. Best Answer Block processing? conv2 or imfilter all are sliding window concept. Related SolutionsMATLAB: Function for Calculating Moving sum For a "moving" sum - the sum in a window - you can use conv(), or conv2() in two dimensions:windowWidth = 15; % or whatever.movingSum = conv(oneDsignal, ones(1, windowWidth));for the moving average:windowWidth = 15; % or whatever.movingAverage = conv(oneDsignal, ones(1, windowWidth) / windowWidth); MATLAB: Count each row white pixels from the bottom to the top The loop is unnecessary.% First element of counts is the last row count:counts(size(BW,1):-1:1,:) = sum(BW == 1,2);or you can simply use:counts = flipud(sum(BW == 1,2)); Related QuestionHow to find bifurcation and termination points in fingerprintHow to find sum of all pixels in rows whose value is 1How to write code for 3×3 sliding window to process over a Image with Pixel size of 256×256
Best Answer