forked from alandefreitas/matplotplusplus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimshow_10.cpp
26 lines (17 loc) · 815 Bytes
/
imshow_10.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <matplot/matplot.h>
int main() {
using namespace matplot;
image_channels_t image = imread("lena_color.tiff");
image = imvignette(image);
auto image_to_show = imresize(image,0.5);
imshow(image_to_show);
auto image_to_save = imresize(image,2.,image_interpolation::bicubic);
imwrite(image_to_save, "lena_bicubic.tiff");
imwrite(imresize(image,2.,image_interpolation::bilinear), "lena_bilinear.tiff");
imwrite(imresize(image,2.,image_interpolation::grid), "lena_grid.tiff");
imwrite(imresize(image,2.,image_interpolation::lanczos), "lena_lanczos.tiff");
imwrite(imresize(image,2.,image_interpolation::moving_average), "lena_moving_average.tiff");
imwrite(imresize(image,2.,image_interpolation::nearest), "lena_nearest.tiff");
wait();
return 0;
}