edge-detection

How to detect interior vertices in groups of 2d polygons? (E.g. ZIP Codes to determine a territory)

半腔热情 提交于 2019-12-13 16:42:19
问题 I am looking for a method, preferably in PHP, to analyze a group of polygons to detect the outer boundaries of the group. Specifically, this is for a Google Maps v3 application that renders territories. Each polygon in the territory is a ZIP Code. I'm trying to detect and draw only the territory boundary. Here's a mock-up of what I'm trying to accomplish: The challenges I face in solving this problem: ZIP Codes within each territory can be (and often are) non-contiguous (see the red and green

Fill the circular paths in image [closed]

ⅰ亾dé卋堺 提交于 2019-12-13 10:27:33
问题 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 months ago . I have many images consisting of circles(varying from 1 to 4) in each image. I am trying to get a clear circle images by filling the missed pixels along the circle path. I have tried Hough-transform, but its parameters are image specific: for each image I have to change the

Deblurring an image in order to perform edge detection

戏子无情 提交于 2019-12-13 08:32:13
问题 I have this image: I am trying to put the background into focus in order to perform edge-detection on the image. What would be the methods available to me (either on space/frequency filed)? What I tried is the following: kernel = np.array([[-1,-1,-1], [-1,9,-1], [-1,-1,-1]]) im = cv2.filter2D(equ, -1, kernel) This outputs this image: I also played around with the centre value but with no positive result. I also tried this: psf = np.ones((5, 5)) / 25 equ = convolve2d(equ, psf, 'same')

Filling edges using flood fill not working properly

戏子无情 提交于 2019-12-13 07:56:52
问题 I am using openCV in python to detect cracks in concrete. I am able to use canny edge detection to detect cracks. Next, I need to fill the edges. I used floodfill operation of openCV but some of the gaps are filled whereas some are not filled. The image on the left is the input image whereas that on the right is the floodfilled image. I am guessing this is because my edges have breaks at points. How do i solve this ? My code for floodfilling: im_th1 = imginput im_floodfill = im_th1.copy() #

To find minute circles using hough circle function in opencv for iris

≡放荡痞女 提交于 2019-12-13 06:14:54
问题 I need to detect the iris of the eye picture I have using HoughCircle function thats available in opencv2. So , // Read the image src = imread("D:/001R_3.png"); if( !src.data ) { return -1; } /// Convert it to gray cvtColor( src, src_gray, CV_BGR2GRAY ); /// Reduce the noise so we avoid false circle detection GaussianBlur( src_gray, src_gray, Size(9, 9), 2, 2 ); ///////////// /// Generate grad_x and grad_y Mat grad_x, grad_y; Mat abs_grad_x, abs_grad_y; Sobel( src_gray, grad_x, ddepth, 1, 0,

Image Distortion with Lock Bits

我是研究僧i 提交于 2019-12-13 04:54:47
问题 I'm having a problem with writing to files using lock bits. I'm working on an edge detection software which has a strange distortion effect with most images. I've tried to isolate the problem, and it seems very random. It is not associated with format, but rather the only images that seem to work are pictures made for desktop wallpapers, and I don't really know why. I only switched to writing to files using lockbits recently, so I am sure the problem is with that (there were no problems when

The function 'edge' is not supported for standalone code generation

和自甴很熟 提交于 2019-12-13 01:27:24
问题 I am trying to use the edge(I,'sobel') method inside a Matlab function block in Simulink(MATLAB 2013a). When I try to compile, I get the error "The function 'edge' is not supported for standalone code generation". I know there is an edge detector block , but I want to call the function with in the Matlab function block. How to get around this. 回答1: If you have Computer Vision System toolbox you can use vision.EdgeDetector System object. If you have edge detector block then you already have

How do you handle negative pixel values after filtering?

爱⌒轻易说出口 提交于 2019-12-12 17:02:48
问题 I have a 8-bit image and I want to filter it with a matrix for edge detection. My kernel matrix is 0 1 0 1 -4 1 0 1 0 For some indices it gives me a negative value. What am I supposed to with them? 回答1: Your kernel is a Laplace filter. Applying it to an image yields a finite difference approximation to the Laplacian operator. The Laplace operator is not an edge detector by itself. But you can use it as a building block for an edge detector: you need to detect the zero crossings to find edges

In OpenCV, what data types does cv2.filter2D() expect?

北城以北 提交于 2019-12-12 15:02:26
问题 I'm teaching myself about edge detectors, and I'm trying to use OpenCV's filter2D to implement my own gradient calculator, similar to cv2.Sobel() . In the Python interface to OpenCV, cv2.filter2D() allows users to convolve an image with a custom filter. In OpenCV nomenclature, this filter is called a "kernel." Using an image (per00001.png) from the MIT pedestrian dataset, I find that cv2.Sobel() produces a reasonable looking output. (Code is below, output image is here.) #OpenCV's Sobel code

Python implementation of the laplacian of gaussian edge detection

江枫思渺然 提交于 2019-12-12 07:47:19
问题 I am looking for the equivalent implementation of the laplacian of gaussian edge detection. In matlab we use the following function [BW,threshold] = edge(I,'log',...) In python there exist a function for calculating the laplacian of gaussian. It is not giving the edges back definitely. scipy.ndimage.filters.gaussian_laplace Any pointer to online implementation or the code Thanks 回答1: What matlab edge() do should be Compute LoG Compute zero crossings on LoG Compute a threshold for local LoG