7.3 To CaptureandDetect

Once you have your camera fixed in the right direction with a valid Calibrationfile you can start to capture and to detect moving objects for a given duration or with the Sun below a certain level under the horizon.

On a routine night you will:

  • Run FTP_CaptureDonglesAndDetect.exe with archive flag = 1 (copy)
  • After the observations run FTP_MeteorCalAutoUpdate.exe  to obtain a new calibration file valid for the observing night.
  • Run FTP_ApplyCal2DetectInfo.exe
  • Run FTP_Confirmation.exe. The resulting confirmed DetectionInfo can be found under the Confirmation folder of this night (e.g. FTPdetectinfo_03830399_2017_09_01_23_31_04C.txt)
  • Compress your FTPdetectinfo-file and the applied calibration files in a zip file:
  • Mail the zip file to the network coordinator.

We describe each of these programs below.

7.3.1 FTP_CaptureDonglesAndDetect.exe

To start capturing video frames at a rate of 25 per second in 10,24 second duration bin-files of 256 frames each.

  • Start FTP_CaptureDonglesAndDetect.exe
  • Enter the archive flag: enter 1 to copy FF-files or 2 to move FF-files to the Archive folder (–1 to capture without detection, 0 not to copy or not to move).
  • Enter the processor count for the detection processes (recommended 1).
  • Enter the position of the Sun below the horizon when the capture should start/end, most put 8, a positive number indicates the time in hours to run, e.g. 4.25 would let the capture run for 4 hours and a quarter. Decimal dot must be used for fractions of hours, do not use comma.
  • Enter the CAMS directory location (most common is C:).
  • The program will create a new folder “yyyy_mm_dd_hh_mm_ss” under C:\CAMS\CapturedFiles.
  • The program will end automatically and generate a log file with the number of dropped frames listed at the end.

Figure 41 – Screenshot of the input window of FTP_CaptureDonglesAndDetect.exe.

The program FTP_CaptureDonglesAndDetect.exe allows you to capture frames at a rate of 25 per second in respective bin-files of 256 frames during 10,24 seconds. These binfiles are very compact binary compressed image files each having a size of ~1.2 Megabyte. An average night produces about 1–3 Gigabyte of data per camera. This program will store few thousands of bin files into the folder ‘\CapturedFiles’.

All suspected bin-files are copied or moved under the directory ‘C:\CAMS\ArchivedFiles’ and will need a visual verification by the camera operator to distinguish between meteors and ‘false detections’. In general less than 10% of all detections concern real meteors. Planes, birds, insects and clouds generate false detections. With unstable weather circumstances and quickly passing clouds the number of false positives can amount to many thousands of detections.

More about FTP_CaptureDonglesAndDetect by Pete Gural

Capture, compress, detect from single dongle to eight dongles.

Input files: CameraSites, LASTSETTINGS, ReprocessParameters, CAL*, DonglesConfig
Output files: CaptureStats.log, CaptureTimesBlock.log, CaptureTimesF2F.log, CameraTimeOffsets, FTPdetectinfo*
FTP_CaptureDonglesAndDetect can be run by double clicking on the executable or via a batch file command line.

IMPORTANT NOTE:  This program is interfaced specifically to USB dongle(s)!

Clicking on the FF_CaptureDongles executable icon will go into interactive mode where the dongle configuration file is specified in DonglesConfig.txt. Inputs include the archive flag enable detection and if enabled, where to put candidate detection FF files, the number of child detection processes to be spawned, the duration of the capture in hours, and the drive letter/folder under which a CAMS directory and subdirectories are created or already exist.

There are several options for the duration with early exit if the disk availability is limited and the maximum number of FF files has been reached. If the duration is  greater than zero, the capture starts immediately and stops after the designated “duration” time in hours has elapsed. If the duration entered is zero, the user is prompted to manually start and stop the capture process. The capture will end automatically if the max number of FF files is reached or 24 hours has elapsed.

If the duration entered is negative, the program computes the period of time when the Sun is more than the absolute value of the duration (entered now in degrees) below the local horizon. The program will wait in an idling loop until the sun dips low enough to the user designated angle and then starts capturing. It will run continuously until the user angle limit before dawn, OR the maximum number of FF files is written.

The app now uses DonglesConfig.txt for its input parameters (FrameGrabConfig.txt is no longer used).

The archive_flag options determine if the FF files with detections are moved or copied as follows:

  • 0 = Not moved and not copied from CapturedFiles folder
  • 1 = Copies from CapturedFiles to ArchivedFiles folder
  • 2 = Moved from CapturedFiles to ArchivedFiles folder (no longer in CapturedFiles)
  • -1 = No detection processing performed, FF files are in CapturedFiles

