Mid January Biking Report

Thanks to our continued warm winter weather, I’ve started off 2012 on a biking tear.  I’ve already ridden to work 9 times, reaching that mark a week earlier than any previous January.  The spreadsheet I use to track my rides tells me that I’m on pace for 259 total rides and 5617 total miles in 2012.  Somehow I doubt that I’ll get quite that many, but at this pace, 180 sure seems attainable.  I’m sure we’ll eventually get some winter weather this year, but for now, I’m enjoying the salt- and ice-free roads.  The studded tires I put on back in November still have yet to be tested in true winter conditions.

I received a Merino wool t-shirt as a Christmas gift, and so far I am really liking it.  It is the “Minus 33” brand.  In the past, I’ve always worn t-shirts or jerseys made out of synthetic fabrics, by themselves in the summer and as a base layer in the winter.  The problem with them is that they only last a ride or two before they start to (ahem) smell funky.  The mean time to smelliness seems to be inversely proportional to the amount of sweating I do.  When you ride 4 to 5 days a week, you end up washing a lot of shirts.  I was attracted to wool due to its ability to resist odors, which is one of the reasons I swear by wool socks.  So I figured I’d give a wool t-shirt a try, and so far I haven’t been disappointed.  This shirt has gone through 5+ rides now, and still no hint of any funky odor.  The real test will be to see how it does in the summer.  For the Minus 33 brand, I got an extra large, and initially was a little worried that it’d be too big for cycling.  However, it ended up fitting just fine.  I am 6′ and around 180lbs, and the fit is comfortable but not form fitting.  We’ll see how it fares after the first time I wash it.

Another GIMP Trick

Recently, I had occasion to convert a few shapes extracted from a flash movie to PNG format.  I used the excellent swftools suite to extract the shapes from the movie, and then I used  Gnash to render the shapes and save PNG format screen shots. This works great, but unfortunately, the resulting image is missing the alpha channel, and its background is white.  I wanted a way to restore the shape’s transparent background.

One easy way to restore transparency is to use GIMP to select all the white background pixels and “erase” them to make them transparent.  Unfortunately, that’s not quite good enough.  That’s because anti-aliased images have “semi-transparent” pixels around the edges, which show the white background underneath.  If you just erase the white pixels, the semi-transparent pixels will leave artifacts around the image:

The above image is on a black background to highlight.  Note the white artifacts around the edge of the circle.

To truly restore transparency and get rid of the artifacts, we need two images, one on a white background, and another on a black background.  Then we can compare the images and average out the differences between the semi-transparent areas, thereby eliminating the artifacts.  For flash shapes, it’s relatively easy to generate a container movie that displays the shape on a black background.  You can do it with the “swfc” utility provided with swftools, and a script like this:

.flash filename="blackbg.swf" bbox=autocrop
   .swf temp "shape.swf"
   .put foo=temp
.end

Load the two images into GIMP using the “Open as Layers” dialog from the File menu.  Then duplicate each layer so that you have two copies of each image.  Order the layers so that the 2 layers with black backgrounds are on top of the white layers:

For clarity, I’ve renamed the layers according to their background colors.  Next, you want to hide “black” and “white” and select “black copy”.  Then set the opacity of “black copy” to 50.  The resulting image should be on a gray background, representing the average between black and white:

Now, merge the visible layers together (right-click on “black copy” and select “merge down”) to create a single layer containing the averaged background.  Move this layer to the top:

Now, we want to find the differences between the black and white layers and use this to create a layer mask, which we’ll paste over the averaged layer.  Hide “average” and show “black” and “white”.  Select “black”, click on the “Mode” drop-down box, and select “Difference.”  The result should look something like this:

The amount of white corresponds to how much the two images differ.  The gray areas correspond to the anti-aliased pixels along the edge of the circle.

Now we’ll use this image to apply transparency to the top, averaged layer.  Press Ctrl-A to select the image, then Edit – Copy Visible (or Shift-Ctrl-C).  It’s important to “Copy Visible” and not just “Copy”, so we get the visual representation of the differences between the two layers.  Otherwise it’ll only copy the active layer.

Hide the two bottom layers, so only the top “average” layer is visible.  On the Layers dialog, right-click the top layer and select “Add Layer Mask.”  Select the first option to initialize the mask to white (full opacity), and click “Add.”

Make sure the top layer is selected.  Right-click on it in the layers dialog again and ensure that “Edit Layer Mask” is checked.  Then, paste the clipboard into the layer mask with Ctrl-V or Edit – Paste.  Finally, invert the layer mask with Colors – Invert.

