joeltong.org
27Feb/100

FLaser on Youtube

Hi there,

Just posted 2 videos from my FLaser Ver 1.0 (2 years ago) on Youtube.  You can view it here:

An excerpt:
Preamble:
This project proposes a cost-effective solution of interacting with a projector screen using a laser pointer, via an ordinary webcam.

The system was deployed and scripted in Flash Actionscript 3.0, back in Dec 2007 to Jan 2008.

It subsequently won the Most Innovative Award and Best Exhibit at the Singapore Shell Science Fair 2008, was shortlisted by MOE to represent Singapore in the Taiwan International Science Fair (TISF) 2008, in addition to being an exhibited finalist at the A*STAR Singapore Science and Engineering Fair (SSEF) 2009.

For more information, please checkout http://blog.joeltong.org/ .

Method:
The system comprises of a screen image from a projector. A webcam is positioned to track the projector screen area.

The steps for successful detection are as follows:
1. Calibration - 4 Red dots are shown on-screen. Thresholding red, the system is able to pick out the distance between the four red dots, demarking the tracked active area by the webcam. A ratio is then computed which is used to position the mouse.
2. A red laser dot is then shone onscreen. Minor adjustment knobs compensate for the offset in terms of the computed position of the laser dot and its actual position, similar to zeroing in using a crosshair.
3. The system is ready to track the laser pointer. In this case, a much high threshold is used, from the fact that red laser beams have a much higher intensity from the surrounding background.

System has been shown to detect laser dot despite showing red noise. However, alternative algorithms are being devised fo9r the system for better background noise tolerance.

Do checkout the version shown at Shell Science Fair @ LINK. System is targeted at rhe Flash platform, and for home users.

For more enquiries,

Email: me {at} joeltong {dot} org.

Thanks!

Best regards,
Joel Tong

http://blog.joeltong.org/

22Feb/100

Radial Thresholding in AS3 (Webcam)

Perhaps one of the things I would like to do before NS - build a radial threshold filter.

Conventional threshold filters are constant throughout. This is means that if let's say the image threshold value is 170, then that threshold value is applied to the WHOLE image. That is pretty bad for some cameras.

Back when I was working on my DSI project, I suggested implementing a radial threshold. Bah, not enough time then. This time, modular approach, OOP-based, voila.

My aim is to implement a radial threshold with a 2D-based function. In some webcams, the distribution of light may not be even, even though it IS even. It's just picked up with bias. For example, let's say we want the threshold to be a logarithmic function. Then we would use y = ln (x) or something (sometimes this works especially if you want the threshold to level out sooner than later.

All we have to do is then input this expression into the code, then by doing per-pixel iteration, we would be able to map that certain value for the specific pixel with the corresponding threshold value onto the image. Now, in this case we will be plotting 2 graphs: one of the image and another of threshold versus the length of the line from the origin (centre of circle).

See the pic for more info ;)

Hopefully I can make an implementation fast enough to be used for video manipulation in AS3 =D

22Feb/100

Random Filter Stuff

Been playing around with some filters in Flash.

Here's a few:

Laplacian of Gaussians i.e. difference of Gaussians - subtract 2 images of varying gaussian blurs to produce image.

Color exchange - flipping the colors using ColorMatrixFilter class.

Enjoy!

PS Just got my new iPhone, I am really in need of an SDK for Windows.  XCode anyone?  Help! =P

16Feb/100

Improved Image Viewer

Get Adobe Flash player

Happy Chinese New Year!! Been dabbling around with my image viewer class during my free time in the past few days. Still purely AS3, albeit with more stuff like:

  • Navigational bar
  • Caption support
  • Page left-page right flipping motion
  • Varied animations to choose from.  If you can't decide, leave it blank and it will randomize it for you.
  • Quite dynamic, and (compiled in CS3) it's only 15kB! xD
  • Auto screen-fit resizing

Screenshot as above! =D   Enjoy!

So, proprietary or open-source? =D

5Feb/100

Reflection

Hey,

I think the screen isn't as reflective as it should be. Hopefully it will work better on a wall? Haha. Anyways, thinking of doing this:

