There is a sdk called VUFORIA/QCAR. if you examine their Text Recognition Sample it will give you an idea.
For example;
firstly change open gl es shader program to render a square,
after that you need to detect what color behind the word. to do so. vuforia gives readonly access to image data.
like this;
QCAR::Frame vbFrame = state.getFrame();
const QCAR::Image *vbImage;
for (int i = 0; i<vbFrame.getNumImages(); i++) {
if (state.getFrame().getImage(i)->getFormat() == QCAR::RGB888) {
vbImage = state.getFrame().getImage(i);
}
}
From that point you need vuforia
experience and binary image knowledge.
for to give you and an idea, you can get a point RGB
color values like this,
- (void) getColorFromVGImage:(int)xx andY:(int)yy
{
const char* vbImageData = (const char*) vbImage->getPixels();
int maxXx = vbImage->getWidth() - 1;
int maxYy = vbImage->getHeight() - 1;
int bytesPerPixel = 3;
int bytesPerRow = vbImage->getStride();
int byteIndex = ((bytesPerRow * yy) + (xx * bytesPerPixel));
int maxByteIndex = (bytesPerRow * maxYy) + (maxXx * bytesPerPixel);
if (maxByteIndex >= byteIndex && byteIndex > 0) {
unsigned char rchar = vbImageData[byteIndex];
unsigned char gchar = vbImageData[byteIndex + 1];
unsigned char bchar = vbImageData[byteIndex + 2];
int r = (int)rchar;
int g = (int)gchar;
int b = (int)bchar;
}
}
AND PLEASE NOTE: This process for RGB888 binary image data.
hope this helped.