基于VC的BMP图像二值化处理 谁有那个程序 能发一下么

2024-12-05 18:03:42
推荐回答(2个)
回答1:

typedef int (WINAPI ICEPUB_IMGTOSINGLEBMP)(char *strImgFilename,char *strBmpFilename,int thresholdValue);
ICEPUB_IMGTOSINGLEBMP *icePub_imgToSingleBmp = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_imgToSingleBmp=(ICEPUB_IMGTOSINGLEBMP *)GetProcAddress(hDLLDrv,"icePub_imgToSingleBmp");
}
if(icePub_imgToSingleBmp)
{
icePub_imgToSingleBmp("my24.bmp","single1.bmp",150);
icePub_imgToSingleBmp("my.jpg","single2.bmp",150);
icePub_imgToSingleBmp("my.png","single3.bmp",150);
}

if(hDLLDrv)
FreeLibrary(hDLLDrv);

回答2:

TANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_imgToSingleBmp=(ICEPUB_IMGTOSINGLEBMP *)GetProcAddress(hDLLDrv,"icePub_imgToSingleBmp");
}
if(icePub_imgToSingleBmp)
{