Closed haoyunfeix closed 7 years ago
@haoyunfeix according to #190, customized camera options need to been set for multi-model usage.
const cameraOptions = {
color: {
width: 640,
height: 480,
frameRate: 30,
isEnabled: true,
},
fisheye: {
width: 640,
height: 480,
frameRate: 30,
isEnabled: true,
},
depth: {
width: 320,
height: 240,
frameRate: 30,
isEnabled: true,
},
};
function runSLAM(slam) {
console.log('run SLAM');
return slam.setCameraOptions(cameraOptions).then(function() {
return slam.start();
});
}
function runOR(or) {
return or.setObjectRecognitionOptions({
mode: 'single-recognition',
confidenceThreshold: 0.3,
computeEngine: 'CPU',
enableSegmentation: true,
maxReturnObjectCount: 2,
enableObjectCenterEstimation: false,
}).then(function() {
return or.setCameraOptions(cameraOptions);
}).then(function() {
console.log('run OR');
return or.start();
});
}
Donna had already commented on the suggested changeset above.
Updated code according to suggested comments above. All available test cases passed. @kenny-y please have a look.