Questions tagged [edge-detection]

Edge detection is a tool in computer vision used to find discontinuities (edges) in images or graphs. Use this tag when asking about finding and manipulating edges or edge interaction.

Edge detection is a part of computer vision where the goal is to find edges in images. This often involves computing derivatives of the image with respect to the coordinates, because intuitively if the difference between two neighboring pixels is high, it is likely that there is an edge in the image. A popular edge detection algorithm is the Canny edge detector. Other edge detection algorithm includes Laplace & Sobel.

Discontinuities in image are likely to correspond to

  • discontinuities in depth
  • discontinuities in surface orientation
  • changes in material properties and
  • variations in scene illumination
1057 questions
17
votes
3 answers

Best value for threshold in Canny

I have an image which I want to detect edges on that. I found Canny has been used a lot ( I don't know whether I have a better option than that). I have set the values as follow: Imgproc.Canny(img, img, 10, 100, 3,true) I've changed threshold…
Mahsa
  • 1,502
  • 7
  • 18
  • 40
17
votes
4 answers

Best articles to start learning about edge detection/image recognition

I am involved in a personal project which will require pretty extensive knowledge of edge detection and image segmentation/object recognition. I know the importance of planning/understanding before writing code and with this in mind, what is the…
GurdeepS
  • 65,107
  • 109
  • 251
  • 387
16
votes
1 answer

Can Canny in OpenCV deal with both grayscale and color images?

I have some questions about the Canny edge detector in OpenCV. Here is the code I tried. def auto_canny(image, sigma=0.33): v = np.median(image) lower = int(max(0, (1.0 - sigma) * v)) upper = int(min(255, (1.0 + sigma) * v)) edged =…
XV15
  • 161
  • 1
  • 1
  • 3
16
votes
1 answer

How to use Chamfer Matching algorithm for finding 'Similar Images'

I would like to ask for more information on how Chamfer Matching algorithm (an edge matching algorithm) can be used to find 'similar' images. I would like to know if it is possible to place a 'score' for the matched results.
bloodfire1004
  • 493
  • 2
  • 8
  • 24
16
votes
6 answers

Edge detection for image stored in matrix

I represent images in the form of 2-D arrays. I have this picture: How can I get the pixels that are directly on the boundaries of the gray region and colorize them? I want to get the coordinates of the matrix elements in green and red…
user4632747
15
votes
1 answer

Edge Detection Techniques

Does anyone know what the differences between the Prewitt, Sobel and Laplacian operators in edge detection algorithms? Are some better than others? Are different operators used in different situations?
ale
  • 11,636
  • 27
  • 92
  • 149
15
votes
2 answers

Algorithm for labeling edges of a triangular mesh

Introduction As part of a larger program (related to rendering of volumetric graphics), I have a small but tricky subproblem where an arbitrary (but finite) triangular 2D mesh needs to be labeled in a specific way. Already a while ago I wrote a…
Reunanen
  • 7,921
  • 2
  • 35
  • 57
15
votes
2 answers

Is Center-Surround mechanism implemented in opencv?

I am new to the concept of Biologically Salient Regions Detector, and I read some papers and they always use the mechanism of Center-Surrond to computer features intensity, color and orientation. I googled that mechanism but i did not find…
15
votes
3 answers

Python implementation of the laplacian of gaussian edge detection

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.…
Shan
  • 18,563
  • 39
  • 97
  • 132
14
votes
3 answers

Smoothing a jagged path

I was participating in the thread Image/Graphic into a Shape the other day and made a hackish attempt to get the outline of an image by adding a Rectangle iteratively to an Area. That was very slow. This example instead builds a GeneralPath and…
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
14
votes
2 answers

how to find corners points of a shape in an image in opencv?

I have to find corners of shapes in an image. i have used Harris corner detection algorithm to find corner, but it is giving total corners present in an image and for finding corners for a particular shape in that image it is not feasible. please…
13
votes
2 answers

Closing a contour curve in OpenCV

I'm using OpenCV (Canny + findCountours) to find external contours of objects. The curve drawn is typically almost, but not entirely, closed. I'd like to close it - to find the region it bounds. How do I do this? Things considered: Dilation - the…
SRobertJames
  • 8,210
  • 14
  • 60
  • 107
13
votes
4 answers

Detecting edges of a card with rounded corners

Hi currently i am working on an OCR reading app where i have successfully able to capture the card image by using AVFoundation framework. For next step, i need to find out edges of the card , so that i can crop the card image from main captured…
raaz
  • 12,410
  • 22
  • 64
  • 81
13
votes
2 answers

OpenCV: Efficient Difference-of-Gaussian

I am trying to implement difference of guassians (DoG), for a specific case of edge detection. As the name of the algorithm suggests, it is actually fairly straightforward: Mat g1, g2, result; Mat img = imread("test.png", CV_LOAD_IMAGE_COLOR);…
peanutman
  • 327
  • 1
  • 2
  • 8
12
votes
3 answers

Prepare complex image for OCR

I want to recognize digits from a credit card. To make things worse, the source image is not guaranteed to be of high quality. The OCR is to be realized through a neural network, but that shouldn't be the topic here. The current issue is the image…
valentin
  • 511
  • 3
  • 16
1
2
3
70 71