Tangra 1.4


 
  TANGRA     VIDEO RENDERING     PHOTOMETRY     PRE-PROCESSING     TRACKING     LIGHT CURVES     ASTROMETRY     ADD-INS     LICENSE     DOWNLOAD  

Pre-Processing


There are a number of ways in which the video data can be enhanced before it is processed. In many cases this can impove the S/N ratio for example for the purpose of detecting an occultation or to improve the PSF fit for the purpose of astrometric measurement. The pre-processing includes stretching, clipping, brightness/contrast adjustments, software integration, reverse gamma correction and applying digital filters.

Stretching is when a brightness level interval from the source data is stretched to the full range of brighness levels in the resulting data. With this all pixels fainter than the lower end of the interval and all pixels brighter than the upper end of the interval will be excluded from the resulting data. Stretching can be useful when looking for small brightness variations because it will magnify the change of the brightness and will make magnitude drops easier to detect.

Clipping is a similar technique but this time the source brightness interval is left as it is and again all fainer and brighter pixels are excluded from the resulting data. This may be useful for excluding background noise from the image. It can be also useful for normalizing a YUV Rec.601 video data where no white stretching has been applied. There are two ways the stretching and clipping pre-processing can be defined - by using a fixed window, where an integer magnification is selected, or by specifying custom lower and upper end of the intervals.



Even that there is no integration used, the three faint stars that are close to the center are visible much better with stretching (middle image below) than without stretching (first image below). This is because small brightness changes have been stretched to appear much bigger/brighter. Clipping on the other side can be useful when looking for small magnitude drops on reasonably bright objects. The clipping can remove all faint pixels and make the background noise to be almost zero. Then the background variations will affect less the small magnitude drop detection. Click on the images for a larger view.

No Stretching/Clipping Stretching x3 (0-85 => 0-255) Clipping 15-235


Another pre-processing technique is the usage of software integration - which is a frame stacking done to get more signal and reveal fainter stars as well as removing the background noise due to its random nature. Integration comes with a loss of timing precision but for really faint targets 2 or 3 frame integration could be quite powerful with neglectible timing precision loss (for the vast majority of the chord lengths).

  Integration comes in two flavours - stepped and sliding. In the case of a stepped averaging N frames (x + 1, ..., x + N) will be averaged and the resulting frame will be used when measuring the frames from x + 1 to x + N. With this all N measurements will have the same value, reduced from the integrated (averaged) frame.

In the case of sliding integration (sliding averaging or also moving averaging) each frame x will have unique measurement which will be derived from the frames x - N/2, x - (N/2 - 1), ..., x - 1, x, x + 1, ..., x + (N/2 - 1), x + N/2.

There are two methods for deriving the resulting value of the integrated pixels - Mean and Median. The Mean value is computed considerably faster and is the default method. The Median pixel averaging works slower and doesn't give significantly better results in the standard cases. In theory in cases of considerable background noise and small number of integrated frames the Median method should give more accurate results though.

Frame integration could be also used to go 'deeper' with smaller scopes and non integrating video cameras.


The three images below show the effect of 8 frame and 32 frame integration.

No Integration Integrating 8 Frames Integrating 32 Frames


Gamma correction usually is applied to analogue video signal in the video camera before the signal is transmitted so the device that displays the video (the monitor) can correctly represent the brightness levels of the original recorded picture. Gamma correction makes the intensity non linear and unless gamma is reversed beforehand, stellar magnitudes derived from intensity based ratios will be incorrect. On the other hand gamma corrections can be used as stretching to enhance the fainter part of the brightness levels. This can be very helpful when trying to detect small magnitude drops and works best if a gamma (0.45 or 0.35) is applied in the video camera and is then not reversed in Tangra (gamma of 1.00 is used). Alternatevly when no gamma is applied in the video camera a similar effect can be achieved by reversing a gamma of 1.22 in Tangra. This will work as an exponential stretching (rather than linear stretching when the Stretching pre-processing is used in Tangra) and will make smaller magnitude drops in the fainter end easier to detect.

Differently than the other pre-processing options so far, gamma is configured in the General Settings form in Tangra.

   


The three images below show a frame from a video recorded with no gamma and then having gamma of 1.22 and 0.45 reversed in Tangra.

No Gamma Gamma 1.22 Gamma 0.45


Standard brightness and contrast adjustments can be done as a pre-processing step. The values for the brightness are varied from 0 to 255 and the values for contrast go from -100 to +100.

   


The images below compare two frames, one with and the other one without brightness/contrast adjustments made.

 
No Brightness/Contrast Brightness/Contrast Applied  


   


Tangra supports low pass and high pass pre-processing digital filters. These are the Low Pass (LP) filter and the Low Pass Difference (LPD) filter (LPD is a high pass filter). Digital filters can be beneficial when doing both astrometry and light curve extraction. LPD filter can help when measuring very faint stars and LP filter can help with long running occultation events and with astrometry.

 
No Filter (plus brightness/contrast) Low-Pass Filter (plus same brightness/contrast)  


Dark and Flat field correction


The licensed version of Tangra also supports dark and flat frame correction. It allows dark/flat frames to be created from a video file and then those frames to be used to correct a video for darks/flats.