Poker-AI.org
http://poker-ai.org/phpbb/

Hardware capture
http://poker-ai.org/phpbb/viewtopic.php?f=26&t=3316
Page 1 of 1

Author:  nefton [ Mon Feb 10, 2020 12:59 pm ]
Post subject:  Hardware capture

Had promised some article about hardware captures. But thinking a bit, decided that there must be a topic, to other peoples can add their experience here. So some my experience:
There are many capture devices in the market, and every year it changes a lot. Each capture is different with different drivers, etc. And usualy you cant know this stuff untill got a capture in a hands. Also you cant garantee same look devices will give same capture.
For my purposes I use most common tehnology that semi all devices are support (as they say on their sites!)(but they did not)
this is YUY2 directshow. Had try opencv - but it is 100 times slower.
To understand future you need read about YUY2. long story shot: brightness coded 8 bit per pixel each pixel. And color and saturation coded 8 bit but for 2 near pixels at once. (so they have same color and saturation)
Ok, lets start tests. Here is example picture (sized 10x to viev it in brauser):
Attachment:
orign_1000.png
orign_1000.png [ 105.28 KiB | Viewed 10660 times ]


I had open in on 1 pc, and capture with different captures on another. with default settings.
Test picture represent some worst situations (lert) and some usual situations (default table size).

Attachments:
test_capture_orign.png
test_capture_orign.png [ 6.54 KiB | Viewed 10658 times ]

Author:  nefton [ Mon Feb 10, 2020 1:10 pm ]
Post subject:  Re: Hardware capture

1st. unnamed china capture for 130$
Attachment:
unnamed_china.png
unnamed_china.png [ 102.58 KiB | Viewed 10658 times ]

It is my 1st capture. So I dont know is that was good or not. For now I know - it is middle.
Here is capture by this card:
Attachment:
china_n_1000.png
china_n_1000.png [ 141.22 KiB | Viewed 10658 times ]

as you see there are 4 pixel artefacts (all captured in yuy2 mode, so must be 2 pixel only)
+ black is not black, white is not white. Image looks mutch darker than orign. Brightness, Contrast, Hue, Saturation - makes no any sense.(it makes picture even more terrible)
But this image was enought quality to make recognition of some rooms, also all my captures have enought speed to play tables with render. (this will be another article :) )
Think twice are you will be able to recognize that picture :)

Author:  nefton [ Mon Feb 10, 2020 1:24 pm ]
Post subject:  Re: Hardware capture

2nd device. EZCAP. (it is device name from its inner properties. (I think main chip))
it is most chip;ess solution. I had buy it for only 65$. (usual price is 70-80$)
Attachment:
fucking_ezcap.png
fucking_ezcap.png [ 61.87 KiB | Viewed 10658 times ]

They said on their site that it support yuy2. (because it is most mommon format for capture devices (your cameras too))
But default was MGPEG format. (read more about jpeg coding to understand what a shit they do)
Picture in jpeg are too terible to recognition. I had select yuy2 manualy but picture was same.
Attachment:
ezcap_1000.png
ezcap_1000.png [ 190.64 KiB | Viewed 10658 times ]

