Reputation: 1156
Suppose I have the coordinates of 2 corner points of a selected area on screen. Is it possible to tell if the area contains text or blank. If text exists, can it be converted to a string?
** The selected area has a solid background (1 color).
Upvotes: 1
Views: 139
Reputation: 1616
I think there are three steps in answering your question:
The first step in answering you question is contained in Capture the Screen into a Bitmap.
To determine if the screen is blank you can sample each pixel using Bitmap.GetPixel
, and if all the pixels are the same color as the first then it's blank.
To determine what the text is you'll need some OCR, and the answer to that question is answered in Where can i find a free .Net (C#) library that i can use to scan and OCR documents?.
Upvotes: 3