How to Bundle Artec Scanners
The code snippet below shows how to scan using several devices simultaneously.
ErrorCode ScanningProcedureBundleSample( AlgorithmWorkset& workset )
// example of the post-scanning processing
asdk::ErrorCode AlgorithmProcessingSample( asdk::AlgorithmWorkset& workset )
{
TRef<IArrayScannerId> scannersList;
cout << "Enumerating scanners... " << endl;
SAFE_SDK_CALL( enumerateScanners( &scannersList ));
TRef<IArrayScanner> scanners;
SAFE_SDK_CALL( createArrayScanner( &scanners, scannersList->getSize( ) ));
cout << "Creating " << scannersList->getSize() << " scanners..." << endl;
for(int i = 0; i < scannersList->getSize(); i++)
{
cout << "Creating scanner " << i << "..." << endl;
TRef<IScanner> s;
SAFE_SDK_CALL( createScanner( &s, NULL ));
scanners->setElement(i, s);
s->setTextureTriggerDelay(1);
}
cout << "Creating scanning bundle procedure..." << endl;
TRef<IScanningProcedureBundle> scanning;
// a burst of one hundred shots in fully automatic
ScanningProcedureBundleSettings desc = { 0 };
desc.procedureSettings.maxFrameCount = 1000;
desc.procedureSettings.initialState = ScanningState_Record;
desc.procedureSettings.pipelineConfiguration = ScanningPipeline_FastCapture;
desc.procedureSettings.captureTexture = CaptureTextureMethod_OnTextureKeyFrame;
desc.procedureSettings.ignoreRegistrationErrors = true;
desc.threadCountPerScanner = 3;
SAFE_SDK_CALL( createScanningProcedureBundle(&scanning, scanners, &desc) );
cout << "Launching the scanning procedure fully automatic mode..." << endl;
SAFE_SDK_CALL( executeJob(scanning, &workset) );
executeJob(scanning, &workset);
return ErrorCode_OK;