OpenCV

Display new window in second monitor, opencv

十年热恋 提交于 2021-01-27 04:37:54
问题 I have a opencv program in python that takes frames from a webcam and displays the feed. When 'p' is pushed, it grabbes just the face and display this one frame in another window. I would like to force this new window on to my second monitor while the camera feed is on the other one - the "main" monitor. Now it just displays on top of the feed. I have been looking and searching but can't find anything else than moveWindow. How can I use this or another function to do this? Hope someone can

Display new window in second monitor, opencv

蹲街弑〆低调 提交于 2021-01-27 04:37:52
问题 I have a opencv program in python that takes frames from a webcam and displays the feed. When 'p' is pushed, it grabbes just the face and display this one frame in another window. I would like to force this new window on to my second monitor while the camera feed is on the other one - the "main" monitor. Now it just displays on top of the feed. I have been looking and searching but can't find anything else than moveWindow. How can I use this or another function to do this? Hope someone can

Alpha blending two images with OpenCV and/or Numpy

假如想象 提交于 2021-01-27 04:03:13
问题 I would like to add a semi-transparent rectangle filled with a solid colour to an already loaded semi-transparent PNG. Here's an example input image I am using: That image is loaded with a standard cv2.IMREAD_UNCHANGED flag so that alpha channel is perfectly preserved. That input image is stored in the image variable. Here's my code that I have so far: # get image dimensions imgHeight, imgWidth = image.shape[:2] # create empty overlay layer with 4 channels overlay = np.zeros((imgHeight,

Alpha blending two images with OpenCV and/or Numpy

偶尔善良 提交于 2021-01-27 04:01:53
问题 I would like to add a semi-transparent rectangle filled with a solid colour to an already loaded semi-transparent PNG. Here's an example input image I am using: That image is loaded with a standard cv2.IMREAD_UNCHANGED flag so that alpha channel is perfectly preserved. That input image is stored in the image variable. Here's my code that I have so far: # get image dimensions imgHeight, imgWidth = image.shape[:2] # create empty overlay layer with 4 channels overlay = np.zeros((imgHeight,

Alpha blending two images with OpenCV and/or Numpy

吃可爱长大的小学妹 提交于 2021-01-27 04:01:48
问题 I would like to add a semi-transparent rectangle filled with a solid colour to an already loaded semi-transparent PNG. Here's an example input image I am using: That image is loaded with a standard cv2.IMREAD_UNCHANGED flag so that alpha channel is perfectly preserved. That input image is stored in the image variable. Here's my code that I have so far: # get image dimensions imgHeight, imgWidth = image.shape[:2] # create empty overlay layer with 4 channels overlay = np.zeros((imgHeight,

opencv - object tracking using feature detection

两盒软妹~` 提交于 2021-01-27 03:53:08
问题 I want to track an object(for example, a moving ball) in a video. Referring to opencv tutorial - 'Features2D + Homography to find a known object', I have been able to track my object in a still image by providing a reference image. I plan to use a reference image to detect the moving object from the first frame of input video. For the next frame the object detected in previous frame should act as a reference image and so on. But I don't know how to find back an object from its descriptor. An

opencv - object tracking using feature detection

牧云@^-^@ 提交于 2021-01-27 03:51:20
问题 I want to track an object(for example, a moving ball) in a video. Referring to opencv tutorial - 'Features2D + Homography to find a known object', I have been able to track my object in a still image by providing a reference image. I plan to use a reference image to detect the moving object from the first frame of input video. For the next frame the object detected in previous frame should act as a reference image and so on. But I don't know how to find back an object from its descriptor. An

opencv - object tracking using feature detection

心不动则不痛 提交于 2021-01-27 03:51:00
问题 I want to track an object(for example, a moving ball) in a video. Referring to opencv tutorial - 'Features2D + Homography to find a known object', I have been able to track my object in a still image by providing a reference image. I plan to use a reference image to detect the moving object from the first frame of input video. For the next frame the object detected in previous frame should act as a reference image and so on. But I don't know how to find back an object from its descriptor. An

opencv矩阵掩膜操作

僤鯓⒐⒋嵵緔 提交于 2021-01-26 10:57:27
前言 本文介绍opencv的矩阵掩膜操作。 一、图像的基本操作: 1、图像的定义:图像是指由输入设备捕捉的实际场景画面或以数字化形式存储的任意画面(由一个个像素组成)。像素是组成图像的最小单位,而每个像素则由多个(通常为3个)不同颜色(通常为红、绿、蓝)的点组成 2、图像的基本运算有很多种,例如:+、-、*、/、位运算、平方根、对数、绝对值等; 3、图像也可以放大、缩小、旋转,还可以截取其中的一部分作为ROI(感兴趣区域)进行操作; 4、各个颜色通道可以分别提取及对各个颜色通道进行各种运算操作*(例如RGB有3种颜色通道,都可以进行运算)。 二、掩膜(Mask)是什么? 1、掩膜的组成:掩模是由0和1组成的一个二进制图像。 可简单理解为一个由0和1组成的矩阵。 2、掩膜的定义:用选定的图像、图形或物体,对处理的图像(全部或局部)进行遮挡,来控制图像处理的区域或处理过程。 在OpenCV的中,掩模操作是相对简单的。大致的意思是,通过一个掩模矩阵,重新计算图像中的每一个像素值。掩模矩阵控制了旧图像当前位置以及周围位置像素对新图像当前位置像素值的影响力度。用数学术语讲,即我们自定义一个权重表。 3、掩膜操作举例:我们简单用与运算(&)举个例子: 运算方式:原图中每个像素和掩膜中的每个对应像素进行与运算。 三、掩膜(Mask)实现图像对比度的调整: 1、掩膜操作计算公式: 2

推荐一款基于 Java 的身份证号码识别系统

牧云@^-^@ 提交于 2021-01-26 09:41:33
点击▲关注 “ 爪哇妹 ” 给公众号标星置顶 更多摄影技巧 第一时间直达 大家好,我是阿逛! 最近发现一个有趣的项目。 这个 项目是通过学习https://gitee.com/nbsl/idCardCv 后整合 tess4j,不需要经过训练直接使用的,当然,你也可以进行训练后进行使用。 该项目修改原有的需要安装 opencv 的过程,全部使用 javaccp 技术重构,通过 javaccp 引入需要的 c++ 库进行开发。不需要安装 opencv 新增的了前端控制识别区域的功能,新增了后端识别后验证 ,页面样式主要适应 paid,重新修改了后面的识别过程,用户 opencv 进行图片优化和区域 选择,使用 tess4j 进行数字和 x 的识别 配合样式中的区域在后台裁剪相关区域图片 /idCardCv/src/main/resources/static/js/plugins/cropper/cropper.css 身份证号码识别 请求地址 http://localhost:8080/idCard/index 它基于 openCV 开源库。这意味着你可以获取全部源代码,并且移植到 opencv 支持的所有平台。它是基于 java 开发。它的识别率较高。图片清晰情况下,号码检测与识别准确率在90%以上。 Required Software 本版本在以下平台测试通过: windows7