Image subtraction with RTools

Image subtraction with RTools

How can one perform image subtraction using RTools?

RTools has an integrated way to do file subtractions by using a “background” file mechanism through the polyorder -1 and -2 data reduction modes.  This functionality will provide the ability for one to create a background image file and then reference that background image using the file format structure.  RView willl automatically read in image movies and subtract the background files to show contrast images between the target movie and background image when in “Radiance” data reduction mode. Please refer to the “Statistics and Calculation Algorithms” and “Edit Include File” section of the RView manual to help explain how to do this from within RView.

Another approach to setup a target movie with a background file is to use the SliceNDice utility found under Start>All Programs>RTools>Utilities. SliceNDice is a simple program that allows the user to input a movie and then average frames in the movie or slice a section of a movie out.  To generate a averaged background file and insert it into another movie as the backgoround file do the following:
1) Run the SliceNDice utility
2) Browse for movie file to be used to create a background file
3) Make sure second drop down is set to “Average”
4) Select Options button to get “Average Options” dialog
5) Check “Create Background File” and choose whether you want to go ahead this new background files as the background file to another target movie.
6) Then select OK
7) Verify which range of frames from the input background file that you want to average
8) Then click “Process” to average and generate the background file.
9) Go into RView and load the target movie and verify that the background file is applied.  Note that you must be in “Radiance” mode to see the file subtraction instead of RAW mode.