Package htw.ai.dln

Class AptDecoder

  • All Implemented Interfaces:
    IAptDecoder

    public class AptDecoder
    extends java.lang.Object
    implements IAptDecoder
    Since:
    : 21.02.21
    Version:
    : 1.0
    Author:
    : Enrico Gamil Toros Project name : apt-decoder
    • Field Summary

      Fields 
      Modifier and Type Field Description
      boolean isInteractive  
    • Constructor Summary

      Constructors 
      Constructor Description
      AptDecoder​(Apt apt)
      Apt decoder
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int[] decode()
      APT Decoder Decodes an audio to an image Result will be the raw decoded image (no sync) or corrections The Result will depend a lot from the amount of noise in the input signal
      void saveImage​(int[] data, java.io.File saveLocation)
      Create Image from digitalized signal
      int[] syncFrames​(int[] digitalized)
      Sync imag with Sync frames to fix doppler effect and fix first line offset
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • isInteractive

        public boolean isInteractive
    • Constructor Detail

      • AptDecoder

        public AptDecoder​(Apt apt)
        Apt decoder
        Parameters:
        apt - Wav to decode
    • Method Detail

      • decode

        public int[] decode()
                     throws UnsupportedFrameSizeException
        APT Decoder Decodes an audio to an image Result will be the raw decoded image (no sync) or corrections The Result will depend a lot from the amount of noise in the input signal
        Specified by:
        decode in interface IAptDecoder
        Returns:
        int[] each int equals to one pixel, ranges from 0 to 255
        Throws:
        UnsupportedFrameSizeException
      • syncFrames

        public int[] syncFrames​(int[] digitalized)
                         throws NoSyncFrameFoundException
        Sync imag with Sync frames to fix doppler effect and fix first line offset
        Specified by:
        syncFrames in interface IAptDecoder
        Parameters:
        digitalized - Digitalized signal, should range from 0 to 255
        Returns:
        synced Image with syn Frames
        Throws:
        NoSyncFrameFoundException
      • saveImage

        public void saveImage​(int[] data,
                              java.io.File saveLocation)
        Create Image from digitalized signal
        Specified by:
        saveImage in interface IAptDecoder
        Parameters:
        data - digitalized Signal
        saveLocation - path to output file