dimanche 25 août 2019

Hugin Panorama Creator with the Fairphone 2

The computer has more options for stitching photos together than digital cameras have. Hugin Panorama Creator is free software and gives excellent results. However, to work correctly, Hugin needs the correct information for the lens used to take the photos! It is uncanny how inadequate lens data can impede Hugin’s algorithms to the point of rendering them absolutely useless.

The Fairphone 2 is not actually a digital camera for a start, and it is a niche phone at that. No wonder, that Hugin knows nothing about its lenses.

Thankfully, I found a nice tutorial by Alexandre Prokoudine about the correct usage of Hugin’s Calibrate Lens GUI.

To teach Hugin about the Fairphone 2, the first step is to take some photographs containing straight vertical and horizontal lines. It is not a problem if there are other details on the picture, such as furniture or trees.
I took 3 such pictures, taking care to have my phone parallel to the vertical and horizontal lines (house walls, furniture limits…), and not to zoom; I do not really know if I did well, but it led to the wanted result in the end.

Next, Hugin needs a combination of a focal distance and a “focal length multiplier”, which is, to the best of my knowledge, the “crop factor”. This is the difficult part, especially for phones, and the above article considers you already know these numbers…

I felt lucky when I found a technical page about the Fairphone 2, but the lens data is about the first model of the lens (OV8865), and I swapped the photo-module for the newer one (OV12870). At least, I got the order of magnitude, for reference.

The focal length is easy to find, because it is stored in each photograph taken with the Fairphone 2; it is 3.851 (often rounded up to 3.9 when displayed for information).

The crop factor is trickier to get. The technical sheet from the Fairphone shop tells about a pixel size of 1.25×1.25 µm. Then a page about another phone with the same lens tells about a 4032×3024 pixels resolution, which gives a sensor size of 5.04×3.78 mm. From there, providing the focal length and the sensor size, “Option 1” of an online calculator computes a crop factor of 6.868.

In Hugin’s Calibrate Lens GUI, after I imported the photos and entered the 2 technical values found above, here is how I proceeded (but I am not an expert…):

  1. I clicked the [Find lines] button.
  2. In the “Preview” pane, I switched to the “Edge detection” view, and I un-selected all edges, that were not aligned with real “perfect” horizontal or vertical lines (for example, I removed tree branches, electrical wires…).
  3. I clicked the [Optimize] button.
  4. I saved the lens, with the lens name “FP2-2ndGen”.

To be honest, at first, I had not seen the information about the 1.25×1.25 µm size of pixels, so I used the 1.55×1.55 µm size found on the slightly better OV12890 chipset page, and I tried to somehow compensate for the fact, that the OV12870 chipset would be a bit different; anyway, the crop factor I used in the Calibrate Lens GUI was actually 6.76, and my stitchings went well, so I guess the software does give some leeway regarding the exactness of the technical values provided.

samedi 24 août 2019

Personal accounting automation, and password caching on Linux

Personal accounting management is a tedious task: logging in to each bank’s web portal, checking for new PDF documents to download, then downloading for each account a “computer-friendly” record of transactions since the previous visit. And this is only to get the data…

All banks seem to agree on using the PDF format for “official communication”. For files intended to be imported into accounting software, however, anything is possible: csv, qif, ofx, or even nothing (that’s Oney…). Besides, the downloading process is not always satisfactory: the HTML forms to fill may be a bit buggy, the downloaded files sometimes have the wrong encoding, the included labels may not be as informative as those found on the web site…

Then I discovered boobank, from the Weboob software collection. This awesome tool can automatically login to each bank, and then convert the web site’s paged list of transactions into a standard format, such as ofx!

Lire la suite

mardi 26 février 2019

Fun with Kanban, episode 2

So… You were aboard a space-ship, and you crashed on a planet after hitting an asteroid. Welcome to the excellent game Blackvoxel!

As we saw in the first episode, from the wreckage you salvaged a base machine, which is the foundation on which you slowly rebuild the technology and equipment you were used to.

Lire la suite

jeudi 21 février 2019

Fun with Kanban, episode 1

(yes, the title is a nod at something… guess what!)

You are aboard a space-ship, and you crash on the nearby planet after hitting an asteroid. Thus begins the tale of Blackvoxel. From the wreckage, you salvage a base machine, and you are still under the protection of your space-suit. Much like Matt Damon in The Martian, you are alone, and you have to make do with your environment and the salvaged equipment…

Lire la suite

dimanche 23 septembre 2018

IRIScan Mouse Executive 2 on Linux, sort of…

The IRIScan mouse is a neat little device! Its scanning function works really well and fast, for such a little piece of hardware, and the mouse function is surprisingly familiar: no extra weight, no extra bulk. It could be perfect.


Lire la suite

jeudi 9 novembre 2017

Google Chrome is great? Think again…

The Chrome web browser won market-share fast, and still is. But people tend to forget who is behind Chrome. Now Google (or should I say Alphabet?) decided that their Chrome browser feeling faster is worth breaking web sites and going against the established standards that make the Web an open  […]

Lire la suite

dimanche 20 novembre 2016

Bootable flash drive for both Linux and Windows: live Linux

Three years ago, I wrote a small series about having all my favourite tools on a USB flash drive when I am on the go. Some things have changed in these years, so the time has come to write fresh blog posts on the subject. My main aim is a full portable Linux OS, and this third part is about just that!

Lire la suite

Bootable flash drive for both Linux and Windows: boot loader

The following text is the second part of a reboot —as they say for films, now— of my 3-year-old series about having a universal Linux and Windows toolbox on a bootable USB flash drive. The main target is a full portable Linux OS, but I will also address the Windows OS, for those times when you have no choice ;-)

This part is about the boot loader and miscellaneous tools accessible from there.

Lire la suite

- page 1 de 8