diff --git a/config.h b/config.h new file mode 100644 index 0000000000000000000000000000000000000000..b7cf9f4ea18647b6f45a83d8ee8ce7b579e00050 --- /dev/null +++ b/config.h @@ -0,0 +1,36 @@ +/********************************************************* +* Config des images à corriger, leur emplacement +* et la correction à appliquer +* Date: 29-Mai-2021 +* Auteur: Yann Roberge +*********************************************************/ + +#ifndef CONFIG_H +#define CONFIG_H + +// Image definition +#define N_IMAGES 5 +#define IMG_WIDTH 640 +#define IMG_HEIGHT 360 + +#define IMG_AREA (IMG_WIDTH * IMG_HEIGHT) +#define IMG_DEPTH 8 // bits +#define IMG_N_CHANNELS 3 // RGB + +#define BYTES_PER_PIXEL (IMG_N_CHANNELS * IMG_DEPTH / 8) +#define FRAME_BUF_SIZE (IMG_AREA * BYTES_PER_PIXEL) + +// Files and directories +#define FRAME_IN_DIRECTORY "/run/user/1000/gvfs/sftp:host=odroid,user=nas/media/raid/frames/" +#define FRAME_OUT_DIRECTORY "/run/user/1000/gvfs/sftp:host=odroid,user=nas/media/raid/frames_out/" + +#define FRAME_IN_FILENAME "frame" +#define FRAME_OUT_FILENAME "frameout" + +// Corrections to apply +#define DELTA_HUE 60 +#define DELTA_SATURATION 0.2 +#define DELTA_VALUE 0 + +#endif + diff --git a/main.h b/main.h index 5ea6fad1e33a88afe4e73feb6ea6600c59abb9fb..2bc692051553ba4ce0c7ce9af0fd8b817fca0d4f 100644 --- a/main.h +++ b/main.h @@ -9,32 +9,7 @@ #include <stdint.h> -// Image definition -#define N_IMAGES 1 -#define IMG_WIDTH 15 -#define IMG_HEIGHT 11 - -//#define IMG_WIDTH 640 -//#define IMG_HEIGHT 360 -#define IMG_AREA (IMG_WIDTH * IMG_HEIGHT) -#define IMG_DEPTH 8 // bits -#define IMG_N_CHANNELS 3 // RGB - -#define BYTES_PER_PIXEL (IMG_N_CHANNELS * IMG_DEPTH / 8) -#define FRAME_BUF_SIZE (IMG_AREA * BYTES_PER_PIXEL) - -// Files and directories -#define FRAME_IN_DIRECTORY "/run/user/1000/gvfs/sftp:host=odroid,user=nas/media/raid/frames/" -#define FRAME_OUT_DIRECTORY "/run/user/1000/gvfs/sftp:host=odroid,user=nas/media/raid/frames_out/" - -//#define FRAME_IN_FILENAME "frame" -#define FRAME_IN_FILENAME "color_test_pattern" -#define FRAME_OUT_FILENAME "color_test_pattern_out" - -// Corrections to apply -#define DELTA_HUE 50 -#define DELTA_SATURATION 0.2 -#define DELTA_VALUE 50 +#include "config.h" // Pixel struct unpacked for processing typedef struct {