Softek Barcode Reader Toolkit for Apple OSX (英語版)
イメージファイルからバーコードを読み込みます。
Softek Software 社の製品
2004 年より日本国内にてComponentSourceで販売中。
The Softek Barcode Toolkit for Apple OSX は TIF と JPG ファイルからバーコードを読み込みます。画像処理アプリケーションがツールキットをスキャンされたドキュメントからバーコードストリングを読むために使い、データベーステーブルに対してそれらを相互参照することができます。ツールキットは Shell と「C」プログラミングインターフェース両方をサポートしてすべての一般的なバーコードフォーマットをサポートします。
The Softek Barcode Toolkit enables application programmers to read barcodes from image files. The image files can be from any source, but will typically come from a scanner or computer fax modem. The barcode recognition engine is contained in a single library file, which makes product upgrades a simple matter. The application programmer can use either the Shell or the 'C' interface. The choice of interface will depend on the type of language being used and the type of application to be developed.
A few lines of code are all that is needed to read a barcode from an image. As can be seen from this example using the 'C' interface:
hBarcode = STCreateBarCodeSession() ;
bar_count = STReadBarCode(hBarcode, file, 0, &bar_codes, &bar_codes_type) ;
for (i = 0; i < bar_count; i++)
{
printf ('Barcode = %s\n', bar_codes[i]) ;
}
Using the Shell interface is even simpler:
$ ./bardecode -t any -j 1 -f file.tif
1234567890
Image Formats:
The following types of barcode are currently supported:
Barcode Widths:
The main requirement is for each black or white bar in a barcode to be clearly visible on the image. All barcodes have at least 2 sizes of bar and the image needs to be of high enough quality to show this. For example, a Code 39 barcode consists of 9 bars per character, of which 3 must be wide and 6 must be narrow. The wide bars should be around 2.5 times the size of the narrow bars - but for simplicity we will say 2 times the size. This means that each character needs at least 12 pixels in an image. This assumes that each pixel in the image lies either entirely in a black bar or entirely in a white bar. In practise, this isn't possible and so the resolution should allow around 36 pixels per character.
So, to encode a string of 10 characters (including the start and stop *) you will need at around 360 pixels. If the barcode is 1 inch wide on the paper then you will need to scan at a resolution of around 400 DPI. If the barcode is 2 inches wide then you will need to scan at a resolution of at least 200 DPI.
Some types of barcode have more than 2 widths of bar and a higher resolution still will be needed to ensure that the different widths can be distinguished on the image.
As for barcode height - if you have a very wide barcode then you need to ensure that it is high enough to cope with any skewing that takes place when the image is scanned.
In summary - the success of a project can depend on specifying the correct barcode size and image resolution.