2021-03-07 12:46:25 +01:00
|
|
|
/**********************************************************************
|
2022-03-20 20:56:32 +01:00
|
|
|
* This file is used for testing random stuff without running the
|
2021-03-07 12:46:25 +01:00
|
|
|
* whole of SatDump, which comes in handy for debugging individual
|
|
|
|
|
* elements before putting them all together in modules...
|
2022-03-20 20:56:32 +01:00
|
|
|
*
|
|
|
|
|
* If you are an user, ignore this file which will not be built by
|
2021-05-12 21:16:53 +02:00
|
|
|
* default, and if you're a developper in need of doing stuff here...
|
2021-03-07 12:46:25 +01:00
|
|
|
* Go ahead!
|
2022-03-20 20:56:32 +01:00
|
|
|
*
|
2021-03-07 12:46:25 +01:00
|
|
|
* Don't judge the code you might see in there! :)
|
|
|
|
|
**********************************************************************/
|
|
|
|
|
|
2022-03-28 11:51:13 +02:00
|
|
|
#include "logger.h"
|
2023-11-13 15:41:02 +01:00
|
|
|
#include "common/image/image.h"
|
2023-09-07 08:37:08 +02:00
|
|
|
|
2023-11-13 15:41:02 +01:00
|
|
|
int main(int /*argc*/, char *argv[])
|
2023-11-13 01:28:14 +01:00
|
|
|
{
|
2023-11-13 15:41:02 +01:00
|
|
|
initLogger();
|
2023-11-19 16:22:39 -05:00
|
|
|
completeLoggerInit();
|
2023-10-11 00:54:06 +02:00
|
|
|
|
2023-11-13 15:41:02 +01:00
|
|
|
image::Image<uint16_t> img_ch1;
|
|
|
|
|
image::Image<uint16_t> img_ch2;
|
2023-10-29 21:37:02 +01:00
|
|
|
|
2023-11-13 15:41:02 +01:00
|
|
|
img_ch1.load_img(argv[1]);
|
|
|
|
|
img_ch2.load_img(argv[2]);
|
|
|
|
|
int offset = std::stoi(argv[4]);
|
2023-11-13 01:28:14 +01:00
|
|
|
|
2023-11-13 15:41:02 +01:00
|
|
|
img_ch1.equalize();
|
|
|
|
|
img_ch2.equalize();
|
2023-11-13 01:28:14 +01:00
|
|
|
|
2023-11-13 15:41:02 +01:00
|
|
|
image::Image<uint16_t> output_rgb(img_ch1.width(), img_ch2.height(), 3);
|
2023-10-27 13:34:53 +02:00
|
|
|
|
2023-11-13 15:41:02 +01:00
|
|
|
output_rgb.draw_image(2, img_ch1);
|
|
|
|
|
output_rgb.draw_image(1, img_ch1);
|
|
|
|
|
output_rgb.draw_image(0, img_ch2, offset);
|
2023-10-27 13:34:53 +02:00
|
|
|
|
2023-11-13 15:41:02 +01:00
|
|
|
output_rgb.save_img(argv[3]);
|
2023-07-23 23:13:13 +02:00
|
|
|
}
|