CineFrameCatcher - Help

CineFrameCatcher Version 2.0 2020-06-21 ---- Copyright © Wolfgang Kurz, 2020

Table of Content

Introduction

The CineFrameCatcher is a program to support the digitization of cine films in 8 mm,  9,5 mm (Pathé) and 16 mm format. 9.5 mm and 16 mm formats are currently implemeted but not fully tested, because I have not the ressources to do that. At that point I want to thank Lawrence Cockell who supported me especially in the area of Pathé and Arduino testing.

The frames of a cine film are caught separately by a video capturing device (digital microscope or similar) and stored with consecutive numbers in a frames directory to allow later (in a separate step) to generate a video in SD or HD format with a video generation program (e.g. VirtualDub together with AviSynth)

to the table of content

Hardware Prerequisites

To catch the frames of a cine film you need a special hardware which is unfortunately not available as fully assembled device that can be bougth. It must be crafted by yourself, but this is not very difficult if you have a little crafting experiance.

As components to build the device you need:

1. A digital microscope.

2. A stepper motor to move the film through the transportation unit

3. A stepper controller

4. A sprocket wheel with 8, 10, 16, 20 or 25 sprockets

5. A illumination unit.

6. A power supply.

7. A 5 Volt DC (direct current) motor (optional)- probably with a gearbox .

8. A 4 way focusing rail

A complete transportation unit



The microscope is placed above the frame window using the 4 way focusing rail. It can be moved precisely in all 3 dimensions with this device. This allows an exact positioning above the frame window and a perfect focusing of the lens can be achieved. Good focusing is very important, because the depth of field is minimal for a focus length of only several millimeters. You must be able to precisely move the microscope up and down within a range of 100 to 200 micrometer.
The film is guided below the microscope and above the illumination chamber on a film guidance rail. For the film guide see image below.



Below the film guidance and the microscope the light chamber is located. Inside the light chamber there is the illumination unit (light bulb). Between light bulb and frame window you may have to apply a diffuser (e.g. a piece of bright white paper - 80 to 160 gr) to achieve an evenly illuminated area as background for the frame to be grabbed.

Left of the light chamber there is the transportation unit located. It is shown here whit a grabber. Instead of the grabber you can also use the sprocket wheel which is like the grapper driven by the stepper motor.

Even more to the left you see the capture reel which is driven here by a transmission. If you like, a 5 Volt DC motor can also be used. It will be controlled via the StepRocker. The CineFrameCatcher provides the required electronic signals to the StepRocker.

to the table of content

Software Prerequisites, Installation and Invocation

The CineFrameCatcher is a Windows application developed using MS Visual Studio Community 2019, C# as programming language and .NET Framework 4.6.1 as class library (the runtime components of .NET 4.6.1 or better must be installed, to run the application properly). The components of the Accord .Net Library 3.8.0 must also be installed (the required components are contained in the distribution file) and if the Arduino board shall be used, the components of the Solid.Arduino Library (it is also contained int the distribution file) must be installed as well.
The application can be run on a computer with a MS Windows operating system (Windows 7 or higher, preferably Windows 10 64 Bit). You can the application also install under a Virtual Machine (Oracle Virtual Box or VMWare ...).

The application is delivered via an installation file compressed by 7-Zip. To install the application, it is sufficient to unpack the installation file into an installation directory of your choice, e.g. to C:/Windows/Programs/CineFrameCatcher.
The Windows registry is not used.
For potential updates it is normally sufficient to replace the CineFrameCatcher.EXE file in the installation directory.
De-Installation is simply done by deleting the installation directory with all it's content.

For the program invocation you can create a desktop shortcut. Suitable icons to identify the shortcut easily are provided via the installation file.
Annotation: The application is protected against multiple invocation. It can be executed on a computer only once. An attempt to run the application simultaneously a second time will be postponed, until the first invocation has been terminated.

In the desktop shortcut you can provide three invocation parameters:

  1. A logging control character. "0" = Logging switched off and "1" = Logging switched on. 
  2. the execution languages supported are currently"EN" for English and "DE" for Deutsch (German).
    and
  3. the path to an existing directory (the base directory), into which the application files (the project directory with their subdirectories "FRAMES" and "VIDEO") are placed which are created for each project.

To set a new and meaningfull desktop icon in the shortcut, you can use the icons provided in the installation directoy.


to the table of content

Running the Program

Starting the Application

The application is started either

  1. via the EXE file (eventually as described in the example below with the shown invocation parameters) in the batch command window. Take care about the installation directory!
    Example for the batch invocation command C:/Programs/CineFrameCatcher/CineFrameCatcher.exe "EN" "1" "E:/FilmProjects"
    or
  2. via the desktop shortcut as described above.

