非大神,初学者,做了很久才做好了。在此给出我的程序,是直接提取出basler的sample里边存放的图片,通过opencv来显示在对话框上的。
PylonInitialize();
try
{
CInstantCamera camera(CTlFactory::GetInstance().CreateFirstDevice());
CString str;
str = camera.GetDeviceInfo().GetModelName();
//......
}