Smooth out Image Vector in Matlab -
i have image converted vector , plotted:
img = imread(image.png'); grayimage = rgb2gray(img); grayimage(2:2:end,:)=fliplr(grayimage(2:2:end,:)); b = rot90(grayimage); c = flipud(b); [x,y]=size(c); vector = reshape(c ,1,x*y); plot(vector); the problem although can visually see wave pattern, there lot of noise occurs. noise mean signals rapidly go , downwards forming sinusoidal wave want able connect crest of each spike 1 in order create continuous wave pattern. if understands trying do, help appreciated.
thank in advance.
not 100% sure you're asking, medfilt1 median filter function might you're looking for, it's 1d smoothing filter. illustration usage be:
vector_filt = medfilt1(vector); check out documentation , illustration @ http://www.mathworks.com/help/signal/ref/medfilt1.html.
matlab image-processing
No comments:
Post a Comment