Jump to content

Selfmade image blur filter

konstantin magnus

Recommended Posts

Could anyone please give me some advice on how to program a simple box filter in COPs using python or VEX? Basically calculating the average of every pixel and its immediate surrounding pixels over and over again?

I created one in a VOPCOP2filter, but due to the lack of a foreach-node in COPs I cant repeat it multiple times without copying nodes over and over again (see attachment).


Edited by konstantin magnus
Link to comment
Share on other sites

You have to loop through samples. Fortunately a lot of COP nodes are written in VEX (I assume by our legendary Mark?) that you can check out to learn how to write your own box blur. I think Radial Blur should be the closest to what you need.

Link to comment
Share on other sites

@yader: i solved other tasks with vops and wanted to replace 'premade' nodes by custom ones (mainly for learning reasons, the feeling to know whats happening and for having it done by myself : )

@eetu: afaik for-loops dont loop over the latest result but just over the same input again and again?

@magneto: great hint!


thank you for the answers!

Link to comment
Share on other sites

Ah yeah, sorry, I read too fast. I thought you wanted a loop for taking many samples/taps for the blur.


For a special case you could set up a feedback loop with file write/read, but it doesn't really suit a general purpose node ;)

Or, you could make it an HDA with a few of those VOP nodes inside, but that would of course mean a fixed number of passes..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...