Here’s the result, shown on a red background to illustrate that the artifacts are gone.

And there you have it.  Hopefully someone will find this useful!

Update…  I found myself having to do this with a very large number of images.  After spending a couple mind-numbing hours doing repetitive operations with GIMP, I figured out a way to script this using ImageMagick:

# produce averaged image
convert black.png -channel a -evaluate set 50% out$$.png
convert white.png out$$.png -flatten avg$$.png
rm out$$.png

# generate alpha mask
composite -compose difference white.png black.png out$$.png
convert -negate out$$.png mask$$.png
rm out$$.png

# apply mask to averaged image
composite mask$$.png -alpha off -compose Copy_Opacity avg$$.png output.png
rm mask$$.png avg$$.png

This works great, and looks to be a huge time saver.

Happy New Year

Well it’s 2012, and I’m back to work, and by extension, riding to work.  My 2-week holiday break was great, and much needed, but it seems that the older I get, the less my body likes changes to its routine.  I don’t miss work much for its own sake, but I miss the day-in, day-out routine of riding to work every morning, riding home every evening, and eating regular amounts of food at regular times.

I managed to sneak in one ride during the holidaze this year.  I did a quick 24-mile ride out to BWI, around the airport, and back.  That’s one of my go-to routes when I have 1½ hours to spare.

January has started out on a wintry note, with this morning’s ride in the 20s, with wind and flurries, and tomorrow morning looking similar.  But it looks like another warming trend is on the way for the end of the week.  This winter has been amazingly warm so far, warmer than any I can remember.  It’s been so warm that I wonder if we’re going to get any snow or ice at all.  I trotted out the studded tires this morning due to the snow threat, but they have yet to be broken in on “real” ice in spite of being on my bike since mid November.  I guess we’ll see what the next two months have in store.

Wrapping up 2011

Today is my last bike commute of 2011.  I’ll finish up with 154 rides, 20 fewer than 2010, but 10 more than 2009.  May and June were my most prolific months of the year, with 17 rides each month.  As usual, February was least prolific, with only 4 rides this year.  I rode 11 times in December, which beat both 2010 and 2009, and also 2008 if you don’t count 2 rides to UMBC I took during the holiday break and recorded as commutes.

I rode my 2 road bikes most of the time this year.  Both were tied with 60 rides each (actually, the Giant gets the slight edge with 60.5, due to a one-way commute back at the end of June).  The Rockhopper was a distant third with 34, with most of those coming in January-March.

With the long holiday break looming and its probable lack of rides (I always have good intentions, but the rides never seem to materialize) I wanted to take a slightly longer ride this morning.  I rode down Lawyers Hill Rd and through Patapsco State Park on the Grist Mill Trail, then left on Ilchester and right on Bonnie Branch.  I followed Bonnie Branch its entire length and turned right onto Montgomery, right on Baugher Farm, and right on New Cut.  I took New Cut into Ellicott City, turned right on Frederick, right on River, left on Thistle, and right back onto Frederick.  I followed Frederick about a mile towards Catonsville, turned right on Seminole, left on Idlewilde, right on Montrose, left back onto Idlewilde, right on Hilton, left on McCurley, left on Newburg, right on Pullen, right on Mellor, right on Montemar, left on Bloomsbury, right on Asylum, through Spring Grove, left on Valley, right on Wilkens, and finally left onto Walker into UMBC.  Total distance was about 18 miles.  I’d ridden all these roads before, but never this exact route, and it had been a long time (well over a year) since I rode through that particular area of Catonsville.  It’s not a bad route, with two long climbs (Bonnie Branch and Thistle Rd up to Seminole).  There are two potential bad traffic spots:  the light at Frederick and Rolling (where it’s necessary to take the lane because there’s no shoulder) and the intersection of Newburg and Rolling, where you have to cross Rolling to continue straight on Newburg.  However, traffic wasn’t bad this morning, and I may try riding through here a little more often to see what it’s like on different days.  I’m always looking for longer routes that don’t require long rides on Montgomery Rd.

Well, that about does it for 2011.  See you in 2012.  We’ll see what the new year has in store for riding.

Cold Feet

