Copied source from OReilly book about OpenCV