Piero V.

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]

PyElas

Recently, I started experimenting with stereo vision.

It is a technique to produce depth maps using images captured by close positions. Then, with these maps, it is possible to create 3D representations.

The core of this workflow is the matching algorithm, which takes pairs of post-processed images and creates a “disparity” map. The disparity is the distance between a point in the two images. Depth and disparity are inverses, so it is easy to switch from one to the other.

OpenCV contains some stereo matching algorithms, but they produced a lot of noise. So I looked for another library, and I found libelas.

It is a GPLv3 C++/MATLAB library with many parameters to tune, but I could not find a Python version. My options were to switch to C++ or to port it by myself. I chose the latter, hoping that also others can benefit from it 🙂️.

Long story short, I published my first package on PyPI: PyElas.

How to use it

You can install it using pip. Then you just have to do this: … [Leggi il resto]

On acquiring 3D models of people

For my Master’s degree thesis, I dove into acquiring static objects with a RGBD sensor. Eventually, I decided to use the Kinect Fusion algorithm, which produced decent results.

I found this topic fascinating, so I continued on my own, but in another direction: acquiring people. So, in the last few months, I have been experimenting with scanning myself and my friends with a Microsoft Kinect One.

Conditioned by my previous results, initially, I tried with point clouds.

Deformation graph approach

One approach I found in several papers consists in:

  1. acquiring only a few scans (from 6-8 points of view), with the person as still as they can;
  2. performing a rough global alignment;
  3. running ICP to improve the rigid alignment locally;
  4. downsampling the point cloud to build a deformation graph;
  5. resolving an optimization problem;
  6. deforming the denser point clouds.

Reaching point 3 is not trivial because people move. ICP can be very unforgiving, and in some cases, you also need some luck to obtain good results at this stage.

For downsampling (Point 4), I used Open3D’s voxelization followed by averaging point coordinates. I do not know how this can influence the final results compared to something like a clustering algorithm. … [Leggi il resto]