You're lucky. If you're on a 64 bit system, you no longer have to compile it yourself! So, obviously, I'm no going to tell you how, plus there are a ton of tutorials online.
I'm assuming you're running Ubuntu x64 10.10. At least, that's what I'm going to use. I'll do some tutorials in the future on how do do everything in windows too.
First step is to open up synaptic package manager and install libglut. It should be the only result if you search for that in synaptic.
Everything else is pretty straight forward. Download CCV from HERE. Extract the folder inside to wherever you want. I set up a nice file system for everything I'll be using for the touch screen. I started with a folder named Touch in: /home/USER/Documents/
Now just enter the folder, in terminal, you just extracted. Then enter scripts/ubuntu/. Type "sh install_dependencies.sh"
DONE! Now it's time to start the program. You can start it in terminal or just straight from nautilus, your choice. Just double click the file named clickToLaunchApp.sh in Community_Core_Vision, and run it in the terminal.
Now, just play with the settings until you get some amazing looking blobs. After you finish, there is a button on the side to save settings. You can calibrate now, if you only have one screen, otherwise, follow the instructions below.
In a terminal you have to type "sudo gedit /etc/X11/xorg.conf". Change the "Xinerma" value to 1, save, and logout. After you log back in, things will look funny, but don't mess with it, it'll go back to normal after we calibrate. Start CCV using the steps above, and calibrate. Then, just repeat the first step but set "Xinerma" back to 0, save, and logout. Viola! CCV is now calibrated.
Projector Letter Boxing
I'm Starting with a fresh Ubuntu 10.10 install 64 bit. I'll do posts on how to configure everything with windows after the science fair. No matter what size you screen is, or how you adjust the projector, I doubt you'll get the screen to fit perfectly with the proper resolution. That's why I present to you: a tutorial on modelines!
If you open a terminal and type:
gtf width height refreshrate
If that doesn’t work try:
cvt width height
It will return a result. In my case, I used 1024x768 (later I’ll use 1600x1200) because that’s the native resolution for my projector, at 60 hertz.
# 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
Modeline "1024x768_60.00" 64.11 1024 1080 1184 1344 768 769 772 795 -HSync +Vsync
You’ll copy everything after Modeline.
Now, in terminal, open xorg.conf as root
Under the “monitor” or “device” section, whichever you want to add a letterbox, paste:
Modeline "1024x768_60.00" 64.11 1024 1080 1184 1344 768 769 772 795 -HSync +Vsync
Or whatever yours was.You can check online to see what all of these values mean, It took me a while. The second number after “1024x768_60.00” is the one I changed to 786. I did this because I wanted a 1:1 ratio 786x786. The two numbers after that shift the horizontal position. Adding 100 to each of these will shift the image 100 pixels to the right (further away from the left). Once you have the values you want, save the xorg.conf, and restart the x-server. Now you should be able to select the 768x768 resolution, and have the letterbox!
Making it look pretty
Using a bed sheet that I cut into 4 pieces, I sewed a cover for my touch screen table. It worked out pretty well:
Not half bad eh?
Mounting Everything to the Frame
Alright. I'm not going to go into huge detail about how I figured out how everything should be mounted. I'll Upload my scratch work I did during school and maybe you can make some sense of it. I just used trigonometry, the specs of the projector, and the specs of my table, to figure out exactly where the projector should be places so it wouldn't block any light, and it would maximize the screen space. Some helpful advice: Find your projector here, and look at all the specs. This website was a big help to me. Remember, you can click on the pictures to make them bigger.
So first I built a mount for the projector by using screws that I got at McGukins and the support beam. It was extremely stable.
I needed the correct angle for the projector, so using trigonometry again, I figured out how much wood needed to be added between the support and the main frame to hold the projector at that angle.
Now, as for the mirror, I didn't use the angle I calculated. Since I already had the correct angle for my projector, I just adjusted the mirror until the entire screen was covered. I then cut a piece of wood that was the correct size, and propped it onto that.
The camera was fairly easy, especially since it came with a mount. I screwed down the mount to a slice of wood, and pointed the camera perfectly to see the whole screen.
Finally I drilled some holes to string the wires for the LEDs through. Since I designed the LEDs for a 5v power supply, I just used an old PSU from an old Dell. Now whenever I plug in the PSU the IR LEDs turn on!
New Compliant Surface
Little do you guys know, I have this whole compliant surface thing down to a science (not like
Tinkerman doesn't already). My old compliant surface was a little too thin, and had a few dust specs that I couldn't keep my eye off of. So, What you need to do first, is find a dust free, flat, area. I chose my garage and put a fan over the top of my work surface to 1) have it dry faster and 2) keep the dust off. Though, I didn't want the fan to kick up any dust, so I put it on it's lowest setting.
So for this time around I wanted to have 5 layers, and since each surface I use gets ruined after every layer, I decided to put each mixture in old beer bottles. I filled each one with the same type of caulk used in my last 'tutorial'. I plan to throw away each beer bottle after each use and each sponge roller.
When putting the caulk in, be sure it doesn't touch the sides of the beer bottle and makes it into the xylol. If it touches the sides, you'll have a hard time getting it off.
Repeat these next few steps as many times as you want, I did it 5 times. First, you pour one beer bottle worth of silicone onto the vellum, evenly.
Then I spent about 15 minutes rolling it around the entire surface, and making sure no dust got on.
After 5 times of doing it, I got a result that looked something like this:
I should mention, I used a special type of paper that I got at Ball Aerospace. Its water proof, so I can wash it down with a rag whenever it gets dirty. It's called 'Erasable Double Matte Vellum'. Its specification number is 'JR440IJME' and it's made by Intelicoat Technologies.
Adding more LEDs
I'm not going to go into huge detail since I already did this. I decided to add more led's just to make the whole thing brighter. This time around I used 475-1468-ND LEDs from DigiKey, found here. I also used P22.0CACT-ND resistors from DigiKey, found here. The specs are roughly the same from last time. I calculated the resistance using Ohm's law. So, to start of, I had to drill a new set of holes for the LED's
After that was finished, I put the LED's in and hot glued them in.
I put heat shrink around every part of the LED that didn't require a resistor.
I put a resistor between every 2 LED's
Long story short, I put heat shrink over every visible portion of wire, then soldered the whole think to two strips of wire. On of them was positive, and one was negative.
I'm very happy with the results.
Building the Frame (the stand portion)
You know, now that I think about it, this was probably one of the easiest parts of the project. I started off cutting 4 posts that would determine the height of my touch screen. I cut each 2x4 into 28" pieces, so the touch screen would end up being about 30" tall. I only need about 24" of room for the projector, but I wanted extra just to be sure. I also cut 8 1x4's for supports (and mounts for the projector). I wanted the stand to be just outside the view of the screen, so each 1x4 was cut into 40" pieces.
Since the touch screen is too big, I need to assemble it in two pieces, then assemble the full thing in my room. To start, I held down each board in place with C clamps, and screwed the supports in place.
I ended up with two pieces that looked like this:
As I said earlier, the final assembly was done in my room. I'm sure it's pretty self explanatory:
Projector
I should have made a post about this a long time ago, Because I got it on my birthday. My friends got me an $800 projector! That's crazy.
To Levi, Matt, Ian, and Thomas: Thanks SOOO much, I owe you guys a ton. If you ever need anything let me know.
Anyway, the project wouldn't be possible without them. They got just the one I wanted. The highest resolution, and the shortest throw, for a reasonable price. The BenQ MP525ST.
Thanks again guys:
IR camera
WOW! It's been a while hasn't it? Sorry friends. I really haven't had motivation to update the blog. So, I'm going to try to crank out a ton of posts today, because the science fair is in 10 days. Guess what I'm doing for it? RIGHT! Anyway....
There isn't really a component in the whole touch screen that I can say is the most important. Though, the brighter your blobs, the better the resolution, and the faster the frame rate will result in a better touch screen.
So I found a camera that fit my needs. It was cheap, had a high resolution, and a fast frame rate. The Logitech Webcam C600 is what will pick up the 'blobs' in my final touch screen. In this post, I explain why the camera is needed, and show how it picks up the IR light. Unfortunately, most commercial cameras come with a built-in IR filter, so your pictures don't look washed out. For my camera I'm going to remove the IR filter, and add a IR high pass filter. This filter will filter out everything except light around 880 nm.
The first step, is taking the camera apart. If you look on the side of the camera, there are two plates that can be removed. The one with the button is the one you want to remove. Simply just put your fingernail inside to pop it off. Then locate the hole, almost just underneath the button, and take the screw out with a screw driver.
After you do that, the camera should just pop into two pieces.
Now you need to take of the lens and remove the IR filter. I had trouble removing mind, and ended up just breaking it off.
And now that thats over with, It's time to put on the new filter! I ordered my filter from omegabob2. You can visit his store here. I ordered the "NIR Filter, 880DF20, 11.5mm dia, X 4.6mm thick". The transmissions specs were some of the best I could find for it's price. $24 isn't half bad.
So I cut out a spot on the camera where the IR filter could fit into and hot glued it into place.
After the camera was all finished, I tested it. The camera seems to work great, the blobs are a little faint, but as long as I'm in a room with only florescent lights (they don't produce IR) I should be fine!
Building the Frame (And Testing Some)
Well, I need something to hold the plexi glass right? If you see the post earlier in my blog about testing, you'll notice a 3d model. I scraped the little cut out in front, I thought it was a bad idea. I also added another 2 by 2 bored frame around the outside where the plexi glass isn't. This provides somewhat of a closed area for all my LEDs and wiring. I only needed 1 sheet of plywood to make both the top and bottom frame.
Measure twice.
Now that both frames were measured and drawn out, I propped the plywood up on top of some other pieces of wood to prepare for cutting. I just used a skill saw and got as close to the corners as I could. I finished cutting the corners with a hand saw.
I wanted the edges, and the top, to be fairly smooth, so I used an electric sander.
Here are the two finished frames. If I were to do this same thing in the future, I wouldn't make the bottom frame smaller. I would just make both frames the same size. You'll see why shortly.
The frame that is on the floor is the big one, and its the same one that will be on the very top of the table. I then glued my LED rails to the frame. I didn't get quite a good picture, but you'll see them all glued down in the background. I used spray glue, so I had to spray it in a cup first and use a cue tip to apply it.
If you look at that last photo, I also applied some to the plexi glass between the glass itself and the compliant surface. I wanted to make sure the vellum didn't slide around. I knew it wouldn't after the table had been set up, but I'm going to be moving the glass around a lot. This step isn't necessary.
It'll be hard to explain exactly how I'm building my frame. You'll catch on if you've seen the CAD 3D model and know I'm using 2" by 2" boards. Which, as you probably know is never exactly 2" by 2", its about 1.8" by 1.8". They sell it thinking that you're going to put drywall on top of it. Since one of the boards will be sitting on top of the acrylic glass, the LED rail, and the plywood, and one will only be sitting on the plywood. one board must be cut a bit thinner. Luckily I was able to get access to a nice table saw, and accurately cut 11/32 of an inch off the boards.
I ended up with thin strips at the end so it looked like this.
Then I had to cut these pieces into the size I needed.
When I got home I laid all the pieces out on the frame, which I already had the rails glued down and already had the acrylic on top of that in between the rails. Then I glued them together so they wouldn't move when I drilled.
The bottom frame, the one I glued the rails onto won't have anything screwed into it. At least for now. I set up both 2 inch frames and screwed the other piece of plywood into it.
You can't tell in the picture above, but where the (currently) top piece of plywood hangs over, is where I put the other 2" frame and screwed it in. My final product, all set up, and flipped over, looked like this.
I can now officially make some tests!!! I got my webcam set up perfectly underneath the frame, and was able to power up all of the LEDs perfectly. This is an extremely old laptop, so a lot of the multi-touch software didn't work on it. The graphics card just isn't powerful enough. So, the best thing I ended up finding, and since this is just a test its okay, was MTmini. It's actually a really great application. For the final table though, I expect to be running linux.
Seth (cerupcat) posted about this application on the NUI forums and thats how I discovered it. You can find his post here. Under the old archived downloads, I downloaded the v1 software package. You can download that directly here. Setup was EXTREMELY simple. Though, this software package was designed to sense black blobs instead of white ones. This was a simple fix. If you go into the folder 'Touchlib_Tracking_Software' and edit config.xml. All you do is delete the line that says "". Once you've done this simply go back to the root folder and double click on '1) Calibration'.
Once it looks good click the escape key. Keep in mind these aren't the only settings you can adjust. You can also adjust the camera settings directly. After you're finished calibrating, go into the demos folder, then the c++ demos, and run smoke demo. Mine turned out great!
Also, here are some images directly from the webcam so you know how much you can do with software! Anyway, I'll go more in depth about software and everything else in a separate post. This was mainly just for test purposes, and because I was really excited to try it out after all that hard work! ;)
Works Sited:
The Comunity. NUI Group - Natural User Interface Group. Web. 21 June 2010. <http://nuigroup.com/>.
Subscribe to:
Posts (Atom)