Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convolution Mask

Status
Not open for further replies.

Jecca

Technical User
Joined
Mar 10, 2003
Messages
3
Location
GB
Can anyone help me with this problem?
I need to create a convolution mask that will emboss a rectangular button. I am having real trouble figuring out how to do this. The following masks have not worked for me:
-1 -2 -1
0 0 0
1 2 1

-1 0 0
0 0 0
0 0 -1

-1 -1 0
-1 0 1
0 1 1

Thanks
 
The last one should work if you change the centre '0' to a '1'.
 
OK you two I simply have to know just what is a convolution mask?

Who knows, I may already need one and I don't even know what it is!!
 
Filter > Other > Custom...

It allows you to create your own filters (although in a pretty limited way). The center box represents a pixel, and the surrounding boxes represent the surrounding pixels. Set the center box to 1 to leave it unchanged, or a larger value to make it brighter. Using scale & offset, you can fine tune the results, and adding values in the surrounding boxes is neccessary to get any worthwhile effect. In this case,

Code:
-1 -1  0
-1  1  1
 0  1  0

...this will create an embossed effect.
 
Thank you very much, I feel much better now.
 
Whoops! I meant

Code:
-1 -1  0
-1  1  1
 0  1  1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top