Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

image::seek(3pm) [debian man page]

Image::Seek(3pm)					User Contributed Perl Documentation					  Image::Seek(3pm)

NAME
Image::Seek - A port of ImgSeek to Perl DESCRIPTION
use Image::Seek qw(loaddb add_image query_id savedb); loaddb("haar.db"); # EITHER my $img = GD::Image->newFromJpeg("photo-216.jpg", 1); # OR my $img = Imager->new(); $img->open(file => "photo-216.jpg"); # OR my $img = Image::Imlib2->load("photo-216.jpg"); # Then... add_image($img, 216); savedb("haar.db"); my @results = query_id(216); # What looks like this photo? remove_id(216); # Just remove id from database. DESCRIPTION
ImgSeek (http://www.imgseek.net/) is an implementation of Haar wavelet decomposition techniques to find similar pictures in a library. This module is port of the ImgSeek library to Perl's XS. It can deal with image objects produced by the "Imager" and "Image::Imlib2" libraries. EXPORT
None by default, but the following functions are available: savedb($file) Dumps the state of the norms and image buckets to the file $file. loaddb($file) Loads a database of image norms produced by savedb cleardb Clears the internal database. Note that "loaddb" will load into memory a bunch of data that you may already have - it will duplicate rather than replace this data, so results will be skewed if you load a database multiple times without clearing it in between. add_image($image, $id) Adds the image object to the database, keyed against the numeric id $id. This will compute the Haar transformation for a 128x128 thumbnail of the image, and then store its norms into a database in memory. remove_id($id) remove id from database, and you should "savedb" to save the changed database. query_id($id[, $results)) This queries the internal database for pictures which are "like" number $id. It returns a list of $results results (by default, 10); a result is an array reference. The first element is the ID of a picture, the second is a score. So for example: query_id(2481, 5) returns, in a shoot I have, the following: [ 2481, -38.3800003528595 ], [ 2480, -37.5519620793145 ], [ 2478, -37.39896965962 ], [ 2479, -37.2777427507208 ], [ 2584, -10.0803730081134 ], [ 2795, -7.89326129961427 ] Notice that the scores go the opposite way to what you might imagine: lower is better. The results come out sorted, and the first result is the thing you queried for. SEE ALSO
http://www.imgseek.net/ AUTHOR
Simon Cozens, <simon@cpan.org> Lilo Huang, <kenwu@cpan.org> All the clever bits were written by Ricardo Niederberger Cabral; I just mangled them to wrap Perl around them. COPYRIGHT AND LICENSE
Copyright (C) 2005 by Simon Cozens, 2008 by Lilo Huang This library is free software; as it is a derivative work of imgseek, this library is distributed under the same terms (GPL) as imgseek. perl v5.14.2 2008-02-09 Image::Seek(3pm)

Check Out this Related Man Page

img-png(3tk)															      img-png(3tk)

NAME
img-png - Img, Portable Network Graphics format (png) SYNOPSIS
package require Tk package require img::png ?1.3? image create photo ?name? ?options? DESCRIPTION
The package img::png is a sub-package of Img. It can be loaded as a part of the complete Img support, via package require Img, or on its own, via package require img::png. Like all packages of Img it does not provide new commands, but extends the existing Tk command image so that it supports files containing raster images in the Portable Network Graphics format (png). More specifically img::png extends Tk's photo image type. The name of the new format handler is png. This handler provides new additional configuration options. See section PNG OPTIONS for more detailed explanations. All of the above means that in a call like image create photo ?name? ?options? [1] Image data in png format (options -data and -file) is detected automatically. [2] The format name png is recognized by the option -format. In addition the value for the option is treated as list and may contain any of the special options listed in section PNG OPTIONS. PNG OPTIONS
The handler provides no true options at all, but accepts pairs of keys and values when writing a PNG file. Each pair will be written as a named text chunk where the key provides the name of the chunk and the value its contents. For example png Author <name> Title <title> Description ... TRANSPARENCY
If you want to write images to disk which contain transparency information (e.g. PNG with alpha channel) you need at least Tk 8.3. SEE ALSO
img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img- window, img-xbm, img-xpm KEYWORDS
image handling, png, tk COPYRIGHT
Copyright (c) 1995-2003 Jan Nijtmans <nijtmans@users.sourceforge.com> Img 1.3 img-png(3tk)
Man Page