Changes

Jump to navigation Jump to search
no edit summary
Line 89: Line 89:  
The last line is the actual search function. The search functions by finding the location with the smallest difference between the intensity(a(m,n)) and the fit function we apply to image.  We use a gaussian distribution with user defined parameters as our fit.  The code for this function is:
 
The last line is the actual search function. The search functions by finding the location with the smallest difference between the intensity(a(m,n)) and the fit function we apply to image.  We use a gaussian distribution with user defined parameters as our fit.  The code for this function is:
 
    
 
    
      function out=gauss2(x,y,p)
+
[[Image:Screenshot2.png|center|Matlab code used for image analysis]]
 
  −
        [xx,yy]=meshgrid(x,y);
  −
 
  −
        out=p(1)*exp(-0.5*((xx-p(2))/p(3)).^2-0.5*((yy-p(4))/p(5)).^2) + p(6);
      
The parameters p(1) to p(6) are, in numerical order, (1) the amplitude of the function, (2) x location, (3)sigma x, (4) y location, (5) sigma y, and (6) an offset applied to eliminate background noise.  The function takes user inputs as an initial guess, then loops the search process to find more accurate values for the parameters.  Arbitrary values are chosen for p(1), p(3), p(5) and p(6) to begin, and are then readjusted based on the first output parameters.  Typically, the closer these fit parameters are to the true parameters, the better the function is at defining p(2) an p(4).
 
The parameters p(1) to p(6) are, in numerical order, (1) the amplitude of the function, (2) x location, (3)sigma x, (4) y location, (5) sigma y, and (6) an offset applied to eliminate background noise.  The function takes user inputs as an initial guess, then loops the search process to find more accurate values for the parameters.  Arbitrary values are chosen for p(1), p(3), p(5) and p(6) to begin, and are then readjusted based on the first output parameters.  Typically, the closer these fit parameters are to the true parameters, the better the function is at defining p(2) an p(4).
 
By knowing the change in pixel location between photos, as well as th angular displacement, a value for pixel change per mrad in the x diection can be determined.  This process is then repeated for the y direction.  Once these two parameters are known, the video analysis can be used to find both frequency and amplitude.  
 
By knowing the change in pixel location between photos, as well as th angular displacement, a value for pixel change per mrad in the x diection can be determined.  This process is then repeated for the y direction.  Once these two parameters are known, the video analysis can be used to find both frequency and amplitude.  
   −
{| style="text-align:center; margin: 1em auto 1em auto"
+
{| border="0" align="center"
|-
+
|- align="center" valign="top"
| [[Image:false1b.png]] || [[Image:false2.png]]
+
| [[Image:false1.png|thumb|300px|]]
|
+
|| [[Image:false2.png|thumb|300px|]]
 +
|}
 +
 
 
    
 
    
 
+
<br>
 
==Video analysis ==
 
==Video analysis ==
 
The same process used for the calibration images can be used to analyze the motion of the center of the lens flare over time.  Because of the number of images involved in a video at 1200 fps, a batching process was developed to automate the process.  First, a built in Linux program, ffmpeg, is used to separate the images from the video.  Next, the automation script is applied to the folder containing the video stills.  This script uses the same code as the image analysis, but loops the search process through a large group of images.   
 
The same process used for the calibration images can be used to analyze the motion of the center of the lens flare over time.  Because of the number of images involved in a video at 1200 fps, a batching process was developed to automate the process.  First, a built in Linux program, ffmpeg, is used to separate the images from the video.  Next, the automation script is applied to the folder containing the video stills.  This script uses the same code as the image analysis, but loops the search process through a large group of images.   
196

edits

Navigation menu