Never never!

Never-Never-NEVER open file for reading until you think twice what mode (text/binary) of operation do you need!!

How to compare video metrics

There are specific databases which were subjectively tested. Ans MOS was calculated
for example
http://www.ponomarenko.info/tid2008.htm
you can download database and compare your metric to MOS by Spearman correlation

SSIM metric for video

See good explanation is in

Title: Handbook of image and video processing 
Author(s): Bovik A. (ed.)
Series: Periodical:
Publisher: Elsevier Academic Press 
Year: 2005 
Edition: 2ed.
Language: English 
Pages: 1429
ISBN: 9780121197926, 0121197921

SSIM по русски

Нужно будет тут записать как работает метрика SSIM по человечески

Replace \n in Microsoft word

To replace new lines in word use "^13" whild-char. "^p" doesn't work :(

Tips for debugging of video processing console

Assume we have Visual Stusio solution for console that makes some video processing.
The console takes two input videos and generates the third video:
Console.exe --input1 video1.avi --input2 video2.avi --output result.avi
While debugging we need to run console on several datasets.
1) dataset1 conststs of videos set1_video1.avi and set1_video2.avi
2) dataset2 conststs of videos set2_video1.avi and set2_video2.avi
....
n) ....

It seem rather convenient to distrubute videos between folders. One folder for each dataset. Insise the folder we should give template names to files (e.g. video1.avi and video2.avi)
Therefore now we can set "Command Arguments" in "Project Properties->Configuration properties->Debugging" the same arguments for all cases and configurations,
The thing should vary is "Working directory" in "Properties->Configuration properties->Debugging".


Another usefull thing is setting  "Environment". Just write there
PATH=%PATH%;<path to dll>
and you don't need to copy all dependency dll's in every debug folder. 

Bjontegaard metric. Matlab script.



Bjontegaard metric (BD-PSNR) describes the distance between two RD-curved. I is useful to determine how big is the gain between "before" and "after" versions. Or determine what curve is better if they have complex form (for example, intersecting).

I found matlab script, that calculates BD-PSNR, but it was not correct. The limits of integration were wrong. Difference between two curves can be calculated only in the area of thein projections intersection.
Fixed script was verified by data provided the auther of the metric.

Download
fixed matlab script for BD-PSNR calculation
github
original paper (doc)
data for verification (xls)



Original publilcation:
G. Bjontegaard, “Calculation of average PSNR differences between RD-curves (VCEG-M33),” in
VCEG Meeting (ITU-T SG16 Q.6), Austin, Texas, USA, Apr. 2001

Problems with debug run from Visual Studio with openMP

I had a problem while running debug+openmp configuration of my console. Meanwhile in Release+openmp configuration everything is ok. Diagnostic message I see is something about wrong parallel configurations, system log and sxstrace.exe.

The solution is following.
Folder
Microsoft.VC90.DebugOpenMP
with files
Microsoft.VC90.DebugOpenMP.manifest
vcomp90d.dll 
were missing. I knew this problem for the folder I specify in debug properties in visual studio:
In that folder I already had Microsoft.VC90.DebugOpenMP. But to avoid error I should place it in output directory (where my binary exe file is placed):

Magick...

Another place with boost binaries

http://boost.teeks99.com/ - Another place with boost binaries. It includes build for version 1.49

Before I new only http://www.boostpro.com/download/

Error spawning cmd.exe

I got error message 
Error spawning cmd.exe
during compiling of Blender sources.
The cause was in system PATH environment variable. Some buggy software I had installed and uninstalled before erased all contents of PATH. So I found out that Visual Studio 2008 has missing paths to
%SystemRoot%\system32;
%SystemRoot%;
%SystemRoot%\System32\Wbem;
A added it and the problem gone. 

Blogs about blender

Overview of open-source node-based video editors (composers)

Synapse Compositor

Seems unsupported for a long time
Very raw






Blender

Good staff, but it is designed originally for 3D modeling. Video editing is performed in composing mode. Rendering is veeery sloooowww. Open source. Available for linux and windows.
Source code: http://gitorious.org/blenderprojects/

Image resize in Nuke

So here we have two filters:
1) Crop
2) Reformat

To cut a part from an image we use Crop. It also has option "reformat". Reformat cuts also borders behind area. If "Reformat" is disabled, black borders remain after crop.