# Monthly Archives: October 2014

Frisk.pics, a new image search engine and derivative of my masters project, is finally starting to take shape.

A big chunk of my master’s career has been dedicated to finding good perceptual hash functions. What separates ‘good’ from ‘bad’ functions is not difficult — low false-positive rate, low false-negative rate. That much is easy to benchmark. Really, though, what we want to optimize for near-identical image matching is the narrow range of boundary cases where images are similar, but not exactly identical. That’s a much more subjective area where a binary right/wrong isn’t as helpful as ‘how wrong’. This is particularly relevant in our case, as we need to be able to sort images based on how similar they are to an input image.

To better visualize the performance of our hash function we perform the following test. A small set of 1500 images are loaded. Each image is permuted in one of five ways; the identity (no change), rotation, pixel noise, scaling, and cropping. Each of these is hashes and appended to a list of all hashes, then a matrix is formed with inter-hash differences. (This is referred to as a ‘similarity matrix’, usually.) The result of the current method can be seen below:

On the diagonal (where x=y) you’ll see the series of black squares. This is to be expected since the difference between something and itself is zero. An ideal equation would have blocks of 5×5 black pixels with the remaining area white or nearly white, suggesting a very high distance between an image and its dissimilar neighbors. You can note in the hash above that it’s quite liberal — assigning a smaller distance between differing images. Contrast it with the pHash grid below.

pHash is much more selective overall, and more effective as a metric (if significantly slower). It says to me that there’s still a lot of work to be done on our hash function before it’s production ready.

One step closer to the HTC U Wot M8.

A few months ago I clumsily dropped my Samsung Galaxy Nexus with a USB cable attached. The device was fine up until I ran over it with my rolling chair. It still works more or less normally, but the USB connection is tenuous and requires a very delicate touch. This is frustrating in development and makes using it as a GPS impossible. (The cable won’t stay in on its own.) For environmental and guilt reasons, I generally avoid buying new phones. I picked up an HTC One M7 off Amazon for around \$200.

This is not the best choice I’ve ever made.

I spent a long while researching the hardware and comparing the battery life (concern #1) and other, less important hardware details. When finally pressed to decide between the HTC M7, Samsung Galaxy S4, and the Xperia Z2, I went with the cheaper of three evils. The device’s hardware is outstanding and the build quality is top notch. I have some minor discontentment with the inset of the top and side buttons, but these trifles in the larger scope. What upsets me most about this device (though it could be great) is the software component.

Caveat: I have had very little time to really experiment with the device. These are first impressions, but they will color the lasting impressions I will have of the device. I will do my best to avoid confirmation bias, but I am not convinced that I can fully overlook my initial feelings on the matter.

Some things that bother me:

• Bloatware: Verizon has installed six applications, including the NFL app, which cannot be uninstalled.
• Blinkfeed uses an entire screen and can’t be removed. (No, the two different approaches to removing it do not work.)
• Blinkfeed, after I finally decided to give it a shot, does not appear to have a way to add custom RSS feeds. (The approaches I found online do not appear to work.)
• Holding down the power button, by default, puts the device to sleep. To allow shutdown, you have to go into the settings menu and disable ‘Enable Sleep’.