First time here? Check out the FAQ!
answered 2018-04-17 01:13:48 -0600
your image was not read correctly. please add a check:
reference=imread("/home/wxh/Desktop/Photo/reference.bmp ",IMREAD_UNCHANGED); if (reference.empty()) { !!! }