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
9
votes
1 answer

OpenCV's Canny Edge Detection in C++

I want to extract the edges of hand but I get the following result. I've tried adjusting the low and high threshold but I still can't get the desired output. I have included below the code and its output. What seems to be the problem? This is the…
Og Namdik
  • 823
  • 4
  • 14
  • 22
9
votes
2 answers

extract lines from canny edge detection

In openCV after applying canny edge detection I'd like to further process the result (show only horizontal lines, remove short lines, etc..). But the result of canny is just another image. I'd like to get an array of lines describing the detected…
Moataz Elmasry
  • 2,509
  • 4
  • 27
  • 37
8
votes
3 answers

One dimensional edge detection

Instead of edge detection of a 2D image, I would like to detect edges on every single row (i.g. a line) of an image separately. That is detection of edges from an input 1D vector whose values are pixel intensities ranging from 0 to 255 ( image…
C graphics
  • 7,308
  • 19
  • 83
  • 134
8
votes
1 answer

How do I color edges or draw rects correctly in an R dendrogram?

I generated this dendrogram using R's hclust(), as.dendrogram() and plot.dendrogram() functions. I used the dendrapply() function and a local function to color leaves, which is working fine. I have results from a statistical test that indicate if a…
Alex Reynolds
  • 95,983
  • 54
  • 240
  • 345
8
votes
0 answers

Android document edge detection app using deep machine learning

I developed Android document scanner using OpenCV edge detection functions which does not work all the time as expected and requires a special background in order to work properly like dark plain background. Also document color might affect the…
8
votes
1 answer

OpenCV Detect Very Small Lines

Here is an example image of what I’m working with: On every image there is a measurement strip. The measurement strip may vary in scale and angle. I’ve identified some intersection with the measurement strip and now need to determine what number it…
Tom
  • 1,636
  • 2
  • 13
  • 21
8
votes
1 answer

rectangle document detection using hough transform opencv android

I am trying to detect rectangle document using opencv 4 android sdk . First i tried to detect it by finding contours but it is not working with multi color documents.You can check this link to get better idea : detecting multi color document with…
ImLearning
  • 357
  • 1
  • 3
  • 16
8
votes
2 answers

Corner detection in Image processing Opencv Python

I have an image of the box. I am trying to detect corners and mark those corner from circles. I am using the following code for this: import cv2 import numpy as np img_file = 'Image.jpg' img = cv2.imread(img_file, cv2.IMREAD_COLOR) imgDim =…
muazfaiz
  • 4,611
  • 14
  • 50
  • 88
8
votes
1 answer

Edge following with camera

I want to follow the rightmost edge in the following picture with a line following robot. I tried simple "thresholding", but unfortunately, it includes the blurry white halo: The reason I threshold is to obtain a clean line from the Sobel edge…
Mateen Ulhaq
  • 24,552
  • 19
  • 101
  • 135
8
votes
1 answer

OpenCV: fit the detected edges

I detected the edges of a water wave by using canny edge detection. However, I want to fit a curve for this edge. Is that possible in OpenCV? Here is the image before edge detection: Here is the result of the edge detection operation: The code…
VaFancy
  • 145
  • 2
  • 4
  • 13
8
votes
4 answers

Binary Image "Lines-of-Sight" Edge Detection

Consider this binary image: A normal edge detection algorithm (Like Canny) takes the binary image as input and results into the contour shown in red. I need another algorithm that takes a point "P" as a second piece of input data. "P" is the black…
Hesham Eraqi
  • 2,444
  • 4
  • 23
  • 45
8
votes
3 answers

Algorithm to implement a lasso selection tool?

I am developing a Mac OS X application which, as part of it's UI, will display many visual elements in it's main view which can be selected. These elements can be positioned really anywhere within the view. The UI will support various ways of…
CJ.
  • 1,034
  • 1
  • 9
  • 20
8
votes
5 answers

Algorithm for unique find edges from polygon mesh

I'm looking for a good algorithm that can give me the unique edges from a set of polygon data. In this case, the polygons are defined by two arrays. One array is the number of points per polygon, and the other array is a list of vertex indices. I…
Peter Shinners
  • 3,686
  • 24
  • 24
8
votes
3 answers

Find the maximum number of edges in the graph

There are 'n' vertices and 0 edges of an undirected graph. What can be the maximum number of edges that we can draw such that the graph remains disconnected. I have made the solution that we can exclude one vertex and can find the maximum number…
Luv
  • 5,381
  • 9
  • 48
  • 61
7
votes
4 answers

Canny edge detector in MATLAB

I am trying to perform canny edge detector without calling the canny function in Matlab. I wrote a few functions for the gaussian filter(sigma = 1) and non-maximum suppression. The original image and the resultant image is shown.. Not sure what the…
lakshmen
  • 28,346
  • 66
  • 178
  • 276