{"id":21496660,"url":"https://github.com/jupfu/beck-view-digitalize","last_synced_at":"2026-05-09T03:34:21.237Z","repository":{"id":177863188,"uuid":"661014766","full_name":"JuPfu/beck-view-digitalize","owner":"JuPfu","description":"Digitalize 16mm films with Python \u0026 reactivex \u0026 FT232H","archived":false,"fork":false,"pushed_at":"2026-02-04T19:56:58.000Z","size":56625,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-05T07:56:51.642Z","etag":null,"topics":["cython","ft232h","libpng","multiprocessing","numpy","opencv","python3","reactivex","um232h"],"latest_commit_sha":null,"homepage":"","language":"Cython","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JuPfu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-07-01T14:17:50.000Z","updated_at":"2026-01-14T10:55:15.000Z","dependencies_parsed_at":"2024-04-28T11:22:03.696Z","dependency_job_id":"4aa23e7a-4f86-4928-b075-ce45c51686c4","html_url":"https://github.com/JuPfu/beck-view-digitalize","commit_stats":null,"previous_names":["jupfu/beck-view-digitalize"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JuPfu/beck-view-digitalize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuPfu%2Fbeck-view-digitalize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuPfu%2Fbeck-view-digitalize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuPfu%2Fbeck-view-digitalize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuPfu%2Fbeck-view-digitalize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuPfu","download_url":"https://codeload.github.com/JuPfu/beck-view-digitalize/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuPfu%2Fbeck-view-digitalize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32806011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cython","ft232h","libpng","multiprocessing","numpy","opencv","python3","reactivex","um232h"],"created_at":"2024-11-23T16:18:11.618Z","updated_at":"2026-05-09T03:34:21.225Z","avatar_url":"https://github.com/JuPfu.png","language":"Cython","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Beck-View-Digitize\n\nDigitize 16 mm films using **Cython**, **OpenCV**, **ReactiveX**, **PyFtdi**, and an **FT232H breakout board**.\n\n---\n\n## Project Summary\n\nBeck-View-Digitize is designed to digitize 16 mm film using a mechanically modified projector and a USB camera.\n\nA USB camera is mounted in front of the projector lens. When a film frame is positioned and mechanically at rest, an opto-coupler sends a signal to an **FT232H** microcontroller. This signal triggers the capture of a single frame via the USB camera. The captured image is processed using **OpenCV** and written to disk in **PNG format**.\n\nTo achieve sustained high frame rates, the project integrates **Cython** for performance-critical code paths. Migrating selected components from Python to Cython significantly improves execution speed and reduces overhead in the image capture and processing pipeline.\n\nCaptured image sequences can be reassembled into a movie using\n[Beck-View-Movie](https://github.com/JuPfu/beck-view-movie).\n\n![Beck-View Overview](./assets/img/beck-view-overview.jpg)\n\n---\n\n## Building Beck-View-Digitize\n\nBeck-View-Digitize combines Python, Cython, and native libraries to achieve high-performance film digitisation.\n\nThis section explains how to build the project on:\n\n* **Windows**\n* **macOS**\n* **Linux**\n\nThe repository provides platform-specific helper scripts:\n\n* `install.bat` (Windows)\n* `install.sh` (macOS / Linux)\n\nThese scripts:\n\n* create a Python virtual environment\n* install Python dependencies\n* build the Cython extensions in place\n\n⚠️ Native dependencies (notably **libpng**) must be installed separately.\n\n---\n\n## Prerequisites (All Platforms)\n\n* Python **3.10 or newer** (64-bit recommended)\n* Git\n* Native C compiler\n\n  * Windows: MSVC (Visual Studio Build Tools)\n  * macOS: Xcode Command Line Tools\n  * Linux: GCC or Clang\n\nUsing a Python virtual environment is **strongly recommended**.\n\n---\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/JuPfu/beck-view-digitalize.git\ncd beck-view-digitalize\n```\n\n---\n\n## Windows\n\n### 1. Install Python\n\nDownload Python from:\n\n[https://www.python.org/downloads/windows/](https://www.python.org/downloads/windows/)\n\nDuring installation:\n\n* Enable **“Add Python to PATH”**\n* Ensure **pip** is installed\n\nVerify:\n\n```powershell\npython --version\npip --version\n```\n\n---\n\n### 2. Install Visual Studio Build Tools (MSVC)\n\nCython extensions and libpng require a native compiler.\n\nDownload **Visual Studio Build Tools** from:\n\n[https://visualstudio.microsoft.com/visual-cpp-build-tools/](https://visualstudio.microsoft.com/visual-cpp-build-tools/)\n\nDuring setup, enable:\n\n* Desktop development with C++\n* MSVC v143 (or newer)\n* Windows 10/11 SDK\n\n---\n\n### 3. Install libpng Using vcpkg\n\nBeck-View-Digitize uses **libpng directly** for high-performance PNG writing.\nOn Windows, **vcpkg** is the recommended and tested installation method.\n\n#### Install vcpkg\n\n```powershell\ngit clone https://github.com/microsoft/vcpkg.git\ncd vcpkg\nbootstrap-vcpkg.bat\n```\n\nOptional but recommended:\n\n```powershell\nvcpkg integrate install\n```\n\n#### Install libpng\n\nMake sure the triplet matches your Python architecture (usually `x64`):\n\n```powershell\nvcpkg install libpng:x64-windows\n```\n\nThis installs:\n\n* `png.h`\n* `libpng16.lib`\n* required zlib dependencies\n\n---\n\n### 4. Build Beck-View-Digitize (Windows)\n\nFrom the project root directory:\n\n```powershell\ninstall.bat\n```\n\nThe script will:\n\n* create a virtual environment\n* install Python dependencies\n* build all Cython extensions\n\n---\n\n### 5. Verify the Build\n\nOn each platform, the install script generates a native executable.\n\nA simple verification step is to run the executable with the `--help` option:\n\n```powershell\nbeck-view-digitize.exe --help\n```\n\nThis is not a full functional test, but it confirms that:\n\n* the executable was built successfully\n* required native libraries are available at runtime\n* the program starts correctly\n\nIf the help text is displayed, the build can be considered successful.\n\n---\n\n## macOS\n\n### 1. Install System Dependencies\n\n```bash\nxcode-select --install\nbrew install python libpng libusb\n```\n\n---\n\n### 2. Build Beck-View-Digitize\n\n```bash\nchmod +x install.sh\n./install.sh\n```\n\nHomebrew provides the required `libpng` and `libusb` headers and libraries.\n\n---\n\n### 3. Verify the Build\n\n```bash\n./beck-view-digitize --help\n```\n\n---\n\n## Linux (Debian / Ubuntu)\n\n### 1. Install System Packages\n\n```bash\nsudo apt update\nsudo apt install -y \\\n    python3 python3-venv python3-dev \\\n    build-essential \\\n    libpng-dev \\\n    libusb-1.0-0-dev\n```\n\n---\n\n### 2. Build Beck-View-Digitize\n\n```bash\nchmod +x install.sh\n./install.sh\n```\n\n---\n\n### 3. Verify the Build\n\n```bash\n./beck-view-digitize --help\n```\n\n---\n\n## Linux: USB Permissions for FT232H (udev Rules)\n\nOn Linux, Beck-View-Digitize accesses the FT232H device directly via USB.\nWithout additional configuration, this requires **root privileges**.\n\nTo allow access for normal users, a **udev rule** must be installed.\n\n### Identify the Device\n\n```bash\nlsusb\n```\n\nExpected entry:\n\n```\nID 0403:6014 Future Technology Devices International, Ltd FT232H\n```\n\n### Install the udev Rule\n\nCreate or edit the rules file:\n\n```bash\nsudo nano /etc/udev/rules.d/11-ftdi.rules\n```\n\nAdd:\n\n```text\nSUBSYSTEM==\"usb\", ATTR{idVendor}==\"0403\", ATTR{idProduct}==\"6014\", MODE=\"0666\", GROUP=\"plugdev\"\n```\n\nReload rules:\n\n```bash\nsudo udevadm control --reload-rules\nsudo udevadm trigger\n```\n\nUnplug and reconnect the device.\n\nIf access is denied, ensure your user is in the `plugdev` group.\n\n---\n\n## Windows: Installing the libusb-win32 Driver for FT232H\n\nOn Windows, Beck-View-Digitize requires a **libusb-win32 compatible driver** for the FT232H.\n\n### Steps Overview\n\n1. Install the official FTDI CDM driver\n2. Download and run **Zadig**\n3. Replace the FTDI driver with **libusb-win32**\n\n### Install FTDI Driver\n\nDownload from:\n\n[https://ftdichip.com/drivers/](https://ftdichip.com/drivers/)\n\nInstall and reboot if required.\n\n---\n\n### Install Zadig\n\nDownload Zadig from:\n\n[https://zadig.akeo.ie/](https://zadig.akeo.ie/)\n\nRun `zadig.exe` as **Administrator**.\n\n---\n\n### Replace the Driver\n\n1. Enable **Options → List All Devices**\n2. Select the FT232H device\n3. Choose **libusb-win32**\n4. Click **Replace Driver**\n\nAfter completion, the device should appear under **libusb-win32 devices** in Device Manager.\n\n---\n\n## Hardware Overview\n\n![Projector Setup](./assets/img/projector_1.jpg)\n*Projector with mounted USB camera*\n\n![Optocoupler](./assets/img/projector_2.jpg)\n*Opto-coupler synchronized with the rotating shutter*\n\n![Mechanical Mount](./assets/img/projector_3.jpg)\n*Spring-damped camera platform*\n\n![Beck View](./assets/img/projector_4.jpg)\n*Front view of the Beck-View setup*\n\n### Circuit Diagram\n\n![Circuit Diagram](./assets/img/beck-view-layout.png)\n\nThe FT232H connects via USB-C and provides:\n\n* **GPIO D6**: Frame synchronization\n* **GPIO D7**: End-of-film signal\n\n---\n\n## Notes\n\n* The libpng-based writer is essential for sustained frame rates\n* PNG filters are disabled by default for performance\n* Shared memory is used to avoid unnecessary data copies\n* MSVC + vcpkg provides the most reproducible Windows build\n\n---\n\n## Contributing\n\nContributions are welcome.\n\n1. **Fork the repository**\n2. **Create a Feature Branch:**\n   ```bash\n   git checkout -b feature/your-feature\n   ```\n3. **Commit your changes**\n   ```bash\n   git commit -m 'Add some feature'\n   ```\n4. **Push and open a pull request**\n   ```bash\n   git push origin feature/your-feature\n   ```\n\n---\n\n## License\n\nMIT License — see [LICENSE](LICENSE)\n\n---\n\n## Acknowledgements\n\n\nThanks to the contributors of\n* [NumPy](https://numpy.org/), \n* [OpenCV](https://opencv.org/), \n* [ReactiveX](https://reactivex.io/), \n* [PyFtdi](https://eblot.github.io/pyftdi/installation.html) \n* [libpng](https://www.libpng.org/pub/png/libpng.html) \n\nfor their libraries and support.\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjupfu%2Fbeck-view-digitalize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjupfu%2Fbeck-view-digitalize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjupfu%2Fbeck-view-digitalize/lists"}