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 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 signalvoid
saveImage(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 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 interfaceIAptDecoder
- 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 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:
saveImage
in interfaceIAptDecoder
- Parameters:
data
- digitalized SignalsaveLocation
- path to output file
-
-