Matlab: Image Processing: twelve-sided dice with numbers
( German ) This post is like the post before and describes the identification of the numbers on a twelve-sided dice with numbers from 1 to 12. Also automatically rolled by the dice rolling machine of my brother . Dice identification: First of all the images are loaded into Matlab and the size is reduces to 200x200 pixel size. The with rgb2gray the image is reduces to a gray-scaled image and the gradient is used. The gradient and the normal image is converted into a binare image with a treshold. Then the gradient images is morphologically closed and multiplied with the normal tresholded image and afterwards morphologically dilated. After this the big for loop over all images is executed. The the watershed is applied and the middle of the image with my own function is determined, which just calculate the mean of all columns and rows where the image is one. From this middle a big area is chosen that the rolled number is for sure in this area. Then the biggest area in