Home > other >  The multifrequency heterodyne method of structured light 3 d reconstruction
The multifrequency heterodyne method of structured light 3 d reconstruction

Time:09-24




 oid MultiPhaseDec: : decMultiPhase5 (Mat * imgShift, Mat & amp; ImgAbsPhase) 
{
//get wrap phase
F32 * dPtr=(F32 *) imgAbsPhase. Data;
Mat imgPhase [5].
for(int k=0; K<5; K++)
ImgPhase [k]=Mat: : zeros (m_nHeight m_nWidth, CV_32FC1);

For (int n=0; N<4. N++)
{
PIXEL * I0=(PIXEL *) imgShift [4 * n + 0]. Data;
PIXEL * I1=(PIXEL *) imgShift [4 * n + 1]. The data;
PIXEL * I2=(PIXEL *) imgShift * n + 2 [4]. The data;
PIXEL * I3=(PIXEL *) imgShift [4 * n + 3). The data;

F32 * pha=(F32 *) imgPhase [n]. The data;
for(int k=0; K & lt; M_nWidth * m_nHeight; K++)
{

If (pha [k] <0)
Pha [k] +=PI2;
DPtr [k]=0;
}


Mat imgAbsPhase1=Mat: : zeros (m_nHeight m_nWidth, CV_32FC1);
Mat imgAbsPhase2=Mat: : zeros (m_nHeight m_nWidth, CV_32FC1);
Mat imgAbsPhase3=Mat: : zeros (m_nHeight m_nWidth, CV_32FC1);

ImgPhase phaseUnWrap (imgPhase [0], [1], imgAbsPhase1, m_dFreq [0], m_dFreq [1]).
PhaseUnWrap (imgAbsPhase1, imgPhase [2], imgAbsPhase2, m_dFreq [1], m_dFreq [2]).
PhaseUnWrap (imgAbsPhase2, imgPhase [3], imgAbsPhase3, m_dFreq [2], m_dFreq [3]).
PhaseUnWrap (imgAbsPhase3, imgPhase [4], imgAbsPhase, m_dFreq [3], m_dFreq [4]);

//ImgShowPhase (imgPhase [0], "0");
//ImgShowPhase (imgPhase [1], "1");
//ImgShowPhase (imgPhase [2], "2");
//ImgShowPhase (imgPhase [3], "3");
//ImgShowPhase (imgPhase [4], "4");
//cvWaitKey (1000000);
//
//ImgShowAbsPhase (imgPhase [0], PI2, "abs0");
//ImgShowAbsPhase (imgAbsPhase1, 3 * PI2, "abs1");
//ImgShowAbsPhase (imgAbsPhase2, 9 * PI2, "abs2");
//ImgShowAbsPhase (imgAbsPhase3, 27 * PI2, "abs3");
//ImgShowAbsPhase (imgAbsPhase, 81 * PI2, "abs4");
//cvWaitKey (1000000);


}



Need other can add QQ1264768501, or leave a message

CodePudding user response:

CodePudding user response:

  • Related