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

How to find basic shapes (brick, cylinder, sphere) in an image using the Sobel operator?

I have calculated the Sobel gradient magnitude and direction. But I'm stuck on how to use this further for shape detection. Image> Grayscaled> Sobel filtered> Sobel gradient and direction calculated> next? The Sobel kernels used are: Kx = ([[1, 0,…
KshitijJaju
  • 156
  • 1
  • 10
3
votes
3 answers

How to improve the efficiency of a sobel edge detector

I am writing a computer vision library from scratch in Python to work with a rpi camera. At the moment, I have implemented conversion to greyscale and some other basic img operations which both run relatively fast on my model B rpi3. However, my…
Joe Iddon
  • 20,101
  • 7
  • 33
  • 54
3
votes
2 answers

sobel filter algorithm (C++) (no libraries)

I am trying to apply the sobel filter algorithm to a given picture (grayscale in this case) given my approach to accessing the pixels of the picture. Since I am accessing them in a way that doesn't use libraries, I am having trouble figuring out how…
evanhaus
  • 727
  • 3
  • 12
  • 30
3
votes
3 answers

I don't understand why my c++ code running so slow

I'm working on Sobel masking for edge detection without using any special library. The output that I want to get is a text files with 512x512 matrix with values between 0 to 1. I've checked that the code is working by putting smaller values like 50…
Ryan Kim
  • 31
  • 2
3
votes
2 answers

java image processing sobel edge detection

I have a problem with java program, in which i'm using sobel operator for edge detection, but when I'm trying to use that funcion, console says: Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 262144 at…
Natalia
  • 27
  • 1
  • 5
3
votes
1 answer

applying sobel filter on image

I am trying to use sobel filter on an image of a wall but it doesn't work. My code is : im=scipy.misc.imread('IMG_1479bis.JPG') im =…
Pauline1006
  • 127
  • 1
  • 9
3
votes
3 answers

Otsu Thresholding on a Sobel Filtered Image gives different Results

I'm creating a Sudoku solving application on an Android platform and I've run into an issue when processing the image. I'm trying to find the horizontal lines of the puzzle using OpenCV using a Sobel filter and then thresholding with the Otsu…
2
votes
2 answers

Sobel Operator in Julia

I am beginner regarding Julia programming and I want to implement Sobel operator. Unfortunately the output of the following code is just a black image. using Images, Colors, FileIO, Plots; img = load("Lenna.png"); img_gray = Gray.(img); sobel_image…
VladH
  • 143
  • 7
2
votes
1 answer

Hessian matrix, how to combine Ixx & Iyy together?

"Before extracting the lines, you need to detect potential points on them. Apply a Gaussian filter first and use the Sobel filters as derivative operators. Threshold the determinant of the Hessian and then apply non-maximum suppression in 3 × 3…
2
votes
3 answers

Sobel edge detection using opencv

I am using the built-in Sobel edge operation in openCV for some image processing purpose but the results are not as expected for the function. sobel=cv2.Sobel(img,cv2.CV_64F,0,1,ksize=3) cv2.imshow('Sobel Image',sobel) I am attaching a sample image…
pr22
  • 179
  • 1
  • 2
  • 9
2
votes
1 answer

Colored Canny edge detection calculation problems

I'm working on a school project for the graphics class. My task is detecting edges on a colored image, we received the suggestion to use the Canny edge detection algorithm. I've decided to write the entire program by myself in Java, because it…
2
votes
1 answer

Detecting edges of an image doesn't work in Matlab

I'm working on a script detecting edges of an image. Here is the script: clear all; close all; clc; c = rgb2gray(imread('image_S004_I0004.jpg')); c = double(c); k = imnoise(c, 'salt & pepper', 0.01); gg = [-1 0 1;-2 0 2; -1 0 1]; gh =…
Bacon
  • 37
  • 5
2
votes
1 answer

Sobel edge detection with BufferedImage.TYPE_BYTE_BINARY as output

I´m doing a school assignment where we are supposed to do a sobel edge detection on an image. We should do a convolution with the sobel cores och then calculate the gradientmagnitude for each pixel. After that, we should use the threshold method to…
Isus
  • 143
  • 2
  • 16
2
votes
1 answer

How to implement custom sobel-filter-based loss function using Keras

I am new to DL and Keras and currently I am trying to implement a sobel-filter-based custom loss function in Keras. The idea is to calculate the mean squared loss of a sobel filtered prediction and a sobel filtered ground truth image. So far, my…
Midas.Inc
  • 1,730
  • 3
  • 13
  • 25
2
votes
2 answers

Visualizing sobel gradient in python

I'm trying to implement the sobel operator in Python and visualize it. However, I'm struggling with how to do that. I have the following code, which currently calculates the gradient for each pixel. from PIL import Image import math def run(): …
fbailey
  • 303
  • 5
  • 17
1
2
3
12 13