본문 바로가기

전체 글29

분류성능평가지표 Confusion matrix 입력에 대한 실제 정답과 분류 결과에 대한 각 Case를 정리한 matrix True Positive(TP) : 실제 True인 정답을 True라고 예측 (정답) False Positive(FP) : 실제 False인 정답을 True라고 예측 (오답) False Negative(FN) : 실제 True인 정답을 False라고 예측 (오답) True Negative(TN) : 실제 False인 정답을 False라고 예측 (정답) Precision 정밀도, 모델이 True라고 분류한 것 중에서 실제 True인 것의 비율 Recall 재현율, 실제 True인 것 중에서 모델이 True라고 예측한 것의 비율 Precision-Recall Trade-off 정밀도와 재현율은 Trad.. 2022. 11. 17.
[C++] Pass value between c# and c++ by memory copy or Mashal, 메모리 카피 또는 Mashal을 이용한 c#과 c++간 변수값 주고받기 C++ DLL을 이용하여 C#에 함수를 import한 경우 c#에서 변수값을 넘겨주고 c++에서의 변경사항 또는 결과값을 넘겨준 변수값에 할당하고 싶은 경우가 있다. 그러한 경우 메모리 복사나 Mashal을 통해 해결할 수 있다. [DllImport(DLL_NAME, CallingConvention = CallingConvention.Cdecl)] public static extern (반환형) (함수명) ( ... ); 다음과 같이 C#에서 DLL의 함수를 import 했을 때, 1. 단일 값의 경우 DLL에서 import한 함수의 인자로 int, char, double, bool 같은 자료형을 넣을 경우 ref int recogNum int& recogNum 다음과 같이 인자의 형식을 지정해주면, C.. 2022. 6. 28.
[C++, OpenCV] imgproc, error C2589 한글을 출력하기 위해 UTF8을 ANSI로 변환하는 도중, 다음과 같은 에러가 났다. opencv2\imgproc.hpp(4777,27): error C2589: '(': '::' 오른쪽에 잘못된 토큰이 있습니다. opencv2\imgproc.hpp(4777): error C2144: 구문 오류: unknown-type'은(는) ')' 다음에 와야 합니다. opencv2\imgproc.hpp(4777,1): error C2660: 'cv::LineIterator::init': 함수는 2개의 인수를 사용하지 않습니다. opencv2\imgproc.hpp(4797,10): message : 'cv::LineIterator::init' 선언을 참조하십시오. opencv2\imgproc.hpp(4777): er.. 2022. 6. 10.
[C++, OpenCV] error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file) VideoWriter, .avi 확장자로 하면 can't find starting number 에러 발생 >> .mp4, .mov 등 다른 확장자로 하면 해결된다. 2022. 5. 20.
[C++] 식에 클래스 형식이 있어야 합니다 or 식에 클래스 형식이 있어야 하는데 ~ 형식이 있음 다음과 같은 에러 문구나 "식에 클래스 형식이 있어야 합니다" 같은 에러 문구가 떴을 때는 해당 객체 선언 쪽을 보면 다음과 같이 디폴트 생성자로 해당 객체를 만들고자 했을 수 있다. 이를 아래처럼 괄호만 지운다면 에러가 해결된다! 이 외에도 클래스 형식이 있어야 한다는 에러는 선언부에서 생성자 문제일 확률이 높은 거 같다. 2022. 4. 29.
[C++, OpenCV] download contrib(extra modules) to an existing OpenCV directory https://cmake.org/download/ Download | CMake Current development distribution Each night binaries are created as part of the testing process. Other than passing all of the tests in CMake, this version of CMake should not be expected to work in a production environment. It is being produced so that us cmake.org https://github.com/opencv/opencv_contrib GitHub - opencv/opencv_contrib: Repository fo.. 2022. 4. 27.