7.03.2004

The 411 on Farenheit 9-11

I have just returned from seeing Michael Moore's Farenheit 9-11.

Entertaining? Yes the first half which covers the election in 2000 to the Iraq war is very entertaining, after that it's simply depressing.

Contraversial? I didn't think so, as everything in this film has been public for a long time.

Biased? Of course, but no more so than anything you or I say on a daily basis. It actually wasn't as biased as I thought it would be. I was expecting two hours of "Bush bashing" where they take the most understandable circumstances and twist them to attack bush, but instead found two hours of pseudo-documentary which simply showed clips of Bush, and that is enough to make him look bad. I walked away feeling more like I watched a movie made by someone with an opinion than someone with a mission.

Factual? I believe it was. I'm not going to get the script and fact check it, but I am very familiar with almost all of the things mentioned in the movie and I am a very skeptical person and I saw nothing that rang untrue. There were three or four times when something is mentioned in the movie which was news in the past few months, but which never panned out. One example was Bush's plan to cut veteran's benefits. I think he changed his mind on that one, but it is still mentioned in the movie (and I could be wrong). Fact for fact, I think you can take this movie to the bank.

Did it change my mind on anything? Not really. I don't like Bush but there was nothing that really reinforced my opinion in that though there were things that piqued my interest, such as James R Bath, the bin laden representative who just happened to bankroll Bush's first oil company. I had heard it before, but it re-interested me a little.

I also had opinions on a couple of things that, once I saw video of how they happened, understood them better and decided I was wrong to criticize Bush for them.

I'm not going to endorse the movie, I'm just going to say it's worth seeing. I think Bush supporters better have some answers for this movie as it is pretty damning. If they're to be taken seriously in their condemnation of the film they need to have a solid response to the information contained therein instead of the dismissals they've been peddling.

I have said before that we are only caught in the middle in this war on terror. It is not a war between Americans and terrorists, it is a war between the US government and terrorists. Either side will use us in any way they see fit. Both will spend our lives for their gain, we can only hope against their better judgement that the government won't spend them cheaply. But only one of the two are any threat to our freedom and it isn't Osama, it's the United States government.

I think I enjoyed this film because it had the same viewpoint. The downside is that Moore probably thinks a democrat like Kerry would be any different. If he'd realize the system itself was the breeder of the problems and the politicians simply the whores who keep it going he'd be a lot more interesting. Oh well, at least he's half right.

6.30.2004

Linux Landsat Tutorial, Part I

Ok, so you wanna know a little about fooling around with satellite imagery? Specifically on Linux?

Here's some ins and outs of how I do it. Keep in mind I am not a trained professional and wouldn't try this on an open road, without the prper safety equipment or without adult supervision. Your mileage may vary, keep your arms and legs in at all times, no refunds, batteries not included etc etc.

You will need a good image analysis program. You can buy some professional programs anywhere from $100 to $3500 but this is Linux, we ain't payin' for nothin'. I recommend Tnimage (a scientific image analysis program written primarily for the medical field) which works great for me. Be skeptical of other programs because as this page shows, many programs discard information that can be very important in performing mathematical operations on the image because they are only designed to display them, not do the math.

It's optional, but I also use Imview to preview the imagery for a couple of reasons. Number one is that my computer isn't that fast (1.2 GHz with 512 MB RAM), and secondly because Tnimage is a little slow in opening huge files (these images can range from 60 to over 200 MB).

It also doesn't hurt to have Imagemagick, most Linux systems should already have it. We don't need it for this, but one day it will come in very handy.

On to the fun stuff.

First thing you do is head on over to the Earth Science Data Interface (ESDI) at the Global Land Cover Facility to get your raw data.

Well, semi-raw anyway. They come as orthorectified tiff files. "Orthorectified" means north is up and that everything in the image is flat and shaped like it's supposed to be. Taking images from satellites is a complicated business and most raw images start out having geometric distortions due to the curvature or rotation of the earth, atmospheric conditions, the flight path of the satellite and a million other things. Luckily they are rectified by professional geeks and the end result is an image that is so accurate that you can use it as a map.

Anyway, you're at the ESDI. The map search is probably the best thing for a beginner. Just click on the map until you find the place you want then select the satellite you want at the left and click the "select window" thing at the top of the map. If there is imagery for that location a red patch will cover that section of the map, then you can preview and download.

I'll let you figure out the map, let's download the imagery and get started. Click here for an ftp directory. These images cover the area in red as shown below.

Image Hosted by ImageShack.us


You will find these files:

