fixed flann crash bug

checking if the MAT of image and object descriptors are not empty
before doing flann.