Kép szöveg kereső .NET
Bevezetés a Image Text Finder for .NET
A Image Text Finder for .NET egy plug-in, amely lehetővé teszi a fejlesztők számára, hogy kivonják a szöveget a képek a .net alkalmazások. Ez az útmutató megy keresztül a funkciók a plugin és ad példákat a kód hogyan kell használni.
Támogatott fájlformátumok
A Image Text Finder for .NET támogatja a következő képfájlformátumokat:
- BMP
- JPEG
- PNG
- GIF
- TIFF
A szöveget ezekben a képfájlokban keresheti a plugin API használatával.
A szöveg megtalálása a képekben
To extract text from an image, you need to create an instance of the AsposeOcr
class and call the ImageHasText
method. Here is an example:
using Aspose.OCR;
AsposeOcr recognitionEngine = new AsposeOcr();
bool isFound = recognitionEngine.ImageHasText("sample1.png", "Aspose");
In this example, we open a file stream to the image file and pass it to the ImageHasText
method. The method returns if the text was found or not.
Nem angol nyelvű szövegeket talál a képekben
To extract non-English text from an image, you need to create an instance of the ImageTextFinder
class and call the ExtractText
method. Here is an example:
using Aspose.OCR;
AsposeOcr recognitionEngine = new AsposeOcr();
RecognitionSettings settings = new RecognitionSettings(Language.Ara);
bool isFound = recognitionEngine.ImageHasText("sample1.png", "Aspose", settings);
In this example, we open a file stream to the image file and pass it to the ImageHasText
method. The method returns if the text was found or not.
Legjobb gyakorlatok
Íme néhány legjobb gyakorlat a .NET Image Text Finder használatához:
- Győződjön meg róla, hogy a képfájl támogatott formátumban van.
- Használja a szöveg helyes nyelvi beállítását a képben.
- Különböző betűméretekkel kísérletezünk, hogy javítsuk a kivonat pontosságát.
- A hibák és kivételek megfelelő kezelése a robusztus alkalmazási viselkedés biztosítása érdekében.