IMPORTANT NOTE – The CameraSites.txt file will need to be in the ..\CAMS\Cal\ folder and populated with the info for all the cameras starting with the user specified camera number, so that the program knows the latitude and longitude of  the camera’s site for Sun angle calculations.

Various options for the command line entries:

Executable_name  archive_flag  camera_number  #detect_processes  duration_in_hours  drive_letter/folder:
FTP_CaptureDonglesAndDetect                   User prompted for archive, processor count, duration, main data directory
FTP_CaptureDonglesAndDetect   1               User prompted for process count, duration, main data directory
FTP_CaptureDonglesAndDetect   1  4            User prompted for duration, main data directory, 4 detection processes to be run
FTP_CaptureDonglesAndDetect   1  4  0.0       User prompted for manual capture start and stop, main data directory
FTP_CaptureDonglesAndDetect   1  0  9.5       User prompted for main data directory and runs for 9.5 hours, no detection processing
FTP_CaptureDonglesAndDetect   1  4 -6.0       User prompted for main data directory and runs while sun is 6 deg below horizon
FTP_CaptureDonglesAndDetect   1  4  7.2  D:   No user prompts and runs for 7.2 hours starting immediately, puts data in D:\CAMS\…
FTP_CaptureDonglesAndDetect   1  4 -8.0  D:   No user prompts and runs while sun is 8 deg below horizon, puts data in D:\CAMS\…

A folder is created for saving the FF files based on the date/UT time at the start of the executable. The higher level directory is always user specified and the \CAMS\CapturedFiles\ is appended along with the start date and time. For example, cameras 101–104 whose process starts on Jan 5, 2011 3:11:05 UT and the directory specified was D:\Test would have FF*.bin files  placed into the folder D:\Test\CAMS\CapturedFiles\2001_01_05_03_11_05\ for cameras 101 through 104 inclusive.

The code also looks for a Calibration directory as …\CAMS\Cal\. So for the example given, the calibration folder is expected to be D:\Test\CAMS\Cal. If not found then the user is prompted for the folder.

This program launches daughter processes to perform detection processing. Up to #detect_processes can be running simultaneously, so be careful as processor load balancing should be considered to ensure sufficient CPU resources are available to capture/compress as well as detect. Examination of the dropped frame statistics may help gauge if more/less processors should be allocated to detection given the number of CPU cores and processing speed.

Error return codes

  • 0 – Normal completion
  • 10 – Memory not allocated for working arrays
  • 11 – Critical section not initialized
  • 16 – Writing FF thread not created
  • 17 – Writing FF thread could not begin
  • 20 – Detection thread not created
  • 21 – Detection thread could not begin
  • 22 – Could not open output log file
  • 27 – Twilight calculation error for very high latitudes

More about FTP_CaptureFourAndDetect by Pete Gural

Capture, compress, detect from 4 channel Sensoray 2255 runs with a single detection thread for multiple channels.

Input files: CameraSites, LASTSETTINGS, ReprocessParameters, CAL*, FrameGrabConfig
Output files: CaptureStats.log, CaptureTimesBlock.log, CaptureTimesF2F.log, CameraTimeOffsets, FTPdetectinfo*
FTP_CaptureFourAndDetect can be run by double clicking on the executable or via command line.

IMPORTANT NOTE: It is based on the Sensoray 4 channel 2255 capture device.

Clicking on the FTP_CaptureFourAndDetect executable icon will go into interactive mode where the user enters the archive flag, camera numbers, the duration of the capture in hours, and the drive letter/folder under which a CAMS directory and subdirectories are created or already exist. There are several options for the duration with different consequences associated with disk availability. The archive flag options are to use zero for no copy of FF files even with detections, unity to copy FF files containing detections to the archive folder, or two to move (not copy) FF files with detections. To  suppress the detection processing thread and only capture and compress with FF files placed in the CapturedFiles folder only, use an archive flag of less than zero (e.g. –1).

If the duration is greater than zero, the capture starts immediately and stops after the designated “duration” time in hours has elapsed, OR the disk space remaining is less than 100 Megabytes. The user is notified at capture start if the duration exceeds the available disk space but will start capturing anyway and stop after leaving the 100 Mbyte margin.

If the duration entered is zero, the user is prompted to manually start and stop the capture process. The capture will end automatically if the remaining free disk space falls below 100 Mbytes.

