Random header image... Refresh for more!

It’s 10:40 PM. Do you know where your Atari is?

I’ve been on this Crazy Weekend Project all day and I haven’t even plugged in the Atari yet.  This sucks.

February 25, 2010   No Comments

Achievement Unlocked: Wild Goose Chase

So, I found out why it wasn’t waiting…

It was waiting and I’m just a moron.

I had my program set up to send a Bluetooth message to the NXT to retrieve the contents of Mailbox 10.  One the NXT, I was writing true to Mailbox 10 when I started an action and false when the action completed, so that Mailbox 10 could be used as a “Busy” signal.  My program would poll until Mailbox 10 reported false, then continue.

Thing is, I was sending the “Clear Mailbox” flag to the NXT.  So the NXT gave me the contents of Mailbox 10, then cleared Mailbox 10.  The first read returned true, because the motor was busy.  The second read returned false, not because the action had completed, but beacuse the “Clear Mailbox” flag caused Mailbox 10 to be filled with a bunch of zeroes.

February 25, 2010   No Comments

Achievement Unlocked! Reboot to the Head

Reboot to the Head:  Attempt to fix a problem by rebooting your computer.

Unfortunately, it didn’t work.  The CD is still choppy and weird.  Oh well.

February 25, 2010   No Comments

“Turn Right at Groom Lake”

There were two incidents this weekend where people blindly followed their GPS into the middle of nowhere and were shocked when they got stuck in the snow, miles from a cell phone signal.  It’s mind boggling that nothing would have tipped them off that it was a bad idea well before they got stuck.  I would have known not to go that way as soon as it included “Forest Service” road anywhere in the directions.  But beyond that, what about the fact that the road was probably completely unsigned, not to mention completely deserted?  I was reluctant to take Oregon Highway 6 between Tillamook and Portland in March because of snow, yet these people think Forest Road 1234 is a good idea in December?  Your four wheel drive is not going to protect you from your stupidity.

At any rate, it inspired me to see what kind of stupid directions I could have Google Maps give me.  I’m a tester.  Time to break stuff.

The obvious first choice is someplace where there aren’t roads, like Seattle to Tokyo.  Apparently, the best route there is to drive to Gasworks Park, kayak to the north shore of Oahu, drive to Honolulu, then kayak the rest of the way to Japan.  While I did appreciate that it specifically told me to kayak to Japan, and that it would take about 34 days to do so, I was a bit dismayed by the fact that it didn’t recommend a grand-circle route through the Aleutians, which should be faster and shorter, not to mention that you can drive to Homer Alaska, take the ferry to at least Kodiak, probably even further, then only have to kayak to somewhere in Siberia, where there’s probably a road of some sort down the Kamchatka Peninsula, then it’s another quick kayak trip across the Sea of Okhotsk to Japan.  I guess they’re trying to keep me out of the dangerously stormy and cold North Pacific.

At any rate, I would be dead if I followed these directions because, well, you know, kayaking across the entire Pacific just ain’t gonna work out so well.

So then, I tried a more reasonable tourist query:  How do I get to Windy Ridge from the Johnston Ridge Observatory at Mt. St. Helens?  The correct answer is to go down through Cougar or up through Morton.  That’s not what it told me.  Now, I was hoping to be directed to take a road across the Blast Zone which hasn’t existed since 1980, but unfortunately, that was not the recommendation.  Instead, I was given these directions:

3. Slight left  
361 ft
4. Turn left  
0.6 mi
5. Turn right  
2.7 mi
6. Turn left  
0.6 mi
7. Turn left  
1.4 mi
8. Turn right  
2.3 mi
9. Turn left  
0.3 mi
10. Turn left  
1.1 mi
11. Slight right  
0.4 mi
12. Turn right  
0.7 mi
13. Slight left  
2.2 mi
14. Turn left  
1.4 mi
15. Turn right  
0.6 mi

Well, of course!  Without these clear directions, I would have turned left at step 11, instead of a slight right, and who knows where I would have ended up.  My DeLorme Gazetteer shows that somewhere out in that forest is where Bigfoot lives.

OMGBigfoot

