init mediapipe & tensorflow
This commit is contained in:
parent
8e8d317da3
commit
dc7e39f6d3
|
@ -58,11 +58,13 @@ const Home = () => {
|
||||||
|
|
||||||
if (videoRef.current) {
|
if (videoRef.current) {
|
||||||
videoRef.current.srcObject = stream;
|
videoRef.current.srcObject = stream;
|
||||||
mediapipeHelper = new MediapipeHelper(videoRef);
|
|
||||||
detectionHelper = new DetectionHelper();
|
|
||||||
console.log("Camera access granted and helpers initialized.");
|
console.log("Camera access granted and helpers initialized.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mediapipeHelper = new MediapipeHelper(videoRef);
|
||||||
|
detectionHelper = new DetectionHelper();
|
||||||
|
|
||||||
setLoadCamera(true);
|
setLoadCamera(true);
|
||||||
onHandDetected();
|
onHandDetected();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -79,9 +81,7 @@ const Home = () => {
|
||||||
|
|
||||||
startWebcam();
|
startWebcam();
|
||||||
|
|
||||||
return () => {
|
return () => {};
|
||||||
|
|
||||||
};
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue