Poker-AI.org Poker AI and Botting Discussion Forum 2013-03-23T07:03:31+00:00 http://poker-ai.org/phpbb/feed.php?f=26&t=2419 2013-03-23T07:03:31+00:00 2013-03-23T07:03:31+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2419&p=3474#p3474 <![CDATA[Re: Fastest way to access video memory state]]> http://stackoverflow.com/questions/1962 ... pplication

Statistics: Posted by cantina — Sat Mar 23, 2013 7:03 am


]]>
2013-03-22T23:12:55+00:00 2013-03-22T23:12:55+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2419&p=3471#p3471 <![CDATA[Re: Fastest way to access video memory state]]> Statistics: Posted by proud2bBot — Fri Mar 22, 2013 11:12 pm


]]>
2013-03-22T22:13:08+00:00 2013-03-22T22:13:08+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2419&p=3469#p3469 <![CDATA[Re: Fastest way to access video memory state]]>
Don't forget to update when you find the way.

Statistics: Posted by Kratt — Fri Mar 22, 2013 10:13 pm


]]>
2013-03-22T20:37:23+00:00 2013-03-22T20:37:23+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2419&p=3459#p3459 <![CDATA[Re: Fastest way to access video memory state]]> Kratt wrote:

A single Google search will give you the fastest screen capturing methods available.


You have obviously *not* done that Google search ;).

I appreciate the thought, but there are very different people on this forum, for very different reasons. Computer Vision, Visual Processing and OCR are definitely a big part of many bot programs.

Simple things as detecting new positions or buttons are not that complicated or performance intensive. More importantly, the performance gains you can achieve by fine tuning it are usually small percentages.

Accessing the video memory directly - through a driver for instance - should however increase the performance of that part of the program by several factors. It's thus a much more sensible choice to look into.

So, as much as I appreciate your advice, I do believe there is a place for this kind of question here, and I do hope that some of the hardware/low-level cracks will get a chance to give me some guidance.

Statistics: Posted by Heuristics — Fri Mar 22, 2013 8:37 pm


]]>
2013-03-22T19:19:10+00:00 2013-03-22T19:19:10+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2419&p=3456#p3456 <![CDATA[Re: Fastest way to access video memory state]]> Heuristics wrote:

That's not the point of this thread. I am currently using single pixel polling for all of those things.
I however ALSO want to have a way of accessing the WHOLE screen directly in the video memory in an EFFICIENT way - meaning NOT through WinAPI.

We used to have a couple hardware/low-level cracks on the old forum, not sure if they joined/are going to join again. You may want to search through the archive, I think there were some pretty useful discussions related to this topic on there.

Statistics: Posted by Coffee4tw — Fri Mar 22, 2013 7:19 pm


]]>
2013-03-22T16:59:09+00:00 2013-03-22T16:59:09+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2419&p=3452#p3452 <![CDATA[Re: Fastest way to access video memory state]]> Statistics: Posted by Kratt — Fri Mar 22, 2013 4:59 pm


]]>
2013-03-22T16:09:50+00:00 2013-03-22T16:09:50+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2419&p=3451#p3451 <![CDATA[Re: Fastest way to access video memory state]]> Coffee4tw wrote:

Heuristics wrote:
I just want to reduce the resources used by each poll to the minimum so I can use them for something more important.

Then focus on more important (smaller) parts of the picture, as Kratt suggested. No need to take a screenshot of the whole screen if you are just trying to watch one table. No need to capture the whole table if you are just polling if the dealer button moved, etc.


That's not the point of this thread. I am currently using single pixel polling for all of those things.

I however ALSO want to have a way of accessing the WHOLE screen directly in the video memory in an EFFICIENT way - meaning NOT through WinAPI.

Why? Because in case the software changes graphics or moves buttons, etc. by a some pixel value, I can switch to an OCR & Computer Vision engine while rebuilding the pixel values.

Statistics: Posted by Heuristics — Fri Mar 22, 2013 4:09 pm


]]>
2013-03-22T15:56:47+00:00 2013-03-22T15:56:47+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2419&p=3450#p3450 <![CDATA[Re: Fastest way to access video memory state]]> Heuristics wrote:

I just want to reduce the resources used by each poll to the minimum so I can use them for something more important.

Then focus on more important (smaller) parts of the picture, as Kratt suggested. No need to take a screenshot of the whole screen if you are just trying to watch one table. No need to capture the whole table if you are just polling if the dealer button moved, etc.

Statistics: Posted by Coffee4tw — Fri Mar 22, 2013 3:56 pm


]]>
2013-03-21T10:08:38+00:00 2013-03-21T10:08:38+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2419&p=3445#p3445 <![CDATA[Re: Fastest way to access video memory state]]> Kratt wrote:

Yes, you can get better results with OpenGL. Google around if you have to. But you don't really need to do that. Because couple of frames per second is more than enough. Just keep polling few pixels to give a better response time for your bot/scraper and scrape the rest when it's really needed. If you're in hand, you can't really miss anything. When observing even 120fps will not guarantee you won't miss anything. Causes more stalls, if nothing else. It's a good amount of data to move around.


I don't think you can use OpenGL if there's no OpenGL app running?

Of course, I won't be polling 120 times per second, that's just meant as a measure of performance. I just want to reduce the resources used by each poll to the minimum so I can use them for something more important.

Statistics: Posted by Heuristics — Thu Mar 21, 2013 10:08 am


]]>
2013-03-21T00:12:03+00:00 2013-03-21T00:12:03+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2419&p=3440#p3440 <![CDATA[Re: Fastest way to access video memory state]]> Statistics: Posted by Kratt — Thu Mar 21, 2013 12:12 am


]]>
2013-03-20T19:57:42+00:00 2013-03-20T19:57:42+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2419&p=3434#p3434 <![CDATA[Fastest way to access video memory state]]>
I'm currently using pixel recognition with only very little OCR to read the screen. For the OCR, I use WinAPI to get a screen shot into memory. This allows me to get 80-120 pictures of the screen per second, but it uses a lot of resources I would like to free up for other parts of the application.

Is there any way to do this more efficiently, i.e. by accessing the graphics card memory directly? I do have some OpenGL programming experience, so I wouldn't shy back from some lower level stuff, as long as it pays off.

Statistics: Posted by Heuristics — Wed Mar 20, 2013 7:57 pm


]]>