Questions tagged [sobel]

The Sobel operator, sometimes called Sobel Filter, is used in image processing and computer vision, particularly within edge detection algorithms.

The Sobel operator, sometimes called Sobel Filter, is used in image processing and computer vision, particularly within edge detection algorithms.

It is named after Irwin Sobel, who presented the idea of an "Isotropic 3x3 Image Gradient Operator" at a talk at the Stanford Artificial Intelligence Project (SAIL) in 1968.

Technically, it is a discrete differentiation operator, computing an approximation of the gradient of the image intensity function. At each point in the image, the result of the Sobel operator is either the corresponding gradient vector or the norm of this vector.

The Sobel operator is based on convolving the image with a small, separable, and integer valued filter in horizontal and vertical direction and is therefore relatively inexpensive in terms of computations.

On the other hand, the gradient approximation that it produces is relatively crude, in particular for high frequency variations in the image.

The Kayyali operator for edge detection is another operator generated from Sobel operator.

Wikipedia: http://en.wikipedia.org/wiki/Sobel_operator

182 questions
2
votes
1 answer

scipy sobel edge detection, extract outer pixels

Trying to extract the pixels outside and inside the edges within it's own area, currently i am applying the scipy Sobel filter like this: im = scipy.misc.imread(filename) im = im.astype('int32') dx = ndimage.sobel(im, axis=0) dy = ndimage.sobel(im,…
Wahtever
  • 3,597
  • 10
  • 44
  • 79
2
votes
1 answer

What is wrong with this code on Sobel filter?

I am trying to implement a sobel filter in PHP GD but something is wrong with my code: $gd = imagecreatefrompng('base.png'); $width = imagesx($gd); $height = imagesx($gd); for($i=1; $i<$width-1;$i++){ for($j=1;$j<$height-1; $j++){ …
kosinix
  • 1,779
  • 1
  • 18
  • 22
2
votes
1 answer

OpenCV: Sobel filter not rotation invariant

I am using The sobel operator to detect edges in a grayscale image with EmguCV 3.0 (the .NET Wrapper for OpenCV). The code I am using is Image gray = new Image(@"C:\gray.bmp"); Image sobel = gray.Sobel(0, 1,…
derjan
  • 41
  • 2
2
votes
2 answers

Why does the Sobel function for edge detection fail to find the contour of a white square in a black background?

I tryed to apply to the image the following code in octave: sq = imread("Square BW.jpg"); figure(1), imshow(Square); cont1 = edge(sq,"Sobel"); figure(2), imshow(cont1); The image I get is: And a similar image appears if I use the Prewitt…
r_laezza
  • 119
  • 1
  • 2
  • 14
2
votes
1 answer

1 Dimensional Sobel Produces Noise

I'm attempting a piece-by-piece Sobel edge detector for a project for school, and I can't wrap my head around where I am going wrong. Without putting up too much detail, I think a large portion of it boils down to the code below. When I put a…
2
votes
1 answer

Why do I must use Sobel Operator?

As I've recently read some journals and pdfs about Neural Network. And i anchored my mind to an article about "Handwriting Recognition Using Neural Network". For addition, I'm studying Backpropagation. And my question is "Why do the author recommend…
1
vote
1 answer

Sobel filter doesn't filter horizontally

Basically my problem is that I apply Sobel filter to BMP image where 1 pixel is 1 bit. But it doesn't do anything to the image, while filtering horizontally. Sobel function: void sobelFilter(unsigned char** image, int width, int height) { const…
1
vote
1 answer

Canny vs Sobel. Why Canny is not able to detect edges?

I am having a 16 bit image from which I am trying to detect edges. I converted the image to 8 bit and then applied edge detection. I am getting edges using Sobel, however, Canny doesn't detect edges. Why does this happen ? The original image is…
1
vote
1 answer

Javascript Sobel-Operator does not detect horizontal edges

So I have been trying to implement a Sobel filter in JavaScript using pixel manipulation. When using it on this image: The result I got looks like this: As you can see it does not seem to detect horizontal edges. Where is the mistake in the…
1
vote
0 answers

Why I get different results from a cpu and gsgl rendered sobel filter by using the same algorithm?

If I use this code: QImage gradient_image(image_ptr->width(),image_ptr->height(),QImage::Format_ARGB32 ); //gradient_image.fill(Qt::red); //sobel algorythm double S_x [3] [3] = {{-1,0,1},{-2,0,2},{-1,0,[enter image description here][1]1}}; double…
david2
  • 11
  • 1
1
vote
2 answers

Sobel edge detection without offset

I am interested in the Sobel function for edge detection. I would like to return the exact position of horizontal and vertical edges. However the sobel operator values are offset. As I understand, the sobel operation give the variation along an…
sam47
  • 11
  • 2
1
vote
0 answers

First vs second order edge detection filters

I've recently been asked the following question: Why are second order edge detectors better at finding edges than first order detectors? The problem is, I cannot see why! Second order filters are always more sensitive to noise (e.g. laplacian…
1
vote
1 answer

Multiple problems with Sobel algorithm in c

I'm trying to build an edge detection program using the code below. I have faced a variety of problems though, that I don't know how to solve. #include #include #include #define xrows 700 #define ycolumns 1244 int…
1
vote
0 answers

Halide Error: Input buffer b0 is accessed at -1, which is before the min (0) in dimension 0 - sobel edge detector

I'm trying to develop a sobel edge detector using Halide. Because I need to compute the 3x3 square around each pixel, I'm trying to realize the function over a smaller rectangle (and avoid the outer border). Here's what I came up with so…
1
vote
1 answer

How to apply gradient/magnitude to an image using OpenCV?

I'm currently following this tutorial as part of an university assignment where we are supposed to implement canny edge detection ourselfes. Applying the gaussian blur worked without any problems but now I'm trying to display the magnitude intensity…
Samaranth
  • 385
  • 3
  • 16
1 2
3
12 13