(No difference)

Revision as of 09:32, 25 January 2013

Additional information for the first lab (if you are still unsure of what FIR and IIR):

Compiler: Read through "Makeflie" and google "linux make"
FIR: consider a sliding window pass through the entire image defined as h(m,n) that could be transformed to H(u,v)
IIR: H(u,v) is defined as Y(u,v)/X(u,v) which is transformed from y(m,n)/x(m,n)

Some easy checks you could perform yourself:
Low Pass Filter: Smoothing (less sharp edges or details but reduces some static noise)
High Pass Filter: Sharping (clear edge and enhance details but also emphasize noise)

Rule of thumb:If your image doesn't look like it is doing what it is supposed to do, it is probably wrong. In this case, you want to first make sure your MATLAB functions shows the right result before C Then check all your buffers with compilation


Question 1:
The folder downloaded from the course website includes a "Makefile" that could be used by running "make" in linux systems. For the VC++ users, please include all the libraries needed to compile the code.

Question 2:
If your image is not displaying correctly, make sure your data format is correct. If not, cast it into the correct. A common mistake would be forget to limit the min and max values to [0,255].

Question 3:
For the analytic solution, check out http://en.wikipedia.org/wiki/Sinc_function. When plotting H(u,v), remember the pattern repeats itself @ [-pi,pi], and you are sampling in frequency domain accordingly.

For FIR filter implementation, I would recommend writing a function such as:

double conv2d(int x, int y){

 for(every pixel in the filter box){
   %grab the near by pixel by converting the coordinates in memory
   %multiply and add the values
 }

}return(out);

Question 4:
Same as Q3, just keep in mind this is a high pass now.

Question 5:
PSF is equivalent to computing the impulse response for the particular image. More information can be found on http://en.wikipedia.org/wiki/Point_spread_function. To compute a IIR filter, write a feedback loop in C, you do NOT need to use the PSF result.

Question 6:
How do you include a tif figure using pdflatex or latex? !

Q&A Section:

Q: Lab1,Section 5 (IIR Filter) part2:
I am having an issue setting up the PSF of filter h(m,n) by applying a 256x256 input image x(m, n) = diracDelta�(m−127, n−127).
Is the input image supposed to be in Tiff format with this applied to RGB layers? Would this input image only have a pixel value of 1 in uint8 format for R,G, and B layers at x(127,127) pixel location?
I am able to apply this filter to input images and have a burring effect but I cannot seem to create a PSF of h(m,n).

A1: Export the result to a TIFF file using the following scaling: imwrite(uint8(255*100*h),’h_out.tif’)
A2: It would be easier to create an image in matlab to set the center value to be (255,255,255) and save accordingly to generate the PSF.

Back to Spring 2013 ECE637

Alumni Liaison

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood