I found a bug in OpenCV’s findHomography() function. This function takes two different point sets as input and returns a 3 by 3 matrix that converts between them. If the singular case occurs, the result…
Category: Development
Creation Date: 2022-12-08 CUDA with cuDNN Please refer to other resources regarding CUDA installation. After installation, add the environment variable below to the system environment variables. [Variable name] CUDA_PATH_V11_6[Variable value] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6…
WITH_EIGEN: Eigen3 라이브러리 사용 여부 이 플래그는 Eigen3-OpenCV 상호 운용성 기능을 사용할 수 있게 만드는 것 외에는 아무 것도 수행하지 않는다. 심지어 cv::Mat::inv()조차도 OpenCV 자체 알고리즘을 사용한다. 따라서 OpenCV 빌드를 위해 굳이 이 옵션을 사용할…
1. Github에서 소스코드를 다운로드 받아서 압축을 푼다. 2. CMake에서 {source}와 {build} 위치를 지정해주고, [Configure] 버튼을 누른다. 3. [Yes] 버튼을 누른다. 4. Visual Studio에는 기본적으로 포트란(Fortran) 컴파일러가 없다. 따라서 Visual Studio 대신 MinGW의 gfortran.exe로 빌드가 되도록…
1. 우선 다음과 같이 간단한 C++ DLL을 만든다. (DLL을 만드는 상세한 과정은 생략) 빌드(build)의 결과로 위와 같은 .dll 파일이 만들어진다. 2. 이제 유니티(Unity) 프로젝트를 생성한다.
PyChar에서 Keras 사용하면 training progress가 다음과 같이 한 줄이 아닌 여러 줄로 출력된다. 이 문제를 해결하려면 PyCharm 옵션을 다음과 같이 수정해주면 된다. 수정 후 다시 실행해보면 다음과 같이 한 줄로 출력되는 것을 확인할 수 있다.
Windows Defender는 PyCharm을 느리게 만든다. 다음과 같은 과정을 거쳐서 이 문제를 해결할 수 있다.
아나콘다(Anaconda)란 파이썬(Python)과 수 백 가지 이상의 데이터 과학 패키지가 종속성 문제 없이 함께 설치되는 종합 패키지이다. 아나콘다(Anaconda)를 사용하면 필요한 여러 패키지들을 별도로 하나씩 설치해주어야 하는 번거로움이 없고 쉽게 가상환경을 만들고 버전 관리를 할 수 있기…
윈도우즈 환경에서 OpenCV 개발 환경을 구성할 때 다음의 두 가지 방법이 있다. 1번 방법의 경우 설치가 간편하지만 빌드시 이미 고정되어 있는 여러 가지 옵션들을 변경할 수 없다는 점, 최신 업데이트가 반영되지 않을 수 있다는 점,…
Visual Studio에서 작업을 하다 보면 하나의 솔루션(solution) 안에 여러 개의 프로젝트(project)를 만들어서 관리해야 하는 경우가 생긴다. 이 때, 각 프로젝트 마다 개별적으로 설정을 해주는 것은 여간 귀찮은 일이 아니다. (예를 들면, 헤더 파일이 있는 디렉토리…
Ubuntu version: 18.04.2Python version: 3.6g++ version: 7.3.0clang version: 6.0.0swig version: 3.0.12OpenCV version: 4.0.0 [C++ code] class Image { private: cv::Mat mat; public: Image() {} }; The following errors occur when importing my module after binding…
디자인에는 “최소 놀람의 원칙 (principle of least astonishment 또는 principle of least surprise)”이라는 것이 있다. 사용자가 디자인의 결과물을 마주쳤을 때 예상 가능한 범위를 넘어 당황하거나 놀라지 말아야 한다는 의미이다. 직관적인 디자인은 사용자가 고민을 하지 않도록…
There is no excerpt because this is a protected post.
There is no excerpt because this is a protected post.
보통 회전(rotation)하는 양을 나타낼 때 [0,360) 범위의 숫자를 사용한다. 이러한 경우에 361º는 (360+1)º와 동일한 방향(orientation)을 나타내므로 1º로 표기한다. 그런데, 가끔 이러한 범위 제약 없이 연속적으로 누적하여 회전량을 표기해야 할 필요성이 있을 때가 있다. 예를 들어보자….
// given data Point worldPoint = …; Point worldCameraPosition = …; Point worldAimingPoint = …; // the assumption in this example) // the camera’s up vector = world y-axis Vector upVector = Vector( 0.0, 1.0,…
SOA (Structure of Array) [position0, position1, position2, …] / [color0, color1,color2, …] / [normal0, normal1,normal2, …] AOS (Array of Structure) [position0/color0/normal0], [position1/color1/normal1], [position2/color2/normal2], …
void fftw_execute_dft_c2r( const fftw_plan p, fftw_complex *in, double *out); This function is one of the new-array execute functions in FFTW 3.3.7. When using this function, be careful that the input array changes. It is a…
class MyClass { public: float x; public: MyClass(); void a() const; void b(); }; MyClass::MyClass() { x = 0.f; } void MyClass::a() const { MyClass* ptr = (MyClass*)this; ptr->b(); } void MyClass::b() { x++; }…
#include <iostream> #include <vector> using namespace std; class A { public: float x; public: A() : x(0.f) { cout<<"Default Constructor"<<endl; } A( const A& a ) : x(a.x) { cout<<"Copy Constructor"<<endl; } A( const A&&…
gcc -shared libMySharedLibrary.so `ls *.o` The *.o files must be compiled with -fPIC or -fpic option.
Add the following two lines in ~/.vimrc autocmd BufReadPre SConstruct set filetype=python autocmd BufReadPre SConscript set filetype=python
#include <iostream> using namespace std; #include <cuda.h> #include <cuda_runtime.h> int main( void ) { cudaError_t stat = cudaSuccess; int devCount = 0; cudaGetDeviceCount( &devCount ); if( !devCount ) { cout << "No Cuda Device." <<…
inline float FastInvSqrt( float x ) { float xHalf = 0.5f * x; int i = *(int*)&x; i = 0x5f3759df – (i>>1); x = *(float*)&i; x = x*(1.5f-xHalf*x*x); // 1st Newton iteration //x = x*(1.5f-xHalf*x*x);…
길이가 1인 두 개의 벡터 A와 B가 주어졌을 때, 두 벡터 사이의 각도를 구하는 함수 float Angle1( const Vector& A, const Vector& B ) { return acosf( DotProduct(A,B) ); } : A와 B가 거의 평행하게…
[ hash table (or hash map) ] – associated array: (key, value) 형식의 data를 저장하는 data structure – hash function을 사용하여 입력 key 값으로부터 hash value를 얻은 다음 이를 index로 사용하여 associated array의 형태로 저장하는…
컴파일시 error: identifier “atomicAdd” is undefined와 같은 에러가 발생한다면 다음과 같이 GPU architecture 옵션을 주면 된다. Windows Visual Studio: 속성 -> CUDA Runtime API -> GPU 에서 GPU Architecture (1)에서 sm_20으로 설정 Linux: nvcc에서 -arch…
CentOS를 사용했을 때에는 이러한 error가 발생하지 않았으나, Ubuntu에서 컴파일 하니 이런 error가 발생하였다. 이 때에는 #include <climits> 를 포함해주면 된다.
((case1)) class tetgenio { … typedef struct { int *vertexlist; int numberofvertices; } polygon; <strong> typedef struct { polygon *polygonlist; int numberofpolygons; double *holelist; int numberofholes; } facet;</strong> … }; ((case2)) class tetgenio { … typedef…
gtkgl로 작성한 프로그램 실행시 /usr/autodesk/maya2008-x64/lib/libgcc_s.so.1: version `GCC_4.2.0′ not found (required by /usr/lib64/libstdc++.so.6)와 같은 에러가 발생하였는데, root계정으로 실행할 때에는 정상적으로 실행되는 것으로 보아 특정 파일의 permission 문제인 것으로 생각을 했었지만, LD_LIBRARY_PATH에 /usr/autodesk/maya2008-x64/lib 경로가 잡혀있기 때문에 발생한…
GTK+는 LGPL(Lesser General Public License) 약관을 따른다. 즉, 간단하게 말해 GTK+ 라이브러리를 이용하여 사용 코드를 작성해도 된다는 뜻이다. 이와 비교되는 Qt는 GPL 라이센스를 따르기 때문에, 이를 이용하여 상용 프로그램을 개발할 수 없다. GTK+와 QT 모두…
Linux에서 Maya plugin을 complile하면 다음과 같은 error가 발생할 때가 있다. /usr/autodesk/maya2008-x64/include/maya/M3dView.h:94:27: error: X11/Intrinsic.h: No such file or directory /usr/autodesk/maya2008-x64/include/maya/M3dView.h:95: error: ‘Widget’ does not name a type /usr/autodesk/maya2008-x64/include/maya/M3dView.h:326: error: ‘MWindow’ does not name a type make:…
cross platform GUI를 만들 수 있는 방법을 찾던 중 가장 눈에 띄는 wxWidgets라는 것을 발견하였다. cross platform이라는 점은 생각보다 엄청난 장점이 될 수 있다. 특히, Windows와 Linux를 동시에 사용한다면… 그리고, wxWidgets for Mac OS X까지……
boost python 사용시 (ver.1.3.7) 컴파일하면 다음과 같은 에러가 발생할 수 있다. /usr/include/bits/fcntl.h:227: error: reference to ‘ssize_t’ is ambiguous /usr/include/sys/types.h:110: error: candidates are: typedef __ssize_t ssize_t /usr/local/include/boost-1_37/boost/python/ssize_t.hpp:15: error: typedef Py_ssize_t boost::python::ssize_t /usr/include/bits/fcntl.h:227: error: reference to ‘ssize_t’…
“there are no arguments to ……… that depend on a template parameter” 컴파일시에 위와 같은 에러가 발생하는 이유 gcc 4.1 버전부터 표준을 더 엄격하게 지키려고 하다보니 발생하는 문제로서 일종의 버그라고 봐도 무방하다. 해결책은 다음 3가지…