#include "Ltimgcor.h"
L_LTIMGCOR_API L_INT L_LambdaConnectedness(pBitmap, lambdaVal)
Performs image segmentation using a special region-growing algorithm called Lambda Connectedness.
Pointer to the bitmap handle referencing the bitmap to be converted.
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.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
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
Win32, x64, Linux.
This example loads a bitmap and applies lambda segmentation.
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 Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document