Software Archive
Read-only legacy content
17061 Discussions

Incomplete task type

lee_j_2
Beginner
209 Views

 

I am getting the error of incomplete task type. Am i doing something wrong and why?

 

PXCSenseManager *psm = 0;
psm = PXCSenseManager::CreateInstance();

 

//Projection
        PXCCaptureManager *cm = psm->QueryCaptureManager();
        PXCCapture::Device *device = cm->QueryDevice();
        // color and depth image size.
        PXCImage::ImageInfo dinfo = depth_image->QueryInfo();
        PXCImage::ImageInfo cinfo = color_image->QueryInfo();

        
    
        // Calculate the UV map.
        PXCPointF32 *uvmap = new PXCPointF32[dinfo.width*dinfo.height];
        //projection->QueryUVMap(depth_image, uvmap);

        PXCProjection *projection = device->CreateProjection();
        projection->QueryUVMap(depth, uvmap);                                <<<-------------error happens here

 

 

 

Below is what the document suggests doing. 

 

Example 40 shows how to map depth to color coordinates using the UV map.

Example 40: Map Depth to Color Coordinates using UV Mapping

 

 

 

// Create the PXCProjection instance.
PXCProjection *projection=device->CreateProjection();

 

// color and depth image size.
PXCImage::ImageInfo dinfo=depth->QueryInfo();
PXCImage::ImageInfo cinfo=color->QueryInfo();
// Calculate the UV map.
PXCPointF32 *uvmap=new PXCPointF32[dinfo.width*dinfo.height];
projection->QueryUVMap(depth, uvmap);
// Translate depth points uv[] to color ij[]
for (int i=0;i<npoints;i++) {
  ij[i].x=uvmap[(int)uv[i].y*dinfo.width+(int)uv[i].x].x*cinfo.width;
  ij[i].y=uvmap[(int)uv[i].y*dinfo.width+(int)uv[i].x].y*cinfo.height;
}

 

// Clean up
delete[] uvmap;
projection->Release();

 

0 Kudos
0 Replies
Reply