They capture it in jpeg,(loose many info while) and then convert it back to yuy2. (again some little looses)
STUPID. just look at this picture. Anyway I had many time and I love chelenges. That is only reason I do ocr pokerstars with this shit too.
p.s. forgot that my exemplar was broken. (1 usb3.0 wire has bad contact, and it work in usb2 mode with no yuy2 support (just slow jpeg)
So I had repaired it with the solder. You must think wery wery hard before buy this ***.
Attachment:
ezcap_repaired.jpg
ezcap_repaired.jpg [ 73.76 KiB | Viewed 10638 times ]

Author:  nefton [ Mon Feb 10, 2020 1:42 pm ]
Post subject:  Re: Hardware capture

3rd. Magewell
Attachment:
magewell.png
magewell.png [ 93.46 KiB | Viewed 10658 times ]

It cost about 350$. I have not this device myself, but few my clients have. It have perfect picture!
Attachment:
megawel_1000.png
megawel_1000.png [ 166.93 KiB | Viewed 10658 times ]

All artefacts you see - it is just yuy2 convertion.
It is so perfect, that my algorytms writen to desctop orign image working with magewell with no any changes!
Also they have sdk. (but I had not enought time + my clients time to try all this)
only pity that they declare rgb24 directshow support, but they did not support it from the box.
may be some sdk libraries will help. (have not this device myself)
Also magewell have some devices for 750$ (support 4k) - but I dont think you need it. + dont know what problems will apear.
So my advice is this magewell for 350$.

Author:  nefton [ Mon Feb 10, 2020 1:50 pm ]
Post subject:  Re: Hardware capture

Feell free to add your captures here. test_image is in attachments. you can do capture by any your soft like obs, or my demo ocr.

Author:  nbiresev [ Mon Feb 10, 2020 7:58 pm ]
Post subject:  Re: Hardware capture

Hello amazing work! I am glad that there is finally some contribution and shared experienced about stealth topic.

Did you try Kvm2usb from epiphan or the one from robotsky? It is quite expensive but as i understood it shouldn't loose any information, and very important it returns EDID information so it can't be recognized by poker site. Those cheap devices don't return EDID so it is potentially recognizable by poker site.
I mean if device is recognizable due to not returning EDID, what is the point of using it then?

By the way even with those cheap devices, i see that image looks quite different from original but does it really matter? I mean the whole point is that you received image, it doesn't matter if it looks close to original i think it only matters if you can recognize fonts in it. As what ever method you use for OCR, you can work directly on transfered images instead of with original images.
I think tablemaps from openholdem would be able to read such fonts without any issues.

Author:  nefton [ Tue Feb 11, 2020 3:26 am ]
Post subject:  Re: Hardware capture

nbiresev wrote:
Those cheap devices don't return EDID so it is potentially recognizable by poker site.
I mean if device is recognizable due to not returning EDID, what is the point of using it then?

This splitter for 33$ from aliexpress support edid copy from real monitor to poker PC
Attachment:
splitter.png
splitter.png [ 127.16 KiB | Viewed 10613 times ]

So noone can detect if you use splitter + real monitor + capture.

Author:  nefton [ Tue Feb 11, 2020 3:36 am ]
Post subject:  Re: Hardware capture

nbiresev wrote:
I think tablemaps from openholdem would be able to read such fonts without any issues.

1. Tablemaps need poker window. But there is only image, all windows are drawed here.
2. I am not expert in tablemaps, But for me tablemaps recognition techniks are so pure. Image compare, hash, binary fonts recognition. (dont forget pixels are NOT same each time. Their colors depends on neibor pixels and table position. (+ 10^6 other problems)
3. Usualy there is mutch difference betwin thinking and doing. You can post your experience with recognition anytime :)

Author:  nbiresev [ Tue Feb 11, 2020 8:27 am ]
Post subject:  Re: Hardware capture

ok great that this cheap device is not recognizable.
What about other devices that you listed above, are they returning EDID?

Tablemaps with original implementation are working with window handle just because they take screenshot from the window instead of from whole screen, and that way you always know position of the table in the screen, but you can edit code to make screenshot at specific position of the screen where you expect table to be and then perform fonts recognition.
I am no expert in OCR, but i think tablemaps are working just fine, so far didn't have any problems in detecting fonts. Off course if you say pixels are looking the different way all the time due to transfer of image, sure then it is more work.

By the way when you say that pixels look different all the time when transferring image, does it happen even when you have the same image all the time that the transferred image will not be identical each time?

Author:  nefton [ Tue Feb 11, 2020 8:46 am ]
Post subject:  Re: Hardware capture

nbiresev wrote:
ok great that this cheap device is not recognizable.
What about other devices that you listed above, are they returning EDID?

Every device have own EDID. But it is not a problem.
This splitter have option to copy EDID from input1 to output.
Attachment:
HardwareSystem2.png
HardwareSystem2.png [ 236.96 KiB | Viewed 10608 times ]

Author:  nefton [ Tue Feb 11, 2020 8:54 am ]
Post subject:  Re: Hardware capture

nbiresev wrote:
By the way when you say that pixels look different all the time when transferring image, does it happen even when you have the same image all the time that the transferred image will not be identical each time?

Usualy not. Same input picture produce same output. But every symbol may look different on different chairs.
In yuy2 if you move your table up or bottom - image will be same. But if you move it 1 pixel right or left - all symbols become different.
It depends on their absolute position in a row. odd/even

Author:  nbiresev [ Wed Feb 12, 2020 2:29 pm ]
Post subject:  Re: Hardware capture

Quote:
Usualy not. Same input picture produce same output. But every symbol may look different on different chairs.


Is it just looking different at different locations on the table as you mentioned for different chairs, or is it also when you move table to different position on the screen? Because even when bot plays on the same PC as poker client,
on most sites pixels look quite different for different chairs.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/