21 FFTW ss(R, C, FFTW_ESTIMATE);
24 gp0.
window(
"Image", 10, 10, 2 * C + 80, 2 * R + 50);
25 gp1.
window(
"FFT Blue channel", 640, 10, 2 * C + 80 + 50, 2 * R + 50);
28 cube x3(R, C, 3, fill::randu);
30 x3.slice(0).submat(span(20, 51), span(20, 51)) =
32 x3.slice(1).submat(span(80, 111), span(70, 101)) =
34 x3.slice(2).submat(span(20, 51), span(110, 141)) =
38 ppm.
write(
"test.ppm", ppm.
PPM_B, x3,
"Test picture");
49 gp1.
send2gp(
"set palette grey");
bool write(std::string fname, const imtype _type, const arma::cube &img, const std::string info="")
Write the .pnm file.
void fft2(arma::mat &x, arma::cx_mat &Pxx)
FFT of real 2D input.
void image(const arma::Mat< T > &x)
Plot mat as image.
void set_term(const char *ttype)
Set output terminal.
arma::Col< T > fftshift(const arma::Col< T > &Pxx)
1D FFT shift.
void window(const int fig, const char *name, const int x, const int y, const int width, const int height)
Configure the figure used Windows environment.
Portable anymap format class.
void send2gp(const char *cmdstr)
Send command to Gnuplot pipe.