ImageMan.Net Version 3 Summer 2012 Release
IsTextFlipped(ImImage,Int32) Method
See Also  Send Feedback
DTI.ImageMan Namespace > Analyze Class > IsTextFlipped Method : IsTextFlipped(ImImage,Int32) Method

ImImage to scan to see if text is upside down.
minAscenderCount default of 70

Glossary Item Box

Determines if the Text on this page was scanned upside down


Visual Basic (Declaration) 
Public Overloads Shared Function IsTextFlipped( _
   ByVal img As ImImage, _
   ByVal minAscenderCount As System.Integer _
) As System.Boolean
Visual Basic (Usage)Copy Code
Dim img As ImImage
Dim minAscenderCount As System.Integer
Dim value As System.Boolean
value = Analyze.IsTextFlipped(img, minAscenderCount)
public static System.bool IsTextFlipped( 
   ImImage img, minAscenderCount
public static function IsTextFlipped( 
   img : ImImage,
   minAscenderCount :
) : System.boolean;
Managed Extensions for C++ 
public: static System.bool IsTextFlipped( 
   ImImage* img, minAscenderCount
static System.bool IsTextFlipped( 
   ImImage^ img, minAscenderCount


ImImage to scan to see if text is upside down.
minAscenderCount default of 70

Return Value

Returns True if the text on this page is upside down.


This function will scan text characters on this page to see if this image was scanned in upside down. It will work with English documents using standard fonts of medium to high resolution. 100 dpi images or less may not all be detected with the default values, especially if there is little text in the image, but if you use the default values you should not get false positives either.

This function counts straight Ascenders "h" "b" "d" "k" (higher frequency letters in English, 12.6% total) and compares to straight descenders "p" "q" (lower frequency letters in English, 2.024% total). This function may work with other languages and Fonts, but should be tested extensively first, as the high frequency letters may differ, and diacritic marks may throw off the calculation.

There are optional parameters for this function allowing for adjustments for non standard documents, we encourage you to use the default or larger more stringent values, if you lower any of these values false positives are likely:

  • minAscenderCount - the minimum number of Ascenders needed to make the calculation, The higher this number the less likely you will get a false positive. But also the more text will need to be present on the page. The default for this value is 70.
  • minConfidence- The minimum confidence for determining both vertical ascenders and descenders. In other words how closely does the character glyph need to look like a filled in "b" or "d" or "p" or "q". The default value is 7.0.
  • minConfidenceRatio - The minimum confidence ratio when comparing ascenders to descenders. The default value is 2.5. In other words there should be at least 2.5 times more ascenders than descenders.

This function is not designed to work with landscape oriented text. Results will vary.


Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2014 Data Techniques, Inc. All Rights Reserved.