#include "purify/config.h"
#include "purify/types.h"
#include "purify/cimg.h"
#include "purify/directories.h"
#include "purify/pfitsio.h"
Go to the source code of this file.
|
int | main (int nargs, char const **args) |
|
◆ main()
int main |
( |
int |
nargs, |
|
|
char const ** |
args |
|
) |
| |
Definition at line 8 of file histogram_equalisation.cc.
10 auto const input_name =
11 (nargs > 1) ?
static_cast<std::string
>(args[1]) :
image_filename(
"M31.fits");
12 auto const output_name = (nargs > 2) ?
static_cast<std::string
>(args[2]) :
"M31_heq.fits";
15 CDisplay display = cimg::make_display<Image<t_real>>(input,
"Image");
16 const auto img1 = cimg::make_image(input.real().eval()).get_normalize(0, 1);
17 const auto results = img1.get_equalize(256, 0.01, 1);
18 const Image<t_real> &output = Image<t_real>::Map(
reinterpret_cast<const t_real *
>(results.data()),
19 input.rows(), input.cols());
22 throw std::runtime_error(
"compile with CImg.");
void write2d(const Image< t_real > &eigen_image, const pfitsio::header_params &header, const bool &overwrite)
Write image to fits file.
Image< t_complex > read2d(const std::string &fits_name)
Read image from fits file.
std::string image_filename(std::string const &filename)
Image filename.
References purify::image_filename(), purify::pfitsio::read2d(), and purify::pfitsio::write2d().