add method in extract_data

new method to get value of digit and to create image