20.05.2015 21:52

During the first week of May or so, there is a clustering of national holidays known as the "Golden Week". It starts with 昭和の日 (Showa Day) on April 29th, and usually ends with こどもの日 (Children's Day) on May 5th. This year, due to an overlap with a weekend, it ended up looking like this, where red are the days off:

Japanese workers are notoriously short on vacation, with something like 12 working days per year being about average. Even then, in a Japanese company, it is being frowned upon to actually use the full yearly vacation budget, so in reality, people take maybe half of those 12 days.

Unsurprisingly, a cluster of national holidays like during Golden Week makes the Japanese workers rejoice, since by taking just 2 days off, they can get 9 days off in a row. They will then happily rush to Thailand, Hawaii, or maybe some more exotic destination, do as much travel as they can during that short time, and then show off where they have been by bringing お土産 (Omiyage) to the office, little sweet snacks for the co-workers bought overseas.

For some reason, I didn't manage to properly plan a full-scale vacation for this year's Golden Week, so we just stayed in Tokyo, enjoying the relative peacefulness of a slightly-less-than-usually packed city.

On Tuesday then, I seized upon the chance to head out, and climb a mountain road that the local cycling people use to casually show off just how hard their trip was. I was warned that it would be a difficult climb, and headed out along 浅川 (Asakawa) towards 高尾 (Takao), the shortest possible approach.

It happened to be May 5th, which is called "Children's Day", but in reality, it's "Boy's Day". There is a "Girl's Day" 2 days earlier, where the girls get to see some creepy dolls they are not allowed to touch, or so I heard. On May 5th, though, parents proudly show off their sons in public, by putting up colorful fish made of paper, suspending them from poles or ropes, where the wind is supposed to make them look as if they swam in the (hopefully) blue sky:

But I had a goal, so I kept going past 高尾, heading to 和田. I took the forest road approach, which can be used by just going straight instead of turning left. There are 2 chains to keep off motored vehicles, making it completely quiet, but slightly dirty. That's fine for climbing, but a little dangerous on a fast descent:

For the first kilometers, I was not sure why this road was even worth mentioning to so many people, it was surely nice and quiet, but not particularly steep. About halfway through though, the real climb begins, and from there, it's all 10%+:

(The plot starts in front of 高尾駅, goes up the forest approach, down the regular road, and back to the station. The little bump on the left is some artifact in the GPS data, and not a 200% climb.)

It doesn't flatten out at all, if anything, it's getting steeper at some points. It's really tough and really nasty, but on the bright side, since it's so steep, it's relatively quick. Once upon the top though, it's a bit disappointing, since there's really not much to see, except for more trees, and an idea of a view in the distance:

The trick here is to not rush down again right away, but lock the bike near the cafe at the top, and keep walking on foot up the stairs on the left:

They lead to a path that is only 750m long, and climbs another 50m or so, eventually leading to the summit of 陣馬山 (Mount Jimba). On the top, there is an open field with a couple of cafes, and some really great views, including 富士山 on a clear day:

The detour is less than 10 minutes in each direction, and after having it made so far, there's really no reason to not go up there and take in the scenery.

06.05.2015 15:17

I've been in Japan for three years now. During my first visit, I did most of the touristy stuff - going to temples in Kyoto, eating all the weird food, even going to Kamakura. But ever since actually moving here, I kind of stopped and forgot to visit the rest of the country, which is partially due to sheer laziness on my side, and partially due to Tokyo making it a bit complicated to get out given its enormous size.

So even though I can see Fuji-san, one of Japan's most iconic landmarks, from our apartment's window on a clear day, I never actually went there. This year, for the weekend following my birthday, I decided to change that, and go take a closer look. Hopping on a car or train to get there would have been too easy, though, so I got on my bicycle, and scheduled 2 days, one to get to the area known as Fuji Five Lakes, and another one to encircle the mountain.

I followed the advice found on the English-speaking sites regarding getting there, and headed out to 道志道 (Doushi-michi) from 相模原市 (Sagamihara-shi) on Saturday morning, which leads all the way to 山中湖 (Yamanaka-ko). On paper, it's a relatively small street, following a river bed as so many other mountain roads in Japan, since the river would already have carved a valley with more or less appropriate grades into the mountains:

There was two unexpected things though. Firstly, this road is rather well-known, and in particular among motorcyclists. As it turns out, they gather in groups of around 15-20 people, and interestingly, within those groups, the types of motorcycles are pretty homogenous. There's the classic gang of people riding their overspec'd super sports machines, but there's also groups of young people on pimped up 50cc machines, groups on classic bikes of all the same kind, and so on. The end result is that every couple of minutes, there is the blaring sound of engines whizzing by, which is not quite the soundtrack I was hoping for. And while they are relatively cautious when overtaking, given the sheer number of riders, some of them will have accidents. On that day, I saw one young woman mourning at a road side mark where her friend died shortly before, plus two more wrecks that had crashed on that very day.

The other problem: it's all uphill. Here's the full height profile, starting from our apartment, and ending at 富士河口湖:

The average climb is only 3% or so, but it is really uphill all the way, except for the short dip around 75km, and it gets steeper and steeper the further the road progresses. There was also a very persistent head wind blowing on that day, making the whole climb even more exhausting. The grade is mostly managable at the beginning, but about 3 or 4km before the peak, it gradually steepens, to 6%, 8%, and then the last 1km or so feels more like 10%, although I didn't really measure. Suffice to say, I was more than happy to see this tunnel, after passing it, there is no more climbing to be done:

I had booked a stay at at small Japanese style hotel (旅館) at 富士河口湖 (Fujikawaguchi-ko) called 丸弥荘 (Maruyaso), so I took the north route around 山中湖, which turned out to be a very good choice. There is a cycling road winding right along the shore of the lake, and while going there, I was treated with great views on Mt. Fuji in the sunset, which pretty much made up for all the efforts getting there. The pictures don't really do justice to its actual size, it surely looks a lot more majestic in reality:

The clouds just opened up for a couple of minutes, and it would be the only time to get an unobstructed view of the top of the mountain. After letting gravity propel me to the hotel, I spent the rest of the evening going back between relaxing in the 温泉 (Onsen) which is available to guests at any time, and stocking up on calories again.

The quirky elderly owner of the place had treated my to a room with a mountain view, so here's what I woke up to the next morning:

Quick breakfast, and off I went, to encircle the mountain counter-clockwise, until eventually reaching Hakone, where I would meet up with my fiancée, who had booked a lovely room with a private hot bath there. For going around the mountain, there is pretty much only one road, which inevitably includes some more climbing, but at a much easier grade than the day before:

The first 30km or so where mostly lined with trees on the side, which kind of defied the point of going around Mt. Fuji, but at least they would open up to the other side, with some nice vistas across 富士河口湖:

Around the time of the first descent, though, the forests gave way to rather open farm lands, and from that point, I had Mt. Fuji on my left side pretty much all the time. The top was covered in clouds all day, but at least the rain was only intermittent:

The only really tough part of this ride was the mountain range in front of Hakone, which are something around an 8% grade, but felt more like 10% with 2 days of riding in the legs. There is a tunnel on top, after that, the descent is pretty steep, making for a very quick dash into Hakone, and maybe catching a quick glimpse of the lush greens and the waterfalls along the way:

We met up at Yaeikan, which is a gorgeous Japanese style hotel, and offers rooms with in-room hot spring bathes. While not exactly a bargain, it's a truly great experience to soak in the water from the hot springs, without any interruptions, and not having to care about other people using the bath, all while overlooking the surrounding scenery:

All in all, it was a fantastic birthday weekend. If I did the trip again, I would likely pick a different route to 山中湖, or possibly leave on a Friday morning to avoid the weekend motorcycle crowd. It may also make sense to do this at the end of May / early June instead of my mid-April weekend, when it's a bit warmer in the high lands around Mt. Fuji, but before rain season hits and the rain becomes unpredictable.

05.05.2015 23:24

Recently, DARPA released a video that shows bullets which are capable of changing their course in-flight, depending on the movement of their target:

The technology is honestly pretty amazing. A quick Google search gives me a rough lower limit of 800m/s for a .50 caliber bullet, and something like 180.000rpm rotational speed for gyroscopic stability. Now, it is of course possible that some kind of fins are included in the bullet, which could possibly eliminate most of the rotational velocity, leaving only the actual travel speed to deal with.

Even then, things have to happen pretty darn fast. It's not clear how far away the target is, so I'm making a rough guess at 1.000m, which would put the flight time at 1.25s. In the videos, there are around 7-8 thruster firings for the course corrections, so one course correction every 150ms. In those 150ms, the controlling computer has to:

  • Expose a series of images
  • Track and extrapolate the path of the target
  • Track and extrapolate the flight path of the bullet
  • Compute a new trajectory for the bullet based on those two pathes
  • Estimate a thruster configuration to put it on the new flight path
  • Transmit the data from the control computer to the bullet
  • Fire the thrusters
  • Wait for the thrusters to burn, and for the bullet to overcome its inertia and take on the new path

Rinse and repeat. 150ms is a pretty darn tight time budget for all of those operations, especially since most of it would be taken by the sampling intervals for the captured images, so it's not a trivial achievement, and can probably only be done with a tightly integrated custom hardware/software stack.

The question then is - how does DARPA attract the technical talent to pull this off? The world's richest companies are fighting over the best hardware and software engineers, paying ridiculous salaries and stock bonuses, and trying really hard to fulfill their wishes. So it's not exactly like there is a surplus of engineers, and they don't have much career paths other than joining the military. People with the matching skill set have a choice, and even if they can't make it to the top-tier companies, there is a real demand for people with real-time computer vision skills pretty much anywhere.

What, then, is it that makes people forego some of the most desirable jobs in the world, and design killing machines instead? There is no dual use for homing bullets, they are better at killing people, and that's it. Are people really capable of convincing themselves that this will make the world a better, safer, happier place?

05.05.2015 22:22

In the Japanese language, there are a handful of words that have no direct translation into English or German - unsurprisingly for a language and culture that evolved over hundreds of years in almost complete isolation. One of the best known ones is 頑張る, a verb that usually means something like enduring a hardship, especially under the aspect of not giving up. It is a pretty fundamental concept in the Japanese society. People 頑張る when they learn in school, university, or after that. People 頑張る when they do some work that they don't really want to do. People 頑張る when they partake in a Marathon race, or other endurance events. Being able to 頑張る is regarded as a virtue, which drives people to stay in the office late at night, even if they don't have any work to do. Cynics say it's also what makes people do the same thing, over and over, for years and years, without changing anything.

It is not surprising, then, that virtually every time I head out of town, I see some people doing some kind of ultra-distance marathon running along the river. It's not always obvious what race they take part in, but those people here had a helpful tag indicating they were doing a 100 miles race, which would be roughly 161km:

At that time, I was heading to 青梅 (Oume), a city in the far west of the Tokyo metropolitan area. There is a rather mild mountain path connecting 青梅 to 五日市 (Itsukaichi), and since it was cherry blossom time, I figured going along the rivers would be a good idea, since they were all nicely lined with blooming trees:

However, living on essentially a giant underwater mountain range amidst the vastness of the pacific ocean means that water and land tend to mingle a lot, and just when I arrived in 青梅, the downpour started:

It didn't stop until after sunset, so I went back home in the darkness. Two weeks later, I started a second attempt. The forecast mentioned something like a 40% chance of rain, which seemed better than a coin flip. But of course, the coin fell onto the wrong side, and I had to abort again, this time even earlier:

Last Sunday then, the third attempt. This time, the forecast was a lot rosier, and the very same places had a much nicer tint in the sky, even if they had lost the pink shades of the cherry blossom:

The people of 青梅 where busy with some local festivities, that as far as I can tell involved banging on drums, eating Yakisoba, and closing off the main streets:

The climb itself is pretty nice, a bit over 400m of elevation gain with a fairly constant 8% grade, there's really no ups and downs, just grinding at the same pace until the top. The chart is from 青梅 station to 武蔵五日市:

The road is closed off for motor vehicles on the north side, so no roaring motorcycle engines around here, at the expense of slight debris on the road:

At the top, the forest gives way for a look back onto 青梅, so basically the reverse of what I had seen twice before from the other side. Note that since this is Japan, no view is nice enough to be spared a high voltage power line. Form follows function, even in the mountains, but that wouldn't stop me from sneaking in a "cyclist selfie":

From there, it's just rolling down the road, and following back the 浅川 / 多摩川 up to the high rise buildings.

So there it is, a total of 340km for a small, quiet climb. I don't know whether it's worth all the trouble or not, but at least I did 頑張る.

21.04.2015 21:18

As operating systems mature, for every new iteration that is being released, I find it a lot more difficult to get excited. Take Apple's OS X for example, the system I'm writing on right now. I remember being very enthusiastic about new versions up to 10.5 or so, where every new version would introduce features that I would actually use. After a while though, the system matured, and some time around 10.7, I lost track of which version I'm actually using. In fact, I would be hard pressed to tell the version I'm using right now, or what has changed compared to its predecessor. For the most part, I'm just happy if none of the changes broke my workflow.

The same is happening to mobile OSes as they mature. I happen to be an Android user, and while it made huge leaps during the earlier development cycles, it now reached a point where it's becoming harder and harder to tell one release from the previous one. There's some small changes to the icons here and there, but in the grand scheme of things, not much has really changed in how I use my phone in the last 3 years or so.

Incidentally, the reason in both cases is the same - both companies realized that their users stopped getting excited about new color schemes, and have shifted their focus on applications instead. For both companies, it is thus only natural to start focusing on applications, too, which means working on OS-level services and accompanying APIs, which is exactly what was the focus of the most recent releases.

The side effect is that while the applications coming bundled with the OS are stagnating, the third party applications can flourish in a wealth of new APIs. Take Google's camera APIs on Lollipop for example, which break with a year-long tradition of designing the API around a handful of use-cases and making it just good enough to enable the bundled application. In Lollipop, the bundled native camera application is still a horribly limited application, but the underlying APIs enable a whole new breed of apps like the very nice Manual Camera, which effectively turn the phone into a fixed-lens shooter with full manual controls and DNG support.

Naturally, I started using my phone as my every-day-camera, and when not being forced to take the pre-cooked ISP algorithms' decisions on the final look of the images, the results can actually be pretty exciting.

Soon enough though, the geek within me started to wonder whether there's a way to further improve on the image quality, and I quickly found that while there are no supplied profiles for the particular lens/sensor of the Nexus 5 bundled in Lightroom, Adobe actually provides a free Lens Profile Creator, as well as a DNG Profile Editor, which can be used to calibrate and correct for geometric distortion in the lens, and color shifts in the lens/sensor, respectively.

Yesterday, I finally found the time to play around with those, and got out the soft boxes to create the profiles:

I used the same setup for the color profile, only with an X-Rite ColorChecker Classic, and then had Adobe's tools do their thing. The output can be found here:

Nexus 5 Rear Lens Profile

Nexus 5 Rear DNG Profile

The results are actually a little less dramatic than I thought. Looking at the distortion only, here's an example of a tiled wall, as it is coming uncorrected straight out of the phone:

Note that there is a pin cushion distortion on the upper edge, and a barrel distortion on the right edge, but both are suprinsingly low already in the uncorrected image. There is some pin cushion bending going on in the center of the frame though, which is actually noticable when shooting things that are more exciting than naked walls.

Either way, when looking at the upper edge for example, the lens profile is doing a pretty decent job of straightening out the warped lines:

It's not perfect, but surely good enough for me.

Happy shooting!