OpenCV

Clustering human faces from a video

烂漫一生 提交于 2021-02-07 03:48:02
问题 I have run the face detection algorithm inbuilt in opencv to extract faces in each frame of a video(sampled at 1 fps). I have also resized each face image to be of same size and I have cropped some fraction of image to remove background noise and hair. Now the problem is that I have to cluster these images of faces - Each cluster corresponding to a person. I implemented the algorithm described here http://bitsearch.blogspot.in/2013/02/unsupervised-face-clustering-with-opencv.html Basically

Clustering human faces from a video

丶灬走出姿态 提交于 2021-02-07 03:43:02
问题 I have run the face detection algorithm inbuilt in opencv to extract faces in each frame of a video(sampled at 1 fps). I have also resized each face image to be of same size and I have cropped some fraction of image to remove background noise and hair. Now the problem is that I have to cluster these images of faces - Each cluster corresponding to a person. I implemented the algorithm described here http://bitsearch.blogspot.in/2013/02/unsupervised-face-clustering-with-opencv.html Basically

How I make color calibration in opencv using a colorchecker?

眉间皱痕 提交于 2021-02-07 03:37:46
问题 I have a image of the colorchecker get by a digital camera, how i use this to calibrate the images using opencv? follow below the colorchecker image: 回答1: Are you asking how to do color calibration or how to do it with OpenCV? In order to do color calibration you use the last row (gray tones) of the calibration board. Here is what you should do for color calibration step by step: Capture an image and take small regions inside the gray regions. 10x10 pixels in the middle should be fine. After

How I make color calibration in opencv using a colorchecker?

。_饼干妹妹 提交于 2021-02-07 03:33:10
问题 I have a image of the colorchecker get by a digital camera, how i use this to calibrate the images using opencv? follow below the colorchecker image: 回答1: Are you asking how to do color calibration or how to do it with OpenCV? In order to do color calibration you use the last row (gray tones) of the calibration board. Here is what you should do for color calibration step by step: Capture an image and take small regions inside the gray regions. 10x10 pixels in the middle should be fine. After

Delete OCR word from Image (OpenCV,Python)

…衆ロ難τιáo~ 提交于 2021-02-07 02:55:53
问题 So, from what I can begin.. I am working with OCR. The script works pretty well for what I need. It detects the words with an accuracy which for me is ok. This is the result: 100% accuracy with attached image. from PIL import Image import pyocr.builders import os os.putenv("TESSDATA_PREFIX", "C:\\Program Files (x86)\\Tesseract-OCR") tools = pyocr.get_available_tools() tool = tools[0] langs = tool.get_available_languages() lang = langs[0] #eng file = "test.png" txt = tool.image_to_string(Image

Track Eye Pupil Position with Webcam, OpenCV, and Python

[亡魂溺海] 提交于 2021-02-07 02:33:25
问题 I am trying to build a robot that I can control with basic eye movements. I am pointing a webcam at my face, and depending on the position of my pupil, the robot would move a certain way. If the pupil is in the top, bottom, left corner, right corner of the eye the robot would move forwards, backwards, left, right respectively. My original plan was to use an eye haar cascade to find my left eye. I would then use houghcircle on the eye region to find the center of the pupil. I would determine

Track Eye Pupil Position with Webcam, OpenCV, and Python

痞子三分冷 提交于 2021-02-07 02:32:18
问题 I am trying to build a robot that I can control with basic eye movements. I am pointing a webcam at my face, and depending on the position of my pupil, the robot would move a certain way. If the pupil is in the top, bottom, left corner, right corner of the eye the robot would move forwards, backwards, left, right respectively. My original plan was to use an eye haar cascade to find my left eye. I would then use houghcircle on the eye region to find the center of the pupil. I would determine

Track Eye Pupil Position with Webcam, OpenCV, and Python

大城市里の小女人 提交于 2021-02-07 02:32:16
问题 I am trying to build a robot that I can control with basic eye movements. I am pointing a webcam at my face, and depending on the position of my pupil, the robot would move a certain way. If the pupil is in the top, bottom, left corner, right corner of the eye the robot would move forwards, backwards, left, right respectively. My original plan was to use an eye haar cascade to find my left eye. I would then use houghcircle on the eye region to find the center of the pupil. I would determine

一文讲解图像插值算法原理!附Python实现

﹥>﹥吖頭↗ 提交于 2021-02-06 21:21:42
在图像处理中,几何变换是将一幅图像映射到另外一幅图像内的操作,可以大概分为放缩、翻转、仿射(平移、旋转)、透视、重映射几部分。 在几何变换时,无法给有些像素点直接赋值,例如,将图像放大两倍,必然会多出一些无法被直接映射的像素点,对于这些像素点,通过插值决定它们的值。且不同插值方式的结果不同。 在一幅输入图像[u,v]中,灰度值仅在整数位置上有定义。然而,输出图像的坐标映射回原图像后,一般为非整数的坐标。所以输出图像[x,y]的灰度值,一般由非整数坐标来决定,非整数坐标的像素值,就需要插值算法来进行处理。常见的插值算法有最近邻插值、双线性插值和三次样条插值。 本文目标 了解插值算法与常见几何变换之间的关系 理解插值算法的原理 掌握OpenCV框架下插值算法API的使用 插值算法原理介绍 近邻插值算法 1. 原理简介 将目标图像中的点,对应到原图像中后,找到最相邻的整数坐标点的像素值,作为该点的像素值输出。 如上图所示,目标图像中的某点投影到原图像中的位置为点P,与P距离最近的点为Q11,此时易知,f(P )=f(Q11)。 2. 例子说明 如图所示: 将一幅3*3图像放大到4*4,用f(x , y)表示原图像,h(x ,y)表示目标图像,我们有如下公式: 3. 缺点 由最邻近插值法,放大后的图像有很严重的马赛克,会出现明显的块状效应;缩小后的图像有很严重的失真。 这是一种最基本

Python OpenCV Box2D

家住魔仙堡 提交于 2021-02-06 20:08:52
问题 I am trying to call OpenCV function MinAreaRect2 from within python. I use OpenCV 2.4.2 with python 2.7 and numpy 1.6. I went this far : import cv def nda2ipl(arr, dtype=None): return cv.fromarray(np.ascontiguousarray(arr, dtype=dtype)) def min_area_rect2(points): storage = cv.CreateMemStorage() cv_points = nda2ipl(points.reshape((-1, 1, 2))) out = cv.MinAreaRect2(cv_points, storage) return out I can call this function with a ndarray of shape (N x 2). I get this kind of results : ((476.5, 604