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
960 questions
104
votes
8 answers

Algorithm to detect corners of paper sheet in photo

What is the best way to detect the corners of an invoice/receipt/sheet-of-paper in a photo? This is to be used for subsequent perspective correction, before OCR. My current approach has been: RGB > Gray > Canny Edge Detection with thresholding >…
45
votes
9 answers

Sobel filter kernel of large size

I am using a sobel filter of size 3x3 to calculate the image derivative. Looking at some articles on the internet, it seems that kernels for sobel filter for size 5x5 and 7x7 are also common, but I am not able to find their kernel values. Could…
Aarkan
  • 3,143
  • 5
  • 30
  • 50
45
votes
4 answers

How to control node placement in graphviz (i.e. avoid edge crossings)

I'm using graphviz (dot) to generate the graph you can see below. The node in the lower left corner (red ellipse) causes annoyance as its edges cross several edges of the adjacent node. Is there a way to restrain node placement to a certain area?
jnns
  • 3,848
  • 3
  • 35
  • 65
35
votes
3 answers

Image segmentation based on edge pixel map

I have trained a classifier in Python for classifying pixels in an image of cells as edge or non edge. I've used it successfully on a few image datasets but am running into problems with this particular dataset, which seems pretty ambiguous even to…
34
votes
3 answers

Why Sobel operator looks that way?

For image derivative computation, Sobel operator looks this way: [-1 0 1] [-2 0 2] [-1 0 1] I don't quite understand 2 things about it, 1.Why the centre pixel is 0? Can't I just use an operator like below, [-1 1] [-1 1] [-1 1] 2.Why the centre row…
Alcott
  • 15,679
  • 24
  • 106
  • 170
31
votes
8 answers

Image Processing - Implementing Sobel Filter

I've got a task to implement Sobel filter which is, as you know, an image processing filter for edge detection. But unfortunately, I've got no experience in image processing field, to the extent that I don't even know how images are represented in…
Ahmad Siavosh
  • 634
  • 1
  • 9
  • 19
30
votes
1 answer

OpenCV Edge/Border detection based on color

I'm fairly new to OpenCV, and very excited to learn more. I've been toying with the idea of outlining edges, shapes. I've come across this code (running on an iOS device), which uses Canny. I'd like to be able to render this in color, and circle…
Jeff
  • 1,690
  • 5
  • 29
  • 52
30
votes
5 answers

A good approach for detecting lines in an image?

I've written some code that uses OpenCV libraries to detect white lines painted on grass. I need someone's opinion on the approach I used (as I'm sure there's a much better way than mine). Also, the results I'm getting are not as good as I expected…
28
votes
3 answers

Changing the color of an object in an Android application

Basically my goal is change the color of object in real time for paint application. To achieve this goal I follow the following concepts: I have used the canny() method for finding the object. Using findContours() for edge detection. using…
Prabhakar
  • 1,651
  • 15
  • 22
27
votes
4 answers

What's the use of Canny before HoughLines (opencv)?

I'm new to image processing and I'm working on detecting lines in a document image. I read the theory of Hough line transform but I can't see why I must use Canny before calling that function in opencv like being said in many tutorials. What's the…
Risa
  • 349
  • 1
  • 6
  • 12
22
votes
2 answers

How can I select the best set of parameters in the Canny edge detection algorithm implemented in OpenCV?

I am working with OpenCV on the Android platform. With the tremendous help from this community and techies, I am able to successfully detect a sheet out of the image. These are the step I…
Ankur Gautam
  • 1,316
  • 4
  • 13
  • 26
21
votes
2 answers

How to classify blurry numbers with openCV

I would like to capture the number from this kind of picture. I tried multi-scale matching from the following link. http://www.pyimagesearch.com/2015/01/26/multi-scale-template-matching-using-python-opencv/ All I want to know is the red number.…
spencerJANG
  • 240
  • 2
  • 8
18
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
  • 58,809
  • 95
  • 236
  • 371
17
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…
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
1
2 3
63 64