(tweak) Update README, fix misc_utils.py

This commit is contained in:
Benjamin Evans committed 2024-09-28 16:26:35 -05:00
1 parent e8e5662447
commit 987e026434
2 files changed
+17 -15

No files matched your search

+8 -12
View File
@@ -6,12 +6,16 @@ import os
import platform
import cv2
import subprocess
from pygrabber.dshow_graph import FilterGraph
is_nt = True if sys.platform.startswith('win') else False
graph = FilterGraph()
# Detect the operating system
is_nt = os.name == "nt"
os_type = platform.system()
if is_nt:
from pygrabber.dshow_graph import FilterGraph
graph = FilterGraph()
def list_camera_names():
cam_list = graph.get_input_devices()
cam_names = []
@@ -20,14 +24,6 @@ def list_camera_names():
cam_names = cam_names + list_serial_ports()
return cam_names
# Detect the operating system
is_nt = True if os.name == "nt" else False
os_type = platform.system()
if is_nt:
from pygrabber.dshow_graph import FilterGraph
graph = FilterGraph()
def list_cameras_opencv():
""" Use OpenCV to check available cameras by index (fallback for Linux/macOS) """
+9 -3
View File
@@ -1,4 +1,3 @@
![Babble Logo](https://github.com/SummerSigh/ProjectBabble/blob/SummerSigh-patch-4/Babble.png?raw=true)
<h3 align="center">
@@ -32,8 +31,15 @@ Once it's finished installing, you can update and run the Babble app by typing `
*You should also be able to run the Windows executable through Wine!*
#### Note:
If you recieve a `ModuleNotFoundError: No module named 'tkinter'` error message on run, you'll need to install `tkinter` for your distro.
#### Notes:
If you receive a `["Error listing UVC devices on Linux ... No such file or directory"]` when choosing/changing your camera, you'll need to install video4linux (`v4l-utils`) for your distro.
For Ubuntu or other distros with apt:
```bash
sudo apt-get install v4l-utils
```
If you receive a `ModuleNotFoundError: No module named 'tkinter'` error message on run, you'll need to install `tkinter` for your distro.
For Ubuntu or other distros with apt:
```bash