Friday, June 20, 2008

'Color Search' in Processing


Tulip, 100% complete
Originally uploaded by warpcat
I found inspiration in the 'Pixel Path' Processing work done by Craig Mackenzie, and wanted to try my hand at it.

In this sketch, it isolates every 5th pixel, and if it fist a certain HSB criteria, it finds every matching pixel in the image, and draws a line to it. Click on the image to be taken to my Flickr page to see more.

The class I authored to help with the color pixel search can be found on my Processing Wiki.

7 comments:

Chris Whitehead said...
This comment has been removed by the author.
Chris Whitehead said...

I now get a really odd error using the code from your wiki:

extecting DOT, found 'get colorPos'

AkEric said...

What line is it erroring on? I had some custom comments in my code which I stripped out, I may have introduced a typo when posting up on the wiki :(

AkEric said...

Ok, I fixed the code. You can go back to the wiki and get a working version.

Chris Whitehead said...

thank you. Much obliged....

Chris Whitehead said...

Tried ruuning the codeas specified in the Wiki:

Just get 'Type "ImageData" was not found'

AkEric said...

Hmm... I'm not sure what's wrong. I can copy and paste the code directly from the wiki into Processing and it works fine (other than changing the name of the image it's looking for). I just tried again, and got the expected results. You do need to copy both the class code block, and the example usage code block, and put them in the same sketch. Sounds like you're only using the example usage, without the class data as well.