added example histogram calc for current image. used cv::waitKey(), namedWindow now opens and displays correctly. Commented out previous_image, use leads to crash. Indexing not working properly or leading to crash because of attempted conversion?