Tag Archive for 'pixelblender'

HSV Threshold using pixelblender

It can be very usefully for a blob tracking technics

Example

Usage

// HSV PIXEL BLENDER FILTER
[Embed("HSV_Threshold.pbj", mimeType="application/octet-stream")]
private var hsvShader:Class;
private var hsv:Shader = new Shader(new hsvShader as ByteArray);

...

/// RED /// /// /// /// /// /// /// /// /// //

hsv.data.HueMin.value = [275.0]
hsv.data.HueMax.value = [ 35.0]
hsv.data.SatMin.value = [ 40.0]
hsv.data.SatMax.value = [100.0]
hsv.data.ValMin.value = [ 40.0]
hsv.data.ValMax.value = [100.0]

yourBitmapData.applyFilter(yourBitmapData, yourBitmapData.rect, new Point(0,0), new ShaderFilter(hsv));

Shader source