当前位置: 首页 > news >正文

深圳建站公司优化建设公司网站大概需要多少钱?

深圳建站公司优化,建设公司网站大概需要多少钱?,杭州网站制作 乐云践新,个人网页设计说明书2000字我试图在一个程序中击败一个反机器人功能,用户必须按字母数字顺序点击图像中的字母。我已经设法使用预处理从背景中提取文本,但是仍然需要使用Tesseract对每个单独的字符进行倾斜以获得最佳结果。在使用Hough线之前的图像,只是预处理由HoughL…

我试图在一个程序中击败一个反机器人功能,用户必须按字母数字顺序点击图像中的字母。我已经设法使用预处理从背景中提取文本,但是仍然需要使用Tesseract对每个单独的字符进行倾斜以获得最佳结果。在

使用Hough线之前的图像,只是预处理

94ad6353fce336a5d35d872f0cc06235.png

由HoughLinesP绘制的线条的原始图像

CIhSV.png

我尝试过使用Canny边缘检测器+Hough线来查找每个字符下面的行。然而,我认为这条线本身的质量是不一致的,而且我不能根据它的底线来区分。在

以下是我尝试过的代码:# -*- coding:utf-8 -*-

import cv2, numpy as np, time

img_roi = [48, 191, 980, 656] # x1, y1, x2, y2

src_img_dir = "images/source/9.png"

bg_img = cv2.imread("images/background.png", cv2.IMREAD_COLOR)[img_roi[1]:img_roi[3], img_roi[0]:img_roi[2]]

# The background of the area is constant. So I have used a reference background image and removed pixels which have a similar H value as the background

bg_hsv = cv2.cvtColor(bg_img, cv2.COLOR_BGR2HSV)

src_img = cv2.imread(src_img_dir, cv2.IMREAD_COLOR)[img_roi[1]:img_roi[3], img_roi[0]:img_roi[2]]

# This image is the image where letters are placed on top of the background image

src_hsv = cv2.cvtColor(src_img, cv2.COLOR_BGR2HSV)

mask = np.zeros([src_img.shape[0], src_img.shape[1], 3], dtype=np.uint8)

offset = 3

start_time = time.time()

for y in range(src_img.shape[0]):

for x in range(src_img.shape[1]):

sp = src_hsv[y][x]

bp = bg_hsv[y][x]

if bp[0]-offset <= sp[0] <= bp[0]+offset:

if sp[1] >= 109:

mask[y][x] = src_img[y][x]

elif sp[1] <= 90:

if sp[0] >= 67:

mask[y][x] = src_img[y][x]

elif sp[2] >= 125 and sp[1] >= 20:

mask[y][x] = src_img[y][x]

else:

mask[y][x] = src_img[y][x]

"""if sp[1] >= 60 and sp[2] >= 60:

mask[y][x] = src_img[y][x]

#mask[y][x] = conv"""

print("duration", time.time()-start_time)

mask = cv2.cvtColor(mask, cv2.COLOR_BGR2HSV)

#mask[:,:,2] = 255

mask = cv2.cvtColor(mask, cv2.COLOR_HSV2BGR)

mask_gray = cv2.cvtColor(mask, cv2.COLOR_BGR2GRAY)

ret, thresh = cv2.threshold(mask_gray, 0, 255, cv2.THRESH_BINARY | cv2.THRESH_OTSU)

opened = cv2.morphologyEx(thresh, cv2.MORPH_OPEN, (3,3))

opened = cv2.morphologyEx(opened, cv2.MORPH_OPEN, (3,3))

opened = cv2.erode(opened, (3,3))

opened = cv2.dilate(opened, (3,3))

opened = cv2.dilate(opened, (5, 5))

opened = cv2.morphologyEx(opened, cv2.MORPH_CLOSE, (3,3))

opened = cv2.erode(opened, (3,3))

opened = cv2.erode(opened, (3,3))

final_img = opened

#edges = cv2.Canny(final_img, 0, 255)

lines = cv2.HoughLinesP(final_img, 1, np.pi / 180, 20, minLineLength=10, maxLineGap=3)

for line in lines:

coords = line[0]

cv2.line(src_img, (coords[0], coords[1]), (coords[2], coords[3]), [255,255,255], 2)

#cv2.imshow("can", edges)

#cv2.drawContours(src_img, fixed_contours, -1, (0,255,0), 2)

cv2.imshow("src", src_img)

cv2.imshow("", final_img)

cv2.waitKey(0)

cv2.destroyAllWindows()

http://www.lbrq.cn/news/2762137.html

相关文章:

  • 徐州网站开发兼职做推广的都是怎么推
  • wordpress注册用户可见湖北seo推广
  • 广州省建设厅官方网站网络推广的方式和途径有哪些
  • 网站建设项目验收表网络推广方法有哪几种
  • 今日头条重大消息李江seo
  • wordpress欢迎新会员seo优化是怎么回事呢
  • 注册网页需要多少钱企业seo职位
  • 微信微网站教程重庆网站seo好不好
  • 网站建设的前期投入百度应用中心
  • wordpress 短信插件seo流量排名软件
  • html5网站建设 教程自媒体怎么赚钱
  • 政府网站建设工作的自查报告重庆网站制作
  • 清远佛冈住房和城乡建设局网站ciliba最佳磁力搜索引擎
  • 青岛建网站选青岛博采网络二十四个关键词
  • 免费广州网站开发维护陕西seo优化
  • b2b网站用织梦可以做吗电商运营推广是做什么的
  • 做公司网站需要什么网站推广优化公司
  • 合肥哪个公司做网站好广告公司推广软文
  • 内部网络网站怎么做注册网站在哪里注册
  • 做名片用哪个网站百度推广在线客服
  • 优秀网站seo报价如何推广宣传一个品牌
  • win7如何做网站服务器网推放单平台
  • 网站栏目名称seo系统源码
  • 深圳企业网站建设开发费用私人做网站
  • 青海省住房和城乡建设厅的官方网站企业建站免费模板
  • 网站建设+临沂怎么在百度上做广告
  • 深圳西乡 网站建设品牌整合营销
  • 视频类网站建设的成果深圳搜索引擎优化推广便宜
  • 网站改版中百度认证是什么
  • 个人网站限制网址缩短
  • STM32学习笔记14-I2C硬件控制
  • Day8--滑动窗口与双指针--1004. 最大连续1的个数 III,1658. 将 x 减到 0 的最小操作数,3641. 最长半重复子数组
  • vscode wsl解决需要用别的用户调试的问题
  • 【深度长文】Anthropic发布Prompt Engineering全新指南
  • 云原生事件驱动引擎(RocketMQ-EventBridge)应用场景与技术解析
  • 如何做HTTP优化