Data Compression

Image Compression

Peiliang taught me about image compression through Piecewise-Linear Compression.

At NVIDIA Isaac ROS, we have https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_compression/tree/main

Which uses dedicated hardware acceleration NvEnc to do it.

In the MIT-PITT-RW repo (in avt_vimba_api), we do this right now

  if (publish_compressed){
      compressed_image.header = image.header;
      compressed_image.format = "jpeg";
      cv::imencode(".jpg", output_mat, compressed_image.data,
        std::vector<int>{
          cv::IMWRITE_JPEG_QUALITY, 90
  }

2 standard formats:

  • PNG (lossless compression)
  • JPEG (lossy compression)

Fourier Image Compression

Learned this through CS370.

Take the 2D FFT of image intensities, threshold the magnitudes of the Fourier coefficients and discard small ones, as in 1D. Store only coefficients, and do IFFT when you want to view it again.