Monthly Archives: November 2009

LM3909 Oscillator

I was wandering the net at random, following various links, and ended up researching a rather interesting integrated circuit that I’ve used before: an LM3909 LED flasher chip. It’s an interesting chip which can flash a regular LED with a 2v voltage drop using only a single 1.5v battery. I used to have this breadboarded up on my bookshelf ages ago, and it would flash for months using a single AA cell, and probably for years using a D cell. The problem is that this chip is kind of hard to find these days, and when you can find them, you end up paying $5 each. What’s cool is that someone actually worked out the circuit from the databook and drew up a completely discrete version.

Discrete LM3909 Oscillator

More Fuji Real 3D W1 experiments (and an anaglyph)

Well, I’ve tinkered around a bit more, and discovered a few things: the camera doesn’t actually do very much to align images. In fact, there is a fairly significant vertical misalignment between the two camera (I’m guessing around the order of a dozen pixels) which doesn’t really hurt things too bad, but which annoy me as the perfectionist stereo practitioner I’m being paid to be. 🙂

In yesterday’s article, I used exiftool to extract left and right images, which works just fine. I just composited the two images directly together, which resulted in a substantial amount of parallax over most of the image (the image was entirely behind the screen, and there was significant disparity). We can shift the images’ relative position by hand to reduce this overall disparity, and move the objects closer to the real screen, which makes the images easier to view and fuse. I decided to give this a try using GIMP, and basically constructed the anaglyph below using the following steps.

  1. Extract left images and right images from the MPO file as yesterday.
  2. run “gimp l.jpg r.jpg”
  3. I like the traditional anaglyphs, so I converted each image to BW, then back to color to produce gray scales of both images.
  4. I then added a new layer atop each image. For the left image, I filled that layer with a solid red. For the right image, I filled it with a cyan layer.
  5. Select the “Screen” layer mode for both of the new layers. This should let you see both a red colored and cyan colored image.
  6. Use “Merge down” to convert each layer into a single layer.
  7. I then copied the red layer, and used “Paste into” to put it on top of the blue layer.
  8. Change the new layer mode to “Multiply”. Voila! You have an anaglyph. You can use the shift tool (while wearing anaglyph glasses if you like) to adjust and align the layers as you see fit.
  9. Crop and export!
  10. In the photo below, Luigi’s eyes should be roughly at screen depth, so his front bumper will appear modestly in front of screen. I probably could still be a bit better on the vertical alignment, but it’s not bad.

    luigi

    Addendum: Here’s Bruce!
    bruce

Fujifilm Real 3D W1 Camera

Today we got an interesting new toy in the lab, a Fujifilm Finepix Real 3D W1. It’s a very cute little camera which you can think of as being the modern day equivalent of the old Nimslo 3D cameras. It has two lenses, and can acquire both 3D and regular 2D images, which it displays on a built in 3D lenticular display on the back of the camera.

But that’s not that much fun, you’d have to pass the camera around, and let’s face it, the display is pretty small. Fuji is supposed to have a digital picture frame which can display these images in 3D, and is also supposedly going to have a service bureau so you can get lenticular prints made, but again, that’s not much fun, at least not today. So, instead, I decided to see what I could learn about the image formats that it uses.

For still imagery, it writes both a .JPG and a .MPO. The JPGs are just standard JPG images, and can be read by pretty much anything. The MPO files are Multi Picture Objects, which are a format that I hadn’t seen before. Digging around a bit, I found out that (with some complications) they are mostly just two concatenated JPG images. Most JPEG readers seem to open and read the first image (which I believe to be the right lens image) without any difficulty, so if you weren’t interested in the stereo image, you could pretty much just treat them like JPGS (although iPhoto doesn’t even try to notice them, and refuses to try to open them).

A little more digging revealed that there is a tool called exiftool which can be used to extract the images. After you install exiftool, you can run:

exiftool -trailer:all= input.mpo -o R.jpg
exiftool input.mpo -mpimage2 -b > L.jpg

to extract the left and right image. If you have ImageMagick installed, you can create a red/blue anaglyph with a command like:

composite -stereo L.jpg R.jpg stereo.jpg

Here’s an example that is just an image that I shot as a test:

stereo2

I also did a bit of experimentation with video. It appears that it records an AVI file with two different video streams and one audio stream. I did some quick tests using mplayer to dump frames of each video stream into separate directories, combining them with composite, and then making a video back out of the resulting frames. It worked, but the example footage was terrible, and I could work on improving the results, so I’ll hold off on that example for now.

Overall, it’s a pretty neat little gadget, but I must admit you can buy a much better camera for the $600 price tag that it costs. It’s neat not just for what it can do, but because it demonstrates some of the capabilities that I think cameras of the future will have.

More about it after I play with it a bit more.

Crystal Sets to Sideband, by Frank W. Harris

I was trying to remember where I had seen this excellent online book, and finally found the link that lead me to it. Archived here for posterity. Frank tries to never buy radios, but literally build his entire station. This isn’t to save money, it’s to foster an understanding of how things work in a way that a single individual can master. It’s a great way to think about amateur radio. Check it out, lots good inside.

Book Copyright c 2006, Frank W. Harris / HTML and PDF assembly Copyright c 2006 AmSoft.