As already mentioned, the application can be active only once to prevent images that should be grabbed to be overwritten.

to the table of content

The Main Window

The first window presented is the main window. It provides a menu bar and a message field as well as all required input fields to control the frame capturing, grouped into 3 categories.

The Menu Bar in the Main Window

the menu bar contains three main groups: 1. File, 2. Options and 3. Help

The menu "File" comprises 3 entries.

  1. Select language
  2. Create new project
  3. Exit

The menu "Options" comprises 7 entries.

  1. Generate AVS File for VirtualDub
  2. Show actual parameters
  3. Erase all images in the image subdirectory
  4. Enable logging
  5. Disable logging
  6. Show logfile content
  7. Clear Logfile content

The menu "Help" comprises 4 entries.

  1. Stepper positioning
  2. CineFrameCatcher Help
  3. Test for updates
  4. About CineFrameCatcher

File menu items

Options menu items

to the table of content

The Project Parameter Pane

The project parameter pane shows all input fields related to and describing the catching project.

Field names and field functions


Buttons of the project parameter pane

to the table of content

The Transport Parameter Pane

The transport parameter pane shows all input fields related to and describing the film transportation during Catching project performance.

Field name and field function

to the table of content

The Video Device Parameter Pane

The video device parameter pane contains the input fields and buttons to describe the required parameters and actions for the frame grabbing.

Field names and field functions

to the table of content

The buttons are:

  1. find video device - already described above. See; find video device and camera resolution.

    You should select the target resolution before pressing this button, because as soon as the video device and the camera resolution is set, the video device ist automatically prepared (warmed up) and the frame definition dialog is started after a certain warming up time. If the colors of the image still seem not to be fully OK in t he upcoming frame definition pane, you should press the "c Img. position" button in the window. See later !

  2. The button FrameDefinition  activates the "Frame Definition Dialog".
  3. reset  -  this button resets the form to the default field contents as actually stored in the INI File..
  4. exit -  by pressing ths button you leave the application, It is the same function as triggerd by the "File -> Exit" menu.

to the table of content

Preparing the frame (size and color) for grabbing

After the video capture device is started and warmed up, the frame size and color definition window is presented. It shows the first grabbed image as seen by the video catching device (the microscope).

define position

If no image could be scanned (probably because the microscope is not switched on) a notification image appears that informs you about what might have happened. I also might help to adjust the brightness threshold (default value 220). This is the color at which the sprocket hole evaluation process decides, which pixels are considered to be bright or dark. A sprocket hole border is asumed if there is a significant change in the brightness of consecutive pixels.

Focusing

If the image does not fit properly into the window, you have to reposition the grabbed frame in the windows picture box. This can be achieved by clicking the button "start image positioning" at the left bottom corner in the Frame Definition Window.  If this button is clicked, the window shows the image actually captured by the video capture device. You now can correct the position by moving it up and down using the 4 way focusing rail. You should position the image in such a way, that for S8 footage at least half the sprocket hole is visible at the left side of the window. Red lines tell you where the sprocket hole should appear approximately. If an old extraction definition exists, it is shwon by a white rectangle.

Focusing

Special care has been taken, if a sprocket wheel is used for transportation and if Pathé footage has to be scanned. 9.5 mm films have the sprocket hole in the middle of the film and not at the left border.
The left image shows the image position, that should be achieved as start position. The blue area is the definition window rectangle.
Due to the inaccuracy of the stepper motor it might happen, that the scanned images move up and down. Therefore the magnification should selected in such a way that 2 sprocket holes (or parts thereoff) allways will be visible .
You may see during scanning positions of the sprocket holes that are a combination of 2 red or a a red and a green hole as shown in the right image.

Focusing Focusing

Similar things can happen for film types, where the sprocket holes are located at the left windows side but at the image separation line (16mm or N8 / R8).

If no pre-stabilisation is pssible (no sprocket hole visible or sprocket hole misplaced), it is sufficient to set the magnification in such a way, that no borders appear in the picture box.

With the microscope you adjust the focusing and the magnification. With the focusing rails you correct the image position ( up, down., left, right, eventually a rotation). If the result is acceptable, you can terminate the correction process and return to the definition dialog by pressing the button "stop image positioning" in the left lower corner of the window.

As we deal with very tiny position changes, this task is not easy.
You have to perform this process very accurately and it needs significant training to do the job with the required precission.

If you'r pleased with the image position, you have to set the extraction size. This is done by clicking the button "img. pos and size". You can set the desired section with the left and right mouse button.
First click with the left mouse button in the image at the position, the left upper corner of the final image should be. Two yellow lines show what has been selected.
Then click with the right mouse button in the image at the position, the right lower corner of the final image should be. Now a yellow rectangle defines the extraction area.
If yuo are not satisfied with this rectangle, you can repeat the selection by clicking the middle mouse button. The previous selection will be ignored.

