opencv一次读取多幅图像问题

CFileDialog dlgOpen(TRUE,0,0,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_ALLOWMULTISELECT);
dlgOpen.m_ofn.lpstrFile=sBuffer;//设置图像名称的缓冲区
dlgOpen.m_ofn.nMaxFile=BUFFER_SIZE;

//图像打开成功
if (dlgOpen.DoModal()==IDOK)
{
//获取选中图像的初始位置
POSITION position=dlgOpen.GetStartPosition();
while (position!=0)
{
pathName=dlgOpen.GetNextPathName(position);
temPosition=pathName.GetBuffer();//cstring向char转换
const char* tmp=temPosition.c_str();
img[i]=cvLoadImage(tmp);
i++;
}
//cvShowImage("人脸",img[5]);//显示图像

}



http://www.opencv.org.cn/forum/viewtopic.php?f=1&t=1597

你可能感兴趣的:(opencv一次读取多幅图像问题)