|
Author |
Topic: extracting people from video (Read 6597 times) |
|
adm
|
extracting people from video
« on: Nov 28th, 2004, 9:33pm » |
|
Hi, I want to write an applet that will let me extract characters from frames of video and I'm looking for a good place to start. This applet doesn't need to run in real-time. It would step through the frames of a .mov file and output .tga's as it goes. The camera is static in the footage so the backgrounds do not move. So what I was thinking was that it would be a matter of comparing the pixels in the frames in succession to see which pixels are changing and which aren't. I realize its not quite that simple since there will be masses of pixels that will be similar colors that would break this approach. The footage I'm working with is black and white... I'm not sure if that simplifies or complicates what I'm trying to do. So can anyone point me to any resources and/or processing applets that would help me approach this task? Thanks. -Aaron
|
« Last Edit: Nov 28th, 2004, 9:33pm by adm » |
|
|
|
|
kensuguro
|
Re: extracting people from video
« Reply #1 on: Dec 6th, 2004, 7:47am » |
|
I think you can do it as you've planned to. Just as long as you can grab a frame of the static background with no person in it. Then subtract that from all the other frames, and that should give you a rough difference image. You may want to put a threshold on that, and convert it to a 2 bit (black and white, no greys) image. So it's kinda like "if the pixel value is greater than so and so, make it white. If not make it black". Use the 2 bit image to cut the character out from the original image. I think black and white complicates things, because that decreases the difference when you do the subtraction. With color, you can use the difference of all r,g,b channels. Actually, I've experimented with this in color, in realtime, and have gotten pretty good results. E-mail me if you want the code. It's messy code, but may serve as a good starting point.
|
|
|
|
bsr
|
Re: extracting people from video
« Reply #2 on: Dec 6th, 2004, 1:52pm » |
|
i've done this before using eyesweb: http://www.eyesweb.org/ i think there's an example which does what you're asking when you download the app. it's not processing or java but it may give you some starters. it's a useful platform to download anyway, especially if you're into installation work.
|
http://hippocamp.net
|
|
|
md
|
Re: extracting people from video
« Reply #4 on: Dec 7th, 2004, 3:32pm » |
|
java.lang.UnsatisfiedLinkError: no QTJava in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1403) at java.lang.Runtime.loadLibrary0(Runtime.java:78 at java.lang.System.loadLibrary(System.java:832) at quicktime.jdirect.JDirectLinker$1.run(JDirectLinker.java:266) at java.security.AccessController.doPrivileged(Native Method) What am I missing?
|
|
|
|
fry
|
Re: extracting people from video
« Reply #5 on: Dec 7th, 2004, 6:53pm » |
|
on Dec 7th, 2004, 3:32pm, md wrote:java.lang.UnsatisfiedLinkError: no QTJava in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1403) at java.lang.Runtime.loadLibrary0(Runtime.java:78 at java.lang.System.loadLibrary(System.java:832) at quicktime.jdirect.JDirectLinker$1.run(JDirectLinker.java:266) at java.security.AccessController.doPrivileged(Native Method) What am I missing |
| - windows.. you must make sure that "QuickTime for Java" is installed. to install it, you need to download it at: http://www.apple.com/quicktime/download/ if you install the version "with iTunes", there's a second step. after the installation, go to Start Menu -> QuickTime -> QuickTime Updater. when it runs, use the "Custom" install, scroll down, and click the checkbox next to "QuickTime for Java" and then install. if you install the version of QuickTime without iTunes, you'll also need to use the "Custom" install, as outlined above. the same is true if you have already installed QuickTime, and did not use the "Custom" or "Full" install. after that, if you're doing video capture on windows, you'll also need winvdig.
|
|
|
|
michael05
|
Re: extracting people from video
« Reply #6 on: Dec 8th, 2004, 11:05am » |
|
apple.. another reason is a wrong path to the quicktime QTJava.zip in the windows qtjava environment variable. my qtjava links to: "C:\Program Files\Java\j2re1.4.2\lib\ext\QTJava.zip" right click on "my Computer" "Advanced" "Environment Variables" "system Variables": "QTJAVA" "Edit" just link it to your QTJava.zip location.
|
°°°°°°°°°°°°°°°°°°°° http://www.m05.de
|
|
|
MrHunt
|
Re: extracting people from video
« Reply #7 on: Feb 4th, 2005, 8:53am » |
|
Can anyone send me his sample code?I want to do the same thing.
|
|
|
|
ufux
|
Re: extracting people from video
« Reply #8 on: Feb 4th, 2005, 8:24pm » |
|
Thanks, I tried your code but I got some poor results with poor light. I guess it will work much better with good&balanced light. Under what circumstances did you use this application? How was the lights, the background etc?
|
|
|
|
michael05
|
Re: extracting people from video
« Reply #9 on: Feb 6th, 2005, 1:27pm » |
|
do you mean my code? i have used it under special light conditions. you have to avoid shadows on the background. therefore i have used a neon lamp ontop of the scene. it does not cast not much shadows. and i used a background with a contrast color. grey or white. there were some problems with yellow backgrounds and white skin color. a friend used red color with good results. good luck
|
°°°°°°°°°°°°°°°°°°°° http://www.m05.de
|
|
|
kurol
|
Re: extracting people from video
« Reply #10 on: Mar 29th, 2005, 8:37am » |
|
about black and white being a disadvantage compared to RGB. The argument is true, but often times with video processing, working in the YUV colorspace is advantageous to RGB. YUV is (luminance,chroma1,chroma2) vs RGB (red,green,blue). The code used for detection in black and white could be converted to work for luminance easily, and then chroma could be used later. The only problem is that I think Processing cannot natively handle YUV. Basically... just keep in mind that YUV is actually more popular than RGB. . . some of the time.
|
I hate programming . . .
|
|
|
|