If the duration entered is negative, the program computes the period of time when the Sun is more than the absolute value of the duration (entered now in degrees) below the local horizon. The program will wait in an idling loop until the Sun dips low enough to the user designated angle and then starts capturing. It will run continuously until the user angle limit before dawn, OR the disk space  remaining is less than 100 Megabytes. The user is notified at program start if  the captured file space will exceed the available disk space, but will attempt to capture nonetheless until reaching the 100 Mbyte margin.

IMPORTANT NOTE – The CameraSites.txt file will need to be in the …\CAMS\Cal\ folder and populated with the info for the user specified camera number, so that the program knows  the latitude and longitude of the camera for sun angle calculations.

Various options for the command line entries:

Executable_name  archive_flag  cam#1  cam#2  cam#3  cam#4  #detect_processes  duration_in_hours  drive_letter/folder:
FTP_CaptureFourAndDetect                                  User prompted for archive flag, camera numbers, process count, manual capture start and stop, main data directory
FTP_CaptureFourAndDetect  1                               User prompted for camera numbers, process count, manual capture start and stop, main data directory
FTP_CaptureFourAndDetect  1  23  24  25  26               User prompted for process count, manual capture start and stop, main data directory
FTP_CaptureFourAndDetect  1  23  24  25  26  2            User prompted for manual capture start and stop, main data directory
FTP_CaptureFourAndDetect  2  23  24  25  26  2  0.0       User prompted for manual capture start and stop, main data directory
FTP_CaptureFourAndDetect -1  23  24  25  26  2  9.5       User prompted for main data directory and runs for 9.5 hours, no detection processing
FTP_CaptureFourAndDetect  1  23  24  25  26  2 -6.0       User prompted for main data directory and runs while sun is 6 deg below horizon
FTP_CaptureFourAndDetect  1  23  24  25  26  2  7.2  D:   No user prompts and runs for 7.2 hours starting immediately
FTP_CaptureFourAndDetect  2  23  24  25  26  2 -8.0  D:   No user prompts and runs while sun is 8 deg below horizon

A folder is created for saving the FF files based on the date/UT time at the start of the capture. The higher level directory is always user specified and the \CAMS\CapturedFiles\ is appended along with the start date and time. For example, a capture that starts on Jan 5, 2011 3:11:05 UT and the directory specified was D:\Test would have FF*.bin files placed into the folder D:\Test\CAMS\CapturedFiles\2001_01_05_03_11_05\

The code also looks for a Calibration directory as …\CAMS\Cal\. So for the example the calibration folder is expected to be D:\Test\CAMS\Cal. If not found then the user is prompted for the folder.

Error return codes:

  • 0 – Normal completion
  • 1 – Capture thread 1 timed out while trying to write FF file
  • 2 – Capture thread 2 timed out while trying to write FF file
  • 3 – Capture thread 3 timed out while trying to write FF file
  • 4 – Capture thread 4 timed out while trying to write FF file
  • 5 – Main timed out waiting for capture thread 1 to finish frame
  • 6 – Main timed out waiting for capture thread 2 to finish frame
  • 7 – Main timed out waiting for capture thread 3 to finish frame
  • 8 – Main timed out waiting for capture thread 4 to finish frame
  • 9 – Main timed out waiting for capture thread 1 to fully wrap up
  • 10 – Main timed out waiting for capture thread 2 to fully wrap up
  • 11 – Main timed out waiting for capture thread 3 to fully wrap up
  • 12 – Main timed out waiting for capture thread 4 to fully wrap up
  • 13 – Main timed out waiting for writing thread 1 to fully wrap up
  • 14 – Main timed out waiting for writing thread 2 to fully wrap up
  • 15 – Main timed out waiting for writing thread 3 to fully wrap up
  • 16 – Main timed out waiting for writing thread 4 to fully wrap up
  • 17 – Main timed out waiting for process thread to fully wrap up
  • 18 – Memory not allocated for working arrays
  • 19 – Critical sections not initialized
  • 20 – Capture 1 thread not created
  • 21 – Capture 1 thread could not begin
  • 22 – Capture 2 thread not created
  • 23 – Capture 2 thread could not begin
  • 24 – Capture 3 thread not created
  • 25 – Capture 3 thread could not begin
  • 26 – Capture 4 thread not created
  • 27 – Capture 4 thread could not begin
  • 28 – Writing 1 thread not created
  • 29 – Writing 1 thread could not begin
  • 30 – Writing 2 thread not created
  • 31 – Writing 2 thread could not begin
  • 32 – Writing 3 thread not created
  • 33 – Writing 3 thread could not begin
  • 34 – Writing 4 thread not created
  • 35 – Writing 5 thread could not begin
  • 36 – Process thread not created
  • 37 – Process thread could not begin
  • 38 – Could not open output log file
  • 39 – No video capture devices (Sensoray 2255) found
  • 40 – Video device number exceeds 2255 device count minus one
  • 41 – Unable to set up video capture channel 0
  • 42 – Unable to set up video capture channel 1
  • 43 – Unable to set up video capture channel 2
  • 44 – Unable to set up video capture channel 3
  • 45 – Twilight calculation error for very high latitudes

