then this should be fixed in cpfind, don't it? This should be tried first before introducing a new tool. Maybe you could try this first?
So only if this does not help, the patch could be taken into consideration. But then the patch needs a lot of reworking:
* Don't duplicate code of base algorithms. That makes the maintenance more difficult than necessary. So both places should use the same code.
* When using wx functions in a program you need to initialize the wx library before. Command line tools should use wxWidgets only if absolute necessary (some single program need it, but most cli are not depended on wxWidgets).
* Also the image cache needs some more initialization before using it.
* You are using nearly the whole alphabet for switches. Not all switches are really necessary to tweak by the user (e.g. reproject, alternate, maybe other also). Some are totally unnecessary: the correlation is always between 0 and 1. No need to clean cp with correlation >1.0 - this does not happen. Also is really the tweaking of the curvature necessary? This adds a lot of complexity to the command line, documentation but also to the code, which is not necessary.
There are many options technical possible, but it makes no sense to expose all finer details to the user. For some it is better to use sensible fixed default values.
* There may be other issues I have miss at a first scan of the code.
And then there are more formal issues
* Please provide an unified diff file with all changes in a single file. And not several files with the comment "feel free to put it wherever" (your words)
* Unnecessary code should be removed and not commented out only with the comment "not sure what these do but everything seems to work fine without it?". This helps nobody and adds only garbage.
* Please use our indentation/brace style (most new code is Allman style based) and don't mix in the same file.