So, it finally felt a little wintry this morning.  It was 35° out when I left the house at around 7:50am.  We got a lot of rain yesterday evening, and I’m told there were a few flakes mixed in, though by dawn, there was no evidence of snow anywhere.  In a true shocker, schools weren’t even delayed.  All the same, I trotted out the mountain bike with the studded tires this morning.  The only really slick spots on my commute this morning were on the wooden bridges in Patapsco State Park.  I took River Rd. out to Frederick Rd. and into Ellicott City.  Parts of River Rd. were very washed out, so my fenders got a good workout.  But it wasn’t cold enough for widespread ice.

The only real problem with today’s ride was that my toes got really cold.  I’ve got SPD pedals on this bike, and my regular neoprene shoe covers don’t fit over the shoes.  In the dead of winter, I switch to standard pedals and straps, and ride with hiking boots.  This was my first time riding the SPD shoes in colder weather, and my toes were pretty frosty by the end of the ride.  It looks like my cheapo Performance toe covers do fit over the shoes (though it’s a tight squeeze), so I may try riding with them to see if they help.  But in any case, if this is going to by my everyday winter bike, I need a good way to keep my feet warm with the SPD shoes.

Closing out November

As hoped, I’m finishing November with a total of 13 rides, smashing my previous record of 12, set in 2009.  I almost always take the first week of November off work, which combined with the Thanksgiving holiday, cuts down significantly on the potential ride total for the month.  For November 2011, out of 14 total work days, I biked 13 times and took the car once.

I rode north on Landing Rd.  this morning for the first time since June.  Landing is a great workout, and it’s a good shortcut to Ilchester Rd., but every time I ride it, I’m reminded why I don’t take it very often.  It’s very narrow, and the traffic in the morning is almost as bad as the traffic on Montgomery Rd.  If I’m going to deal with the traffic, I might as well do it on Montgomery, which is relatively flat.  There are other, less traveled back roads that I can ride on if I want to do hills.

Of course, another reason I avoid Landing is the fact that I wiped out there last February.  Today was the first time I rode it with the same bike I was riding when I crashed.  My crash was caused by ice, which wasn’t a factor today, but I’ll still admit to being a little nervous, and going really slowly, past the spot where I crashed!

Last weekend I recharged the batteries for my Planet Bike “Blaze” headlights, and I noticed right away on Monday that they were noticeably brighter.  I had ridden them quite a bit in “flash” mode during early autumn, and I guess I went a little too long without recharging them.  I’m going to try to make a point to recharge the batteries every weekend, just to keep them fresh.

We’ll see what December brings on the riding front.  I have 13 work days in December, so I’m going to try for 13 rides, weather, schedule and health permitting.

Mileage milestone

I always find it noteworthy when one of my bike’s odometers turns over another thousand miles.  Given that I have three bikes that I ride regularly, it’s kind of a meaningless stat.  Nonetheless, it’s a good excuse to note where I was when it happened, go back over previous ride logs, etc.  Anyhow, this morning I hit 3000 on my single-speed.  It was on the way to work, likely on the Patapsco State Park entrance road near the South St. gate.  I say “likely” because I didn’t actually see it flip over to 3000.  I noticed I was at 3002 while I was riding up Selford Rd, around 2 miles from the park entrance.

It took almost a full year to log 1000 miles on this bike.  I hit 2000 back on December 13, 2010.  After being my go-to bike for 95+ rides in 2010, it was out of commission for a good part of early 2011 due to various issues, but lately it’s been seeing a lot of action again.

If I can ride on all 4 of the remaining work days in November (excluding today), I’ll finish up with 13 rides for the month, which will be a new November record.  The previous record of 12 was set in 2009.  I’m currently on pace to finish 2011 with 156 rides.  That’s significantly fewer than last year’s 174, but it’s still enough to to put 2011 in second place for total rides since I began keeping records in 2006.  Not too bad, given all the setbacks I had this year with injuries etc.

T-Day Week

Well, our unseasonably warm and wet autumn has lasted into Thanksgiving week.  The weather for this morning’s ride was around 58° with fog.  I took a longer ride this morning, because it wasn’t raining, rain is predicted for tomorrow and Wednesday, and I actually managed to get out of the house before 8:00am.

Last Friday I took another ride on my mountain bike, with its new Schwalbe Marathon Winter studded tires, to finish the break-in period for the tires.  Considering that they’re studded, the tires ride pretty well on dry pavement.  They are 1.75″ tires, slightly smaller than the 1.95″ Kendas I use on this bike during warm weather.  This works out great, because there’s more clearance between the tires and the fenders, making it less likely that the fenders will clog with snow and other kruft.  Looking forward to trying these tires out under “real” winter conditions.