More about FTP_Capture8AndDetect by Pete Gural

Capture, compress, detect from 8 chan Sensoray 812/1012 Multiple daughter detection processes – exe required: FTP_DetectSingleFF.exe

Input files: CameraSites, LASTSETTINGS, ReprocessParameters, CAL*, Sensoray812_config*
Output files: CaptureStats.log, CaptureTimesBlock.log, CaptureTimesF2F.log, CameraTimeOffsets, FTPdetectinfo_0001_Subset.txt to #processors used.
Note that detectinfo files need to be merged via FTP_CombineDetectinfo

FTP_Capture8AndDetect can be run by double clicking on the executable, or use a batch file command line.

IMPORTANT NOTE:  This program is interfaced specifically to the Sensoray 812 board.

Clicking on the FF_Capture8 executable icon will go into interactive mode where the user enters the parameter configuration file for the frame grabber Sensoray 812 unit, the archive flag to do detection and where to put the candidate detection FF file set, the first camera number of 8 sequentially numbered cameras, the number of child detection processes to be spawned, the duration of the capture in  hours, and the drive letter/folder under which a CAMS directory and subdirectories are created or already exist.

There are several options for the duration with early exit if the disk availability is limited and the maximum number of FF files has been reached. If the duration is greater than zero, the capture starts immediately and stops after the designated “duration” time in hours has elapsed. If the duration entered is zero, the user is prompted to manually start and stop the capture process. The capture will end automatically if the max number of FF files is reached or 24 hours has elapsed.

If the duration entered is negative, the program computes the period of time when the Sun is more than the absolute value of the duration (entered now in degrees) below the local horizon. The program will wait in an idling loop until the Sun dips low enough to the user designated angle and then starts capturing. It will run continuously until the user angle limit before dawn, OR the maximum number of FF files is written.

The archive_flag options determine if the FF files with detections are moved or copied as follows:

  • 0 = Not moved and not copied from CapturedFiles folder
  • 1 = Copies from CapturedFiles to ArchivedFiles folder
  • 2 = Moved from CapturedFiles to ArchivedFiles folder (no longer in CapturedFiles)
  • –1 = No detection processing performed, FF files are in CapturedFiles

IMPORTANT NOTE – The CameraSites.txt file will need to be in the …\CAMS\Cal\ folder and populated with the info for all eight cameras starting with the user specified camera number, so that the program knows the latitude and longitude of the camera’s site for Sun angle calculations.

Various options for the command line entries:

Executable_name  config_filename  archive_flag  camera_number  #detect_processes  duration_in_hours  drive_letter/folder:
FTP_Capture8AndDetect                                              User prompted for config, archive, 1st camera num, process count, duration, main data directory
FTP_Capture8AndDetect  Sensoray812_config.txt                      User prompted for archive, 1st camera num, process count, duration, main data directory
FTP_Capture8AndDetect  Sensoray812_config.txt  1                   User prompted for 1st camera num, process count, duration, main data directory
FTP_Capture8AndDetect  Sensoray812_config.txt  1  23               User prompted for process count, duration, main data directory
FTP_Capture8AndDetect  Sensoray812_config.txt  1  23  4            User prompted for duration, main data directory, 4 detection processes to be run
FTP_Capture8AndDetect  Sensoray812_config.txt  1  23  4  0.0       User prompted for manual capture start and stop, main data directory
FTP_Capture8AndDetect  Sensoray812_config.txt  1  23  0  9.5       User prompted for main data directory and runs for 9.5 hours, no detection processing
FTP_Capture8AndDetect  Sensoray812_config.txt  1  23  4 -6.0       User prompted for main data directory and runs while sun is 6 deg below horizon
FTP_Capture8AndDetect  Sensoray812_config.txt  1  23  4  7.2  D:   No user prompts and runs for 7.2 hours starting immediately, puts data in D:\CAMS\…
FTP_Capture8AndDetect  Sensoray812_config.txt  1  23  4 -8.0  D:   No user prompts and runs while sun is 8 deg below horizon, puts data in D:\CAMS\…

A folder is created for saving the FF files based on the date/UTtime at the start of the executable. The higher level directory is always user specified and the \CAMS\CapturedFiles\  is appended along with the start date and time. For example, cameras 101-116 whose process starts on Jan 5, 2011 3:11:05 UT and the directory specified was D:\Test would have FF*.bin files placed into the folder D:\Test\CAMS\CapturedFiles\2001_01_05_03_11_05\ for cameras 101 through 116 inclusive.

