用DirectShow调用摄像头采集图像并转化为halcon图像
//转Halcon图像HObject ImageDataPtr2HObject(CCameraDS& CameraDS, BYTE* imageDataPtr){ HObject image; if (8 == CameraDS.GetBitCount()) //灰度图 { //造一个灰度图 GenImage1( &image, "byte", CameraDS.GetWidth(), CameraDS.GetHeight(