Software Archive
Read-only legacy content
17061 Discussions

Doc example typos

Zsolt_E_
New Contributor I
256 Views

There are 3 typos in "C++ Example 65: Using the Blob Extractor". All of them are missing & and * characters. This is the corrected version:

// Extract the blobs
void ExtractBlobs(PXCSession *session, PXCImage *image, std::vector<PXCBlobExtractor::BlobData> &blobs) {
	blobs.clear();

	// Create an instance of the blob extractor
	PXCBlobExtractor *blob = 0;
	pxcStatus sts = session->CreateImpl<PXCBlobExtractor>(&blob);
	if (sts < PXC_STATUS_NO_ERROR) return;

	// Initialize
	PXCImage::ImageInfo iinfo = image->QueryInfo();
	PXCImage *segImage = session->CreateImage(&iinfo);
	blob->Init(iinfo);

	// Extract blobs from the image
	blob->ProcessImage(*image);

	// Prepare blob data to return back
	int nblobs = blob->QueryNumberOfBlobs();
	for (int i = 0; i < nblobs; i++) {
		PXCBlobExtractor::BlobData data2;
		blob->QueryBlobData(i, *segImage, data2);
		blobs.push_back(data2);
	}

	// Clean up
	segImage->Release();
	blob->Release();
}

    // Clean up
    segImage->Release();
    blob->Release();
}

0 Kudos
1 Reply
Zsolt_E_
New Contributor I
256 Views

It seems that example 66 also has a bug at

contour->ProcessImage(*image);

 

0 Kudos
Reply