title: Basic Pixel/Cell Counting Algorithm
body: <p>Good night :)</p>
  
  <p>I am currently playing with the DevIL library that allows me to load in image and check RGB values per pixel. Just as a personal learning project, I'm trying to write a very basic OCR system for a couple of images I made myself in Photoshop.</p>
  
  <p>I am successfully able to remove all the distortions in the image and I'm left with text and numbers. I am currently not looking for an advanced neural network that learns from input. I want to start out relatively easy and so I've set out to identify the individual characters and count the pixels in those characters.</p>
  
  <p>I have two problems:</p>
  
  <ul>
  <li>Identifying the individual characters.</li>
  <li>Most importantly: I need an algorithm to count connected pixels (of the same color) without counting pixels I've previously counted. I have no mathemathical background so this is the biggest issue for me.</li>
  </ul>
  
  <p>Any help in the matter is appreciated, thanks.</p>
  
  <p>edit:</p>
  
  <p>I have tagged this question as C++ because that is what I am currently using. However, pseudo-code or easily readable code from another language is also fine.</p>