Line 34: Line 34:
 
Question 4:<br/>
 
Question 4:<br/>
 
Same as Q3, just keep in mind this is a high pass now.
 
Same as Q3, just keep in mind this is a high pass now.
 
'''Hello Shao,'''
 
 
'''Question:  Is the diracdelta convoluted with the original image just the original image?'''
 
 
g(m, n) = diracdelta (m, n) + (deracdelta (m, n) − h(m, n))
 
 
so from a programming point of view would g(m,n) convoluted with the original image be: 
 
 
'''"original image" + lamda * ("original image" - "original image" convoluted with "h(m,n)"'''
 
 
My confidence in subject is not going well.
 
 
Thanks,  Richard  rboettch@purdue
 
  
 
<br/>
 
<br/>

Revision as of 18:38, 20 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.

Alumni Liaison

Abstract algebra continues the conceptual developments of linear algebra, on an even grander scale.

Dr. Paul Garrett