The code also looks for a Calibration directory as …\CAMS\Cal\. So for the example the calibration folder is expected to be D:\Test\CAMS\Cal. If not found then the user is prompted for the folder.

Error return codes

  • 0 – Normal completion
  • 10 – Memory not allocated for working arrays
  • 11 – Critical section not initialized
  • 16 – Writing FF thread not created
  • 17 – Writing FF thread could not begin
  • 20 – Detection thread not created
  • 21 – Detection thread could not begin
  • 22 – Could not open output log file
  • 27 – Twilight calculation error for very high latitudes
  • other – Sensoray error codes – refer to their software manual for the 817 board

More about FTP_Capture16AndDetect by Pete Gural

Capture, compress, detect from 16 channel Sensoray 817 Multiple daughter detection processes – exe required: FTP_DetectSingleFF.exe

Input files: CameraSites, LASTSETTINGS, ReprocessParameters, CAL*
Output files: CaptureStats.log, FTPdetectinfo_0001.txt to #processors used
Note that detectinfo files need to be merged via FTP_CombineDetectinfo

FTP_Capture16AndDetect can be run by double clicking on the executable, batch file command line.

IMPORTANT NOTE:  This program is interfaced specifically to the Sensoray 817 board.

Clicking on the FF_Capture16 executable icon will go into interactive mode where the user enters the first camera number of 16 sequentially numbered cameras, the number of child detection processes to be spawned, the duration of the capture in hours, and the drive letter/folder under which a CAMS directory and subdirectories are created or already exist.

There are several options for the duration with early exit if the disk availability is limited and the maximum number of FF files has been reached. If the duration is greater than zero, the capture starts immediately and stops after the designated “duration” time in hours has elapsed. If the duration entered is zero, the user is prompted to manually start and stop the capture process. The capture will end automatically if the max number of FF files is reached or 24 hours has elapsed.

If the duration entered is negative, the program computes the period of time when the Sun is more than the absolute value of the duration (entered now in degrees) below the local horizon. The program will wait in an idling loop until the Sun dips low enough to the user designated angle and then starts capturing. It will run continuously until the user angle limit before dawn, OR the maximum  number of FF files is written.

IMPORTANT NOTE – The CameraSites.txt file will need to be in the …\CAMS\Cal\ folder and populated with the info for all sixteen cameras starting with the user specified camera number, so that the program knows the latitude and longitude of  the camera’s site for sun angle calculations.

Various options for the command line entries:

Executable_name  camera_number  #detect_processes  duration_in_hours  drive_letter/folder:
FF_Capture16                   User prompted for 1st camera num, process count, duration, main data directory
FF_Capture16  23               User prompted for process count, duration, main data directory
FF_Capture16  23  4            User prompted for duration, main data directory, 4 detection processes to be run
FF_Capture16  23  4  0.0       User prompted for manual capture start and stop, main data directory
FF_Capture16  23  0  9.5       User prompted for main data directory and runs for 9.5 hours, no detection processing
FF_Capture16  23  4 -6.0       User prompted for main data directory and runs while the sun is 6 deg below horizon
FF_Capture16  23  4  7.2  D:   No user prompts and runs for 7.2 hours starting immediately, puts data in D:\CAMS\…
FF_Capture16  23  4 -8.0  D:   No user prompts and runs while the sun is 8 deg below horizon, puts data in D:\CAMS\…

A folder is created for saving the FF files based on the date/UTtime at the start of the executable. The higher level directory is always user specified and the \CAMS\CapturedFiles\  is appended along with the start date and time. For example, cameras 101-116 whose process starts on Jan 5, 2011 3:11:05 UT and the directory specified was D:\Test would have FF*.bin files placed into the folder D:\Test\CAMS\CapturedFiles\2001_01_05_03_11_05\ for cameras 101 through 116 inclusive.

The code also looks for a Calibration directory as …\CAMS\Cal\. So for the example the calibration folder is expected to be D:\Test\CAMS\Cal. If not found then the user is prompted for the folder.

Error return codes

  • 0 – Normal completion
  • 10 – Memory not allocated for working arrays
  • 11 – Critical section not initialized
  • 16 – Writing FF thread not created
  • 17 – Writing FF thread could not begin
  • 20 – Detection thread not created
  • 21 – Detection thread could not begin
  • 22 – Could not open output log file
  • 27 – Twilight calculation error for very high latitudes
  • other – Sensoray error codes – refer to their software manual for the 817 board