image-processing

Detect circles with specific colors using opencv

£可爱£侵袭症+ 提交于 2020-04-05 05:26:30
问题 I have to detect yellow circles in an image using OpenCV and python, as shown in the first image: Once I detect the yellow circle, I have to highlight it, like so: I am new to OpenCV, so I was looking for some guidance or help. All help is appreciated 回答1: Here's a potential approach: Convert image to HSV Find upper/lower color boundaries and create a mask Find contours and filter using the number of vertices We convert image to HSV and then determine lower and upper boundaries to create a

How to rotate skewed fingerprint image to vertical upright position [closed]

妖精的绣舞 提交于 2020-03-28 06:41:29
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 7 months ago . I’d like to rotate fingerprint image from skew to vertical center By python with opencv I’m beginner. From this To this 回答1: Given an image containing a rotated blob at an unknown angle, the skew can be corrected with this approach Detect blob in the image Compute angle of

How to rotate skewed fingerprint image to vertical upright position [closed]

你。 提交于 2020-03-28 06:41:11
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 7 months ago . I’d like to rotate fingerprint image from skew to vertical center By python with opencv I’m beginner. From this To this 回答1: Given an image containing a rotated blob at an unknown angle, the skew can be corrected with this approach Detect blob in the image Compute angle of

Can Google Cloud Vision API label faces?

回眸只為那壹抹淺笑 提交于 2020-03-26 04:29:11
问题 I am currently using google cloud-vision api for a project. I want to assign a unique ID to a face, so that it automatically detects which IDs any image contains. This way I can know which person is in the image. Can cloud-vision distinguish faces and return some unique ID for a face? 回答1: NO , and as Armin has already mentioned, Google Vision API doesn't support Facial Recognition or Face verification. It only performs face detection on an image. What you can actually do is to use tensorflow

Automatic Scaling when the image is resize

不羁岁月 提交于 2020-03-26 04:02:11
问题 I am having a problem when I change the size of the image. Then the proportions of the line no longer match those of the image, i.e. the line will become smaller than expected. Any idea how I can resize the line proportionally equal to the image? Here is the original image: Here is the result that I want: But this is the result that I get after resizing (it gives the same value at second picture): from scipy.spatial import distance as dist from imutils import perspective from imutils import

Why yolo can't detect all objects in image?

柔情痞子 提交于 2020-03-25 18:08:33
问题 I am trying to detect objects in image using AlexeyAB darknet.But it is detecting only 2 or 3 object.It can't detect small objects(for example hat).I am using this command: ./darknet detector test ./cfg/coco.data ./cfg/yolov3.cfg /weight_path/ /image_path/ How can I do it? 回答1: According to the AlexeyAB page for small objects you can do this: for training for small objects (smaller than 16x16 after the image is resized to 416x416) - set layers = -1, 11 instead of https://github.com/AlexeyAB

Why yolo can't detect all objects in image?

旧城冷巷雨未停 提交于 2020-03-25 18:04:59
问题 I am trying to detect objects in image using AlexeyAB darknet.But it is detecting only 2 or 3 object.It can't detect small objects(for example hat).I am using this command: ./darknet detector test ./cfg/coco.data ./cfg/yolov3.cfg /weight_path/ /image_path/ How can I do it? 回答1: According to the AlexeyAB page for small objects you can do this: for training for small objects (smaller than 16x16 after the image is resized to 416x416) - set layers = -1, 11 instead of https://github.com/AlexeyAB

How to randomize image pixels in python

旧城冷巷雨未停 提交于 2020-03-24 09:56:06
问题 I am new to computational vision and python and I could not really figure out what went wrong. I have tried to randomize all the image pixels in a RGB image, but my image turned out to be completely wrong as seen below. Can someone please shed some light? from scipy import misc import numpy as np import matplotlib.pyplot as plt #Loads an arbitrary RGB image from the misc library rgbImg = misc.face() %matplotlib inline #Display out the original RGB image plt.figure(1,figsize = (6, 4)) plt

Masking Using Pixel Statistics

£可爱£侵袭症+ 提交于 2020-03-23 08:55:33
问题 I'm trying to mask bad pixels in a dataset taken from a detector. In my attempt to come up with a general way to do this so I can run the same code across different images, I tried a few different methods, but none of them ended up working. I'm pretty new with coding and data analysis in Python, so I could use a hand putting things in terms that the computer will understand. As an example, consider the matrix A = np.array([[3,5,50],[30,2,6],[25,1,1]]) What I'm wanting to do is set any element

How to quantify the cartToPolar output to estimate the flow between consecutive frames Python OpenCV?

孤街醉人 提交于 2020-03-23 02:06:35
问题 How can I quantify the output of cartToPolar to estimate the flow between consecutive frames? For sake of simplicity, here the output of two frames import cv2 img_1 = cv2.imread('0.png') img_2 = cv2.imread('1.png') frame_1 = cv2.cvtColor(img_1, cv2.COLOR_BGR2GRAY) frame_2 = cv2.cvtColor(img_2, cv2.COLOR_BGR2GRAY) flow = cv2.calcOpticalFlowFarneback(frame_1, frame_2, None, 0.5, 3, 21, 3, 7, 1.2, 0) magnitude, angle = cv2.cartToPolar(flow[..., 0], flow[..., 1]) print(magnitude) [[0.0001812 0