diff --git a/README.md b/README.md index 490fe99..0d34d44 100644 --- a/README.md +++ b/README.md @@ -16,4 +16,4 @@ Compile in a normal way: Use it: - ./emd + ./emd diff --git a/main.cpp b/main.cpp index 2ebe094..32320c8 100644 --- a/main.cpp +++ b/main.cpp @@ -258,12 +258,17 @@ CImg decompose(const CImg input) /******************************************************************************* Main *******************************************************************************/ -int main() +int main(int argc, char **argv) { + if (argc != 2) { + printf("Usage: ./emd \n"); + return 1; + } + char modeTitle[30], residueTitle[50]; CImgDisplay disp[NB_ITERATIONS * 2 + 1]; - CImg inputImg("lena.bmp"), imgMode; + CImg inputImg(argv[1]), imgMode; disp[0].assign(inputImg, "Source Image"); for (int i = 1; i < NB_ITERATIONS + 1; i++) {