A while ago I was working on a rubiks cube solver that would use a video capture and you would have to line up the cube stickers in rectangles on the video capture that I would get the colors from and use a color distance algorithm to distinguish them. I want make it better, I was thinking of finding contours of the squares and once found following the contour if it moves slightly (So like tracking). How would I go about doing this? The things I have experience are using Mat2Image, BufferedImage, CVrect and some others. How would I approach this? If you want to look at my outline I would be glad to show it. How would I be able to find squares in the video capture?