An Open Source Implementation of CCSDS-123-B-2, the Low-Complexity Lossless and Near-Lossless Multispectral and Hyperspectral Image Compression.
HyperC is an implementation of the CCSDS-123 B-2, designed to meet the FINCH-PayloadController-LosslessCompression requirement. The required Compression Speed is givenby the FINCH-PayloadController-CompressionSpeed requirement. The compression rate required is provided by the FINCH-PayloadController-CompressionRate requirement.
This project contains:
- Compressor
- Decompressor
- Hyperspectral Image formatting and generation
The raw hyperspectral image files are expected to be .uhi (Uncompressed Hyperspectral Image) files, which makes getting and storing individual pixels much faster than csv or mat files.
Compressed Images are stored in .vuf files (Variable Unsigned Files), which are capable of storing unsigned integers of any length less than 32 bits.
- August 31: Finish Preliminary C Implementation
- August 23: Present Progress to Industry Experts at Critical Design Review
- Remove Dynamic Memory Allocation
- Compile Project for ARM32, target: stm32h743zi
- July 6: Run Predictor on NUCLEO-H743ZI2 board without external memory
- July 6: Run Predictor on NUCLEO-H743ZI2 board with external memory
- August 6: Finish Encoder, Decoder, Reconstructor
Download the repository using the command:
git clone https://github.com/Kevin-Caldwell/CCSDS-Compression-C.git
The build system for this project is CMake. In order to assemble the binaries, run the commands
mkdir build; cd build
cmake .
make
The assembled binaries should be found in the build folder:
- hc-imgen
- hc-compress
- hc-decompress
Hyperspectral Image Tools are available in the hc-imgen executable. It provides a CLI for
- Image Generation using Perlin or Voronoi Noise
- Image Conversion from .csv to .uhi
- Image Conversion from .uhi to .csv
hc-compress is the Image Compressor, and the CLI Tags are:
-s
: Set Source File-d
: Set Destionation File-a
: Set Action (See Below)-D
: EnableDEBUG MODE
-l
: Set Log File
Actions describe all the functions you can execute using hc-compress. The list of possible actions are:
compress
: Compress an image in a .uhi file to a .vuf filepredict
: Run the predictor on an image. Input and output files are .uhiencode
: Run Encoder on an image in a .uhi file into a .vuf filetest-x
: Validate x (predictor, encoder, compressor, uhi, vuf)
- Source File:
../data/test-images/indian_pines.UHI
- Destination File:
../data/results/indian_pines.UHI
- Action:
predict
- Debug:
False
- Log File:
../data/logs/compressor.logs
The Decompressor has not been fully implemented yet.
Using the arm-none-eabi-gcc compiler, the build command for this project is
arm-none-eabi-gcc --specs=nosys.specs main/compressor.c src/**.c -I include -lm -o build/hc-compress
Documentation for all features have been documented in code, and can be compiled for Doxygen using the preset file Doxyfile0:
doxygen Doxyfile0
The documentation can be viewed by opening the doc/html/index.html
file in a browser.
Developed by Kevin Caldwell, Mirai Shinjo, Brian Tsoi and Lanlin He, assisted by the University of Toronto Aerospace Team (UTAT) Space Systems Team.
Developed for the Field Imaging Nanosatellite for Crop residue Hyperspectral mapping (FINCH) mission.