(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
Additional information for the first lab (if you are still unsure of what FIR and IIR):<br/>
 
  
Compiler: Read through "Makeflie" and google "linux make"<br/>
+
==<font size= 6>Discussion for Lab 1, [[ECE637]], Spring 2013</font size>==
FIR: consider a sliding window pass through the entire image defined as h(m,n) that could be transformed to H(u,v)<br/>
+
==Additional Information ==
IIR: H(u,v) is defined as Y(u,v)/X(u,v) which is transformed from y(m,n)/x(m,n)<br/>
+
* 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)
Some easy checks you could perform yourself: <br/>
+
* IIR: H(u,v) is defined as Y(u,v)/X(u,v) which is transformed from y(m,n)/x(m,n)
Low Pass Filter: Smoothing (less sharp edges or details but reduces some static noise)<br/>
+
* Some easy checks you could perform yourself:  
High Pass Filter: Sharping (clear edge and enhance details but also emphasize noise)<br/>
+
** 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
+
  
 +
* 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:<br/>
 
Question 1:<br/>
 
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.<br/>
 
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.<br/>
 
+
----
 
Question 2:<br/>
 
Question 2:<br/>
 
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].<br/>
 
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].<br/>
 
+
----
 
Question 3:<br/>
 
Question 3:<br/>
 
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 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.
Line 31: Line 28:
 
   }
 
   }
 
}return(out);
 
}return(out);
 
+
----
 
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.<br/>
 +
----
 +
Question 5:<br/>
 +
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:<br/>
 +
How do you include a tif figure using pdflatex or latex? !<br/>
 +
----
 +
==Q&A Section: ==
  
'''Hello Shao,'''  
+
;'''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.
  
'''Question: Is the diracdelta convoluted with the original image just the original image?'''
+
[[2013_Spring_Image_Processing_ECE_637_Bouman|Back to Spring 2013 ECE637]]
 
+
[[Category:Image ProcessingECE 637Spring2013Bouman]]
g(m, n) = diracdelta (m, n) + (deracdelta (m, n) − h(m, n))
+
[[Category:ECE637]]
 
+
[[Category:image processing]]
so from a programming point of view would g(m,n) convoluted with the original image be:  
+
[[category:discussion]]
 
+
'''"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/>
+
 
+
Question 5:<br/>
+
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.
+

Latest revision as of 07:09, 9 April 2013

Discussion for Lab 1, ECE637, Spring 2013

Additional Information

  • 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