Package htw.ai.dln
Class AptDecoder
- java.lang.Object
-
- htw.ai.dln.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 booleanisInteractive
-
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 signalvoidsaveImage(int[] data, java.io.File saveLocation)Create Image from digitalized signalint[]syncFrames(int[] digitalized)Sync imag with Sync frames to fix doppler effect and fix first line offset
-
-
-
Constructor Detail
-
AptDecoder
public AptDecoder(Apt apt)
Apt decoder- Parameters:
apt- Wav to decode
-
-
Method Detail
-
decode
public int[] decode() throws UnsupportedFrameSizeExceptionAPT 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:
decodein interfaceIAptDecoder- Returns:
- int[] each int equals to one pixel, ranges from 0 to 255
- Throws:
UnsupportedFrameSizeException
-
syncFrames
public int[] syncFrames(int[] digitalized) throws NoSyncFrameFoundExceptionSync imag with Sync frames to fix doppler effect and fix first line offset- Specified by:
syncFramesin interfaceIAptDecoder- 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:
saveImagein interfaceIAptDecoder- Parameters:
data- digitalized SignalsaveLocation- path to output file
-
-