Tify is an application for the automated rejection of image frames based on scoring techniques. Included is a basic instruction set that should help you in the installation and operation of this application.
The application can run either by downloading this project and running using Visual Studio, or installed via a ClickToRun installer which is available here: https://www.dropbox.com/sh/95s5f1h1qbamq1v/AACNe8nSrJEWI3Br7kFdF7rla?dl=0 [compiled: 11/03/2019]. Some people report having problems exporting videos, due to problems with the Accord.Video.FFMPEG library. This can often be resolved by installing the Visual C++ Redistributable for Visual Studio 2015, which is available from Microsoft (https://www.microsoft.com/en-us/download/details.aspx?id=48145).
Tify is designed to help select good and bad images from a stack of images. The primary use is for detecting and removing motion afflicted frames in large image stacks, although technically the application can be used in any instance where you have a large number of images which contain poor quality frames that you would like to remove.
You load images by simply locating the file in which the stack is contained, and then selecting one of the images. Tify will then tell you how many images meet the pattern specified in the file path box - to load a stack, use a wildcard (asterisk) to mark where the frame number is located in the file name. The application will update the count for the number of files that meet the specified pattern. Once the correct number of files are showing, click on Import. Tify uses ImageMagick (via Magick.NET) to load images, so you can use any format which ImageMagick can read.
The most important part of the workflow of Tify is the provision of manual scores by users. To do this, click on the score that you would assign each frame, from zero to 5. If Advance on click is selected, then after each frame score, the current field will advance by one allowing you to quickly provide scores for a stack. If you enter a score incorrectly, simply either use the mouse wheel and the Current Image count box to return to that frame and score it again.
Sometimes it is easier to count images with modifications made, for instance, image thresholding or a LUT applied. To alter these characteristics, open Image Manipulation and adjust the Threshold, noise and LUT values respectively. The statistics for each image are calculated on import so changes here do not affect the calculations and values held in memory. Once set, click on Update one to update the current image. Once you're happy, click on Update all to apply the settings to all images. The changes to images are applied to the source file, so changes do not compound.
Once the images are scored, Tify is then in a position to calculate coefficients. To do this there are two options; either a) manually define the model using the statistics and intitution or b) allow Tify to perform an automated stepwise regression. To perform manual modelling, click Do MLR. This will present to you the coefficients and, more importantly, the p value for each variable. You can then include and exclude variables by clicking on the Y (or N if you need to change it back) and redoing the calculation. Once you are happy with the model, click on Apply and Tify will use the calculated coefficients to derive calculated image scores for each frame. You can check these by scrolling between images and checking the values in the Listbox on the statistics tab. To do an automated modelling, click on Do SWMLR. Tify will work through its stepwise regression protocol until it arrives at a model that fits this process (more information about this is available in the associated manuscript, which can be found in this folder). You can use previously calculated coefficients and models if this is suitable for your work. To save your current coefficients, click on Save Coefficients and choose a location. Equally, to load old coefficients click on Load Coefficients. They are not automatically applied, you need to click on Apply to work out calculated scores. When using old coefficients, sometimes the calculated values are well correlated with human scores, but they are range shifted. To bring these values back into the 0-5 range, click on Range calculated scores. This will set the lowest score to 0, the highest score to 5, and then the remaining values will be adjusted to fall within this range.
You can choose what the lowest quality score you will accept is from the slider on the main page. To see the image playing without your excluded frames, ensure that Skip excluded frames is selected. You can manually remove frames by clicking on the Included button until it goes red. Note, if you move the slider again (the cutoff value) then your manual selections will be forgotten.
Frame windowing is an option that allows you to select image frames by selecting the best scored image from a rolling window. This allows you to retain a chronological link between frames and thus for timelapses, retain this information. To select a frame window, choose a window size and click on Apply Window. If you have a cutoff selected, Tify will show you the best window it can achieve using this cutoff value. However, it will pay no regard to this value when applying the windowing - the best frame in each window width will be selected regardless of this setting.
Tify allows you to either (a) export the image as a video or (b) as individual files. The output format for images can be selected from the dropdown menu in the application. When choosing to save a video, note that the application will always save this in Raw format in an AVI container. Users should, if they want to use other formats, change the video codec used by the Accord.Video element in the application. The available formats can be changed to anything in the Accord.FFMPEG VideoCodec enumeration (http://accord-framework.net/docs/html/T_Accord_Video_FFMPEG_VideoCodec.htm).