Nicomsoft OCR: Developer's Guide


Blk_GetBackgroundColor


Syntax

C++:int Blk_GetBackgroundColor(HBLK BlkObj)
C#:int Blk_GetBackgroundColor(int BlkObj)
Visual Basic:Function Blk_GetBackgroundColor(ByVal BlkObj As Integer) As Integer
Java:int Blk_GetBackgroundColor(HBLK BlkObj)
Delphi:function Blk_GetBackgroundColor(BlkObj:HBLK):integer


Description

Retrieves the average background color of the block after performing OCR with the Img_OCR function.


Parameters

BlkObj [IN] – the Block object.


Return value

If success, an RGB color (B | (G << 8) | (R << 16)); otherwise, an error code.


Remarks

The OCRSTEP_OCR step must be executed before calling this function.


Example

See the sample code for the Img_GetBlockCnt function.