The "CineFrameCleaner" is a program that allows to remove dirt spots, fluff amd other distortions from the scanned frames of a cine film. Additional functions of the program are a) the smooting of colors if these colors appear fluffy due to an image sharpening process and b) the crreation of video clips using FFMPEG.
The removal of the dirt is (as far as possible) supported by specific program features, but a fully automatic process is not possible, due to the lack of sufficiently strong criteria that allow to distinguish dirt from normal image content. Here the human decission capabilities must be used in order to find the image distortions.
The image cleaning is performed by presenting the scanned and stored film frames in the graphical user interface (GUI) of the program. The image to be cleaned appears in the left pane of the GUI in a standardized format (800x600 pixels, image ratio 4:3 - the standard ratio of cine films). In the upper right pane the preceeding image is presented in half the size of the left image and in the lower right pane the following image is presented also in half size. These images function as reference images to ease the detection of distortions. An identified distortion has to be marked in the left image with the mouse by drawing a red rectangle around this distortion. The dirt pixels will then be replaced by the corresponding pixels in the selected comparishion image.
back to the table of contentThe application is developed under MS Windows 10 using Visual Studio 2020, exploiting MS .NET 4.7.2
and Accord .NET 3.8.2. That means .NET 4.7.2 and Accord .NET 3.8.2 must be installed on your computer.
The application is delivered as a packed ZIP file (packed with 7Zip). The required Accord .NET files are included.
To install the application it is sufficient to unpack the file into a folder of your choice on you computer.
Recommended is to create a folder named "FrameCleaner" in "Program Files" folder on your computers C:/ drive.
To execute the application a Windows 64Bit operation system is desirable, but a 32 Bit operation system is also useable
if enough main memory is available. Recommended is Windows 7 or better.
To uninstall the application it is sufficient to delete the installation library. The Windows Repository is not used.
If your installation folder is "C:/Program Files/FrameCleaner" the invocation is either done via the command prompt
using the command "C:/Program Files/FrameCleaner/FrameCleaner.exe"
or via a shortcut on your desktop (see following picture):
Via the button "Change Icon..." you can set the broom symbol for the FrameCleaner shortcut
[ ].
It is located in the installation folder as file "besen32-32.ico".
As parameters for the program invocation you can provide 2 values:
Immediately after the FrameCleaner application has been invoked the empty main window is presented.
The main windows shows in the menu bar the menu entries to control the application.
This is the presentation language (if not already specified in the invoction command) as well the sub-items to determine
the first frame that has to be cleaned.
Below the menu bar the message field is located and below this the panes that show the images to be worked on.
In the lower part of the window the input fields and the buttons to control the program flow are located.
In the menu bar you find 3 entries: File, Functions and Help
Via submenu item "File -> Select language" the dialog to select the presentation language is invoked. Currently the languages English and German are implemented. Additional languages can be implemented. Users who are able to translate the text items into one of the foreseen languages are welcome to contact me. The support E-Mail address you will find on my homepage.
To define the desired language please klick onto the associated checkmark and klick onto button "return". This causes, that all values and labels in the GUI are changed to the desired language.
Via submenu entry "File -> Show INI content" the message box showing the actual valid parameters stored in the INI File is presented. Via button "OK" the messagebox is closed.
Via submenu entry "File -> Find image folder" the folder system standard dialog is invoked in order to select the
base directory in which all the available video projects libraries should be stored. In the video project libraries the
directories (named "FRAMES") containing the scanned video images should be found.
The name of the video projects base library may have been already preselected in the invocation command.
Via submenu entry "File -> Find start file" the file system standard dialog is invoked in order to determine the
image with which the cleaning process should start. Probably you have to navigate to the desired image directory.
Is the desired image folder selected, you have to mark the image, that should be the first image in the cleaning process.
Remark: If already a color smoothing process has been performed, you find here also the subfolder containing the "blured"
images (here "2B"). The "B" stands for blured !
In the right upper corner of the dialog window there is a little window icon
[ ].
if you klick onto this icon the offering for the available image selection forms falls down. A good selection is to use
"Large iconbs". This results in the presentation of the file content as shown in the above screenshot.
If the desired image has been selected, than via button "Open" the image and the two neighbouring images are read from the library and apresented in the window panes (see below).
back to the table of contentVia submenu entry "File -> Continue last session" the actual content of the INI File is read and used to initialize the program parameters. In the INI file is stored the last processed image of a previous session, which has been normally ended. The following image is set as actual image and this image and the surrounding images are read from the image library and used as start point for the new cleaning session process ( see the followin image).
Via submenu entry "File -> Exit" the actual cleaning process will be ended. All potentially open windows will be closed and all actual parameters are stored to the INI File on non volotile storage.
back to the table of contentBy clicking the "create AVS file" menu items a pseudo video file is generated in the project VIDEO folder that contains the parameters used to generate the final video file with VirtuaDub and AviSynth.
Sample Content: "ImageSource("E:\FilmProjekte\IT73\FRAMES\0\IT730%06d.JPG", start = 0, end = 1042, fps = 18, use_DevIL = false)"
The paramrters are: the URL Skeleton: "ImageSource("E:\FilmProjekte\IT73\FRAMES\0\IT730%06d.JPG",
the number of the start file (start = 0) and the number of the end file (end = 1042)
and the number of frame per second in the generated video (fps = 18) and the control parameter (use_DevIL = false).
By clicking the "FFMPEG Video creation" menu item the dialog controlling the video clip generation with FFMPEG is opened.
See: The FFMPEG Video Generation Dialog.
By clicking the "smooth image colors" menu item the dialog to smooth fluffy appearing image colors is opened.
See The image color smoothing dialog
By clicking the "Select image presentation program" menu item the Standard System Filei Searchdialog is opened. This allows to specify an installed Image Viewer (the associated EXE file) to verify the smoothing result. I recommend to use the image program IrfanView ( 32 bit or 64 Bit). See: IrfanView .
back to the table of contentVia submenu entry "Help -> About Frame Cleaner" the information window for the FrameCleaner is presented. Via button "return" the window will be closed.
Via submenu entry "Help -> Test for updates" a message is shown in the message line, which informs about the status of the actuallys used program.
Via submenu entry "Help -> Help document" the help document will be displayed. The window will be closed by clicking onto the "X" icon in the right upper window corner.
In the lower part of the main window is the area in which the important parameters are located. Here you find also the buttons and information fields important for the control flow of the cleaning process.
At the lower border of the GUI there are 8 buttons which control the flow of the cleaning process. These are:
At the lower border of the GUI there are a number of parameter input fields that control the cleaning process. These are:
For the evaluation of the image shift values an area inside the compare image must be defined in which the similarity comparision must take place. This area is defined by left, top, right and lower offsets from the image borders. The larger the border (the smaller the search area) the shorter is the duration of the search for the most similar area.
The process to clean a set of cine film frames stored in a image library is as follows:
After the FrameClenaer program has been invoked, first determine the film project base directory and the set the first
image to be cleaned.
This happens either via the menu items in the "File" menu (see Find start file
respectively the buttons in the main window (see Buttons).
Is the program call a continuation of a previously interrupted cleaning process, than the "File menu item"
Continue last session should be used.
In both cases in the program panes are shown the actual image (left big pane) and the previous and following images
(small panes at the right). In the actual image and in the compare image a yellow rectangle (aproximately in the
center of the image) is shown.
The presented images now must be checked visually if
Are in the frame distortions visible, than you have to mark these distortions. This is done using the left mouse
key. Position the mouse pointer above and left of the distorted area. Press and hold the left mouse key. Then position the
mouse pointer below and to the right of the distorted area and release the left mouse key. This draws a red rectangle
around the distorted area. The coordinates of the last marked area are shown in the information fields "sel. rect.".
Are additional distortions in the frame, than this selection process can be repeated up to 20 times. All selected
areas will be shown by red ractangles in the image and the corresponding smaller rectangles in the comparision image.
Hint: Is the height of a selected rectangle 8 times larger than the width (correction of a vertical scratch),
than the correction color is picked from the actual image as the average of the left and right pixel of a line.
Is the width of a selected rectangle 8 times larger than the height (correction of a horizontal scratch),
than the correction color is picked from the actual image as the average of the top and bottom pixel of a column.
Are all distortions identified and marked, than the cleaning of these areas will be triggered by proceeding to the next
frame (buttons "previous" of "following" frame).
The image will be cleaned and the cleaned frame will be shown as follow up frame in the blue marked small pane to the right.
In the last green line in the lower right window corner the number of replaced pixels will be displayed.
Alternatively to the marking of the distorted areas you can also (if serious distortions occur) replace the whole frame with the previous or the following frame. But you should do that only if no havy movements occur (especially not in the opposite direction of the main movements in the scene). Otherwise this will be very disturbing (images will jump backwards) when viewing the video.
As soon as all frames of a cine film have been cleaned, you can start generating the final video. For this process the following programs can be recommended:
FFMPEG is an extremely powerfull command line tool with no graphical user interface and with a lot of functions that can be exploited for the video clip generation. Due to this fact, CineFrameCleaner provides a GUI in a dialog the supports a user in the high quality video clip generation. This GUI is especially designed according to the needs of CineFrameCatcher and CineFrameCleaner.
The FFMPEG Video Generation Dialog supports the generation of high quality video clips from the (cleaned) images stored in an image subdirectory. The dialog is invoked from the "Functions" menu in the main program window. It takes over the important values from the cleaning process currently active - that is the image subdirectory path and the video directory path. But both variables can be changed/adjusted via the system folder selection dialog.
With the image color smoothing dialog you can carefully smooth the colors of a single image or a series of images in the image folder, if the colors appear fluffy due to an applied image sharpening action.
Three stages of color smoothing is suppoerted;
The smoothed images are stored in a subfolder with the suffix "B" for "blured". The original images are kept unchanged. This allows to replace all or some of the original frames with the smoothed frames.
With button "view smoothed" you can varify the smoothing result. But to do that you first have to set the image viewer to be exploited.
See Select image presentation program
With the convert images dialog you can convert negative black and white images to positive black and white immages (color images are currently not supported).
The converted images are stored in a subfolder with the suffix "C" for "converted". The original images are kept unchanged. This allows to replace all or some of the original frames with the converted frames.
With button "view images" you can varify the conversion result. But to do that you first have to set the image viewer to be exploited. See Select image presentation program