Image edge detection
In terms of making more robust, a fairly obvious improvement would be to ensure that argv[1] exists before using it (that's what argc is for).  If there's no argument, or the file can't be read, emit a useful error message to std::cerr and return EXIT_FAILURE - negative return values from main() can vary by platform.

Why do we declare CannyThreshold with two arguments, but never use them?  Just declare it taking no arguments.

Your description mentions saving the result, but I don't see any code for that - did you perhaps show us the wrong version of the program?