L_LambdaConnectedness

#include "Ltimgcor.h"

L_LTIMGCOR_API L_INT L_LambdaConnectedness(pBitmap, lambdaVal)

pBITMAPHANDLE pBitmap;

pointer to the bitmap handle

L_INT lambdaVal;

represents Lambda factor

Performs image segmentation using a special region-growing algorithm called Lambda Connectedness.

Parameter

Description

pBitmap

Pointer to the bitmap handle referencing the bitmap to be converted.

lambdaVal

Valid values for Lambda range from 1 to 1000. By default, the value is 950, Small values of lambda can result in one region. Large values can result in an over-segmented image.

Returns

SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

Lambda-connectedness is a technique used to find the connectivity between an image's pixels and then clusters them into groups.

Low values for lambda can result in one region.

High values for lambda can result in an over-segmented image.

This function can only process entire images. It does not support regions.

This function supports 12- and 16-bit grayscale and 48- and 64-bit color images.

This command supports signed/unsigned images.

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.

Platforms

Win32, x64, Linux.

See Also
Functions: L_LevelsetBitmapRgnL_ShrinkWrapTool, L_WatershedBitmap, L_KMeansBitmapSegmentation, L_GWireGetMinPathL_OtsuThreshold
Topics: Raster Image Functions: Image Analysis
Processing an Image

Example

#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName 
L_INT LambdaConnectednessExample(L_VOID) 
{ 
   L_INT nRet; 
   BITMAPHANDLE LeadBitmap;   /* Bitmap handle to hold the loaded image. */ 
   /* Load the bitmap, keeping the bits per pixel of the file */ 
   nRet = L_LoadBitmap (MAKE_IMAGE_PATH(TEXT("ImageProcessingDemo\\NaturalFruits.jpg")), &LeadBitmap, sizeof(BITMAPHANDLE), 0, ORDER_BGR, NULL, NULL); 
   if(nRet != SUCCESS) 
      return nRet ; 
   // apply lambda filter 
   nRet = L_LambdaConnectedness(&LeadBitmap, 985); 
   if(nRet != SUCCESS) 
      return nRet; 
   nRet = L_SaveBitmap(MAKE_IMAGE_PATH(TEXT("Result.BMP")), &LeadBitmap, FILE_BMP, 24, 0, NULL); 
   if(nRet !=SUCCESS) 
      return nRet ; 
   //free bitmap 
   if(LeadBitmap.Flags.Allocated) 
      L_FreeBitmap(&LeadBitmap); 
   return SUCCESS; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C API Help