yeuchi

July 3, 2010

Waveform monitor

Filed under: Color, Flash — ctyeung @ 10:55 am

Old analog video requires white balance and color calibration with a specialized oscilloscope known as the waveform monitor.  Chuck Preston and I thought it would be fun to create this “retro”.  Ideally, we would like to add the knobs for adjusting color, white balance as other feature.  Maybe some day….

May 2, 2010

Truevision TARGA Encoder

Filed under: File format, Flash — ctyeung @ 8:29 pm

Another popular image format yet to be supported by Flash and Flex is Truevision TARGA (.tga) format (also see Encyclopedia of graphics format).   This format supports the popular 1, 8,16,  24, 32 bits per pixel for RGBA.  In addition, it also supports run length encoding (RLE) for compression.  I am still working on the decoding but encoding RGB24bpp and RGBA32bpp with no-compression is available here right now.  This feature has also been added to the ImageDEncoder project for demonstration purpose.

April 14, 2010

Point Distance, Rotate

Filed under: Flash — ctyeung @ 9:20 am

Trivial to write a distance equation or draw a polar chart but it is these trivial tasks that can bog down our application performance.  In our last FlashMN meeting, it is brought to my attention that the Flex Point class already has many commonly used features like distance, add, subtract, interpolate, normal, polar.   Doh! time to refactor !  Here is a simple Point demo.

Another common, trivial task, rotate display object from center.  RotateDemo

March 8, 2010

Graphics.drawPath()

Filed under: Flash — ctyeung @ 9:21 pm

I came across a really good article by Trevor McCauley on a number of new Graphics methods for Flash 10.

Thought I try 2 of his examples here, drawPath & winding.  Pretty impressive for finding overlapped area.

March 6, 2010

LineStyle and Fill with pixelbender

Filed under: Flash — ctyeung @ 5:56 pm

There are already many dashline classes written in actionscript.  But thought it will be fun to try it with pixelbender.  I must admit that the product is so-so.  But here is it, PBDashline as a raster filter.  Also added the new Flex 4 Graphics.lineShaderStyle() and Graphics.beginShaderFill() for the 2nd experiment “Vector”.  Color animation is a product of pixelbender filter from Pixelero.

February 16, 2010

Convolution filters for interpolation

Filed under: Flash — ctyeung @ 10:02 pm

By default, Flash and Flex offers nearest neighbor and bilinear interpolation if smooth=true.  A number of articles offer cubic spline interpolation to achieve better result for enlargement; the draw back is performance.  As an alternative, I am using convolution to achieve 2X magnification with the following kernels:  cubic spline, pyramid and box (rect function).  The implementation is done in pixelbender for speed and simplicity.  Note, I sacrifice the flexibility of arbitrary enlargement size.

Consider my demo and source.

Reference: Digital Image Processing (second edition) by William K. Pratt pages 441 – 445.

January 16, 2010

AIR 2.0 feature – launch default application

Filed under: Flash — ctyeung @ 9:31 pm

Wow, awesome feature.  Lesson, thanks to MNSWF and our very own Dustin of Easel Training.  Example here will detect a USB jump drive plugging in and launch the default application when you click on the file.

source-code, installer

I see now AIR 2.0 includes the ability to launch native application.

Here is an Adobe demo.

December 4, 2009

Boolean image operators

Filed under: Flash — ctyeung @ 11:29 pm

I really appreciate Flex BlendMode features.  To complement, here are some primitive boolean operators in pixel bender for 2 images.

Gates: AND, OR, NAND, NOR, XOR.

For demo and source code, try this Flash builder demo.

November 29, 2009

Adjust HSV

Filed under: Color, Flash — ctyeung @ 2:06 pm

Thought I would try applying HSV in pixelbender as well.  The  algorithm I am using maybe referenced from University of Haifa, Israel.  Please consider my Flex app. demo and pixelbender source (pbk).

November 27, 2009

Adjust CIE L*a*b*

Filed under: Color, Flash — ctyeung @ 11:41 pm

Thought I exercise on a pixelbender filter for adjusting brightness (L*), red<->green(a*), and yellow<->blue(b*) in CIE L*a*b* color space.  I am generalizing the sRGB to Tristimulus (XYZ) formulation and assuming D50 light source.

PixelBender source (pbk)Flex App. demo

Reference(s):

1) Principles of Color Technology, 2nd edition by Billmeyer & Saltzman.

2) http://en.wikipedia.org/wiki/SRGB

Older Posts »

Powered by WordPress