Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

why2012/recognition_proj

Repository files navigation

答题卡识别-返回答题矩阵

地址: /recog

方法: post

参数

col	//行
row	//列
card //图片绝对地址或图片

返回


{
	"status": 0, 
	"msg": "", 
	"ans": [[1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 1.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [1.0, 0.0, 0.0, 0.0]]
}

答题卡识别-条码识别

地址: /barcode

方法: post

参数

barcode //图片绝对地址或图片

返回


{
	"status": 0, 
	"msg": "", 
	"ans": 6937748305057
}

答题卡识别-返回答题分数结果

地址: /markingScore

方法: post

参数

col	//行
row	//列
card //图片绝对地址
standAns // 标准答案.A,B|C|D|A
quesType // choice: 2|multiChoice: 3
direction // horizontal: 1|vertical: 2
totalScore // 题块总分

返回


{
	"status": 0, 
	"msg": "", 
	"ans": [[0, 1, 2, 3], "A,B|C|D|-"]
}

答题卡识别-识别学号

地址: /studentIdRecog

方法: post

参数

type (1条码|2填涂)
code // 条码或填涂区域图片绝对地址
[col]	//行, type=2
[row]	//列, type=2
[isMobile] 默认-1, 1|-1

返回


{
	"status": 0, 
	"msg": "", 
	"ans": 6937748305057
}

题目打分-选择题、判断题、打分区域

地址: /multiTypeMark

方法: post

参数

quesType // 题目类型,单选题:1,判断题:2,主观题:3,多选题:4
img // 图片
totalScore // 总分
[paperType] //a3 a4, 题目类型为单选题、多选题、判断题时
[correctAns] // 当题目类型为单选题、判断题、多选题时有此参数,正确答案序号,比如第一列和第二列为正确答案,则序号为: 0,1
[col] // 当题目类型为单选题、多选题时有此参数, 列数
[isColor] // 是否是彩色图像, 默认黑白, 1 -1

返回


{
	"status": 0, 
	"msg": "", 
	"ans": {
 score: 10, //分数
 anslist: [0, 1, 0, 0], //选项
 }
}

题目区域识别-选择题、判断题、打分区域

地址: /questionAreaMatch

方法: post

参数

imgFeatures // 特征模板,逗号分隔 choice7.png,judge2.png,scorebar-lowres03.png
imgDest // 待识别图像

返回


{
 "status": 0,
 "msg": "",
 "ans": [
 [
 // 四个角点坐标
 [
 [
 0.1329461634159088,
 0.5689960718154907
 ],
 [
 0.2946741282939911,
 0.5689836144447327
 ],
 [
 0.29438313841819763,
 0.5813725590705872
 ],
 [
 0.1328614056110382,
 0.581436812877655
 ]
 ]
 ],
 [
 [
 [
 0.14395779371261597,
 0.6089720129966736
 ],
 [
 0.24102778732776642,
 0.6090922951698303
 ],
 [
 0.2411276400089264,
 0.6335967183113098
 ],
 [
 0.14397448301315308,
 0.6337926983833313
 ]
 ]
 ],
 [
 [
 [
 0.09586777538061142,
 0.8137730360031128
 ],
 [
 0.905203640460968,
 0.813746988773346
 ],
 [
 0.9050753116607666,
 0.8375973105430603
 ],
 [
 0.09576867520809174,
 0.8376238346099854
 ]
 ]
 ]
 ]
}

四角标定点识别

地址: /paperSplit

方法: post

参数

opType 0: 返回图片, 1: 返回坐标点和二维码
paper 图片或图片绝对url
paperW
paperH
[isMobile] 是否是照片, 手机拍照填1, 否则影响精度

返回


{
 "status": 0,
 "msg": "",
 "ans": {
 "qr": {
 "paperW": 1200,
 "paperH": 2000
 },
 "coords": [
 [
 41.5, //x
 44.5, //y
 15.572412490844727 //radius
 ],
 [
 966.5,
 44.5,
 15.572412490844727
 ],
 [
 966.5,
 1378.5,
 15.572412490844727
 ],
 [
 41.5,
 1378.5,
 15.572412490844727
 ]
 ]
 }
}

目标区域宽高比判定

地址: /areaExceptionDetect

方法: post

参数

imgFeature // 特征模板,逗号分隔, 推荐 scorebar-lowres04.png
imgDest // 待识别图像
whRatio // 宽高比, 推荐7
[thresh] // 容错值,默认4

返回


{
 "status": 0,
 "msg": "",
 "ans": {
 whRatio: 2,// 检测到了宽高比
 exception: 1 //是否与正确比例一致, 1 一致, 0 不一致
 }
}

区域识别

地址: /paperMatch

方法: post

参数

imgFeature // qr.jpg
imgDest // 待识别图像
whRate // 默认1, 窗口比例
octaveLayers // 默认1

返回


{
 "status": 0,
 "msg": "",
 "ans": [
 // 四个角点坐标
 [
 [
 0.1329461634159088,
 0.5689960718154907
 ],
 [
 0.2946741282939911,
 0.5689836144447327
 ],
 [
 0.29438313841819763,
 0.5813725590705872
 ],
 [
 0.1328614056110382,
 0.581436812877655
 ]
 ]
 ]
}

四角标定点识别-自动检测旋转,识别二维码

地址: /paperSplitWithRotate

方法: post

参数

opType 0: 返回图片, 1: 返回二维码
qrid 二维码查询id, 自定义,必须保证唯一
paperType 纸张类型 a4, a3
[paper] 图片或图片绝对url; opType 0
[isMobile] 是否是照片, 手机拍照填1, 否则影响精度; opType 0

二维码数据格式规范

url内必须包含paperType, pageNumber 和 id三个GET查询字段

返回

opType 0:
 图片
 
opType 1:
{
 "status": 0,
 "msg": "",
 "ans": "{\"pageNumber\": 111, \"wd\": [\"草料二维码\"], \"ie\": [\"utf-8\"], \"id\": \"111\", \"paperType\": \"a3\"}"
}

About

试卷识别

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /