Making image parts transparent in Python

As part of my year-long StillStanding project, I post an average image of the spherical video recordings on Mastodon daily. Average images The average image is similar to an “open shutter” technique in photography; it overlays all the frames in a video. The result is an image that shows the most prominent parts of the video recording. This is ideal for my StillStanding recordings, because the technique effectively “removes” objects that appear in the recording for a short period of time. That means that people, cars, and animals do not appear. Since I stand still, the average image may look like a photography, but you can see that my face is blurred. ...

August 7, 2023 · 2 min · 377 words · ARJ

Horizontal and Vertical Averaging is not the same

For my year-long StillStanding project I am generating videograms for all the scenes. Since there is not much motion in these 10-minute recordings, they typically look like stripes. Looking at today’s recording of an unspectacular hotel room in Kongsberg, I noticed how different the horizontal and vertical videogram look: It is fascinating how two averages of the same video recording can be so different. The explanation is simple; they are based on averaging in two different dimensions (horizontal and vertical). Still, it is a good reminder that taking an average of anything gives only one perspective.

July 5, 2023 · 1 min · 96 words · ARJ

The effect of skipping frames for video visualization

I have been exploring different video visualizations as part of my annual stillstanding project. Some of these I post as part of my daily Mastodon updates, while others I only test for future publications. Most of the video visualizations and analyses are made with the Musical Gestures Toolbox for Python and structured as Jupyter Notebooks. I have been pondering whether skipping frames is a good idea. The 360-degree videos that I create visualizations from are shot at 25 fps. That is on the lower end for capturing fast motion, but is plenty when studying myself standing still or rooms with basically “nothing” going on. Then it certainly makes sense to downsample the video, something that can easily be done in MGT by adding the skip variable when loading a video file: ...

May 20, 2023 · 3 min · 466 words · ARJ

Visualization of Musique de Table

Musique de Table is a wonderful piece written by Thierry de Mey. I have seen it performed live several times, and here came across a one-shot video recording that I thought it would be interesting to analyse: The test with some video visualization tools in the Musical Gestures Toolbox for Python. For running the commands below, you first need to import the toolbox in Python: ...

May 10, 2023 · 2 min · 290 words · ARJ

Making 2D Images from 360-degree Videos

For my annual Still Standing project, I am recording 360 videos with audio and sensor data while standing still for 10 minutes. I have started exploring how to visualize the sensor data best. Today, I am looking into visualization strategies for 360-degree images. I have written about how to pre-process 360-degree videos from Garmin VIRB and Ricoh Theta cameras previously. The Theta records in a dual fisheye format like this: ...

April 1, 2023 · 2 min · 241 words · ARJ

Scripting image exports with LibreOffice Draw

As mentioned yesterday, the source files for the illustrations in my Sound Actions book are available on GitHub in the form of LibreOffice Draw files (ODG). Draw may be less powerful but much easier to work with than more advanced line art software, such as Inkscape. One of the nice things about the LibreOffice package is its scripting possibilities. While working on my book, I wrote a shell script that would read all the ODG files in a folder and convert them to PDF and PNG files: ...

December 21, 2022 · 1 min · 210 words · ARJ

Cleaning up image folders on my blog

I am still in the process of transitioning my blog from WordPress to Hugo. The content has been moved, but I see that WordPress has created quite a mess of files. Here’s a simple way to identify and remove unused images using a few command-line tools. 1. Find All Used Images in Your Content First, extract all image references from your Markdown files. This command searches for Markdown image links and outputs a sorted, unique list: ...

December 14, 2022 · 2 min · 231 words · ARJ

Convert HEIC photos to JPEG

A quick note-to-self about how I managed to download a bunch of photos from an iPhone and convert them to.jpg on my laptop running Ubuntu 22.04. As opposed to Android phones, iPhones do not show up as a regular disk with easy access to the DCIM folder storing photos. Fortunately, Rapid Photo Downloader managed to launch the iPhone and find all the images. Unfortunately, all the files were stored as HEIC files, using the High Efficiency Image File Format. This format is technically good but practically tricky to work with. So I wanted to convert the files to.jpg. ...

September 18, 2022 · 1 min · 164 words · ARJ

Video visualizations of mountain walking

After exploring some visualizations of kayaking, I was eager to see how a similar approach could work for walking. On a trip to the Norwegian mountains, specifically at Haugastøl, situated halfway between Oslo and Bergen, I strapped a GoPro Hero Black 10 on my chest and walked up and down a nearby hill called Storevarden. The walk was approximately 25 minutes up and down, and a fast-forward version of the video can be seen here: ...

July 17, 2022 · 2 min · 319 words · ARJ

Export images from a PDF file

I have previously written about how to export each of the pages of a PDF file as an image. That works well for, for example, presentation slides that should go on a web page. But sometimes there is a need to export only the images within a page. This can be achieved with a small command line tool called pdfimages. One way of using it is: pdfimages -p -png file.pdf image This will export all images in file.pdf and label them with something like image-001-010.png, where the first number refers to the page and the second is a count of images. ...

June 16, 2022 · 1 min · 135 words · ARJ