Archived

This topic is now archived and is closed to further replies.

Where can i find "Sharpen" codes?

This topic is 6152 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Yes,just like photoshop''s sharpen plugin,i wanna have my own code to process big count bitmap resources in short time and fast way,so i must code my own Sharpen tool.But where can i find a free code or algorithm about "Sharpen",any one helps me? thanks!

Share on other sites
Sharpen is the opposite of blur. Subtract neighboring pixels from the current pixel instead of adding.

Share on other sites
Its all about the convolution matrices, I hate them very much. Blur, sharpen, etc can be done with them. The java 2d tutorial has a section on that. <A HREF="http://java.sun.com/products/jdk/1.2/docs/guide/2d/spec/j2d-image.fm8.html"> Here </A>

Share on other sites
Here is a nice article by Endar Wiggin on digital filtering. It is from the Articles & Resources on this site under Programming - Graphics - Algorithms and Data Structures.

Share on other sites
[   0     -1/4      0  ][ -1/4      2     -1/4 ][   0     -1/4      0  ]

Share on other sites
I''ll explain BeerHunter''s post:

The current pixel is the one in the middle of that matrix. Adjacent pixels have corresponding positions in the matrix. The current pixel value is set to be the sum of tha values of all the adjacent pixels, but with the coefficients in the matrix. So what his matrix means is this:

newpixel =    0 * getpixel(x-1, y-1) +           -1/4 * getpixel(x  , y-1) +              0 * getpixel(x+1, y-1) +           -1/4 * getpixel(x-1,   y) +              2 * getpixel(x  ,   y) +           -1/4 * getpixel(x+1,   y) +              0 * getpixel(x-1, y+1) +           -1/4 * getpixel(x  , y+1) +              0 * getpixel(x+1, y+1);

In my first post I told you to subtract the surrounding pixels from the current pixel. This is a way to do that.

Share on other sites
I can code it now

1. 1
Rutin
46
2. 2
3. 3
4. 4
5. 5

• 13
• 10
• 12
• 10
• 13
• Forum Statistics

• Total Topics
632993
• Total Posts
3009763
• Who's Online (See full list)

There are no registered users currently online

×