CAPBAK/X, Ver. 5.2
RELEASE NOTES © Copyright 1999-2006 by Software Research, Inc. |
To obtain your copy of CAPBAK/X 5.2 if you already have the CAPBAK/X 5.1 software please contact SR using the Information Request Form.
The font training enhancement described below provide the option of using supplied font training files that handle the most-common:
Times Roman Courier MS-Line MS-San SerifCurrently, training is optimized to recognize fonts at 8, 10, and 12 point sizes, bold type inclusive. Our experience is that once PC-based text is emulated onto a UNIX X-Windowing environment, the most legible size is a 12 point PC-font due to the screen resolution difference between PC and UNIX hardware. MS-Windows emulations using UNIX standard color map is supported.
Another scenario is if managing software resides in UNIX and has not been nor will be ported to Windows yet the AUT is MS-Windows based. Supported PC-based fonts are listed in the preceding section.
We offer PC-UNIX font recognition without significant compromise to the recognition success rate. Based on this premise, we encourage users to select the most appropriate training file while testing their AUT.
If the AUT is MS-Windows based exclusively, use the PC-only OCR training file. On the other hand, if testing requires the monitoring of both UNIX and PC activity, use the PC-UNIX based OCR training file.
The enhancement described below gives the user additional options in selecting pixel values or rgb values. In turn, this gives the user a much more effective OCR recognition efficiency.
The problem is that the OCR engine fails if there is text embedded in complex images, e.g. red letters against a pink background. What is foreground and background affects what 1-bit plane derived image is sent to the OCR.
The difficulty is that the built-in dithering misleads the OCR engine; OCR tries to extract ASCII from a sloppy image.
If there is no $SR/ocr directory, or if $SR/ocr exists and does not contain either rgb.rc or pixel.rc, then CAPBAK/X acts normally using its own built-ins.
If $SR/ocr/pixel.rc exists, pixel.rc data is used even if $SR/ocr/rgb.rc exists.
If $SR/ocr/rgb.rc exists but $SR/ocr/pixel.rc does NOT exist, CAPBAK/X uses $SR/ocr/rgb.rc data.
These two capabilities give a user the ability to customize the CAPBAK/X OCR recognition in a way that maximizes the ability to extract useful ASCII information from a captured screen image.
foreground 000 000 000 120 120 120 122 147 210 064 064 064 ... (EOF)
background 255 255 255 120 120 120 255 200 195 ... (EOF)then the process will be the same, except that the specified colors are those which are mapped into the background, all others being mapped into the foreground.
background tolerancewhere255 255 255 120 120 120 255 200 195 ... (EOF)
Note that you can choose any 24-bit (3 x 8-bit) RGB value that is possible on the machine in this fashion. Every color that is given is put in as a foreground color in the derived image that is generated from the captured image and sent to the OCR engine.
You have to have at least one valid color or the file is ignored.
The file must begin with either foreground or background (see below) or the file is ignored and operation reverts to normal mode.
Normally this image contains derived pixels (actually, single bits) that are selected on the basis of known machine characteristics, properties of the color map settings, and several other factors. CAPBAK/X settings are pre-set to give effective use of the OCR capability on most machines, with most displays, and on most platforms.
for (all pixels in the candidate image) { for (each defined color in the list in rgb.rc) if (color of pixel = color in list) { derived-image-pixel = foreground = 1; stop the scan; } No match was found, so: derived-image-pixel = background = 0; } Activate the OCR engine using the derived image;Note: Because the innermost loop stops if a color-match is found between some color specified in the rgb.rc file and the current pixel, is will be best to put the color values in the rgb.rc file in the order that is most likely to match. For short lists of RGB values overall performance is not expected to be a problem. This will give the user the flexibility to specify a set of colors all of which are aggregated to be the foreground color.
The X Window system actually renders each colored pixel from a machine dependent set of three 16-bit color intensity values. There are X Window calls that extract a C structure from the actual three 16-bit quantities that are used on your system and show you what values are actually being used to generate your display. This is done via the X Window call XQueryColors(...);.
The three 8-bit rgb values that are specified in the table that a user specifies are converted into the same X Window structure with the function call XParseColor.
Hence, the comparison above (at the Noted line above) is done at this level, i.e. by comparing the outputs of these two function calls for the particular pixel in question.
Note that you specify the RGB values in your Xdefaults file, or in dozens of different ways within your application. The most common source for this information is the named colors in the file rgb.txt which is normally found /usr/lib/X11/.... The specific location will vary from system to system.
Note that $SR is an environment variable that points to the directory at which TestWorks is installed.
foreground 00 12 12 06 FF ...Reverse Pixel Specification Format If the pixel.rc file contains a different initial line, as follows:
background FF 36 25 ...then the process will be the same, except that the specified colors are those which are mapped into the background, all others being mapped into the foreground.
Note that any information on any line in the file from the 4th character and beyond is ignored.
Any lines not matching the above format generate an error message to standard output and are ignored.
Note that you can choose any 8-bit pixel value that is possible on the machine in this fashion. Every color that is given is put in as a foreground color in the derived image that is generated from the captured image and sent to the OCR engine.
You have to have at least one valid pixel specified or the file is ignored.
The file must begin with either foreground or background or the file is ignored and operation reverts to normal mode.
for (all pixels in the candidate image) { for (each pixel in the list from pixel.rc) if (actual pixel = pixel list) { derived-image-pixel = foreground = 1; stop the scan; } No match was found, so: derived-image-pixel = background = 0; } Activate the OCR engine using the derived image;
Obtaining rgb.rc Data: Use the values from rgb.txt at /usr/lib/X11.... Get color values from the xmag (supplied with X11) or some equivalent utility.
int cb_location_RGB8_color(x, y, r, g, b, tolerance) int x, y, tolerance; short r,g,b;
This function checks to determine if the RGB value of the pixel at location x,y matches the red, green and blue values specified by the r, g, and b parameters, within the tolerance specified and returns if so. Otherwise, 0 is returned.
The r,g,b are values for red, green and blue and must be between the value of 0 to 255.
Tolerance indicates a +/- percentage threshold from which the actual RGB value at the specified pixel can vary and still be considered a match. The tolerance parameter should have a value between -1 and 99, where -1 means use the default (+/- 2%) and 0 means an exact match. A higher value will mean that more colors on the screen will match the specified RGB value.
int cb_location_RGB16_color(x, y, r, g, b) int x, y; unsigned short r,g,b;
cb_location_RGB16_color is similar to cb_location_RGB8_color but allows one to specify the RGB values as 16-bit values. Since the Xserver stores colors in 16-bit RGB values this allows for an exact match to be made. There is no tolerance factor for this function call since only if the RGB value at pixel location x,y exactly matches the specified r,g,b will a 1 be returned.
r,g,b are values for red, green and blue and must be between the value of 0x0 to 0xFFFF.
In normal operation you should not experience any difficulty in playing back already existing recordings. The instabilities arise when you are making an Object Mode (OM) recording that requires that CAPBAK/X 5.2 be linked to your application using the special libSRXt.a library.
In cases when you provide the CAPBAK/X-linked application with "too much" input the synchronization modes between CAPBAK/X, your application, and the underlying windowing system will cause the application to abort. An example is when you vigorously move a slide bar back and forth as fast as you can for several seconds; the linked application may abort early in this interval, i.e. after one or two seconds, or it may get all the way through the ten-second interval successfully.
The workaround in this case is to re-record the session, if possibly being reasonably realistic about the speed at which you are making events happen.
Important note: The phenomena described above has NOT been reported on other platforms.
-b staticflag when linking these libraries.
This restriction applies whether the ld command or compiler commands are used to link your application.
Object Mode operation of CAPBAK/X Ver. 5.2 is not supported on releases of AIX older than Ver. 4.n. Testing and checkout of CAPBAK/X Ver. 5.2 has been performed only on AIX Ver. 4.2; however, no sites using the earlier versions of AIX have reported any difficulties.
Software Product License Agreement.