0

I'm creating an application for which I need to convert color images to pencil sketches, for example see this.

answer at Implementing Modified Sketch generation in Java gives similar effect but not quite what I want(as shown in the example above). Can someone tell me how to get the desired sketch effect in java?

Also, are there any cookbook type resources/blogs/books/open-source-library which show the java(or any other language) code for various kind of fun looking effects to images?

Community
  • 1
  • 1
Himanshu
  • 81
  • 1
  • 7

2 Answers2

4

In last couple of days I researched this and was able to get the desired sketch effect using java. I've posted it on my blog.

Pseudocode looks like following..

s = Read-File-Into-Image("/path/to/image")
g = Convert-To-Gray-Scale(s)
i = Invert-Colors(g)
b = Apply-Gaussian-Blur(i)
result = Color-Dodge-Blend-Merge(b,g)

I found following open source code useful...

JH Labs image filters

Processing Programming Language (http://code.google.com/p/processing/)(couldn't make this a hyperlink, it seems I don't have enough reputation to post more than 2 hyperlinks :) )

Himanshu
  • 81
  • 1
  • 7
0

The Java Advanced Imaging library has some demos which shows some basic effects on images.

Jeff Foster
  • 43,770
  • 11
  • 86
  • 103
  • thanks, I looked at it but couldn't get time to run/try the demos. It seems like good resource though. – Himanshu Apr 30 '11 at 10:56