Solved

# easy image filter question

Posted on 2004-11-12
138 Views
Last Modified: 2010-04-15
Hi,

I'm implementing the Sobel Edge Detector image filter. I don't need help with writing the actual code for the filter. The filter is supposed to multiply each pixel by two convolution masks , where do the values for these masks come from? I can't find any explanations on this online. Here is an explanation of the filter:

http://www.cee.hw.ac.uk/hipr/html/sobel.html

If anyone is familiar with it or can look at it and tell me what the values for the masks should be that would be excellent, thanks.
0
Question by:Already_Googled
4 Comments

LVL 22

Expert Comment

The masks are right there in the article!

( The grids with the -1, 0, +2, etc...  numbers )

0

Author Comment

Do you mean those values are the literal values to multiply by? That couldn't be it, the net result would always be zero!

An example, pixel value = 50:

-1 * 50 = -50;
0 * 50 =    0;
1 * 50 -   50;
-2 * 50 = -100;
0 * 50 = 0;
2 * 50 = 100;
-1 * 50 = -50;
0 * 50 =    0;
1 * 50 -   50;    +
----------------------
zero

same for the other mask.
0

LVL 22

Accepted Solution

No no no, you don't multiply the same pixel by all the values, you multiply the corresponding surrounding pixel by that value.

0

Author Comment

oh that's it, thanks.
0

## Write Comment

Please enter a first name

Please enter a last name

We will never share this with anyone.

## Featured Post

### Suggested Solutions

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

#### 761 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

#### Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!