build error fix: remove trailing whitespaces, casting types
minor edits based on alalek's feedback
removing trailing whitespace
using std::array for LUT argument
- made some of dependencies explicit
- removed dependencies to highgui and some other modules where possible
- modified some samples to build without modules