p035r038_7k20000912_z12_nn61.tif.gz
p035r038_7k20000912_z12_nn62.tif.gz
p035r038_7p20000912_z12_nn80.tif.gz
p035r038_7t20000912.742.browse.jpg
p035r038_7t20000912.742.preview.jpg
p035r038_7t20000912.browse.jpg
p035r038_7t20000912.preview.jpg
p035r038_7t20000912_z12_nn10.tif.gz
p035r038_7t20000912_z12_nn20.tif.gz
p035r038_7t20000912_z12_nn30.tif.gz
p035r038_7t20000912_z12_nn40.tif.gz
p035r038_7t20000912_z12_nn50.tif.gz
p035r038_7t20000912_z12_nn70.tif.gz
p035r038_7x20000912.met

The actual image data are the "tif.gz" files. The "browse.jpg" are just a small sample of the imagery that you may find interesting. The ".met" files are metadata files that you don't need to worry about, but check them out if you're curious.

What you generally want are the following files:

...10.tif.gz
...20.tif.gz
...30.tif.gz
...40.tif.gz
...50.tif.gz
...70.tif.gz

which correspond to Landsat bands 1, 2, 3, 4, 5, and 7.

61 and 62 are high/low gain thermal infrared bands and 80 is a high resolution panachromatic band. All three are totally different sizes from the regular bands and neither are easy to work with so we won't worry about those.

Download the other six bands (1, 2, 3, 4, 5, and 7) into a folder somewhere and gunzip them (I usually just do "gunzip *"). Tnimage can actually gunzip them on it's own so if you want to save some disc space you don't have to decompress them, but if you want to use Imview to preview the images they need to be gunzipped.

Now we're ready to rock. Spend some time opening the files and just looking at them until you find something interesting. Then close it and open another band and find the same thing that interested you and see if it still looks interesting. I usually use bands 4, 5 and 7 for my browsing, but use what you like.

I thought this area was interesting.

Image Hosted by ImageShack.us


I will let you find the location yourself. Hint: go to the center, then down to the left.

Now is the tricky part. Technically you are ready to do some image manipulation, but if you use the entire image that you have right now you're going to end up with images that are close to 200 megabytes in size. So let's crop them to work only with the area we are interested in.

Open the first file (p035r038_7t20000912_z12_nn10.tif) in Tnimage and use the "slew" button and the arrow keys to find the location we are interested in (I wrote the author of Tnimage and he is working on a fix for scroll bars to make this easier). Draw a box around the section you want and pay attention to the relative coordinates on the left side. It helps to start and end the box on a good even number and write it down. My numbers 2612 and 5134 aren't easy even numbers, but that's because I had to move the mouse to make the snapshot.

Image Hosted by ImageShack.us


Once you have a set of numbers that correspond to the area you want to crop, close the image and open it back up again. Once it's reopened, don't move it around any. Hit CTRL+i to get to the macro function and type the following substituting your coordinates for the x's and y's:

selectregion(x1, y1, x2, y2);


So if the region you want had the following coordinates:

upper left: x=2500 y=3000
lower right: x=3200 y=3800

you would enter "selectregion(2500, 3000, 3200, 3800);". Don't forget the semi-colon.

Now, make sure to move your cursor back to the left of "selectregion..." or it won't work. Hit "execute" then hit "save" (under slew and close).

In the save dialog, make sure to choose "selected region" and "8bpp gray scale image", then give the file a name like "1.tif" and hit accept. It will warn you about losing color information, but there is no color in the to begin with so click yes. It should then confirm that the file was saved.

Now, close that image and do the same thing for the rest of the landsat bands 2, 3, 4, 5 and 7. As long as you don't close Tnimage you won't have to reenter the macro.

Once you are done with all that you will have these files which correspond to their respective Landsat bands:

1.tif
2.tif
3.tif
4.tif
5.tif
7.tif

Close everything in Tnimage and open all those files in order starting with 1.tif. This may sound funny but open image "7.tif" twice. You'll understand in a minute.

Under the color menu, select "composite RGB". The dialog box allows you to select the images to composite. If you opened the tiffs in order, image 1 corresponds to 1.tif, 2 is 2.tif etc.. (it goes to 8 for some reason, ignore 8 and ignore 0). Remember that there is no "6.tif" so when you opened 7.tif the first time it became image 6. But since you opened it twice, image 7 is 7.tif. See? That just makes it simpler to do combinations with band 7 without having to remember that 7=6. Right?

Now just select three images you want to composite. I have examples of all 120 possible combinations that can give you some ideas for useful and useless combinations, but it's more fun if you simply combine them yourself and see the results.

If you are reading up on band combinations on other websites, make sure you know which order they're talking about with the combinations. Technically "RGB" is backwards and many people speak in terms of "BGR". In the electromagnetic spectrum blue has the shortest wavelength followed by green then red, thus Landsat bands are blue=1, green=2 and red=3 and the infrared bands 4, 5 and 7 increase in wavelength in that order (band 6 was originally the last band but 7 was added on late in the design process). For that reason, some BGR people will say that the natural color combination is 123 (bands 1, 2 and 3 for blue, green and red), but I think in terms of RGB and I say it's 321. Whadda they know?

