hough-transform

Generalized Hough Transform in CUDA - How can I speed up the binning process?

末鹿安然 提交于 2019-12-07 09:21:05
问题 Like the title says, I'm working on a little personal research into parallel computer vision techniques. Using CUDA, I am trying to implement a GPGPU version of the Hough transform. The only problem that I've encountered is during the voting process. I'm calling atomicAdd() to prevent multiple, simultaneously write operations and I don't seem to be gaining too much performance efficiency. I've searched the web, but haven't found any way to noticeably enhance the performance of the voting

Find lines in shape

限于喜欢 提交于 2019-12-06 13:17:25
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 Frankly speaking, I've been monitoring this question for some time in the hope to see useful answer. The task

Hough Transform Algorithm for Text Detection in Images [closed]

微笑、不失礼 提交于 2019-12-06 11:45:02
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 5 years ago . Hough Transform Algorithm is one of the algorithm use for text line detection and edge detection. Does Hough Transform Algorithm can be use for Detecting text in Images? What must be the process or implementation in java for this question? or It must be have another algorithm to make it possilble? Hoping for positive response. Hough transform was initially designed to detect

How exactly does dp parameter in cv::HoughCircles work?

我们两清 提交于 2019-12-06 08:13:36
I read similar question in Stack Overflow. I tried, but I still can not understand how it works. I read OpenCV document cv::HoughCircles , here are some explanation about dp parameter: Inverse ratio of the accumulator resolution to the image resolution. For example, if dp=1 , the accumulator has the same resolution as the input image. If dp=2 , the accumulator has half as big width and height. Here are my question. For example, if dp = 1, the size of accumulator is same as image, there is a consistent one-to-one match between pixels in image and positions in accumulator, but if dp = 2, how to

GNU Octave: Hough Transform

久未见 提交于 2019-12-06 05:11:47
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(I) The houghtf function in Octave parameterizes a line as r = x*cos(theta) + y*sin(theta) The output

OpenCV Python HoughCircles error

两盒软妹~` 提交于 2019-12-05 15:22:21
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.GetSize(img), 8, 1) edges = cv.CreateImage(cv.GetSize(img), 8, 1) cv.CvtColor(img, gray, cv.CV

Measuring the diameter pictures of holes in metal parts, photographed with telecentric, monochrome camera with opencv

好久不见. 提交于 2019-12-05 08:29:34
Setup: Camera: Blackfly S Mono 20.0 MP Lens: Opto telecentric lens TC23080 Lights: 16 green LEDS Python: 3.7.3 openCV: 4.0+ Sorry for the image links, but one image is around 20MB, also did not want to loose any quality Image samples: https://drive.google.com/file/d/11PU-5fzvSJt1lKlmP-lQXhdsuCJPGKbN/view?usp=sharing https://drive.google.com/file/d/1B3lSFx8YvTYv3hzuuuYtphoHBuyEdc4o/view Case: There will be metal parts with different shapes from 5x5 to 10x10 size(cm). Inside these metal parts there are plenty of circular holes from 2 to 10~ that have to be detected very accurately. The actual

Improving circle detection

最后都变了- 提交于 2019-12-05 00:53:27
问题 I am trying to detect circles in my images. I have written the following code in C# using EmguCV. Most of the times it works, but there are some cases that it detects smaller or larger circles that are slightly shifted to a side. Here is my code: Thread.Sleep(1000); imgCrp.Save(DateTime.Now.ToString("yyMMddHHmmss") + ".jpg"); imgCrpLab = imgCrp.Convert<Lab, Byte>(); imgIsolatedCathNTipBW = new Image<Gray, Byte>(imgCrp.Size); CvInvoke.cvInRangeS(imgCrpLab.Split()[2], new MCvScalar(0), new

Reading time from analog clock using Hough Line Transform in Python (OpenCV)

跟風遠走 提交于 2019-12-04 19:46:06
I've been trying to write a program that locates clock's face on picture and then proceeds to read time from it. Locating works fairly well, reading time - not so much. The cv2.HoughLines function returns angles at which lines lay (measuring from the top of the image) and their distance from upper-left corner of the image. After a bit of tweaking I've managed to convince my code to find a single line for each of clock's hands, but as for now I remain unable to actually read time from it. Using appropriate formulas I could find intersection of those lines (middle of the clock) and then iterate

Choosing Lines From Hough Lines

拜拜、爱过 提交于 2019-12-04 11:27:17
问题 I'm using Hough Lines to do corner detection for this image. i plan to find the intersection of the lines as the corner. This is the image. Unfortunately, Hough return lots of lines for each line I expect How do I tune the Hough Lines so there is only four lines each corresponds to actual line on the image? 回答1: Collect the intersection of all line for (int i = 0; i < lines.size(); i++) { for (int j = i + 1; j < lines.size(); j++) { cv::Point2f pt = computeIntersectionOfTwoLine(lines[i],