Before getting started, ensure the below has been done:
- libcamera has been built for the target system, see here for steps.
- The System Reference with libcamera has been built for the target system, see here for steps.
- Ensure that the F´ GDS is running, the System Reference has been copied over to the Rapsberry Pi, and that the software is running. See steps here for more information.
- Open a new log file by sending the
saveImageBufferLogger.BL_OpenFile
command with a unique file name as the argument. For example:saveImageBufferLogger.BL_OpenFile, "Example"
- Configure the image resolution by setting the
IMG_RESOLUTION
parameter, which can be done by issuingcamera.IMG_RESOLUTION_PRM_SET
with desired resolution argument. Note: Keep track of the resolution used, since it will be referenced when processing the image data later on. For example:camera.IMG_RESOLUTION_PRM_SET, SIZE_800x600
- Capture frame data by sending the
camera.CaptureImage
command - Close the log file by sending
saveImageBufferLogger.BL_CloseFile
Now that image data has been captured and saved to disk, we now want to downlink the data so that it can be processed on the ground.
- Select the
fileDownlink.sendFile
and specify the source location of the file and the destination where the file should be stored on the ground. For example:fileDownlink.SendFile, "/home/pi/images/saveImageExample.dat", "saveImageExample.dat"
- In F´ GDS, click the Downlink tab to check the downlink status. Once the file has been downlinked, take note of the destination location specified under the "Destination" column.
Before getting started, ensure that the dependencies for running the ground tools have been installed, see here for more details.
From the project root, navigate to the ground tools directory: cd ground-tools
Process the image data as PNG by running:
python process_raw_image.py -i <.dat filename on ground> -r <image resolution, 640x480 or 800x600> -f PNG
Process the image data as JPEG by running:
python process_raw_image.py -i <.dat filename on ground> -r <image resolution, 640x480 or 800x600> -f JPEG
Processed images will be saved in the same directory as the input file as the input file name followed by the .png or .jpg extension.