HighRes von Cam im PC scalen

This commit is contained in:
ChK
2026-03-15 10:19:28 +01:00
parent 37b506e87e
commit a7ed2775dc
3 changed files with 75 additions and 6 deletions

View File

@@ -8,10 +8,24 @@ function snapshot(outDir, cam0, cam1, ws){
if (!fs.existsSync(outDir)) fs.mkdirSync(outDir, { recursive: true });
const picDate = Date.now();
const name0 = `snapshot_video0_${picDate}.jpg`;
const name1 = `snapshot_video1_${picDate}.jpg`;
var name0 = `snapshot_video0_${picDate}.jpg`;
var name1 = `snapshot_video1_${picDate}.jpg`;
cam0.snapshot(path.join(outDir, name0));
cam1.snapshot(path.join(outDir, name1));
console.log('Taking snapshot from cam0 async');
(async () => {
try {
console.log('Taking snapshot from cam1 a…');
var name1 = `snapshot_video1a_${picDate}.jpg`;
await cam1.snapshotHighRes(path.join(outDir, name1));
console.log('Snapshot gespeichert:', name1);
} catch (err) {
console.error('Snapshot fehlgeschlagen:', err);
}
})();
strFile0 = path.join(outDir, name0);