May 16 2016, 23:23

IT folks: I’ve read with interest about the DjVu format – often used for distributing books, scores, manuscripts. It turns out that the compression mechanism used there is 20-100 times better than the familiar JPEG and GIF – up to 15Kb per page. I know how these two formats work internally, but I became curious about how to squeeze almost two orders of magnitude more out of them.

It turns out, the whole trick is that the image is divided into three layers, which are compressed differently – foreground, background, and a black-and-white (one-bit) mask. The mask is saved at the resolution of the original file; it contains the image of the text and other clear details. The resolution of the background, which retains illustrations and page texture, is typically lowered to save space. The foreground contains the color information about the mask; its resolution is usually reduced even more. Then, the background and foreground are compressed using wavelet transformation, while the mask uses the JB2 algorithm.

Wavelet transformation, in a nutshell, involves dividing the image into high-frequency and low-frequency areas, which can be compressed better individually since they have lower entropy. High frequencies are contrast-rich patches where brightness changes abruptly, and low frequencies are smooth areas where brightness changes gradually. To put it very simply, it’s like taking the derivative of the image multiple times, which expresses smooth structures with fewer bits. JPEG works in a similar way, only it uses a different smoothing algorithm (DCT) and operates with 8×8 blocks, which is absent in wavelets.

A distinctive feature of the JB2 algorithm is that it looks for repeating symbols on the page and saves their image just once – i.e., it clusters the picture into similar areas. For example, all the letters ‘a’ printed in the same font of the same size could serve as examples of such clusters. Slightly different letters ‘a’, for example with distortions from scanning or printed in another font, would fall into different clusters. As a result, a dictionary is created, where frequently occurring identical letters are combined. Then the location of each letter is saved, resulting in a very compact format. Overall, it is similar to JBIG2, of which there is much more information available online. In multi-page documents, every few consecutive pages use a common “dictionary” of images.

Quite an interesting area, computer graphics. I was once passionate about it.

May 16 2016, 21:51

Interestingly, in the USA in 100% of the stores (at least the ones I’ve come across), I can swipe my card even before the cashier has touched the device. Very convenient – no need to wait for the prompt – now swipe! You do need to confirm the amount, of course, but you can leisurely put your card away in your wallet. After all, it does save those precious seconds. Not the customer’s seconds, of course, as hardly anyone cares about those, but the cashier’s.

May 16 2016, 00:06

It turns out that our local shopping center is famous for housing the first Apple Store in the world. In three days, it will be exactly 15 years since Steve Jobs opened the store. The video linked below features his presentation of this first Apple Store. It’s interesting to hear about the store concept as he saw it back then. Much of it was new to me. https://www.youtube.com/watch?v=xLTNfIaL5YI

May 14 2016, 21:05

Found something intriguing. Turns out, an explosive water dump was used to launch the shuttle, intended to dampen the sound vibrations from the engines. A million liters of water turn into a massive waterfall a few seconds before launch and last only 20 seconds. It’s reported to reduce up to 20dB and it’s worth it: used for all subsequent launches. There’s a video in the link.

I can’t find a word about it in the Russian internet. Maybe I’m not searching right.

https://metinmediamath.wordpress.com/2013/12/01/space-shuttle-launch-and-sound-suppression/

May 12 2016, 15:26

Has anyone ever wondered about connecting powerful (1KW and above) European electronics 220 volts to an American 110 volts network? What solutions are there? For example, an iron or a coffee machine, or say, a washing machine?

There ought to be a transformer, but those Chinese ones that are sold everywhere are not trustworthy.

For instance, the most powerful consumer-grade step-down transformer I found was 300W for 1700 rubles http://www.zapitatel.ru/catalog/ponizhayushchie-avtotransformatory-220-110-volt/thg-300s-/

But I doubt it could handle an iron.