2012-09-19

iOS6 maps are crap

iOS5
iOS6
What the hell?

iOS5 using google maps (right) had sensible and usable "satellite" imagery.

iOS6 using apple maps is totally fucking useless.

GIVE ME BACK GOOGLE MAPS NOW.

This crap is not what I paid for when I got my iPhone.

Re-tweet/etc this so people know not to upgrade if they want usable maps!

I will book a genius appt to ask how I downgrade back to iOS5 tomorrow.

Oh! and no streetview either. WTF. This was described as an upgrade but it is plainly not. I may have to sue.

Update: looks like maps.google.co.uk can be saved as a link and does better "satellite" images. Also iFindView appears to be a free app with streetview in it.

Update: Someone had to! Hitler finds out about iOS6 maps...

Holy Ten Point Eighty-Seven Jigga-Pixels, batman!

As I posted earlier, Randall has made a mental comic today. XKCD 1110. It is a tiled image that you click and drag to view. The problem is that it is huge!

Several people have played around with the tiles today, and done things somewhat more quickly than I did. I thought how hard can it be? to simply make the tiles in to one image.

The catch is that it is 165888 by 65536 (bigger if you include blank rows at top and bottom). That is 10871635968 pixels (10.87Gpix). (Do forgive the back-to-the-future title).

First thing I did was look at his javascript, work out the file names, and make a simple html page showing them all tiled. This is pretty browser crashingly big as it is, but did work. It only took  couple of minutes to make. The tiles have north/source and east/west components (no zeros), e.g. 1n1w.png, so easy to make a matrix. Some tiles are missing as they are all white (north) or all black (south).

So, first off, I just saved the html page, so it would save all of the images in a directory for me. Firefox had interesting ideas on how long this would take which are reminiscent of XKCD 612 but actually took quite a few minutes.


Once I had all of the images, I could easily add missing black and white images. Now to tile them - should be simple enough.

First I tried ImageMagick - one command telling it to tile all 2592 files. First I tried making smaller versions (one eighth each way). It eventually finished and went horribly wrong. Hmmm.

So them I tried GraphicsMagick. It would not do all files in one go. Just said "Killed" after a while. I suspect too many files.

So I tried making each row from the cells, and then making the rows to one file. The rows could be made in memory, just, and took around 20 seconds per row. Interestingly, the same thing on ImageMagick took 4 minutes per row. A win for GraphicsMagick, I think.

Then I told it to join the rows. It thought about this a lot, clocked up 20GB of virtual memory, and made a lot of temporary files. After a long time, it then freed up the virtual memory and made a 40GB temp file.

This is silly, it is 10Gpix of greyscale. I even did a -type greyscale to tell it that. Yet still, it is clear from the size and content of the temp file that it has made a 10Gpix file of 8 bit RGBA data (4 bytes per pixel). No wonder it is slow. How stupid! This does rather explain why it was running files on disk not just using RAM or swap.

Right now it is plodding through that, presumably packing it for the final png output. I'll post that once I have it, as a 10Gpix png greyscale image. Even so, this has taken all day. Don't worry, I was able to do some other work while this was happening, honest :-)

What will be interesting is to re-visit this in, say, 2 years. Will handling a 10Gpix file seem run of the mill, and just fit in RAM with no issues on a typical desktop machine. Probably! If this machine was not a year old it would probably be a lot slicker even now.

Update: The run to join the rows took 3 hours 20 minutes.

801.802u 631.023s 3:20:21.13 11.9%    0+0k 349656312+411601712io 181862pf+0w

The final file is 16MB (yes, that is all, lots of blank space) and is here.
Smaller version here and here.

Randall is totally insane

http://xkcd.com/1110/

And if you want to see it all in one go :-
http://www.me.uk/clickdrag.html


2012-09-18

Not orange juice

Seriously, this is meant to be Old Rosie, but is apparently the bottom of the barrel.

We got a replacement, but not before I had poured it in to a new glass that we had brought with us to the pub. That, of course, confused the hell out of them.

What it should look like is more "cloudy", not "orange", see below.

The Old Manor, Bracknell.

Meet the orc (Oct 17/18)

We'll be at IPEXPO 2012, Earl's Court 2, on October 17th/18th on the FireBrick stand, and if you come along you can meet the orc! Register FREE

Thrall Horde is training room supervisor here at A&A, but for the show he is doing stand security :-)

If you don't have an orc to protect your network, you might like to consider a FireBrick.

But seriously, if you are interested in anything network, IPEXPO looks like a useful show. We're happy to talk to anyone on the stand, and we will be taking pictures of the orc with visitors and giving out 6x4 prints for you to take home (and a link so you can download). There will be other goodies on the stand too.

The show is the first marketing we have done for a long time for either FireBrick or A&A, and it is all a bit new for us. We have an excellent team on the case, including Alex Bloor (our new Business Development Manager) and Michael Barrett who is assisting him with marketing. Once the IPEXPO is out of the way, Alex will be concentrating on how A&A can expand, but I really want to retain all of the good things about being a small ISP no matter how big we get.

See you there... It's free if you register a ticket in advance.

