Primitive text direction feature detector

v.1.1 of text direction feature detector :)
Too much magic? 
Please describe what does each value mean. E.g. what is color threshold used for?