Thursday, January 10, 2008
Quartz Composer Patch : Color Distortion Maps, YUV
/* Published by b-l-a-c-k-o-p.com
Copyright (c) 2007-2009

SAMPLE: QameraYUVMunge.qtzThis kernel distorts the color in the image using two source image "maps". Each image map is evaluated as a greyscale value. This results in an average brightness from 0.0 ... 1.0. Using 0.5 as the center, the source pixel is adjusted in the U and V color axes by the displacements from the maps. The effect is blended back into the source pixel according to amount_normal.

kernel vec4 msBlackColorDisplaceYUV(sampler image, sampler distort_u_map, sampler distort_v_map, float amount_normal)
float input_amount = clamp(amount_normal,0.0,1.0);
float inverse_amount = 1.0-input_amount;
const vec3 rgb_y = vec3(0.257, 0.504, 0.098);
const vec3 rgb_u = vec3(-0.148, -0.291, 0.439);
const vec3 rgb_v = vec3(0.439, -0.368, -0.071);
const vec3 yuv_r = vec3(1.0000, 0.0000, 1.4022 );
const vec3 yuv_g = vec3( 1.0000, -0.3457, -0.7145);
const vec3 yuv_b = vec3(1.0000, 1.7710, 0.0000);

vec4 pixel = sample(image, samplerCoord(image));
vec3 pel = pixel;
vec3 distort_u = sample(distort_u_map, samplerCoord(distort_u_map));
vec3 distort_v = sample(distort_v_map, samplerCoord(distort_v_map));

float delta_u = clamp((distort_u.x+distort_u.y+distort_u.z)/3.0,0.0,1.0)-0.5;
float delta_v = clamp((distort_v.x+distort_v.y+distort_v.z)/3.0,0.0,1.0)-0.5;
vec3 pixel_yuv;
pixel_yuv.x = dot(pel,rgb_y);
pixel_yuv.y = dot(pel,rgb_u);
pixel_yuv.z = dot(pel,rgb_v);

pixel_yuv.y = clamp(pixel_yuv.y + delta_u,0.0,1.0);
pixel_yuv.z = clamp(pixel_yuv.z + delta_v,0.0,1.0);

pel.r = dot(pixel_yuv,yuv_r);
pel.g = dot(pixel_yuv,yuv_g);
pel.b = dot(pixel_yuv,yuv_b);

vec3 result = (input_amount*pel) + inverse_amount*vec3(pixel);

return vec4(result.r, result.g, result.b,pixel.a);


By : Ms. Black Color Distortion Maps, YUV




 B-L-A-C-K-O-P NEWS   
 B-L-A-C-K-O-P HOME   
 DIY Greenscreen   
 3D Webcam Mac   
 USB 3D webcam   
 CamCamX Blog   
 CatEye Blog   
 DotMatrix Blog   
 GrabberRaster Blog   
 Qamera Blog   
 Watermarks Blog   
 PDF Watermarking Mac   
 PDF Combine Mac   
 Combine PDF Files   
 Create iTunes Booklet   
 Share Your Pictures   
 Washington DC   
 Universal Binary   
 Cocoa Programming   
 Cocoa Software   
 Screen Capture   
 Screen Grab Mac   
 iSight download   
 iSight software   
 PhotoBooth download   
 MacBook Camera   
 iMac Camera   
 CamCamX compatibility   
 Fake WebCam Mac   
 VJ Software Mac   
 Video Mixer Mac   
 Live Video Switcher   
 Apple Webcam Effects   
 Webcam Video Effects   
 Free iChat Video Effects   
 Skype Video Effects Mac   
 Video Effects Stickam   
 iSight Virtualizer Mac   
 Webcast Streaming Mac   
 Best Screencast Mac   
 Desktop Streaming Mac   
 Screencast Streaming Mac   
 Broadcast Live Streaming Video Mac   
 QuickTime Broadcaster   
 Quartz Composer   
 Quartz Composer Plugins   
 Quartz Composer Patches   
 Mogulus Video FX   
 Video Effects Ustream   
 Operator11 Video FX   
 Youtube Video Effects   
 Facebook Video Effects   
 Polaroid Camera Emulator   
 No recording device found   
 Photo Booth cannot open the camera   
 Free Download/Telechargez   
 Liberi Trasferimento   
 Libere la Transferencia   

Copyright © 2005-2009
All Rights Reserved