Now, the best set of directions I got were the ones between Mercury and Rachel, NV.   They’re tiny little specks of “civilization” on the Great Basin.  Mercury is a former “company” town1 and Rachel is a bar and a handful of mobile homes in the middle of nowhere.  There’s not much reason to go to either one (In fact, you can’t go to Mercury), and even less of a reason to drive between them, but I just wanted to see where I’d be sent.  The results are awesome:

TurnRightAtGroomLake

Here’s the directions Google gave me:

1. Head north toward Mercury Hwy  
0.3 mi
2. Turn right at Mercury Hwy  
2.6 mi
3. Continue onto Short Pole Line Rd  
2.4 mi
4. Slight left toward Mercury Hwy  
2.2 mi
5. Continue straight onto Mercury Hwy  
22.3 mi
6. Continue onto Mesa Rd  
5.2 mi
7. Turn right at Groom Lake Rd  
1.2 mi
8. Slight right toward Groom Lake Rd  
0.9 mi
9. Continue straight onto Groom Lake Rd  
2.5 mi
10. Slight right to stay on Groom Lake Rd  
25.6 mi
11. Continue onto Groom Rd  
13.0 mi
12. Turn left at Mail Box Rd  
5.1 mi
13. Turn left at Extraterrestrial Hwy/NV-375 N  
19.5 mi
14. Turn left at Canyon Rd  
197 ft
15. Take the 1st right onto Front St  
0.2 mi
 

   

Now, I’ll forgive you if you’re not terribly familar with Nevada geography and aren’t clear why the shortest, most direct route between Mercury and Rachel is not exactly the best way to go.  For starters, you will be shot.  Well, you’re probably not going to be shot right away, but I can pretty much guarantee that you will be stopped, through means of force and extreme prejudice, if required.  At the very least, if they don’t shoot you, they’ll arrest you.  Either way, not the best start.  And anyway, if you’re not shot by commandos in black SUVs, the ground itself will get you.  The land between Mercury and Rachel is some of the most contaminated and dangerous dirt in the world.

Allow me to enlighten you as to some of the scenery you’ll see along the way.  Zoom in and follow the route.

NukulerBombz

At about 20 miles or so, you’ll come across a valley full of craters.  It’s not some cosmic impact zone.  Instead, it’s the legacy of the Cold War.  See, this area is where the government tested nuclear bombs from the 50’s through the early 90’s.  There were some 1000 or so nuclear bombs set off in this area.  After the early tests (you know, the ones you always see in the blast test movies) spread radiation across Eastern Nevada and a good chunk of Southern Utah (As well as other downwind points, even as far as Iowa and beyond), they decided it would be best to conduct the tests underground.  These underground tests left subsidence craters all over this valley.  If you’re following the route, the large crater that the road curves around at the north end of the valley is the result of the Sedan test, which was conducted as part of an experiment around using nuclear explosives for excavation work, you know, like for digging canals and such.  As far as moving the earth, it was a spectacular success, forming the largest man-made crater ever, almost a quarter mile in diameter.  Unfortunately, the experiment had a slight downside in that a large portion of the earth it moved ended up as radioactive dust which was carried by the winds across the country and exposed somewhere in the neighborhood of 15 million people to radioactive contamination.  Which would be why we don’t use nuclear bombs for road construction today…

Drive around the Sedan Crater and over a mountain pass, and you’ll approach a cluster of buildings alongside a large dry lake bed.  The lake is Groom Lake.  THE Groom Lake.  Those buildings are what’s known as Area 51.  This is the primary reason why you’ll be shot if you try to take this road.  Area 51 is, or, at least, was, one of the primary test sites for top secret military aircraft.  It’s a perfect place for all sorts of clandestine activities, since it’s in the middle of nowhere and surrounded by even more nowhere.  The nearest settlements outside the fence are backward holes in the wall, so if they see strange things flying by and start telling people, no one will believe them.  The U2 and F117 Stealth Fighter were both developed here.

SpookyAliens

And we can’t forget the spooky aliens.

Anyway, keep driving through Dreamland, and make sure to take pictures of all the hangars, antenna arrays, huge satellite dishes, black helicopters, and all manner of other things that clearly do not exist and are easily confused with the planet Venus.  Continue north, through the minefields and remote sensors and cameras, say hi to the nice people in the black SUV as you pass it by, and eventually you’ll come to the lone mailbox along the Extraterrestrial Highway (No, seriously, that’s the official state designation of the road) and you’re just a short distance from your final destination of Rachel.

