The main application (app.py) cannot start because it requires Firebase credentials, which prevents the camera from working.
Run this command to test if your camera works at all:
python simple_camera_test.pyWhat this does:
- ✅ Tests basic camera access
- ✅ Tests hand tracking functionality
- ✅ Gives you interactive camera test
- ✅ No Flask or Firebase required
Expected output:
🤟 Sign Language Learning - Camera Test
==================================================
🎥 Testing Camera Access...
✅ Camera opened at index 0
📊 Camera Properties:
Resolution: 640x480
FPS: 30.0
✅ Successfully read frame from camera
🖐️ Testing Hand Tracking...
✅ Hand detector initialized successfully
✅ Hand detection test passed - Found 0 hands
✅ All tests passed!
🎮 Do you want to run interactive camera test? (y/n):
When prompted, type y to run the interactive camera test:
What you'll see:
- 🎥 Live camera feed in a window
- 🖐️ Hand detection with landmarks
- 📊 Finger count and pattern display
- 💾 Press 's' to save images
- 🔴 Press 'q' to quit
❌ "No camera found at any index"
- Check if camera is connected
- Close other apps using camera (Zoom, Teams, etc.)
- Restart your computer
- Check Device Manager for camera drivers
❌ "Failed to read frame from camera"
- Camera is busy with another application
- Close all camera-using apps
- Check Windows privacy settings for camera access
❌ "Hand tracking test failed"
- Reinstall dependencies:
pip install -r requirements.txt - Make sure you're in the virtual environment
If the standalone test works, try the web version:
python camera_test.pyThen:
- Open browser to
http://localhost:5000 - Click "🚀 Start Camera"
- Allow camera access when prompted
- You should see live camera feed with hand tracking
Once camera is working, you can fix the main app by:
Edit app.py and comment out Firebase initialization:
# Comment out these lines temporarily:
# if not firebase_admin._apps:
# cred = credentials.Certificate("firebase-credentials.json")
# firebase_admin.initialize_app(cred)
# db = firestore.client()- Go to Firebase Console
- Create a new project
- Download service account key as
firebase-credentials.json - Place it in your project root
- Camera is physically connected
- Camera shows in Device Manager
- No other app is using camera
- Windows privacy settings allow camera access
- Virtual environment is activated (
venv\Scripts\activate) - All dependencies installed (
pip install -r requirements.txt) - OpenCV can access camera
- MediaPipe is working
- Using HTTPS or localhost
- Camera permissions granted
- No browser extensions blocking camera
- Modern browser (Chrome, Firefox, Edge)
python simple_camera_test.pypython camera_test.pypython demo.pypython test_setup.py- Camera opens and shows live feed
- Hand tracking detects your hand
- Finger patterns are displayed
- Real-time processing works smoothly
- Camera doesn't open
- Error messages about camera access
- Hand tracking not working
- Poor performance or lag
- Run the test and share the exact error message
- Check Windows camera app works first
- Try different camera index (0, 1, 2, etc.)
- Restart computer and try again
- Check if camera works in other applications
- Error message from
python simple_camera_test.py - Windows version
- Camera model (if known)
- Whether camera works in other apps
Once camera is working:
- Test hand tracking accuracy
- Try different hand positions
- Test in different lighting conditions
- Move to main application testing
- Configure Firebase for full functionality
Remember: The camera test is designed to work independently. If it fails, the issue is with your camera setup, not the application code!