Still Capture from Composite Video Input

From BATC Wiki
Revision as of 19:31, 16 August 2017 by G8GKQ (talk | contribs)
Jump to navigation Jump to search

Software version 201708150 introduces basic "still capture from video" capabilities. This enables full resolution (720*576) .jpgs to be captured from the PAL composite video input to the EasyCap. This is an initial capability, and improvements are envisaged for subsequent releases.

Current Capability

On Menu 3, there are 3 relevant buttons:

Snap

Touching the snap button initiates the capture of 3 frames (not fields) from the EasyCap. All 3 frames are saved to memory (actually a tmpfs folder /home/pi/tmp) and the 3rd frame is copied to the folder /home/pi/snaps with a sequentially numbered filename. The first 2 frames are generally incomplete, so are discarded. The captured image is displayed on the touchscreen, until it is touched again, when it returns to Menu 3.

View

On touching the view button, it starts saving frames from the EasyCap to memory and then displaying them on the touchscreen as quickly as it can. The rate is about 1.1 frames per second. Touching the screen again returns the display to Menu 3.

This facility enables the EasyCap input to be checked. It is hoped to increase this frame rate AND provide a "Snap" facility from this screen, but this is not implemented yet. Other methods of video display might provide a better frame rate, but would not have the capability to provide a "Snap" facility.

Check

The "Check" button enables the most recent 5 frames to be viewed on the touchscreen. Touching the screen moves to the next image, until after the 5th, when Menu 3 is displayed again. Review of images before the most recent 5, requires the use of a computer.

Accessing the Captured Images

All the captured images (from the "Snap" button) are permanently stored in the folder /home/pi/snaps on the Raspberry Pi. The easiest way to access these images is to use a Windows application called WinSCP which can be downloaded from https://winscp.net/eng/download.php. Connect your RPi to the same network as your computer and log-in to the RPi using WinSCP. You can then copy the images from the /home/pi/snaps folder to your Windows computer. Note that there is also a file called snap_index.txt in the folder which contains the index number of the next image to be stored.

If you want to clear all the images off your RPi, simply delete them and set the number in snap_index.txt back to 0. If you have a 16 GB memory card, there is currently enough free space for at least 40,000 images, but I would suggest deletion at about the 1000 mark!