read mongo gridfs images and convert them to opencv image