P.S. That blog post is far to salesy for me - so here is something more technical.

The pictures of the orc have in fact led to a lot of throught. We are taking pictures with a wide angle lens so we don't have to stand in the aisle or have people walking in front of us. We are then printing them. We finally decided to print direct from the camera (on to a Canon Selphy printer) via USB. This works well but takes around a minute - which is no problem as it gives us an excuse to tell people about the FireBricks we are trying to sell :-)

We did consider wifi to a laptop, which would be neater as no leads connecting to the camera. Several snags with that, including the fact that this Selphy does not appear to have drivers for Mountain Lion, D'Oh. There is also an issue with the local wifi police (exhibition company) who are banning us bringing our own access point on to the stand and connecting to the stand internet. Well, we are happy that we would be using the camera wifi as a device not an AP, in ad-hoc mode not as infrastructure to a laptop (so no AP at all) and not connected to the stand internet, but we're not sure we would win that argument with some stroppy security person with a wifi scanner on the day. Using the show wifi (at a cost for exhibitors) would not work as there is a captive portal and the camera has no browser to work it!

So, printing is sorted, but we figure people will want the picture digitally too. I am sure people will want it emailed. So to make life easy we are printing up stickers in advance, with the image number on it, and a unique code. The camera can upload on Ethernet (so a second wire cable tied to the USB cable). This means that visitors can either have a print with a URL stuck on the back, or just have a business card with a URL stuck on the back if they don't want a print. We are even including a 2D barcode so they can scan rather than type the URL. The idea is people will be able to get the full resolution image on the spot and post to facebook or the like, if they want. The unique code means people cannot just browse all the pictures from the show, only get their own.

The camera does ftp, so quite easy for the server to run a script on each uploaded file and put it on the right URL automatically. The camera actually starts the ftp and logs in when we focus, and then transfers the image immediately when taken, which is pretty cool.

We are also going to ask people if they want to be in the gallery, but have yet to work out how to automate that choice and run the gallery live on the web site - I am sure we'll work out how to do that.

Turning to the dark side

I have put adverts on the main blog page.

Anyone think this is a bad idea, let me know. Not trying to piss anyone off.

As the saying goes: "every little helps".

P.S. If you hate it - please add a comment here, I'll try it for a month and see what happens. Feel free to just ignore the adverts.

2012-09-17

Video watermarking idea

I was watching football yesterday with my brother-in-law, Steve. Yes, I know, very odd. I figured out that they have to get the ball in the net, which seemed (from his somewhat vocal comments) was a concept his team had not quite grasped (though they did win in the end).

Anyway, during the game a 10 digit number kept popping up bottom left. It was clearly locally generated as use of any on-screen menus caused it to vanish. It was most distracting. Fortunately, it gave me a chance to stop watching football and google it. I found several comments from others quoting different numbers when viewing Sky Sports via Virgin Media. It is apparently some watermarking to try and catch live streaming of sports events. No idea if they use it to later identify the source or to kill the stream in real time. They claim, wrongly, that it does not affect the viewing, where plainly it does - you can see it!

This got me wondering if there was a better way to do this, and I came up with a cunning plan. If I was in the industry I would probably patent it (I have patented dumber ideas before now).

The problems with watermarks is that they are either clear enough that they can be seen (as above), or they are subtle enough that they get lost. You don't want them seen as they distract from the viewing and make it easier to remove them. If the streaming was taken from the raw mpeg then invisible coding could be added, but it is not (as I understand it). There are tricks with low bits of colours used in images, but these only work if the colour is not distorted. The whole shit with HDMI mean that you probably just point a web cam at the TV, which means changes in colour, scaling, cropping and even re-sampling the video timing. Subtle forms of watermarking are not going to work with that!

So my cunning plan uses the fact that these sorts of events are often filmed in 3D and involve a lot of moving camera shots and clean cuts between cameras a lot.

Why not transmit both eye's views to the play out box. This means it can do a 3D image on a TV which is not likely to be useful for streaming, but can also play out one of the eye's view's as the standard 2D video. Using either eye will do as the camera is pointed at the action from both viewpoints.

Next, either mark frames in the transmission of have the playback work out when there is a camera cut (from one camera to another). The trick here is to then pick left or right eye from then until the next camera cut. This won't be visible as it is no different to just having twice as many cameras and cutting to specific ones. The user is unlikely to even be able to tell that this is happening even if looking for it (unless there is a locked down static camera being used at some point). It does mean on-screen graphics need to be the same on both, which is often the case anyway with 3D.

But this means each cut allows a locally generated "bit" of data to be conveyed (the choice of left or right for the next scene). This can be detected when compared to the original left and right eye broadcast signals. This could allow a continuous repeat of a bit stream with suitable identification data, and maybe some forward error correction. The actual amount of data needed is low - a serial number.

It would be truly non-disruptive watermarking that can survive a hell of a lot of messing with the image and still be detectable.

So, there, published, can't be patented now.

QR abuse...

I'm known for QR code stuff, and my library, but I have done some abuse of them for fun - I did round pixels  rather than rectangular, f...