Home
Products
Community
Manuals
Contact
Login or Signup

Home made motion capture

Miscellaneous Forums/General Discussion/Home made motion capture

Braincell(Posted 4 years ago) #1
I've been looking into motion capture for some future animation work i'll need to do and i couldn't find any "freeware" "bedroom studio" type of motion capture apps. Does anyone know any free ones?

Regardless, i figured out how to make one. By setting a camera at a known position in 3d space (ie on a desk) we can measure by hand the vertical and horizontal angles in relation to the floor and compare them to 2d coordinates on the picture of the screen. Then we can compute 3d projection angles from a 2d image, knowing where the camera was. Putting a second camera will give us a second set of projection lines and where they cross this may give us a point in 3d space. These projection lines are imaginary lines which can be made in 3d using Blitz for example, and they connect the camera lens to a certain bright point on a mocap suit (for example). I guess you know what im trying to say. You'd just need to empirically measure the angles and put that in as a relation between the 2d coordinates on a video.

So incidently i saw the CSP thing by jfk on bb.com homepage, and i'd like to say that looks very useful in my case. Not that i'd need to do it NOW, but in a month or two when i continue building my "3d character animation" portfolio i may go ahead and do something like this.

Question #2:
Without even searching for it, is there a currently existing and suggested method in blitz3d or bmax that would detect bright spots (1 or 2 pixels) on a generally dark video, and track them?


big10p(Posted 4 years ago) #2
There are some folks around here who have dabbled with motion detection - Cygnus, for one. I guess whatever code they've come up with would be useful in your quest for homemade motion capture.


Jams(Posted 4 years ago) #3
There was an article in last months 3DWorld magazine (Feb 2k6) about DIY mocap... might be worth looking out for!

Maybe they have it on their website, www.3dworldmag.com


Mustang(Posted 4 years ago) #4
Not free, but $39.95 isn't that much :)

http://www.cgauction.com/store/product_info.php?products_id=34


Braincell(Posted 4 years ago) #5
Thanks Mustang, looks interesting but maybe a little bulky and not so precise. Would have to try it. Edit: actually not quite what i need

Jams, i browsed the whole website found nothing :(


Cygnus(Posted 4 years ago) #6
Lenn, yeah, I've played with motion detection but not motion capture- If you were looking for a way to detect movement, i could probrably help-

What i've played with works in 2D *okay* with a lit room.

If you had some sort of gear to light up the joints- like you see in a pro studio for Motion Capture, I could quite easily reprogram it to work faster and use the bright spots in a dark toom to do actual motion *Capture*

Again, this would all be in 2D, so quite probrably not what youre looking for. :)


Jams(Posted 4 years ago) #7
Jams, i browsed the whole website found nothing :("

Shame, anyway they were using this software http://www.simi.com/en/products/motion/index.html which costs £4,000 :(


DampeS8N(Posted 4 years ago) #8
4 cams, a box of ping pong balls and a string of x-mas lights (colors help you isolate the right balls.. if they are unique, or white if you are using the pc to follow them).

Set up the webcams or other video devices (all the same model is best) at about 3-4 feet off the floor. Draw a large + on the floor (however you want to) and position the cams on at the end of the lines as close to the same distance from the center of the the + as possible... 15-25 feet is a good distance. but as long as you can see all of what you are mo cap'n it will be fine. (you can do it with just 2 cams, but 4 is better because it captures what is on all sides of the subject...)

if you have a string of lights that function with some bulbs removed, great... if not.. get out the duct tape.

give yourself enough slack between each working light to spread them out right. Place ping pong balls over the lights and stick em (however you like) to the joints you want to cap.

turn out the lights, flip on the cams, and dance like a fool.

use the footage however you need to...

2 images = 3d space... but if your body blocks a ball... you can't see it... 4 images = much less loss if any.

enjoy.

now... the cams would be the biggest cost.. but you're gonna need to buy them for any method... so.. with them... about 15-20$ for the whole project...


Braincell(Posted 4 years ago) #9
@Cygnus
2D would be fine, i'd just make projection lines out of the bright spots anyway, so not having to pick the spots by hand for every frame would be nice. It doesn't have to be anything uber precise, i would just put it in my 3d modeler and kind of refference to the capture just so i have a timeline and maybe some small secondary movements if possible. I will bug you to show me the code when/if i decide to go through with it.

@Dampe
Christmass tree lights? LoL, go make fun of someone else! :P

It's fairly easy to make flourescent glowing spots on a black suit, its much easier to manage them and you don't look like an idiot. How do you expect to move around tied up with christmass lights? No no... that was a joke ok well... ok... *calms down*


Cygnus(Posted 4 years ago) #10
Currently It works with a webcam :)


