본문 바로가기

opencv

opencv dll 2.4.13 더보기
Visual Studio 2017에서 OpenCV 3.4.2를 사용하는 방법 출처: http://webnautes.tistory.com/1132 미리 빌드되어 배포되는 윈도우용 OpenCV 라이브러리 3.4.2을 Visual Studio 2017에서 사용하기 위해 필요한 과정을 설명합니다. 마지막 업데이트 - 2018. 7. 9 1. OpenCV 깃허브(github)에서는 opencv-3.4.2-vc14_vc15.exe를 다운로드 받습니다.https://github.com/opencv/opencv/releases 2. 다운로드 받은 파일의 이름 opencv-3.4.2-vc14_vc15.exe 에서도 알 수 있듯이 vc14(Visual Studio 2015)와 vc15(Visual Studio 2017)를 위해 미리 빌드된 라이브러리가 배포되고 있습니다. 실행하면 압축을 해제할 위.. 더보기
Visual Studio 2017, Python 3용으로 OpenCV 3.4.2 빌드 하기 (opencv_contrib 포함) 출처: http://webnautes.tistory.com/1036 OpenCV's extra modules( opencv_contrib )을 포함하여 OpenCV 3.4.2 라이브러리를 Visual Studio 2017와 Python 3.7에서 사용하기 위해 컴파일한 과정을 다루고 있습니다. 윈도우즈용으로 미리 빌드된 OpenCV 라이브러리에는 extra 모듈(opencv_contrib)이 빠져있습니다. SURF, SIFT(xfeatures2d) 등의 OpenCV 모듈을 사용하려면 https://github.com/opencv/opencv_contrib에 있는 소스 코드를 포함시켜서 다시 컴파일 해주어야 합니다. 빌드 환경은 다음과 같습니다. Windows 10 Pro 64bitVisual Studio.. 더보기
Template Match Demo 출처: https://github.com/shimat/opencvsharp/issues/182 using static System.Console; using OpenCvSharp; using OpenCvSharp.Util; static void RunTemplateMatch(string reference, string template) { using (Mat refMat = new Mat(reference)) using (Mat tplMat = new Mat(template)) using (Mat res = new Mat(refMat.Rows - tplMat.Rows + 1, refMat.Cols - tplMat.Cols + 1, MatType.CV_32FC1)) { //Convert input imag.. 더보기
비활성창 매크로 만들기 출처: http://yjngh.tistory.com/entry/%EB%B9%84%ED%99%9C%EC%84%B1-%EC%B0%BD-%EB%A7%A4%ED%81%AC%EB%A1%9C-%EB%A7%8C%EB%93%A4%EA%B8%B0 비활성창 매크로 제작기.. 조조전 재료의 압박때문에..짜증이 나던터에.. 오토를 만들었다..opencv개발을 해왔던 터라 주로 활성창을 캡쳐해서 하는 방법으로 주로 했었는데활성창의 경우 집에서는 와이프 눈치 보느라..회사에서는 활성창으로는 도저히 녹스를 돌리기 힘들었다.게다가 내가 캡쳐를 하는방식은 화면을 스크린샷 하는것이기 때문에 화면을 아래로 숨기게 되면 이런식으로 보이는화면 밖으로 나간부분은 캡쳐가 되지않는다.그러던중 비활성창 캡쳐에 관련된 글을 보았다. public st.. 더보기
[OpenCV] 귀찮은 경고 (Warning) 메세지 숨기기 출처: http://dh8607.tistory.com/150 Microsoft Visual Studio에서 OpenCV를 사용하다보면, 컴파일할때 두가지 Warning이 항상 발생한다. warning C4819: 현재 코드 페이지(949)에서 표시할 수 없는 문자가 파일에 들어 있습니다. 데이터가 손실되지 않게 하려면 해당 파일을 유니코드 형식으로 저장하십시오.warning C4996: 'cv::flann::Index_': deprecated로 선언되었습니다.혹은warning C4819: The file contains a character that cannot be represented in the current code page (949). Save the file in Unicode format t.. 더보기
[OpenCV] putText 함수를 이용한 Text 출력 출처: http://webdir.tistory.com/439 [cv::putText 함수의 Prototype] //! renders text string in the image CV_EXPORTS_W void putText( Mat& img, const string& text, Point org, int fontFace, double fontScale, Scalar color, int thickness=1, int lineType=8, bool bottomLeftOrigin=false ); [Source Code] #include "stdafx.h" #include "opencv2/opencv.hpp" using namespace cv; int _tmain(int argc, _TCHAR* argv[]) .. 더보기