JRowe Posted January 17, 2009 Share Posted January 17, 2009 (edited) PixelSearch is really fast. Is there a way to run a pixelSearch on graphics in memory, such as a video stream from a webcam or a snapshot from a webcam? Pixelsearching a streaming video source (not onscreen, but in memory) would be ideal. I'm fairly sure it's possible, but I'm unsure where the best route is. It seems to me that you would create a device context and stream the video content to the context, updating one section in memory that is formatted like a bitmap. Since I'll only have 1GB of RAM, keeping the memory usage down is also desirable. Solutions that I'm trying to find include using a different .dll than avicap32, creating a plugin solution with c/c++, and reworking existing gdiplus/video/webcam udfs into a mashup that does what i want with decent performance. The end goal is a motion tracker script that tracks 3 LEDs attached to a glove, acting as a haptic interface for my Acer netbook. If anyone has any ideas or knows of solutions, please post here. Much thanks! Edited January 19, 2009 by JRowe [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
JRowe Posted January 17, 2009 Author Share Posted January 17, 2009 Anyone know anything? [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
JRowe Posted January 19, 2009 Author Share Posted January 19, 2009 One last bump with clarified topic. Thanks for any insight, I'm also thinking c/c++ solutions are going to be the only route. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
ChangMinYang Posted January 19, 2009 Share Posted January 19, 2009 One last bump with clarified topic. Thanks for any insight, I'm also thinking c/c++ solutions are going to be the only route. Step 1: Capture It to hBmp, then get handle for Bitmap (on memory)Step 2: PixelGetColor about hBmp.Hint: _ScreenCapture() Link to comment Share on other sites More sharing options...
JRowe Posted January 19, 2009 Author Share Posted January 19, 2009 Not quite. I'm looking to PixelSearch, not pixelGetColor. I'm looking for the coordinates of a color, not the color at specific coordinates. I can use looped GetColor from bitmaps grabbed from the webcam, but it takes almost 1/3 of a second to just get the bmp from the cam, and around 4 ms per pixel to search... It's no good for tracking realtime motion. So my question is whether I can run a PixelSearch on a live stream from the webcam. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
JRowe Posted January 19, 2009 Author Share Posted January 19, 2009 Looks like plugin time, using the camspace SDK. Woot. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
keen Posted January 19, 2009 Share Posted January 19, 2009 Working on a prior script I used a live camera feed and used pixel search on it. Try looking at my "Playing using your body" script, that searches for a black pixel in a live webcam feed but can be configured to do many other things. [center]Kesne's Bar & Grill[/center] Link to comment Share on other sites More sharing options...
JRowe Posted January 19, 2009 Author Share Posted January 19, 2009 Not onscreen. In memory, or offscreen, where the video/images haven't been rendered. Your example uses an onscreen cam feed, which is good for the purpose you're using it for, but useless for mine. To a point... the raw image data is accessible via avicap32.dll, I just need to figure out how to get to it... and then apply PixelSearch to it. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
Datenshi Posted January 20, 2009 Share Posted January 20, 2009 You got an interesting idea here. Hope you'll continue digging ill watch this thread RapidQueuer 2.4 - For Rapidshare.comOpensubtitles Hashing FuncRevision3 PlayerGTPlayer BetaIMDB & Poster Grabber v1.3Fetgrek.com - My Website Link to comment Share on other sites More sharing options...
koekje Posted June 23, 2009 Share Posted June 23, 2009 You got an interesting idea here. Hope you'll continue digging ill watch this thread This threat hasn't been updated in months, so i'm wondering if you found a solution to the problem? I'm looking for the exact same thing (though not with a webcam) and i'd love to know =) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now