I’m definitely going to take that drive the next time I’m in the area, because Google told me it’s the way to go!

  1. Where the company was the United States Atomic Energy Commission []

December 30, 2009   No Comments

Circular Logic

I tried running it on a different episode and the results were…  A bit different.

STTNGFail2

STTNGFail1

I guess the high success rate was due to finding the training images again.  Oh well, at least it did that right.

And this wasn’t a complete loss, JeanLucPicard was identified correctly most of the time!  And some of the other characters were properly identified some of the time.

I also took a look at the distances for each match.  You see, the match is actually a 2500 dimensional distance calculation between two images.  I was hoping to use this distance to weed out false matches, unfortunately, there wasn’t really that much of a separation between correct and incorrect matches.

At any rate, all that is just tweaking the system.

November 29, 2009   No Comments

Whitespace

Here’s the average image that came out of CvCalcEigenObjects: WesleyCrusher.

No, really, that’s what it was.  There’s something there.  Sort of.  A 50×50 white square.

Hmmm…  I think I need to work on this some more…

November 27, 2009   No Comments

Warp Drive Disabled

Well, the upgrade to OpenCV 2.0 went just wonderfully.  Now, instead of having one function that’s not implemented, I have a hundred functions that won’t even run.

OpenCVPInvoke

Maybe I should just give up and go back to playing games.

November 27, 2009   No Comments

When In Doubt, Link Debug.

So, there’s apparently a bug somewhere in OpenCV that happens when you try to load a Haar Classifier file.  The error you get is the following:

—————————
OpenCV GUI Error Handler
—————————
Unspecified error (The node does not represent a user object (unknown type?))
in function cvRead, .\cxpersistence.cpp(5061)

Press “Abort” to terminate application.
Press “Retry” to debug (if the app is running under debugger).
Press “Ignore” to continue (this is not safe).

—————————
Abort   Retry   Ignore  
—————————

I’ve found references to this crash which indicate that the error has been happening for several years and several iterations and was not fixed in the version I’m using from early September.  (It may be gone in 2.0, not sure.)  The “fix” that most people recommend is to link against cvd.lib, rather than cv.lib. 

Now…  I haven’t fully researched this since I’m not dealing with the C libraries directly, but from the looks of it, they’re suggesting that you link against the debug build of the library and your problems will go away.

What a wonderful fix for a bug in a high-performance math-heavy visual processing library!

There is, however, a less commonly described workaround that won’t be totally dumb.  You do some other operation before calling load, such as creating a junk image and doing something to it. This is what I used and it worked for me:

//Workaround for crashing bug while loading classifier.
IplImage fakeImage = new IplImage(100, 100, BitDepth.U8, 1);
fakeImage.Erode(fakeImage);
fakeImage.Dispose();

November 26, 2009   No Comments

Rule #1: The Documentation Must Not Suck

So that’s how you create, initialize, and     a SpeechRecognizer…

WonderfulExamples

Besides the fact that this example is apparently showing something that’s invisible, it’s not even really showing the creation and initialization, either.  Calling your local functions “SetupEventHandlers()” and “LoadInitialGrammars()” isn’t exactly all that helpful to me.  I understand that I need to set up event handlers and load grammars.  THAT’S WHY I’M READING THE DOCUMENTATION:  I know I need to do something, but I don’t know how.  You’ve pretty much shown me how to call the constructor on your class.  I managed to get that bit on my own, remarkably enough.

November 25, 2009   No Comments

Well. That Didn’t Work.

I just tried a suggested alternative method of playing.  Rather than moving to the predicted point, why not try to track the ball, like the CPU paddle does.  Well…  Here’s what happened with that attempt:

  1. Paddle shoots WAY up.
  2. Paddle overcorrects WAY down.
  3. Paddle is off the screen.
  4. System is confused.

Not terribly successful.  I’ll try again with lower motor settings, since it seems like the motor has kicked up the power since last night for some reason.

September 7, 2009   No Comments