from opencv import highgui as hg
capture = hg.cvCreateCameraCapture(0)
hg.cvNamedWindow("Snapshot")
frame = hg.cvQueryFrame(capture)
hg.cvShowImage("Snapshot", frame)

original = cv.LoadImageM("image.jpg")
thumbnail = cv.CreateMat(original.rows
/ 10, original.cols / 10, original.type)
cv.Resize(original, thumbnail)

CvtColor(original,gray,CV_RGB2GRAY)

cvThreshold(image, binary_image,128,255,CV_THRESH_OTSU)

myblobs = CBlobResult(binary_image, mask,0, True)
myblobs.filter_blobs(325,2000)
blob_count = myblobs.GetNumBlobs()

from tesseract import image_to_string
image = open("blob.jpg")
text = image_to_string(image)