61 m_pSVSStereoImage =
new svsStereoImage();
62 m_pSVSStereoProcess =
new svsStereoProcess();
63 m_pSVSStereoImage->disparity =
new short[640 * 480];
68 delete m_pSVSStereoProcess;
69 delete m_pSVSStereoImage;
84 m_pSVSStereoImage->dp.corrsize = nWindowSize;
85 m_pSVSStereoImage->dp.thresh = nThreshold;
86 m_pSVSStereoImage->dp.lr = 1;
87 m_pSVSStereoImage->dp.ndisp = nDisparites;
88 m_pSVSStereoImage->dp.dpp = nStep;
89 m_pSVSStereoImage->dp.offx = 0;
90 m_pSVSStereoImage->dp.offy = 0;
92 m_pSVSStereoImage->have3D =
false;
95 ip.linelen = pLeftImage->
width;
96 ip.lines = pLeftImage->
height;
99 ip.width = pLeftImage->
width;
100 ip.height = pRightImage->
height;
104 m_pSVSStereoImage->SetImages(pLeftImage->
pixels, pRightImage->
pixels, 0, 0, &ip, 0,
false,
false);
106 m_pSVSStereoProcess->CalcStereo(m_pSVSStereoImage,
false);
108 const int nPixels = pLeftImage->
width * pLeftImage->
height;
109 const short *input = m_pSVSStereoImage->disparity;
110 float *output = pDepthMap->
data;
112 for (
int i = 0; i < nPixels; i++)
113 output[i] = input[i];
bool Process(CByteImage *pLeftImage, CByteImage *pRightImage, CFloatMatrix *pDepthMap, int nWindowSize, int nDisparites, int nStep, int nThreshold)
ImageType type
The type of the image.
Data structure for the representation of a matrix of values of the data type float.
int width
The width of the image in pixels.
int height
The height of the image in pixels.
unsigned char * pixels
The pointer to the the pixels.
Data structure for the representation of 8-bit grayscale images and 24-bit RGB (or HSV) color images ...