Puoi provare a utilizzare lo stesso servizio di OCR che utilizza la lente Bing. Se non l'hai provato: apri la fotocamera, cambia l'obiettivo con l'obiettivo bing e provalo
L'endpoint del servizio è http://ocrrest.bingvision.net/V1. Fornisce inoltre informazioni sulla posizione del testo rilevato con i relativi riquadri di delimitazione
Probabilmente alcune analisi del violinista ti aiuteranno a inviare la tua immagine in modo simile.
Ho un piccolo frammento di sotto della quale si attende l'immagine come matrice di byte
public static readonly string ocrServiceUrl = "http://ocrrest.bingvision.net/V1"; // was: "platform.bing.com/ocr/V1";
public static readonly string ocrLanguage = "en";
public static async Task<JsonObject> MakeOcrJSON(byte[] image)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(string.Format("{0}/Recognize/{1}", ocrServiceUrl, ocrLanguage));
request.Method = "POST";
using (Stream requestStream = await request.GetRequestStreamAsync())
{
requestStream.Write(image, 0, image.Length);
}
try
{
using (HttpWebResponse response = (HttpWebResponse) (await request.GetResponseAsync()))
{
using (var responseStream = new StreamReader(response.GetResponseStream()))
{
var json = JsonObject.Parse(responseStream.ReadToEnd());
return json;
}
}
}
catch (WebException we)
{
using (Stream responseStream = we.Response.GetResponseStream())
{
DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(OcrResponse));
OcrResponse ocrResponse = (OcrResponse)serializer.ReadObject(responseStream);
string ErrorMessage = "Unknown Error";
if (ocrResponse.OcrFault.HasValue)
{
ErrorMessage = string.Format(
"HTTP status code: {0} Message: {1}",
ocrResponse.OcrFault.Value.HttpStatusCode,
ocrResponse.OcrFault.Value.Message);
}
throw new Exception(ErrorMessage);
}
}
}
fonte
2015-02-24 14:05:36
telefono Windows 8 non supporta qualsiasi API OCR. puoi provare qualche libreria esterna. Diamo uno sguardo a http://www.leadtools.com/sdk/windows-phone/default.htm –
@SadAlAbdullah, Pls metti questo come risposta, aggiungi l'affermazione Microsoft a sostegno della tua risposta, così potremmo farla finita. – Eldho