virtual L_INT LBitmap::FreeKmeansOutput(pOutCenters)
Frees the data generated by the LBitmap::KMeansBitmapSegmentation function.
Pointer to the data generated by the LBitmap::KMeansBitmapSegmentation function.
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| < 1 | An error occurred. Refer to Return Codes. |
Use this function to free the data generated by the LBitmap::KMeansBitmapSegmentation function.
Win32, x64.
L_INT LBitmap__FreeKmeansOutputExample(){L_INT nRet;LBitmap LeadBitmap;nRet =LeadBitmap.Load(MAKE_IMAGE_PATH(TEXT("Clean.tif")), 0, ORDER_BGRORGRAY);if(nRet !=SUCCESS)return nRet;L_UINT nCluster = 4;L_COLORREF OutCenter = (L_COLORREF) RGB(25,50,70);L_COLORREF* pOutCenters = &OutCenter;L_INT nOutCentersCount = -1;nRet = LeadBitmap.KMeansBitmapSegmentation(nCluster, &pOutCenters, &nOutCentersCount, NULL, KMEANS_RANDOM);if(nRet != SUCCESS)return nRet;//free the pOutCenters dataLeadBitmap.FreeKmeansOutput(pOutCenters);nRet = LeadBitmap.Save (MAKE_IMAGE_PATH(TEXT("Result.BMP")), FILE_BMP, 24, 0, NULL);if(nRet !=SUCCESS)return nRet;pBITMAPHANDLE pBitmapHandle = LeadBitmap.GetHandle();//free bitmapif(pBitmapHandle->Flags.Allocated)L_FreeBitmap(pBitmapHandle);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
