Jump to content

PixelSearching video offscreen.


JRowe
 Share

Recommended Posts

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 by JRowe
Link to comment
Share on other sites

One last bump with clarified topic. Thanks for any insight, I'm also thinking c/c++ solutions are going to be the only route. :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

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.

Link to comment
Share on other sites

  • 5 months later...

You got an interesting idea here. Hope you'll continue digging ill watch this thread :D

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...