vipoker扑克图像识别接口

1、消息格式
string字符串:"28,4,44,23,21,25,34,5,55,55,55,10,16,38,41,42,7,13,32,26,9,"
各个字符是按索引[0,n]来顺序排列的。
站在摄像机的视角,从画面的左上角(x=0,y=0)开始,到右下角(x=width,y=height)。此牌位与荷官发牌顺序无关!
按从左到右,从上到下对扑克牌进行排序,序号[0,n]。
value_index:指扑克牌在全牌值列表中的索引[0,n]。-1:未识别。
全牌值列表:
["Club_A","Club_2","Club_3","Club_4","Club_5","Club_6","Club_7","Club_8","Club_9","Club_10","Club_J","Club_Q","Club_K,",
"Diamond_A","Diamond_2","Diamond_3","Diamond_4","Diamond_5","Diamond_6","Diamond_7","Diamond_8","Diamond_9","Diamond_10","Diamond_J","Diamond_Q","Diamond_K",
"Heart_A","Heart_2","Heart_3","Heart_4","Heart_5","Heart_6","Heart_7","Heart_8","Heart_9","Heart_10","Heart_J","Heart_Q","Heart_K",
"Spade_A","Spade_2","Spade_3","Spade_4","Spade_5","Spade_6","Spade_7","Spade_8","Spade_9","Spade_10","Spade_J","Spade_Q","Spade_K",
"back_0","back_1","back_2","null" ];
 
识别结果采取流水线机制,识别线程按设定的FPS运行,不断刷新识别结果值。
vipoker作为Tcp服务器,在连接建立后,按FPS速度送出识别结果值。支持TCP长连接,使用socket的SO_KEEPALIVE机制。

2、配置文件vipoker.conf作为接口的一部分

# VI进程作为Tcp Server。等游戏作为tcp client来连接。
[AsTcpSvr]
# open SO_KEEPALIVE
listen_socket=17101

#算法相关的配置。
[vi]
# 桌台编号。定位文件将以此命名。
table_name=BJL03

# 一局游戏使用的扑克牌最大数量。比如百家乐,可以是4张5张或6张,则填6。
game_pokers=6
min_game_pokers=4

# 相似度门限值, unit:1/1000
pos_threshold=999

# 相似度门限值, unit:1/1000
recg_threshold=990

# if you use netIPC or recording-file(for testing)
#stream_url=rtmp://127.0.0.1/app/stream_name
stream_url=media_input\\bjl3.mp4

# 0:capture device 0, 1:capture device 1. If you use HDMI/SDI Camera
#stream_url=0

# 识别速度。5 FPS,即200ms识别一次。
vi_fps=5

# 平滑校正窗口。窗口期内识别结果不变才输出。
smooth_fix_window=5

你可能感兴趣的:(深度学习)