Prev: building matrix with diffrent rows length
Next: using trap to numerically integrate between bounds
From: matlabnew on 14 Feb 2010 04:08 Hi, I have a question about imnoise and de-moise of matlab problem. The question is as below. Create noisy images, using imnoise(im, ‘salt&pepper’, lvl) from Matlab, using levels 0.01, 0.02, 0.03 and 0.04 Show de-noising results with Average and Median filters of size 3x3, 5x5 and 11x11. Do not use the imfilter(), nor the medfilter function from Matlab. Have your own implementation by creating a convolve function Show Matlab code here: function [im2]=convolve(im, mask) For about question, I know that how to imnoise, but I do not know how to de-noising because there are not permit to use imfilter() and medfilter function. I need to create own function myself. I would like to ask how to create function ' function [im2] = convolve(im,mask)' to de-noising image. Could anyone give me a guide for me. Thank you for your kind helpful. Thank you very much
From: Wayne King on 14 Feb 2010 07:31 matlabnew <haditmu(a)gmail.com> wrote in message <ca04bc08-c592-4763-9cd5-3fba85b429a0(a)x1g2000prb.googlegroups.com>... > Hi, I have a question about imnoise and de-moise of matlab problem. > The question is as below. > > Create noisy images, using imnoise(im, ‘salt&pepper’, > lvl) from Matlab, using levels 0.01, 0.02, 0.03 and 0.04 > > Show de-noising results with Average and Median filters of size 3x3, > 5x5 and 11x11. Do not use the imfilter(), nor the medfilter function > from Matlab. Have your own implementation by creating a convolve > function > > Show Matlab code here: > function [im2]=convolve(im, mask) > > > For about question, I know that how to imnoise, but I do not know how > to de-noising because there are not permit to use imfilter() and > medfilter function. I need to create own function myself. I would like > to ask how to create function ' function [im2] = convolve(im,mask)' to > de-noising image. Could anyone give me a guide for me. > > Thank you for your kind helpful. > > Thank you very much Hi, The general rule here about helping people with homework is that help is given only when the poster shows some code indicating specific parts of the problem they are stuck on. For example, you explain your algorithm, but perhaps one line is throwing an error, or you are having trouble coding a particular loop. There are some very knowledgeable image-processing people here (ImageAnalyst for one) and they will gladly help you if you show them what you've done. If you have not written MATLAB programs before, start with the MATLAB Getting Started Guide under Programming and watch the "Writing a MATLAB Program video demo". As a hint for your program, look at the MATLAB functions filter2() and conv2(). Wayne
From: ImageAnalyst on 14 Feb 2010 11:30 The dumb, brute force method of doing these is simple - you can find (pseudo)code in many places - if you need to. Basically you have a nested pair of for loops (over all rows and all columns). Then at each specific (row,column) location you have another nested pair of for loops where you scan over the rows and columns of the sliding window. In there you'll sum for convolution and sort for median. That's enough to get started, although that's so basic and simple I think you probably already knew that. So write back with specific code where it doesn't produce the correct results or gives an error message.
|
Pages: 1 Prev: building matrix with diffrent rows length Next: using trap to numerically integrate between bounds |