Page 1 of 1

Need Some Insight and I Know I'll Find it Here

Posted: Mon Jan 08, 2007 3:17 am
by Viggy
Next year will be my senior year in High School, and in my High School, to graduate we are required to make a "Senior Project" that reflects on our shop classes. The critiria for my shops "Senior Project" (my shop being: The Acadamy of Manufacturing and Pre-Engineering) is we have to solve a problem. (Ex: One year, someone made a cane that would expand and contract making it easy for a senior citizin to cary when uneeded and use when needed.)

For my project, I don't want to give away the idea (although I probably will anyway), but what I need from anyone here is to tell me if the following is even possible, and if so, where can I find tutorials or anything closely related to what I want.

What I plan to do:
I will be using a camera that I need connected to a program. This program needs to be able to take in what the camera sees and translate certain things to look like something else. How I plan to do this is set up signature magnetic markers where I want them. When the camera picks up on that marker, it will apply a 3D-Model and/or skin to it, making it look like something it really isn't. If all goes as planned, the camera should be able to move around and the computer screen should reflect the translated video instantly (or as close as we can get it).

Is the above possible? If so, is it going to be cheap to make? Difficult? Any insight would be great.

Thanks for reading.

Posted: Mon Jan 08, 2007 1:14 pm
by [cc]z@nd!
is your senior project making the actual program that does this? because i feel it will likely involve using procedural programming to take the magnetic markers as input and create and render the model as output, meaning i don't know how to do that. i saw something on hacakday a while ago where someone used a webcam and some software they wrote to draw a symbol on a wall the webcam is filming (like an L) and have the webcam translate it as a command, like previous track. anyways, i don't know how he did it, but it's the closest i can think of to what you want.

Posted: Mon Jan 08, 2007 1:26 pm
by TomClancey
i think i know wat he wants, its similiar to animation markers, where you put them on your model and u put them on a person, and when the person walks a high speed camera picks up the markers animation to give u extremely realistic motion. But in your instance i would have to say it may not be a magnetic marker just something along the lines of an animation marker, but it makes the object how you want it. (i hope that was similiar to wat u wanted, and the program and camera arent very cheap, usually like movie makers, who do CGI for like The Incredibles, or for video games like Halo 3)

Posted: Mon Jan 08, 2007 5:12 pm
by Darco
isnt that called motion capture?

Posted: Mon Jan 08, 2007 5:27 pm
by TomClancey
i dont know. i just know how its done.

Posted: Tue Jan 09, 2007 3:00 am
by Viggy
Yeah, it's Motion Capture. I've done a little research and yeah, this stuff is expensive. But the way I figure it, I could drum up a ghetto motion capture set myself with materials in my Shop if I really need to, I just don't know how it all works (or further, how it's really made). I'll Google some more and check out HowStuffWorks.com but any more input would be helpful.

Thanks for the replies. :D

Posted: Tue Jan 09, 2007 10:39 am
by a mammoth
Also check up wikipedia.

Posted: Tue Jan 09, 2007 6:44 pm
by Damorian
Correct me if I'm wrong but when it "picked up" your markers it wouldn't be able to associate distance. So for that you'd need 2 cameras put a little distance apart and then have the cameras move (like eyes) so that they both are looking at it perfectly, which would form a triangle. Because you know the distance between the "eyes" and the angles (assuming you use, say, stepper motors) you could calculate the other 2 sides of the triangle (which is the distance from your marker to each eye) by using the side length you know plus, the sin, cos, or tan of the angles (not sure which to use off the top of my head) to get the distance. Once you know the distance you could figure out the size your model would need to be so that it looks proportional to the scene it is in. Just a little problem I thought you might have when doing that.

Posted: Wed Jan 10, 2007 1:55 pm
by [cc]z@nd!
if you go with the 2 cameras, soh cah toa

sine opposite hypotenuse, cosine adjacent hypotenuse, tangent opposite adjacent.

that's all i remember, i don't know how to do the equations themselves. if need be, i can dig up the equations out of a calculator program i fashioned to do it for me.

Posted: Wed Jan 10, 2007 2:38 pm
by TomClancey
lol wow, u made a calcualotr program on your computer to do hypotnuse equations with triangles? wow if i was that good at computers and was really lazy (duh i am) i would do it :P

Posted: Wed Jan 10, 2007 2:45 pm
by fishface617
I was thinking the same thing, zandi, but soh cah toa only works on right triangles from what i have learned so far in math class. =/

Posted: Wed Jan 10, 2007 3:43 pm
by xserre
TomClancey wrote:lol wow, u made a calcualotr program on your computer to do hypotnuse equations with triangles? wow if i was that good at computers and was really lazy (duh i am) i would do it :P
WTF?! is that evolvedi prefer not to use the word nerd just so nobody get's offended but OMG! NEERRRRDDso i wass gonna say omg?! is that evovled nerdspeak

