2015/06/17

[HALCON] Win32 함수 충돌

HALCON 내부에서 함수 사용으로 아래 함수를 정의를 해제(Undef) 하였다.


#if defined(_WIN32)
#undef FindText
#undef CreateMutex
#undef CreateEvent
#undef DeleteFile
#endif


위 함수를 사용하고자 하는 경우 Ansi 인지 Unicode 인지 명시하여 사용하면 컴파일 에러를 피할 수 있다.
예) DeleteFileA, DeleteFileW


Original Post : http://neodreamer-dev.tistory.com/749

2015/06/05

OpenCV contrib 빌드하기

2015-06-04 일자로 OpenCV 3.0이 공개가 되었고 그 내용을 보다 관심을 끄는 기능 있었다.


Big thanks to Google who funded several successive GSoC programs and let OpenCV in. The results of many successful GSoC 2013 and 2014 projects have been integrated in opencv 3.0 and opencv_contrib (earlier results are also available in OpenCV 2.4.x). We can name:
  • text detection
  • many computational photography algorithms (HDR, inpainting, edge-aware filters, superpixels, …)
  • tracking and optical flow algorithms
  • new features, including line descriptors, KAZE/AKAZE
  • general use optimization (hill climbing, linear programming)
  • greatly improved Python support, including Python 3.0 support, many new tutorials & samples on how to use OpenCV with Python.
  • 2d shape matching module and 3d surface matching module
  • RGB-D module
  • VTK-based 3D visualization module
    etc.
opencv_contrib 중에서 2d/3d matching 이다. opencv_contrib 를 빌드 해 보기로 했다.
빌드를 위해서는 우선 opencv_contrib를 다운 받아야 하는데 아래 경로에서 3.0.0 버전을 다운 받았다.


https://github.com/Itseez/opencv_contrib/releases


위 경로에서 받은 파일을 OpenCV 3.0 경로에 풀어 놓고 CMake를 실행한다.
옵션 중에서 OPENCV_EXTRA_MODULES_PATH 항목에 위에서 압축을 풀어 놓은 곳의 modules 폴더를 지정한다.


Extra Module 경로를 지정하고 configure를 하면 추가된 모듈이 보이고 각각의 모듈에 대한 빌드 여부를 설정할 수 있다


OpenCV 2.9 버전부터인가 제공하던 world 버전도 보이는데 VTK와 함께 빌드에 문제가 있을 것으로 보여 이 모듈만 선택을 하지 않았다. 그리고 다시 configure 하니 정상적으로 구성 되었고 generate 를 선택하여 빌드에 필요한 솔루션을 생성하였다.

Visual Studio 2013 버전으로 생성된 OpenCV.sln 파일을 열고 빌드하였다. 그런데 뜻 밖의 에러에 마주쳤다.



OpenMP 의 for 루프에서 unsigned int를 지원하지 않는 문제였다. Visual Studio 2013 버전은 OpenMP 2.0 을 지원하고 있으며 OpenMP 2.0 버전은 unsigned int를 지원하지 않는다. unsigned int 는 OpenMP 3.0 버전에서 지원한다고 한다. 이것때문에 OpenMP를 포기할 수는 없어 해당 부분 두 곳만 OpenMP를 제거하였다.



두 곳의 OpenMP를 제거하고 빌드하니 아무런 문제 없이 빌드가 되었다.
빌드를 마쳤으니 테스트를 해 봐야겠다.

Original Post : http://neodreamer-dev.tistory.com/748

2015/06/04

OpenCV 3.0 Release

드디어 OpenCV 3.0 버전이 정식 릴리스 되었다.


OpenCV 3.0 Release


opencv_contrib 에 포함된 새로운 기능들을 어서 빨리 테스트 해 봐야겠다. 우선 VTK 모듈을 얹은 것 부터 빌드 해 봐야겠다

Original Post : http://neodreamer-dev.tistory.com/747