[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 139
  • Last Modified:

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.
0
Already_Googled
Asked:
Already_Googled
  • 2
  • 2
1 Solution
 
grg99Commented:
The masks are right there in the article!

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

0
 
Already_GoogledAuthor 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

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

0
 
Already_GoogledAuthor Commented:
oh that's it, thanks.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now