Jump to content
  • Advertisement

Archived

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

darkworldgames

Where can i find "Sharpen" codes?

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!