I finally got around to winterizing our swimming pool this weekend.  The most important thing to do when winterizing a pool is to blow as much water out of the circulation pipes as possible, then plug the lines to trap air inside.  This protects the pipes against freeze damage.  For the past 10 years, I’ve used a small air compressor to blow air through the pipes.  This year I decided to try something different, and used my wet/dry shop vac instead.  I was amazed at how good a job the vac did.  Air compressors are designed to deliver a small volume of air at high pressure.  This is great if you happen to be running a pneumatic nailer, but it’s not ideal for blowing out pool plumbing.  That calls for a large volume of air at relatively low pressure.  It turns out that a shop vac, even a small one, is perfect for doing this.  The compressor would always blow in fits and starts as it struggled to keep up with the demand for air.  The shop vac blew a steady, strong stream of air through the lines, and I’m sure it did a better job.  Not only that, the shop vac weighs a lot less, and is generally much easier to deal with, than the compressor.  Looks like I’ve found a better mouse trap.

Lights

So it’s mid November again.  We all know what that brings..  chilly mornings, dark commutes home, and G.I. bugs.  I used to get GI bugs maybe once every 3 years.  Ever since I had kids, I seem to catch them all the time now.  I’ve often joked to myself that if I only rode on days when I didn’t have a mild GI bug, I would never ride between November and April.  Anyhow, I’ve got my first one of the season now, and was seriously dragging for this morning’s ride.  Still glad I did it, though, and glad I’m able to resist taking the car even on days when I’m not feeling 100%.  After a while, it just becomes routine.

I’ve had two commutes home in the dark now with my new headlights.  I have a Planet Bike Blaze 2w and Blaze 1w mounted on the bars on either side of the stem, and a Blaze ½w on my helmet.  So far, I’m liking the setup.  The bar-mounted lights illuminate the road out to a pretty good distance.  They light up reflective signs that are several hundred feet ahead.  They have a low setting for twilight, high for full darkness, and flashing mode for visibility during the day.  The helmet light does a great job lighting up the road closer to the bike, or wherever I happen to point it.  This is my first time riding with a helmet-mounted headlight, and I think it’s a good addition.  Without it, I was constantly adjusting my bar-mounted headlight up or down to illuminate farther out or closer in, depending on conditions.  With the helmet light, I have the best of both worlds.  I can also use it to read my cyclecomputer in the dark.  If there’s a drawback, it’s that the light dances around as I move my head, which can be a little distracting, particularly when climbing hills out of the saddle.  But all in all, I’m happy having one.  Other great things about these lights: they take standard AA batteries, they’re self contained, and their mounting brackets allow for easy removal to move them between different bikes.  What remains to be seen, is how well they will stand up to bad weather.  I’ve taken them out for a couple of rides in light rain and drizzle, with no problems, but I’ve yet to test them in a downpour or a soaking mist, so the jury is still out.  I’ll report back on them later in the season.

Grips and Spikes

We had a few early-season snowflakes fall over this past weekend, so to get in the spirit, I mounted my new Schwalbe “Marathon Winter” studded tires on my mountain bike.  They were a bit of a pain to mount, but I was able to wrestle them on eventually.   Unfortunately, my “bead jack” tool is not designed for larger tires, so it was no help with these.  I also installed a new set of grips on the bike.  My old setup was a set of standard-issue 1990s-vintage handlebar grips with metal bar-ends.  Looking for something more comfortable, I replaced them with a pair of Ergon GC-2 grips with integrated bar-ends.  Yesterday, I took the bike out for a spin to try out the new tires and grips.

Most manufacturers of studded bike tires recommend “breaking in” the tires for 25-30 miles, so this was the start of my “break in” period.  I just wanted to see how the tires rode; there was no ice or really any reason to ride with studs.   The tires ride fine, and as expected, they’re noisy, because the studs chatter against the ground as the tires rotate.  It sounds kind of like riding on a road that’s been over-treated with road salt.  On the trail, pedestrians can actually hear me coming.  I could get used to this.

The Ergons seem like they’re going to be pretty nice.  I still have to play around with the positioning of the grips, to get the most “natural” ergonomic hand position.  One tip: make sure the grips are pushed ALL THE WAY onto the bar.  Initially, I didn’t get one of the grips on far enough, and it kept slipping on the bar.  I unscrewed it, made sure it was fully seated, and re-tightened, and no more slipping.

I’ll be posting more on this stuff (particularly the tires) as the winter wears on, I’m sure.