The part of the image which will be caught is now shown in the "Define image extraction and image color correction" dialog by a yellow rectangle. If the area is not correctly as you want it, you can fine adjust this area via the numeric up and down fields.
6 values can be modified via these fields:

The yellow marked image area and the red extraction size text is updated with each change of a value. The window than looks like this:
The correction values are applied via the fields below the picture box.

With the adjust color and adjust appearance sliders you can correct the colors, brighness, saturation and the contrast of the images. To visualize the changes you may click the adjust image button !   The selected values are carried foreward the the extraction process where they are applied to the grabbed images.
With the return button you can go back to the CineFrameCatcher main window.

If the image colors and borders are correctly set, you can start the image catching process by clicking the Start recording button. Make sure, that the yellow rectangle is visible when pressing this button.

to the table of content

Control and monitor the image catching

As soon as the Start Recording button is pressed in the frame definition dialog

With the microscope you adjust the focusing and the magnification. With the focusing rails you correct the image position ( up, down., left, right, eventually a rotation). If the result is acceptable, you can terminate the correction process and return to the definition dialog by pressing the button "stop image positioning" in the left lower corner of the window.

As we deal with very tiny position changes, this task is not easy.
You have to perform this process very accurately and it needs significant training to do the job with the required precission.

If you'r pleased with the image position, you have to set the extraction size. This is done by clicking the button "img. pos and size". You can set the desired section with the left and right mouse button.
First click with the left mouse button in the image at the position, the left upper corner of the final image should be. Two yellow lines show what has been selected.
Then click with the right mouse button in the image at the position, the right lower corner of the final image should be. Now a yellow rectangle defines the extraction area.
If yuo are not satisfied with this rectangle, you can repeat the selection by clicking the middle mouse button. The previous selection will be ignored.

The part of the image which will be caught is now shown in the "Define image extraction and image color correction" dialog by a yellow rectangle. If the area is not correctly as you want it, you can fine adjust this area via the numeric up and down fields.
6 values can be modified via these fields:

The yellow marked image area and the red extraction size text is updated with each change of a value. The window than looks like this:
The correction values are applied via the fields below the picture box.

With the adjust color and adjust appearance sliders you can correct the colors, brighness, saturation and the contrast of the images. To visualize the changes you may click the adjust image button !   The selected values are carried foreward the the extraction process where they are applied to the grabbed images.
With the return button you can go back to the CineFrameCatcher main window.

If the image colors and borders are correctly set, you can start the image catching process by clicking the Start recording button. Make sure, that the yellow rectangle is visible when pressing this button.

to the table of content

Control and monitor the image catching

As soon as the Start Recording button is pressed in the frame definition dialog the "Image grabbing controller" window opens with the image as grabbed by the microscope as first image.

Pressing the "start" button will start the grabbing process. From this point in time the images are shown in the progress dialog in their final form as they will be stored in the target folder for video clip generation.(see right picture)

The dialog is invoked from the Start Recording button in the definition dialog.
It shows the the target directory into which the scanned frames are stored.
The second line shows the name of the image actually processed.
The third line shows the name of the last image to be captured, and it indicates, that the frames are retrieved from a video device ("V")

There are 3 buttons.

  1. The left button has 3 functions:
    • start starts the grabbing process at the the beginning of the grabbing session .
    • pause interrupts a running grabbing process
    • continue continues an interrupted grabbing process.

    this button changes its label according to the process state. At the beginning it says START. If you click the button with the START label, the grabbing process is started and the label is changed to "pause" processing. When the process is interrupted, you can go to the definition window or the main window to make changes - eg. change the number of images still to be processd or change the image color.
  2. The button "-> main window" transfers the control (for the mouse) to the main window and
  3. the button "to define window" transfers the control (for the mouse) to the definition window

There are 2 check marks.

  1. The checkmark "color adjustment" triggers color adjustment for the grabbed images according to the settings in the definition window. If the button is not clicked, no color adjustment is performed.
  2. The checkmark "shutdown" tell the program, that the computer should be powered off after the grabbing session has finished. This is usefull for unattended over nicht sessions.

In the main window a progress report is given, which shows, how many frames per minute are grabbed and an estimate, when the grabbing session might be completed.
In the message area also sometimes a message shows up, that notifies the observer, that the operating system has performed a garbage collection. This is to explain, why sometimes the frame grabbing seems to pause unintetionally.

to the table of content

Last change: June 21, 2020 WK