tesseract.js手写单词ocr识别匹配效果代码
代码语言:html
所属分类:其他
代码描述:tesseract.js手写单词ocr识别匹配效果代码,按住鼠标写出单词,经过ocr识别是否是正确的单词。
代码标签: tesseract 手写 单词 ocr 识别 匹配
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.0.css"> <style> * { box-sizing: border-box; } body { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: "Roboto", sans-serif; background: #ffd234; background-image: linear-gradient(62deg, #fbab7e 0%, #f7ce68 100%); color: #1f1f1f; } h1 { margin-bottom: 20px; padding-right: 60px; } b { font-weight: 700; } .branding { position: fixed; bottom: 10px; right: 10px; } .branding img { width: 50px; } .wrap { width: 560px; height: 400px; display: flex; position: relative; } .canvas { flex: 0 0 calc(100% - 60px); border: 4px solid #ffe094; border-radius: 6px; overflow: hidden; background: white; cursor: pointer; position: relative; } .canvas canvas { width: 100%; height: 100%; background-size: 100%; } .result { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 90px; animation: grow-fade 1s; transform-origin: top left; } .result.fa-xmark { color: red; } .result.fa-check { color: green; } .controls { position: absolute; z-index: 1; bottom: -10px; left: 10px; display: flex; align-items: flex-end; } .controls button { position: relative; appearance: none; border: 2px solid #ffe094; border-radius: 10px; background: white; color: #111; padding: 5px 10px; text-transform: uppercase; cursor: pointer; font-size: 12px; fon.........完整代码请登录后点击上方下载按钮下载查看
网友评论0