#include "ltwrappr.h"
L_INT LBitmap::ObjectCounter(uCount, uFlags = 0)
L_UINT * uCount; |
objects count |
L_UINT32 uFlags; |
flags |
Gets the number of black objects in a binary image.
Parameter |
Description |
uCount |
Pointer to a variable to be updated with the number of black objects. |
uFlags |
Reserved for future use. Must be 0. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
If white objects are on a black image, the colors in the class object's bitmap must be inverted by calling LBitmap::Invert function.
This function only works on 1-bit images.
This function does not support 32-bit grayscale images. It returns the error code ERROR_GRAY32_UNSUPPORTED if a 32-bit grayscale image is passed to this function.
Required DLLs and Libraries
LTIMGCOR For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
Functions: |
LBitmap::DeleteObjectInfo, LBitmap::EndFastMagicWandEngine, LBitmap::ObjectCounterCallback, LBitmap::StartFastMagicWandEngine |
Topics: |
|
|
//This example counts black binary objects in a binary image with a white background //The objects can be of any size or shape //The callback member function is used to show the length of each removed rake //The callback member function does NOT receive a Windows region.class LObjectCounterBitmap : public LBitmap{public:LObjectCounterBitmap();~LObjectCounterBitmap();virtual L_INT LObjectCounterBitmap::ObjectCounterCallBack(L_RECT rect);};LObjectCounterBitmap::LObjectCounterBitmap(){}LObjectCounterBitmap::~LObjectCounterBitmap(){}L_INT LObjectCounterBitmap::ObjectCounterCallBack(L_RECT rect){CString strMsg;strMsg.Format(TEXT("Region Bounds: left=%d, right=%d, top=%d, bottom=%d \n count=%d"),rect.left, rect.right, rect.top, rect.bottom);OutputDebugString(strMsg);return SUCCESS;}L_INT LBitmap__ObjectCounterExample(LBitmapWindow *pBitmapWindow){L_UINT uCount;L_INT nRet;CString strMsg;nRet = pBitmapWindow->ObjectCounter(&uCount, 0);strMsg.Format(TEXT("The number of Objects is: %d"),uCount);return SUCCESS;}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
