10.7

OpenCV Contours & Convex Hull 2 Structure plugin [DEPRECATED] (Composition by benoitlahoz)

Author: benoitlahoz
License: Public Domain
Date: 2011.10.19
Compatibility: 10.6, 10.7
Categories:
Required plugins:
Kineme GL, Carasuelo OpenCV

[EDIT 20120124 - UPDATED - please see this post now : http://kineme.net/composition/benoitlahoz/BlobTrackingPluginCarasueloOpenCV002a]

My first OpenCV plugin : it gets the contours and convex hulls present in the input image and output a structure of lines structure.

Very-alpha-version : it doesn't support for the moment a difference between the image size and the renderer size, but I'm working on it.

(BTW : i'm looking for a way to get the renderer size in pixels inside of my program... if someone knows how to do this :-/)

I didn't use the Canny filter which slows a lot the comp. I would be interested to know the performance on others machine than mine.

TODO :

  • Track blobs [EDIT : done in the new plugin, see below]
  • Delaunay Triangulation
  • Output Image (arghhh)
  • ...

Thanks to Mirek OpenCV plugin that helped me to understand how to convert the input image to OpenCV. Thanks to Mehmet for the threshold CIKernel.

Works in 32/64 bits

Dither Circles (Composition by gtoledo3)

Author: gtoledo3
License: Creative Commons Attribution-NoDerivs
Date: 2011.10.08
Compatibility: 10.4, 10.5, 10.6, 10.7
Categories:
Required plugins:
(none)

I was looking at Toneburst's port of a webGL crosshatch shader, and I thought the idea of writing different fragment colors and maybe shapes, depending on luminance, was really interesting.

I setup this shader to draw circles that are dependent on luminosity from depth channel.

For four steps of depth, you can control the inner/outer color of the circle, control the interpolation between inner and outer color, void out an area in the middle of the circle (or make it bigger than the outer circle radius, to draw a "smaller" dot than the main circle size).

I don't know if it's really appropriate to call it a dither shader at this point, but I did start with the the crosshatch mono - I deleted all of the "if" stuff after each luminance step, and inserted the code to draw the circles, which was based on this example @ http://people.freedesktop.org/~idr/OpenGL_tutorials/03-fragment-intro.html

The "inner circle" discards kind of "build up" in steps. So, if the first Circ_Inner has a value, all of the subsequent ones will have holes too - you can "add" in bigger holes, or change inner/outer values to kind of tweak around that. It was easier than setting up more conditional statements, and this was just a fun endeavor anyway. :-)

Voronoi Shader (Interactive - reworked from p_g) (Composition by gtoledo3)

Author: gtoledo3
License: Creative Commons Attribution-NonCommercial-NoDerivs
Date: 2011.10.06
Compatibility: 10.6, 10.7
Categories:
Required plugins:
(none)

I was reading:

http://edotprintstacktrace.blogspot.com/search?updated-max=2011-02-01T12...

...and there was a really interesting shader, and video. The video showcased four interactive areas, making a voronoi, totally with a pixel shader, and I thought it was pretty cool.

The showcased code only had it setup for three areas, and there was no real setup / qtz, etc., so it was a bit of a fun challenge to add in the extra yellow area to do what it was doing in the video.

Pulse Multitouch (originally by Danguafer/Silexars, ported to work with Multitouch) (Composition by gtoledo3)

Author: gtoledo3
License: Creative Commons Attribution-NoDerivs
Date: 2011.10.05
Compatibility: 10.5, 10.6, 10.7
Categories:
Required plugins:
kineme multitouch

This is Pulse by Danguafer/Silexars(2010) from the ShaderToy collection, changed to work with multitouch.

The original fragment code is below:

//Pulse by Danguafer/Silexars(2010)
uniform float time;
uniform vec2 resolution;
uniform vec4 mouse;
uniform sampler2D tex0;
 
void main(void)
{
    vec2 halfres = resolution.xy/2.0;
    vec2 cPos = gl_FragCoord.xy;
 
    cPos.x -= 0.5*halfres.x*sin(time/2.0)+0.3*halfres.x*cos(time)+halfres.x;
    cPos.y -= 0.4*halfres.y*sin(time/5.0)+0.3*halfres.y*cos(time)+halfres.y;
    float cLength = length(cPos);
 
    vec2 uv = (gl_FragCoord.xy/resolution.xy+(cPos/cLength)*sin(cLength/30.0-time*10.0)/25.0);
    vec3 col = texture2D(tex0,uv).xyz*50.0/cLength;
 
    gl_FragColor = vec4(col,1.0);
}

Shader Toy Collection - 704 (Composition by cybero)

Author: cybero
License: Creative Commons Attribution-NonCommercial-ShareAlike
Date: 2011.10.05
Compatibility: 10.5, 10.6, 10.7
Categories:
Required plugins:
Audio Tools

One of a collection of 29 fragment shaders ported over from the collection of 41 hosted at Shader Toy [http://www.iquilezles.org/apps/shadertoy/]. GLSL shader '704' by Paulo Falcao (2010).

Amazingly enough. considering the fact that some of the 41 posted at Shader Toy and indeed some the 29 shaders posted here didn't execute correctly in Firefox 7.0, almost all were directly ported into QC without any problem at all.

The contributing GLSL fragment shader authors are Adrian Boeing, Auld, Danguafer/Silexars, Lars Huttar, L.Mallet, Mic, Psycho/Loonies, Paulo Falcao, Simon Green/NVidia, TGGC/BluFlame, Tigrou, Viktor Korsun, W.Yutani, XT95/FRequency, xTr1m/BluFlame and iq/rgba.

Thanks to them all for these GLSL goodies. They work neatly in Quartz Composer. Some of the remaining shaders posted at Shader Toy I failed to port, whilst others ported, but performed very slowly indeed. Currently they are not included in this collection, although they do produce quite outstanding results and are well worthwhile exploring further.

The music file included in the archive below is an original Garageband mixdown of mine.

The music file in the video post is 13 by Teeth Mountain - Copyright: Attribution-Noncommercial-Share Alike 3.0 United States: http://creativecommons.org/licenses/by-nc-sa/3.0/us/ Composer: Teeth Mountain