Wednesday, September 12, 2007
How to use MS Excel sheet to track portfolio
Then I thought how nice it would be if I can use it to calculate my capital gains from this sheet given the transactions. So I learnt some excel programming to come up with very crude way to do it. You can find this excel sheet here. And I have created one ppt with screenshots telling how to use it. You can download it here. Please let me know your feedback at my email id purohit under score arvind at the rate of yahoo.com
Wednesday, September 5, 2007
JPEG Encoding
Its quite long time since I blogged about what I am learning. Blogging should be a regular job. And regularity is toughness. Anyways here is what I have learnt today about JPEG Encoding
JPEG Encoding
JPEG is a lossy image compression and it exploits two limitations of human vision system
(1) We are more sensitive to brightness then the color
(2) We are more sensitive to color change at lower brightness over large area then at higher frequency brightness.
So to exploit it we do following things
(1) Convert RGB color space to YCbCr model. Then reduce Cb and Cr component by as much as half! Thus use limitation (1) listed above
(2) Now split images in 8x8 blocks.
(3) Each of the Y, Cb, and Cr component of this 8x8 block goes through DCT phase.
(4) Then we quantize the output of DCT.
(5) Once quantized we know which part belong to high frequency brightness and which one belong to low brightness. We compress high intensity component more aggressively or may discard them altogether. This is the step in which major loss of information occur in encoding. Here we are exploiting limitation (2) listed above
(6) Remaining components are encoded using lossless compression technique like Huffman Encoding.
Note: YCbCr is color model in which Y stands for Luma(brighness) and Cb and Cr stands for chrominance for blue and red.
Question: What is DCT? You can explore more on it.
Decoding should be the reverse process of it.
