Piero V.

OpenCV and time lapses

After buying my Pixel 4a, I decided to take a picture of a poplar near my home every day. I did this for one year, and I created a time lapse. But I will not publish it here because it would reveal where my home is 😜️.

Methodical is not enough

With time lapses, you usually keep your camera still, but this was not an option in my case. Therefore, I tried to be methodical in taking the various pictures.

I used a sewer cover as a point to shoot the photo and a telephone pole as a reference (its tip is close to the upper-left corner in every picture).

Still, the results were varied, but luckily OpenCV came to the rescue.

Homography matrices

We could say that my scenario is like capturing the same scene with different cameras. Therefore, we can compute the homography matrix to reproject one image to the previous one.

And OpenCV has a very handful function to do so: findHomography. It takes the coordinates of corresponding points as inputs, and it returns a 3-by-3 matrix as output.

If you are using Python, you must pass the points as two NumPy matrices. Both must have the same shapes: a row for each pair and two columns with the coordinates. The point at the ith row of the first array must correspond to the point at the ith row of the second array. … [Leggi il resto]

Which successor for my TD-W8970?

I have been using TP-Link TD-W8970 as my primary router since 2014.

Then, a pair of weeks ago, its modem died because of a storm. Also, the connected Ethernet ports ceased working. Luckily, the lightning did not propagate over the LAN; otherwise, damages would have been thousands of euros.

The hell of DSL users

The TD-W8970 was one of the few devices based on the Lantiq platform, the only one whose xDSL modem is supported by OpenWrt.

Most of the home networking appliances are based on the Broadcom platform. Their modem employs proprietary drivers that work only with ancient and insecure Linux kernels. And in many cases, with OpenWrt, you also lose some WiFi features.

The usual workaround is to rely on two routers. One in bridge mode, i.e., as a pure modem, connected with another one running OpenWrt. I have never liked it because it is much less clean: more devices, more heat, more power consumption, less integrated, etc… But now, I surrendered to it. … [Leggi il resto]

My experience with variable fonts

Variable fonts are a brilliant idea. They embed in a single file the many styles they can have. In this way, the resulting size is much smaller, and they provide increased versatility. For example, you are not limited to regular, bold, light, condensed, expanded stretches, etc. Instead, you can specify numeric values with higher granularity.

They are quite recent: they started being supported by operating systems and libraries around 2017.

Later, also web browsers started supporting them. But, at the moment of writing, the support has not been standardized yet. In other words: use at your own risk 🤐️.

And I tried to. Six months ago, I switched to variable fonts. Lately, however, I have noticed some nasty problems.

Chrome and the faux italic

I love the Inconsolata font. I have been using it as my system-wide monospace and for my site for the latest years. It has only a defect: it does not have an italic variant.

But this is not a real issue because browsers can fake it by slanting the font… or can they?

Sure, if you are using Firefox. But if you are using Chrome, it will not do it. And this includes Chrome on desktop, mobile, and all the browsers based on Android’s WebView. … [Leggi il resto]

A journey into GameCube music

One evening, a pair of weeks ago, I was pretty bored, and I did not want to do anything too demanding. Somehow I reminded Burnout’s soundtrack, and I wondered: is it possible to extract it from the original disk instead of relying on YouTube, or something similar, to listen to it?

Loading GCMs on Linux

I dumped my Burnout disk with some Wii homebrew 8 years ago or so. That time, I named it with the .iso extension, but GC disks are not ISO 9660 standard. They have a proprietary format that the community dubbed GCM.

Even the file utility can detect that them:

$ file burnout.iso
burnout.iso: Nintendo GameCube disc image: "Burnout" (GBOP51, Rev.00)

So, I downloaded a tool called simply gcm-tool. Man, many years have passed since the last time I download something from Google Code!

And I love that people provided an executable and its source code, in plain portable C or C++, without any GUI or additional dependencies. So a gcc *.c gets the work done, and using the wanted tool is immediately possible. … [Leggi il resto]

Seasonic G360, MSI boards and "CPU failures"

Ten years ago, or so, I bought my first external hard drive. At a certain point, one of my cats dropped it. So I switched to a networked RAID 1 with a modified GoflexNet at the beginning of 2016.

That escalated more when, in 2018, I built a PC to replace it. The GoflexNet was quite good, but its CPU was a bottleneck for file transfers. Also, I was a bit worried about the quality of the power supply: I used a cheap LED transformer for over two years 😅️.

I bought a Celeron G3930, the less powerful but also the cheapest processor of the Kaby Lake microarchitecture. I wanted a recent (for the time) CPU because of the improved power efficiency. It is not as good as ARM, but it is acceptable to me. I paired it with an MSI B250 Pro-VD motherboard and 4GB of 2133MHz memory.

The most expensive part was the power supply: a Seasonic SSR-360GP, the littlest member of the G series. It cost more than twice the price of the CPU. But it has good reviews on many sites.

So, I was remarkably surprised when one year ago the system stopped running because of it! … [Leggi il resto]