  | TesseractOcrEngineDetectOrientationAndScript Method (Int32, Int32, Int32) | 
Detects the orientation and script of a document image.
 
Namespace: DevScope.Ocr.Tesseract.WindowsAppAssembly: DevScope.Ocr.Tesseract.WindowsApp (in DevScope.Ocr.Tesseract.WindowsApp.dll) Version: 255.255.255.255
Syntaxpublic IAsyncOperation<TesseractOcrPageOrientationScriptInfo> DetectOrientationAndScript(
	int pixelWidth,
	int pixelHeight,
	int[] pixels
)
Public Function DetectOrientationAndScript ( 
	pixelWidth As Integer,
	pixelHeight As Integer,
	pixels As Integer()
) As IAsyncOperation(Of TesseractOcrPageOrientationScriptInfo)
public:
virtual IAsyncOperation<TesseractOcrPageOrientationScriptInfo^>^ DetectOrientationAndScript(
	[InAttribute] int pixelWidth, 
	[InAttribute] int pixelHeight, 
	[InAttribute] array<int>^ pixels
) sealed
Parameters
- pixelWidth
 - Type: SystemInt32
Width of image in pixels. - pixelHeight
 - Type: SystemInt32
Height of the image in pixels. - pixels
 - Type: SystemInt32
Array of image pixels in BGRA format. 
Return Value
Type: 
IAsyncOperationTesseractOcrPageOrientationScriptInfoThe results of the detection
Remarks
Examples  
This sample shows how to call the 
DetectOrientationAndScript method.
void RunOrientationAndScriptDetection()  
{ 
   ...
   
   var ocrEngine = new TesseractOcrEngine(tessdataRootFolder.Path, languageCode);
   ...
   
   var imgBitmapToOcr = await ImageUtils.LoadImageFromIsolatedStorageAsync(CommonSettings.FileNameFullResImageSentToOcr);
   WriteableBitmap wb = new WriteableBitmap(imgBitmapToOcr);
   var osiOperation = ocrEngine.DetectOrientationAndScript(wb.PixelWidth, wb.PixelHeight, wb.Pixels);
   
   var osiResponse = await osiOperation;
   ........
}
See Also