hough-transform

OpenCV GPU Error (Function Not Implemented) in Hough Transform

你。 提交于 2019-12-10 19:08:27
问题 I have tried Hough on CPU, and it runs fine, just a little slow. So, I am trying to run Hough on OpenCV CUDA, but it shows this error, even if I have GpuMat - OpenCV Error: The function/feature is not implemented (getGpuMat is available only for cuda::GpuMat and cuda::HostMem) in cv::_InputArray::getGpuMat, file PATH\opencv-sources\modules\core\src\matrix.cpp, line 1454 This is my code (I stream frames from live camera, so inside a while loop) - Ptr<HoughLinesDetector> houghLines =

How can i get accurate center points?

我怕爱的太早我们不能终老 提交于 2019-12-10 17:47:57
问题 How can I get accurate center points with OpenCV Hough Circle Transformation? I need more decimal places of accurate in the x,y coordinates. ( on accurate i mean something like this) i got these center coordinates with matlab x107,775526315904 y112,963480232638 x469,550463441518 y208,309866770404 x217,386414755458 y490,882895036058 Here is my code: #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/core/core.hpp> #include <iostream> #include <stdio

How to detect a quadrilateral shape in an image in Java?

核能气质少年 提交于 2019-12-10 17:27:56
问题 I want to detect a quadrilateral shape in an image in Java. I can use the HoughLinesP method in OpenCV (using javaCV for opencv java binding) to detect line segments. But I can't figure out how to detect a quadrilateral shape - is there another method for that or some way to use the hough lines? Also once the corners of the quadrilateral are detected, I want it to return a rectangle just like this class does - http://www.aforgenet.com/framework/docs/html/7039a71d-a87d-47ef-7907-ad873118e374

Hough Transform question

不羁的心 提交于 2019-12-10 15:37:27
问题 I implemented Hough Transform in C# this way: List<Point> forme = new List<Point>(); forme.Add(new Point(260, 307)); forme.Add(new Point(268, 302)); forme.Add(new Point(273, 299)); forme.Add(new Point(279, 295)); forme.Add(new Point(285, 292)); forme.Add(new Point(291, 288)); forme.Add(new Point(298, 283)); forme.Add(new Point(305, 280)); forme.Add(new Point(312, 277)); forme.Add(new Point(319, 274)); forme.Add(new Point(325, 271)); forme.Add(new Point(333, 268)); forme.Add(new Point(340, 264

Find lines in shape

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 10:35:36
问题 I have a binary image and I'm looking for a robust way to find the lines in the shape and the topology (how the lines connect). I have experimented in matlab (although what I'm asking for is which methods to use). I've tried using skeletonization on the binary image and then used hough-transform, works sometimes but not a robust solution. I struggled with boundary disturbance. Could anyone point me in a direction of which methods to use here (and in what order). Binary file for testing 回答1:

How can I determine the angle a line found by HoughLines function using OpenCV?

大城市里の小女人 提交于 2019-12-09 06:47:41
问题 Using the HoughLines function in OpenCV, is it possible to determine the angle of a resulting line relative to the base of the image? 回答1: If you use HoughLines function, it will provide you lines already defined by two parameters: theta and rho, as vector<Vec2f> lines; // detect lines HoughLines(image, lines, 1, CV_PI/180, 150, 0, 0 ); // get lines for( size_t i = 0; i < lines.size(); i++ ) { float rho = lines[i][0], theta = lines[i][1]; .... } Or if you apply HoughLinesP function, you will

Three Dimensional Hough Space

爱⌒轻易说出口 提交于 2019-12-08 06:38:36
问题 Im searching for radius and the center coordinates of circle in a image. have already tried 2D Hough transform. but my circle radius is also a unknown. Im still a beginner to Computer vision so need guild lines and help for implementing three dimensional hough space. 回答1: You implement it just like 2D Hough space, but with an additional parameter. Pseudo code would look like this: for each (x,y) in image for each test_radius in [min_radius .. max_radius] for each point (tx,ty) in the circle

GNU Octave: Hough Transform

爷,独闯天下 提交于 2019-12-08 02:56:14
问题 I am attempting to use a hough transform, unfortunately it doesn't seem to be outputting r and theta that correspond with the lines Drawn. I've been trying to find the answer on this site and others but everything I've tried so far has failed. I=zeros(80, 80); for n=1:25; I(n+20, n+2)=1; I(n+1, n*2+17)=1; I(n+1, n*2+16)=1; end hough = houghtf(I,"line", pi*[0:360]/180); threshHough = hough>.9*max(hough(:)); [r, theta] = find(threshHough>0) %theta = (theta-91)*pi/180 %r=r-size(hough,1)/2 imshow

opencv detect dotted lines

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 23:31:20
问题 I have an image which consists of somehow dotted lines: NOTE: Open the image, to enlage it and see all the small dots How can I use openCV to detect and parametrize those lines? This image are the values of a laser range scanner on a robot and I need to get all the lines as good a possible. The HoughLinesP function should be ideal for this? I thried the following code: //converts laser range readings to a binary image. cv::Mat binaryImg = laserRangesToBinaryImage(); cv::Mat cdst; cvtColor

OpenCV Python HoughCircles error

这一生的挚爱 提交于 2019-12-07 09:50:10
问题 I'm working on a program that detects circular shapes in images. I decided a Hough Transform would be the best, and I found one in the OpenCV library. The problem is that when I try to use it I get an error that I have no idea how to fix. Is OpenCV for Python not fully implemented? Is there a fix to the library I need for the program to work? Here's the code: import cv #cv.NamedWindow("camera", 1) capture = cv.CaptureFromCAM(0) while True: img = cv.QueryFrame(capture) gray = cv.CreateImage(cv