1 / 9

Announcements

Announcements. No office hours on Wednesday. Make up office hours Tuesday Friday class will be taught by Ravish Mehra . Final exam Mon Dec 10 12pm-3pm in SN014. Image manipulation (filtering). Discrete Convolution.

tegan
Download Presentation

Announcements

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Announcements • No office hours on Wednesday. Make up office hours Tuesday • Friday class will be taught by Ravish Mehra. • Final exam Mon Dec 10 12pm-3pm in SN014

  2. Image manipulation (filtering)

  3. Discrete Convolution • Let f be a 1xn matrix and g be a 1x m matrix. If h is the convolution of f with g. Then, • It actually is

  4. Smoothing • A is a preassigned row vector • imfilter(A, [1 1 1 1 1]/5) does uniform averaging • imfilter(A, [1 2 4 2 1]/10) is an example of weighted averaging, where the central element has a higher weight

  5. Finding cliffs/edges • A is a preassigned row vector • imfilter(A, [-1 1]) identifies cliffs. Equivalent to differentiating. • But differentiating increase noise • imfilter(A, [-1 -1 11]) identifies cliffs also suppresses noise • imfilter(A, [-1 -2 2 1]) weighted differentiating

  6. 2D smoothing • A is a matrix • imfilter(A,[1 1 1 1]/4) smooths along the rows (in the y-direction) • imfilter(A,[1 1 1 1]’/4) smooths along the columns (x-direction) • imfilter(A,ones(4,4)/16) smooths in all directions. • Remember: you are not restricted to uniform averaging. Try non-uniform kernels.

  7. Blurring Images • Download che_gray.jpg from the course page • Read it into Matlab using imread and convert into a matrix of doubles >> sub_im=im(1:4:end,1:4:end) >> imagesc(sub_im) >> surf(sub_im) >> surf(imfilter(sub_im,ones(5,5)/25)) • Smoothing is equivalent to blurring

  8. Motion blur • kernel=eye(10) • im_motion=imfilter(im,kernel); • imagesc(im_motion)

  9. Finding cliffs/edges • Find Cliffs facing North/South >>clfs_ns=imfilter(sub_im,[-1 -1 -1 1 1 1]) • Find Cliffs facing East/West >>clfs_ew=imfilter(sub_im,[-1 -1 -1 1 1 1]’) • All Cliffs >>clfs_all=sqrt(clfs_ns.^2+clfs_ew.^2)

More Related