max contrast -> max saturation -> greyscale -> gaussian blur -> threshold -> final img.

Rgds,
Joel Tong

31Jan/100

Labs!

Hmm,

Labs is done. Still under much consturction though..

http://labs.joeltong.org/

Enjoy!

21Jan/100

Update on Today

Hey there,

Well spent some time looking at getid3() . Was trying to make a customized PHP to XSPF converter for Dingle using the getid3() package, but didn't manage to do so after staring 5 hours at the documentation. Haha. Probably would source for another library (if I have the time =P).

Anyways, came up with an auto-gen using PHP. So upload songs to directory, access localhost, and tada. =D

Anyone want to help convert the ID3 tags to XSPF format using PHP? PM me =D

See you @ the ASFUG meeting if you are going! It's this Sat.

PS Something to remember:

9 A man’s heart plans his way,
But the LORD directs his steps.
[Proverbs 16:9]

20Jan/100

Dingle MP3 Player Ver. 1.1.0

Hey,

Well Dingle Ver. 1.1.0 has been released. New features:

  • Dynamic resizing.  Aka, you can resize the MP3 player using HTML (@ runtime) using swfobject, swffit, etc.
  • 3 new visualizations.  To switch, enter a value (0 to 2) for the var DINGX_VISUALIZATION_TYPE found in Config.as (Your configurations file).
  • Menu added.
  • Usage and workable example (minus the songs, do your own XML list compilation) found in folder /deploy.

Things to add in future:

  • Buffering progress bar
  • autogenerated XML file using PHP.  Any takers? =P
  • in the XML file, hopefully I can rely on the duration entry for sound tracking.  Notice that if your sound is not precached, progress bar tends to change in terms of total bytes loaded.
  • DingX's 3D visualizations.  Still quite underdeveloped.

Download the source here: http://www.box.net/shared/1ke8nkn24c
See the preview here: http://www.joeltong.org/dingle/
PS Hopefully I can get my hands on CS4 / future CS5?  The Sound.extract() function seems quite promising.  Maybe sound manipulation at the byte level in future as a possible project?  =D

Update: A-SFUG conference this Saturday, Ogilvy Centre, 11am to 1pm.  See you there if you are going!

Rgds,
Joel Tong

18Jan/100

Flash MP3 Music Player w. Sound Spectrum visualizer (DingX)

Dingle Music Player w. Sound Spectrum visualizer (DingX)

Preview Released.  The specs:

  • AS3 coded, OOP modular approach
  • Backwards compatible with Flash CS3 and up
  • User Interface (UI) completely written in code.  i.e., you can include it in any source project, should run.
  • Editable XML song file.  Customizable songlist.
  • Workable Sound Spectrum Visualization powered by DingX.  Based on Flint and PV3D.  Choose from a range of visualizations found in the DingX library, and more.  See http://joeltong.org/dingx/examples.php.
  • Custom songlist written by me and uses free scrollbar (courtesy WarmForestFlash).
  • Auto-looping

Preview: http://joeltong.org/dingle/

http://joeltong.org/dingx/examples.php
17Jan/100

Dingle Music Player

Heh been building a music player over the past 2 days while I am sick...  Introducing DingX's cousin, Dingle! =D

Well okay. Dingle is a simple music player that supports DingX visualizations. Well, no surprise I hope? =P Screenshot as above (quality of screenshot is pretty bad). Probably might  go retail (or free?) in a couple of days time. Code needs some tidying up and additional eye candy yeah :)

Some features of Dingle:

  • Totally AS3 powered - no MC / Buttons / bg pics was used.  AKA, just compile and run!
  • Graphics, animation, etc. completely written in code!  Small file size because everything is written in CODE!
  • Based on OOP - meaning it is really modular.  Also features singleton classes for management.
  • Support for the sound spectrum visualizations using my DingX engine
  • XML support for songlist - easy updating!
  • Auto looping!

I might decide to put in a pause bar.  There's basically not much need for a stop button since you are already visiting that site =P

Cheers!