I have a picture that looks like this: https://i.sstatic.net/3O4Rt.png
And I'm trying to crop out each of the numbers individually, so I'll end up with an image array that contains only the number 0, another that has only 1, etc. After cropping and grayscaling the orginal image, I have the following code:
for i = 1:351
if(capture_crop_gray(:, i, :) > 100)
capture_crop(:, i, 1) = 255; %red
else
%we found the front of a character
for j = 1:301
if(capture_crop_gray(j, i, :) > 100)
capture_crop(j, i, 1) = 255;
end
end
end
end
And this is the result I get: https://i.sstatic.net/Ue2vc.png
So I'm able to color in everything except the black numbers, but I'm not sure how to crop each one out on it's own. I have the Image Processing Toolkit, so if there's a shortcut using that, please let me know.