In old version of opencv we had the class like CvvImage, that were easily used for MFC controls to display camera images or simple images from the OpenCV. But in 2.4 or 2.3 this support is finished by the OpenCV , i wonder if we have any other class in new version.
My application is MFC SDI and inside view i am over riding the OnPaint function. In previous opencv i was using Paint function like
void CRightCameraView::OnPaint()
{
CPaintDC dc(this); // device context for painting
m_CVvimageObj.CopyOf(m_iplImageFrame); //copy IplImage frame
if(m_bImageDisplay)
{
m_CVvimageObj.Show(dc.GetSafeHdc(),10,0,m_CVvimageObj.Width(),m_CVvimageObj.Height());
}
}
Kindly guide me which is the most update version of class to do same thing and support such DC controls of MFC.
Since i could not find the answer i would like to help others what i did.
I have extracted cvvimage class manually and added in my project and then i did the following ..
in my views header file i declared
inside my CPP file of view , i have called following in initialization function
inside the overided function of OnPaint inside view i added
Cvvimage h file is the following
and CPP file for cvvimage class is following
enjoy.