Study/OpenCV OpenCV 영상읽기 코딩하는 야구쟁이 2011. 10. 12. 10:46 BOOL CMulti_20063703Doc::OnOpenDocument(LPCTSTR lpszPathName) //파일이름 전달 { if (!CDocument::OnOpenDocument(lpszPathName)) // Serialize를 호출 (파일 읽기 위한 함수) return FALSE; // 부모 클래스 함수 호출 // 영상 읽기 m_cvvImage.Load( lpszPathName ); // 파일 경로명 초기화 및 복사 m_szPathName = (char *)calloc(512, sizeof(char)); strcpy( m_szPathName, (char *)lpszPathName ); return TRUE; } void CMulti_20063703Doc::DeleteContents() { // TODO: Add your specialized code here and/or call the base class if( m_cvvImage.GetImage() != NULL ) //이미지에 데이터가 있으면 { m_cvvImage.~CvvImage(); } CDocument::DeleteContents(); // 부모 클래스 함수 호출 }