version 1.0
These programs produce transforms from any input image.
Very simply, these programs produce transforms of any input image. Currently implemented transforms are Fourier, Hough, Radon and Backprojection.
However, there are several enhancements and caveats to be aware of:
- These programs are capable of using (and producing) multi-colour images (greyscale, RGB and CMYK). Each colour channel is treated separately, and then recombined at the end.
- However, note that in order to achieve acceptable results, any transparency is flattened prior to running the code, using alpha blending.
- For Radon projections, each projection angle is achieved by rotating the original image. This, necessarily, introduces some interpolation artifacts. Sorry, no way around this without reverting to more complex (and expensive) algorithms — this one is already O(N³). We use the OpenCV algorithms which have proved far superior to GraphicsMagick in this regard (faster, and better quality).
- Whilst the code does its best to utilise threading, it may still perform rather slow (especially for images in the megapixel range), especially on older computer with limited compute cores.
--input=<inputfile>
--output=<outputfile>
--normalise=<on|off>
--harmonisedScaling=<on|off>
--gpu=<cuda|opencl|cpu|off>
There’s a Makefile in the directory. Check the relevant CXXFLAGS, CPPFLAGS and LDLIBS definitions, and then simply run “make”.
The GraphicsMagick (http://www.graphicsmagick.org/) library is required (for the Magick++ development tools), which itself depends on many other libraries (libpng, libjpeg, libtiff, giflib, libxml, etc.). Note that many pre-compiled versions of GraphicsMagick will be sub-optimal or unsuitable. You will most likely need to build a custom version of the library, in particular the library build should be configured with the --with-quantum-depth=16 option.
The OpenCV (http://www.opencv.org/) computer vision library (plus its contrib packages) is required, which itself may depend on numerous other libraries (libpng, libjpeg, libtiff, etc.) depending on the build platform.
To build on macOS, follow the same instructions as for iOS (https://docs.opencv.org/4.0.0/d5/da3/tutorial_ios_install.html) but with the last line replaced by “python opencv/platforms/osx/build_framework.py macos”.
In any case, the shell scripts described below have been developed to set some default build options that are known to work.
The file aws-ec2.sh has a full shell script to prepare and build all relevant libraries on AWS Linux. There is also a macos.sh script to assist with relevant libraries for macOS.
Contact the author, Rado Faletič radofaletic@gmail.com