You would still need to tape X-mas bulbs to your ass for it to work in a more usable way :)

Oh and you would also need a way to get the image information available in B3D- i used pannos webcam stuff to do it, which is why a webcam is easier. the code i used in it actually uses two arrays, one for the image and another to distinguish pixel changes between frames and remove as much noise as possible.

please note that ive just moved into a new flat so I will likely be busy with that for now, but i dont mind giving a helping hand if need be.


Grey Alien(Posted 4 years ago) #11
/off topic: Cyg: hope the new flat's nice and your GF is happy!


Cygnus(Posted 4 years ago) #12
Many tanks!


Ziltch(Posted 4 years ago) #13
Have you checked out OpenCV?
http://sourceforge.net/projects/opencvlibrary/

I have just got the basics working in BlitzMax.
It has a huge number of functions for image manipulation.
It also has motion/face tracking functions.

The lkdemo in the c directory of the download show good motion tracking. Just click on the webcam image with the mouse , and move around.

It works with Win32 and linux.


Cygnus(Posted 4 years ago) #14
Hey, this could be useful! :D


DampeS8N(Posted 4 years ago) #15
flourescent colors require darkness and a back light to glow...
given enough slack, a cord would be too much of a bother... (Unless you were going to mocap something like the FF8 dance scene)

paints + black lights strong enough to light you will prolly run $100 strong...

I had assumed you wanted to do this on the cheap ;)


jfk EO-11110(Posted 4 years ago) #16
Dampe had some good ideas. I would do it exactly like he suggested. Unfortunately I ain't got 4 cameras.

I would not try to work with live webcams, instead record with 4 MiniDV cameras, then import the videos over firewire and save as Avis with sound. Now each of the 4 avis has an audio channel that can be used easily to sync the 4 avis. You may use eg. the FrameGrabber I posted in the archives lately to access the frames of the avis

Using multiple colors is the easiest way to track several joints easily. Painting the pingpong balls may work too. Christmas tree lights is ok, but they are not so cheap. White LED diodes are pretty cheap and you need only about 15 of them, so maybe it's cheaper to build this yourself, at least LEDs last much longer than the minibulbs of christmas light thingies.

Using Blacklight and fluorescent colors is an option too. You may use teethpaste to make any color fluorescent.

I have also seen solutions that are using IR-Lights (used for Video cameras to film at night) and those security reflectors kids sometimes wear on their way to school etc, materials that can be found in bycicle shops too.

The tracker will have to track the root point that may be the belly. All other points are joints, their rotation is relative to their parent joints and may be calculated using Atan2 etc.

It's all pretty simple as long as you can live with a 30 Hz sampling rate. Only the 4 cameras may cost some money. There are pretty cheap cameras, not really MiniDV cameras, but some pseudo video cameras that are recording to memory disks. I think you can find a camera that is good enough for about 100$

With this equipment it may be possibe to produce pretty good MotionCapture Data. It's then only one further step to apply the Data to an animated B3D.


xlsior(Posted 4 years ago) #17
christmas tree lights is ok, but they are not so cheap


Eh? They seem to be less than 2 bucks for a strand with a hundred lights here... it would probably be a lot more expensive to use LED's, aside from the question of how you're going to power those.


Scaremonger(Posted 2 years ago) #18
Sorry to open up this old post, but has anyone made a start on the OpenCV library yet?

Ziltch: You said you had the basics sorted out. Care to Share?


Plash(Posted 2 years ago) #19
I'm going to setup a network interface to a set of cameras using this. Not having to do it in C++ would be awesome.


Ziltch(Posted 2 years ago) #20
Sorry missed reading your question to me Scaremonger.

I have been playing with OpenCV for a while, but the code is a bit of a mess.

I was working on a motioncap prog a while back but got distracted by other projects. I will have a look at the code again and will post in the bmax programming section.


MadJack(Posted 2 years ago) #21
'UFOCaptureFree'
http://sonotaco.com/soft/e_index.html

I've been using it to try and catch when a neighbourhood dog is crapping on my lawn (bloody dogs!). Limited in function but works pretty well. Also free.


GfK(Posted 2 years ago) #22
That isn't motion capture. That's motion-activated video recording.


MadJack(Posted 2 years ago) #23
Doh - sure enough. But might be of interest.