Posted: Wed Jan 10, 2007 5:12 pm
by The_Hushed_Casket
A basic trig program would be incredibly easy, but implementing it into tracking markers using binocular disparity wouldn't be as easy.

If I were you, I wouldn't go with traditional motion capture. I would modify two webcams with an infrared bandpass filter that only allows infrared light to pass in. Then equip your objects with infrared markers (infrared LEDs, diffused into some sort of marker) that could be read and tracked in real time. Doing it with two at once would be difficult to do, and a tracking algorithm would be difficult, but I believe some already exist for multi-touch interfaces using frustrated total internal reflection (FTIR), which are popular among the DIY community and use the same infrared LED/modified webcam method. The only caveat would be that you could not do it outside, and any lighting you used would have to be infrared filtered (so, no sunlight) because you would want your markers to be the only infrared emitters. This is quite an ambitious project, and the softare end would probably be very complicated.

Posted: Wed Jan 10, 2007 6:48 pm
by Damorian
I must be a little confused about what he is wanting to do. It sounds to me like what he wants to do is have "markers" set up in a set that he is video taping and have that feed into a computer where models are put where the marker is so that you would pretty much get the effect of CGI but without having to go through all the extra stuff on the computer. If he were doing that he wouldn't be able to use infrared cameras (although those things are pretty cool). Also, if that is what he was doing he would have to know the distance from each marker so that as you got closer to the marker the model would get bigger and as you got farther away it would get smaller. Hopefully I'm understanding what you're wanting to do, otherwise, don't listen to anything I have to say.

Posted: Wed Jan 10, 2007 7:03 pm
by fishface617
Ok, i am confused now, pretty much the only thing that i know what is going on are the trig problems involving the cameras which are really simple.

=/

Good luck on your project. :D

Posted: Wed Jan 10, 2007 8:56 pm
by [cc]z@nd!
The_Hushed_Casket wrote:A basic trig program would be incredibly easy, but implementing it into tracking markers using binocular disparity wouldn't be as easy.

If I were you, I wouldn't go with traditional motion capture. I would modify two webcams with an infrared bandpass filter that only allows infrared light to pass in. Then equip your objects with infrared markers (infrared LEDs, diffused into some sort of marker) that could be read and tracked in real time. Doing it with two at once would be difficult to do, and a tracking algorithm would be difficult, but I believe some already exist for multi-touch interfaces using frustrated total internal reflection (FTIR), which are popular among the DIY community and use the same infrared LED/modified webcam method. The only caveat would be that you could not do it outside, and any lighting you used would have to be infrared filtered (so, no sunlight) because you would want your markers to be the only infrared emitters. This is quite an ambitious project, and the softare end would probably be very complicated.
sounds like it's a good place to start, but this is going to be a very complex, programming-heavy project that'll suck up time like no other.

oh, and to whoever commented on my geometry program, it's not on my pc, it's on my calculator, and it does soh-cah-toa realted functions, prism stuff, apothem and hypotenuse stuff, regular polygon stuff, and almost everything but basic math on the geometry final. "knowlege is power!"

Posted: Thu Jan 11, 2007 3:23 am
by Viggy
Wow this is definatly more complex than I anticipated. And I actually started planning a year early just because I thought it would be, but now it's starting to seem way out there, so much that I'd never be able to get it together in time (nor am I even that techonologically savvy).

Posted: Thu Jan 11, 2007 1:05 pm
by [cc]z@nd!
there may be a way to lower the standards of the final product so that it's only one webcam, and a certain color or light is present in the webcam's view. then, maybe there's a way to craft a program to place a 2d image on the color spot (like, you hold up a white cd, and the program places a 2d image directly over the white cd in each frame). that, or maybe decide to just do something interesting with a webcam, which i'm sure there's quite a few tutorials out there on interesting things you can do.

Posted: Thu Jan 11, 2007 6:14 pm
by Viggy
[cc]z@nd! wrote:there may be a way to lower the standards of the final product so that it's only one webcam, and a certain color or light is present in the webcam's view. then, maybe there's a way to craft a program to place a 2d image on the color spot (like, you hold up a white cd, and the program places a 2d image directly over the white cd in each frame). that, or maybe decide to just do something interesting with a webcam, which i'm sure there's quite a few tutorials out there on interesting things you can do.
Do you know where I could find good tutorials on writing that kind of program (or something somewhat related)?

Posted: Fri Jan 12, 2007 1:51 pm
by [cc]z@nd!
no clue, but look around for some programming forums/communities, a few google searches should turn up a few.