Posts

Es werden Posts vom März, 2017 angezeigt.

Matlab: Image Processing: twelve-sided dice with numbers

Bild
( 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 bigges...

Matlab: Image Processing: + and - identification on dices

Bild
( German ) This post describes the segmentation of images of dice with plus, minus and nothing on it Dice identification: My brother has built a dice rolling machine which automatically roll dices with 2/6 +, 1/6 - and 3/6 nothing on it. The images he produces automatically looked like this:  Here one can see that the + is in green and the - in red. Image Processing: First of all I loaded all images into Matlab and have cut them to a 200x200 size (second column). Further on I made a better contrast by multiplying all rgb-values with a factor, because the green plus and red minus had just a value of around 100 of 255 in rgb (third column). Then I splitted the channels in red, green and blue and generated out of this 3 channels on channel only red and only grenn by taken the red channel and subtracting the blue channel and the green channel with the factor 0.5. With a treshold in these images of 50 for green and 20 for red respectively I converted the images to binar...