Giter Site home page Giter Site logo

media-tools's Introduction

Forsythe Media Tools

This repository is a collection of custom tools that I've written to help me capture, process, and catalog a large archive of family photos and other printed and audiovisual artifacts.

copystand

These command-line tools are currently available:

  • fma list [<collection-type>]: Lists all collections of a certain type (defaults to 'photos'), where collections are directories kept in $FMA_ROOT/<collection-type>/<collection-name>. Also indicates which of those collections (if any) is currently selected.

  • fma select [-t <collection-type>] <collection-name>: Selects the specified collection, making it the target of subsequent commands. Configuration state is saved to $FMA_ROOT/config.json. e.g. if FMA_ROOT is Q:\media, then fma select album_02 will make Q:\media\photos\album_02 the selected collection.

  • fma shoot [<subdir>]: Begins a guided process for capturing photos in the currently-selected collection. A subdirectory can be specified to sort shots into distinctly-numbered sets (e.g. "artifact" for images of a photo album, and "images" for the actual photos in the album). This process uses Canon's EOS Utility 3 and automates the process of configuring the output paths and filenames, as well as closing and launching Remote Live View as necessary. Photos are captured by pressing one of the arrow keys to indicate the orientation of the photo, so that rotating and cropping can later be batched without user input.

  • fma orient <directory>: Displays all images in the given directory to the user, one by one. The user presses an arrow key (up, down, left or right) to indicate which edge of the subject is the top edge: i.e., for a photo shot upside-down the top edge is down; for a photo that's already in the correct orientation, the top edge is up. Pressing any other key will reverse to allow mistakes to be corrected. Orientation data is saved in .params/<image_name>.json.

  • fma crop <directory>: Uses darktable to regenerate XMP files for all images in the given directory (note that this will destroy any prior adjustments made in the darktable GUI), then auto-crops each image, writing the new cropping parameters into the XMP files. In darktable's core options menu, "look for updated xmp files on startup" must be enabled in order to allow XMP reloads.

Functionality for these tools is implemented across several Python modules:

  • forsythe.collections: Basic filesystem abstraction for dealing with individual collections that fit into a particular folder structure (with the environment variable FMA_ROOT specifying the root path). A photo album would be a single collection containing multiple images. An audio tape would be another collection consisting of multiple audio and image files.

  • forsythe.images: Organization and file handling for images, including cached conversion from .CR2 RAW to JPEG for intermediate processing.

  • forsythe.eos: Automation support for Canon's EOS Utility 3, for use with a Canon EOS Rebel T6 camera. Provides code for ensuring that the camera is connected, closing and opening the Remote Live View window for camera capture, and seamlessly modifying the application config in order to set output paths.

  • forsythe.darktable: Utilities for working with darktable, an open-source version of Lightroom. Handles launching darktable, clearing and regenerating .XMP sidecar files, and adding image operations to XMPs.

  • forsythe.cropper: Uses OpenCV to detect the subject (i.e. the physical photo print) in an image captured on a copystand. Assumes a solid-colored background suitable for color keying.

Install Python 3 and pipenv, then run pipenv install to create a virtualenv with the prerequisite modules. From there, you can use fma <command> to run commands (or, failing that, pipenv run python main.py <command>).

This is a hobby project.

media-tools's People

Contributors

awforsythe avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.