http://msdn.microsoft.com/ko-kr/library/s8e39b8h.aspx


생성자 안에서는 아직 상속관계가 형성되지 않아

자식 클래스의 추상 함수가 호출되지 않고 현재 생성자의 추상 함수가 호출된다.



by 고민고민하지마~* 2014. 11. 22. 16:02

mkdir 쉘 커맨드 사용.

ex)

bool MakePathIter(string path)

{

#ifdef _WIN32

system((string("mkdir ") + path).c_str());

#endif

return true;

}


by 고민고민하지마~* 2014. 8. 18. 22:07

일반 용도 : (/MD 옵션)

mkdir build\amd64\v110

bjam --toolset=msvc-11.0 architecture=x86 address-model=64 link=static runtime-link=static variant=release,debug --without=mpi --without=python --stagedir=build/amd64/v110 stage -j 2

mkdir build\x86\v110

bjam --toolset=msvc-11.0 architecture=x86 address-model=32 link=static runtime-link=static variant=release,debug --without=mpi --without=python --stagedir=build/x86/v110 stage -j 2


mkdir build\amd64\v100

bjam --toolset=msvc-10.0 architecture=x86 address-model=64 link=static runtime-link=static variant=release,debug --without=mpi --without=python --stagedir=build/amd64/v100 stage -j 2

mkdir build\x86\v100

bjam --toolset=msvc-10.0 architecture=x86 address-model=32 link=static runtime-link=static variant=release,debug --without=mpi --without=python --stagedir=build/x86/v100 stage -j 2


Matlab 용도 : (/MT 옵션을 사용해야한다?)

mkdir build_mt\amd64\v100

bjam --toolset=msvc-10.0 architecture=x86 address-model=64 link=static runtime-link=shared variant=release,debug --without=mpi --without=python --stagedir=build_mt/amd64/v100 stage -j 2

mkdir build_mt\x86\v100

bjam --toolset=msvc-10.0 architecture=x86 address-model=32 link=static runtime-link=shared variant=release,debug --without=mpi --without=python --stagedir=build_mt/x86/v100 stage -j 2



문제 사항 : bootstrap 실행 안됨

해결 : 환경변수에 visual studio 경로 설정 안 되었음

C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64;


참고 : http://anster.egloos.com/2157882

by 고민고민하지마~* 2014. 8. 13. 13:42

1. Mask 사용

CopyTo를 이용

ex) 

cv::Mat MaskClone(cv::Mat &_Src, const cv::Mat &_Mask, cv::Scalar Def)

{

Mat NewMat(_Src.size(), _Src.type(), Def);


_Src.copyTo(NewMat, _Mask);


return NewMat;

}


2. Mat 내부 벡터 초기화

Mat_ 초기화 사용

ex)

m_CameraMatrix = (Mat_<float>(4, 4) <<

_fu, 0, _cu, 0, 

0, _fv, _cv, 0,

0, 0, 0, _fu*_base,

0, 0, 1, 0);


3. Vector to Mat, Mat to Vector

Mat a(Vector<Point2f>)로 초기화시에 생성되는 Mat의 크기는 cols = 1 rows =  vector.size

ex)

cv::Mat CvtKeyPoints2PosMat(vector<KeyPoint> &_Src)

{

vector<Point2f> Src_Vector;

KeyPoint::convert(_Src, Src_Vector);

Mat Src_Channel[2];

split(Mat(Src_Vector).t(), Src_Channel);


return JMU::VCat(Src_Channel[0], Src_Channel[1]);

}


4. Reshape (Vector -> Mat)


5. Reshape (Mat -> Vector)


6. Unique 

딱히 Uniqe 함수는 없으며 std의 unique를 사용해야한다. (General하게 Mat을 받는 것은 차후에)

ex) unique한 mask를 생성

template<typename _Ty>

cv::Mat HUniq_PosMat(const cv::Mat &_Src)

{

assert(_Src.rows == 2);

Mat Temp = VCat(_Src, MakeSeq<_Ty>(Size(_Src.cols, 1)));

Temp = Temp.reshape(3, 1);


vector<Point3_<_Ty>> VecTemp(Temp.begin<Point3_<_Ty>>(), Temp.end<Point3_<_Ty>>());


std::unique(VecTemp.begin(), VecTemp.end(), 

[](const Point3_<_Ty> &a, const Point3_<_Ty> &b)

{

return a.x==b.x && a.y==b.y;

});

Mat Mask = Mat::zeros(1, _Src.cols, CV_8UC1);

unsigned char *pMask = Mask.data;


for(int i=0; i<VecTemp.size(); i++)

{

pMask[int(VecTemp[i].z)] = 1;

}


return Mask;

}

by 고민고민하지마~* 2014. 7. 18. 12:43
by 고민고민하지마~* 2013. 12. 11. 14:29
| 1 |