The Exception is here:
g++ -L/usr/local/lib -I./include -I. -lopencv_core -lopencv_highgui -lopencv_imgproc main.o ColorTransfer.o
main.o: I
In your folder:
/lib
You have to be sure that there are:
opencv_core.so
opencv_highgui.so
opencv_imgproc.so
And that your LD_LIBRARY_PATH point to this folder. Otherwise, you've to export it:
export LD_LIBRARY_PATH=/lib
Have you download opencv sources or precompiled? Have you configured dynamic linker run-time bindings?
sudo ldconfig
Otherwise, try to check out this soloution!