• C

# easy image filter question

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.
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
The masks are right there in the article!

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

0
Author Commented:
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

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

0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
oh that's it, thanks.
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.