Monday, October 30, 2006

powerpointing

I was a bit annoyed about the ability of Powerpoint for playing embedded movies. Here a bit of information for that.

How PowerPoint 2003 Plays Multimedia Files in a Presentation
Adding Multimedia to a PowerPoint 2003 Presentation

Tuesday, October 17, 2006

movie converter

Very useful free software for converting movies.

http://ffmpeg.mplayerhq.hu/

though this is a command line software, input and output format is diverse.

available codecs:



Enumeration values:
CODEC_ID_NONE
CODEC_ID_MPEG1VIDEO
CODEC_ID_MPEG2VIDEO
CODEC_ID_MPEG2VIDEO_XVMC
CODEC_ID_H261
CODEC_ID_H263
CODEC_ID_RV10
CODEC_ID_RV20
CODEC_ID_MJPEG
CODEC_ID_MJPEGB
CODEC_ID_LJPEG
CODEC_ID_SP5X
CODEC_ID_JPEGLS
CODEC_ID_MPEG4
CODEC_ID_RAWVIDEO
CODEC_ID_MSMPEG4V1
CODEC_ID_MSMPEG4V2
CODEC_ID_MSMPEG4V3
CODEC_ID_WMV1
CODEC_ID_WMV2
CODEC_ID_H263P
CODEC_ID_H263I
CODEC_ID_FLV1
CODEC_ID_SVQ1
CODEC_ID_SVQ3
CODEC_ID_DVVIDEO
CODEC_ID_HUFFYUV
CODEC_ID_CYUV
CODEC_ID_H264
CODEC_ID_INDEO3
CODEC_ID_VP3
CODEC_ID_THEORA
CODEC_ID_ASV1
CODEC_ID_ASV2
CODEC_ID_FFV1
CODEC_ID_4XM
CODEC_ID_VCR1
CODEC_ID_CLJR
CODEC_ID_MDEC
CODEC_ID_ROQ
CODEC_ID_INTERPLAY_VIDEO
CODEC_ID_XAN_WC3
CODEC_ID_XAN_WC4
CODEC_ID_RPZA
CODEC_ID_CINEPAK
CODEC_ID_WS_VQA
CODEC_ID_MSRLE
CODEC_ID_MSVIDEO1
CODEC_ID_IDCIN
CODEC_ID_8BPS
CODEC_ID_SMC
CODEC_ID_FLIC
CODEC_ID_TRUEMOTION1
CODEC_ID_VMDVIDEO
CODEC_ID_MSZH
CODEC_ID_ZLIB
CODEC_ID_QTRLE
CODEC_ID_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ID_ADPCM_YAMAHA
CODEC_ID_ADPCM_SBPRO_4
CODEC_ID_ADPCM_SBPRO_3
CODEC_ID_ADPCM_SBPRO_2
CODEC_ID_AMR_NB
CODEC_ID_AMR_WB
CODEC_ID_RA_144
CODEC_ID_RA_288
CODEC_ID_ROQ_DPCM
CODEC_ID_INTERPLAY_DPCM
CODEC_ID_XAN_DPCM
CODEC_ID_SOL_DPCM
CODEC_ID_MP2
CODEC_ID_MP3
CODEC_ID_AAC
CODEC_ID_MPEG4AAC
CODEC_ID_AC3
CODEC_ID_DTS
CODEC_ID_VORBIS
CODEC_ID_DVAUDIO
CODEC_ID_WMAV1
CODEC_ID_WMAV2
CODEC_ID_MACE3
CODEC_ID_MACE6
CODEC_ID_VMDAUDIO
CODEC_ID_SONIC
CODEC_ID_SONIC_LS
CODEC_ID_FLAC
CODEC_ID_MP3ADU
CODEC_ID_MP3ON4
CODEC_ID_SHORTEN
CODEC_ID_ALAC
CODEC_ID_WESTWOOD_SND1
CODEC_ID_GSM
CODEC_ID_QDM2
CODEC_ID_COOK
CODEC_ID_TRUESPEECH
CODEC_ID_TTA
CODEC_ID_SMACKAUDIO
CODEC_ID_QCELP
CODEC_ID_DVD_SUBTITLE
CODEC_ID_DVB_SUBTITLE
CODEC_ID_MPEG2TS

from avcodec.h

Picks

Thursday, October 12, 2006

Image correlation using Igorpro

Question: How can I show the recemblance of the distribution of spotty signals?

Answer:

There could be two ways.

The first method I propose will give you a single parameter representing the similarity. An easy version of so called "Sum of Absolute Differences".

If shape of each receptor in two images are different (such as when you are labeling different molecules within the receptor complex or so), this will not work.

For comparison, it might be good to have a third image that is not similar (from other cells or so).

Let's say there are two images ch1 and ch2 (should have same row and column numbers). Since two images probably have different dynamic ranges, images must be normalized individually. For this, do "wavestats" and get the maximum pixel intensity.

> wavestats ch1

then you will have V_max. Duplicate the original image

> Duplicate ch1 ch1_norm

If ch1 was 8bit or 16bit, then convert ch1_norm to 64bit by

> Redimension/D test

then get the normalized image by

> ch1_norm = ch1 / V_max

Do similar with ch2.

Then what you could do is subtract the images and get its abs.

> Duplicate ch1_norm ch_difference
> ch_difference = abs(ch2_norm - ch1_norm)

then

> print sum(ch_difference)

will give you the sum of all differences between normalized images.
You could do the same thing with a third image (ch_control) which is NOT similar and get the sum of difference with the same procedure as above, between ch1 and ch_control. The value you get from ch1 and the third image should be much larger than that from ch1 and ch2.


Another way of is image correlation plot.
This can be done by first preparing two 1D waves ch1_int and ch2_int

> make/n=(Dimsize(ch1,0)*Dimsize(ch1,1)) ch1_int, ch2_int

then list all pixel intensities these 1D waves

> ch1_int[]= ch1[p - ( floor(p/Dimsize(ch1,0))*Dimsize(ch1,0))][floor(p/Dimsize(ch1,0))]
> ch2_int[]= ch2[p - ( floor(p/Dimsize(ch2,0))*Dimsize(ch2,0))][floor(p/Dimsize(ch2,0))]

> Display ch1_int vs ch_2_int

if ch1 and ch2 has similar pattern, then the scatter plot should show a linear correlation. Otherwise, the plot is dispersed. Plot might become more clear if you subtract the offset (background intensity) before you do the above calculation.

New ImageJ PlugIn picks

Erik Meijering has released MTrackJ, a plugin for manual tracking of moving objects and measurement of traveled distances and instant velocities.

Guy Levy has released ParticleTracker, a plugin for multiple particle detection and tracking from digital videos.