Cool Camera

At work we’ve been working with a cool little camera from Prosilica. Michael wrote a nice wrapper and I spent the last week or two wrangling the data out of the buffers and into the application. The cameras are pretty cool, they spew out 1620×1220 frames at about 300 milliseconds a frame in Bayer 8, and about 500ms in rgb24. The driver they gave us has a really quick conversion from Bayer 8 built in, so we went with that.

The big problem moving to these from the Nikon kits we had, is that the Nikons had their own processing box that did the work of converting the raw data into jpegs. They work pretty fast, around 250ms a frame, but those are 320×240 frames, 640×480 take a tiny bit longer.

Anyway, without that processing box, we have that load moved directly onto our weak little clients, which take about 3 seconds to crush a frame down to a 320×240 jpeg with Magick++. So we decided to just do a raw, fullscreen live image, and it is really cool.

The point of all this introduction is that I like the little guys, and were they under 2 grand I might buy one for myself. Regardless, I get to play with one at work, so here are some pictures I took when we were still working on the full screen mode. They have, of course, been compressed down from the full size. Click through for a 640×480 version.

Posted October 18th, 2007 - Permalink
Categories: Hardware - Linux - Programming - Software
No Comments »
 
DigiPro Tablet And Linux

A few days ago I finally gave in to the two-for-one tablet deal at geeks.com. On a side note, I’ve always had very good luck with geeks.com, good stuff, right price, no problems. Anyway, I gave in and bought myself two of the DigiPro 5.5″x4″ drawing tablets, Model No. WP5540. I tried to find some compatability information about the tablet and linux, but couldn’t.

I got it yesterday, hooked it up and its working just fine. I don’t know about the “512 Pressure Levels”, since I’m not sure what app on my machine would take pressure levels anyway. The GIMP didn’t seem to act any different however. I did uncomment the information for a wacom tablet in my xorg.conf and restarted my X server, but I haven’t tried it without that change, so it may not be necessary.

5.5″x4″ is about as small as it sounds, but it really isn’t that big of a deal. There is plenty of fine control on the tablet, and it’s more than big enough for me. I intend to use it when I’m working in the gimp, for fine control of the lasso tool, etc. If it had a scroll wheel on it, I think I’d replace my mouse, it’s that comfy. Plus you can roll the pen between fingers and type just fine. No more grabbing the mouse every few seconds.

For the record I’m on Mepis, whatever is current there, with kernel 2.6.15-26-386.

Posted March 18th, 2007 - Permalink
Categories: Computers - Hardware - Linux
No Comments »
 
Cleaning Up E-Books

I have a large number of ebooks in Microsoft’s .lit format. My Nokia 770 doesn’t have any software to read a .lit format book. In fact, I can’t say I’ve ever seen a .lit reader other than Microsoft’s own.

What I have seen is the nifty and very usefull ConvertLIT which I use to down convert the files into plain HTML. I don’t even bother with the images. The problem is, they tend to come out formatted in a hideous fashion. I came up with a nice combo of HTML tidy and a perl script.

Here’s my command line for tidy, beware, this will modify your original copy!

tidy --bare yes --clean yes --drop-font-tags yes --drop-proprietary-attributes yes --enclose-text yes --output-xhtml yes --word-2000 yes --tidy-mark no --write-back yes TARGETFILENAME.htm

Here is my perl script, it just runs the file through some regex’s and writes to the same filename with “NEW” appended. I also made a nice little progress bar because I was bored.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/perl
 
$file = $ARGV[0];   # Name the file
open(INFO, "< ".$file);   # Open the file
@lines = <INFO>;    # Read it into an array
close(INFO);      # Close the file
 
$size = @lines;
$counter = 0;
$size = $size / 50;
 
open(FILEWRITE, "> NEW".$file);
foreach(@lines) {
  $counter++;
  if(0 == ($counter % 50) || $counter == @lines) {
  print "\rProcessing: [";
  for($i = 0; $i < ($counter / $size); $i++) {
    print "+";
  }
  for($i = 0; $i < (49 - ($counter / $size)); $i++) {
    print "-";
  }
  print "]";
  }
 
  # Empty paragraph removal
  $_ =~ s/<p>\s*<\/p>//mi;
  if($_ =~ m/^\s*\n$/) {
    # If the line is just a newline or newline and spaces, scrap it.
    $_ = '';
  }
  else {
    # Remove excess spaces
    $_ =~ s/  //mi;
    # I get these alot...
    $_ =~ s/&shy;//mi;
  }
  print FILEWRITE $_;
}
close FILEWRITE;
print "\n";

You can download it here, but be careful with it.
cleaner.pl.txt

Update (01/21/07)
That perl script has a line $_ =~ s/ //mi; which doesn’t really make that much sense looking at it now. I’m thinking $_ s/\s\s+/ /mi; for a replacement. Also, for some reason the server throws up a 500 error on trying to get that file, I’m working on it.

Posted January 19th, 2007 - Permalink
Categories: Nokia 770 - Perl
No Comments »
 
Holy Cow, Java Serial Goodness!

I got my Arduino board today, and I went to check out the IDE. It’s written in Java. Holy freakin’ cow. Couldn’t be more perfect because it’s all written and released under the LGPL! I found the Serial.java in the SVN trunk, and I’m reasonably certain I can figure it out enough to use it. You wouldn’t believe how happy I am right now. I need some breadboard and LED’s.

Posted December 1st, 2006 - Permalink
Categories: Arduino - DK421 - Hardware - Projects
No Comments »
 
The First Pad

Looks like the first pad is going to be the kick drum because I’ve misjudged the whole deal. I went to Ace Hardware today and picked up the stuff. I pretty much just guessed on everything. I bought:

  • Five 5/16″ Bolts, Approx 3″ long @ 0.19 ea
  • Seven 5/16″ Nuts @ 0.07 ea
  • Four Springs @ 0.79 ea
  • Seven 5/16″ Terminal Rings @ 2.49 total

I guessed well on the length of the bolts, the nuts obviously aren’t a guess, neither are the terminal rings. The springs, however, were not a good guess. It’s surprising how much different a spring feels in your hande versus mounted. The ones I picked are way to stiff, but I think they’ll be okay on the kick, because the beater hits a lot harder. Plus I won’t need to put padding on it to dampen the sound since the beater is some soft material anyways.

The other change in the design I’m making is to get some bolts with flat, threadless areas up at the top of them, about an inch worth. When the top board is pushed down it can catch the threads on it’s return, so that’s kinda iffy.

I also did some browsing today. See, I never actually did any poking around on the net before starting, I just got the idea and started building. It seems that DIY triggers aren’t that hard to find. Most are made of a piezo tansducers and practice pads. Example. I haven’t the slightest if that would work here. I think those are more of a range of current, as opposed to a strict on/off like a keyboard. I fully intend to go buy one after work tommorow and meter it to see if it can handle the job. That would make life much simpler. If not I can just make it into an acoustic guitar pickup.

Here are the required photo’s. The little white box is the home from the keyboard circuit board plus my little “breakout” board. I made that because I couldn’t solder directly onto the contacts, so all the connections are hot-glued and the breakout board is to reduce the amount of wiggling and tugging I do on the board to finish it up.

Posted November 9th, 2006 - Permalink
Categories: DK421 - DrumKit - Hardware - Projects
No Comments »
 
More Posts
« Older
Newer »