Those are the basics to working with the images. You now know enough to have some fun on your own. Practice students! Next post on this subject, which will come whenever I have time and feel like it, will get into interpretation and classification. The object of remote sensing is to identify everything in an image and that's what we're going to try and do. If you want to free up disc space go ahead but save those six cropped images, we'll be using them next time.

6.29.2004

photo of the day

This photo of Dubya was recently taken in Ireland. There's nothing really significant about it other than everyone's reaction. Apparently people were rather excited to have photogaphed the president in such a candid moment.


Image Hosted by ImageShack.us


According to the BBC:


The feeding frenzy did not last long. Within minutes, broadcasters were being ordered not to use the pictures, even though they were the most original images of the day.

A hastily written memo was delivered to all broadcasters, including the BBC.

"These pictures are the property of the Irish presidency and must not be used for transmission by any service," it said.

Just in case anyone was thinking of ignoring the instruction, it was written in bold, with capital letters and underlined.

It was too late for some broadcasters, who had excitedly rushed to air with the pictures of the blushing Mr Bush.

The authorities were not amused, and apparently made their feelings known to the cameraman involved.

"He'll probably be sent to Guantanamo Bay now," joked a fellow cameraman.


Since Villa Straylight is not a broadcaster, we are taking the chance.

movie recommendation

Spartan (on DVD)

Val Kilmer is some sort of secret agent who is tasked with investigating the President's kidnapped daughter, and that's really all I can say without giving away too much. The first half feels like a cop action movie, the good guys tracking down leads on a tight timetable, but just when you think it's going to get boring... BLAM! Plot twist after plot twist. There are better movies, sure, but this one is well worth the time. IMDB says it's 106 minutes, but it felt like three intense hours.

I highly recommend this movie though to be honest it's actually not very good. The acting is beyond terrible and every character has the personality of a rock. And not just any rock like mineral veined deposits found in caves that have a history if you know how to read it, but a really boring rock. Just anonymous driveway gravel. Lame is the name, and bland is the game.

Yet, it's still a surprisingly good movie, and a great deal of satisfaction can be derived by the fact that you get to see most of the bland characters die one by one.

6.27.2004

The wonderful .22

A friend and I are taking our CCW class next month so we've been doing a lot of target practice lately. I shot someone else's .22 pistol yesterday, and what fun that was.

I assumed the stance, took careful aim, squeezed the trigger... and nothing happened. Looking closer I found there was indeed a small hole in the center of the bull's eye. Apparently with the other shooting going on I hadn't heard the .22 go off, and there was no kick ("force feedback" for you geeks) to tell me what was happening.

I quickly unloaded the remaining 9 shots and retrieved the target. Ten bulls-eyes at 15 yards. What fun. I decided to dust off my old .22 rifle and head down to the range to make some holey paper today.

Here are the results at 25 yards:

Image Hosted by ImageShack.us


I'm not bragging, .22s are just good and easy guns to shoot. I'm sure not going to take photos of my .45 targets. They always have a lot of holes in the center, but there's always a few sprinkled around the sides too.

I didn't keep count but the gun has a 5 round magazine and from what I can tell that must have been about 45 or 50 shots. Some were even rapid fire, as rapid as you can fire with a bolt action anyway. Lee Harvey Oswald's got nothin' on me!

I wanted to post the history of the .22 cartridge but it looks like a fairly confusing subject. But apparently, when centerfire cartridges were invented, all the other rimfires died out except the .22.

Some pellet guns have a higher velocity than some .22s, though with less payload, and besides target practice the .22 isn't good for much. But they are such fun guns to shoot that even the most liberal anti-gun person would be hard pressed not to enjoy plinking away with a good .22.

Keep the Apple rolling

Fiona Apple's new song Extraordinary Machine is here.

Please download and listen to this song, it is wonderful, but don't get your hopes up about hearing her new album, lemme tell you why.

A few days ago I followed a link to popwherry, Aaron Wherry's MP3 blog and read his post about Fiona. According to him, Sony has decided not to release her new album so someone leaked the title track on the internet and Aaron blogged it, put the song up for download, and even put up the lyrics.

When he had problems with the download links he asked for help mirroring the track and Citizen Keith was first to volunteer. I have a small 10 Meg website that I'm not using so I decided to mirror it as well and Wherry was kind enough to give links to the file as well as to this blog. So that is the blog story behind it.

It really is a good song so download it for yourself to enjoy. And if a lot of people download it maybe Sony will hear about it and decide to release her album. So do it for Fiona.

And she's cute so maybe she will ask me out or something, so do it for me too.

This page is powered by Blogger. Isn't yours?