Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

puzzle_set(3) [debian man page]

debian::manpages::puzzle_set(3) 										   debian::manpages::puzzle_set(3)

puzzle_set_max_width, puzzle_set_max_height, puzzle_set_lambdas, puzzle_set_p_ratio, puzzle_set_noise_cutoff, puzzle_set_contrast_barrier_for_cropping, puzzle_set_max_cropping_ratio, puzzle_set_autocrop - set tunables for libpuzzle functions SYNOPSIS
#include <puzzle.h> int puzzle_set_max_width(PuzzleContext *context, unsigned int width); int puzzle_set_max_height(PuzzleContext *context, unsigned int height); int puzzle_set_lambdas(PuzzleContext *context, unsigned int lambdas); int puzzle_set_p_ratio(PuzzleContext *context, double p_ratio); int puzzle_set_noise_cutoff(PuzzleContext *context, double noise_cutoff); int puzzle_set_contrast_barrier_for_cropping(PuzzleContext *context, double barrier); int puzzle_set_max_cropping_ratio(PuzzleContext *context, double ratio); int puzzle_set_autocrop(PuzzleContext *context, int enable); DESCRIPTION
While default values have been chosen to be ok for most people, the puzzle_set_*() functions are knobs to fit the algorithm to your set of data and to your applications. LAMBDAS
By default, pictures are divided in 9 x 9 blocks. 9 is the lambdas value, and it can be changed with puzzle_set_lambdas(). For large databases, for complex images, for images with a lot of text or for sets of near-similar images, it might be better to raise that value to 11 or even 13. However, raising that value obviously means that vectors will require more storage space. The lambdas value should remain the same in order to get comparable vectors. So if you pick 11 (for instance), you should always use that value for all pictures you will compute a digest for puzzle_set_p_ratio(). The average intensity of each block is based upon a small centered zone. The "p ratio" determines the size of that zone. The default is 2.0, and that ratio mimics the behavior that is described in the reference algorithm. For very specific cases (complex images) or if you get too many false positives, as an alternative to increasing lambdas, you can try to lower that value, for instance to 1.5. The lowest acceptable value is 1.0. MAXIMUM SIZES
In order to avoid CPU starvation, pictures won't be processed if their width or height is larger than 3000 pixels. These limits are rather large, but if you ever need to change them, the puzzle_set_max_width() and puzzle_set_max_height() are available. NOISE CUTOFF
The noise cutoff defaults to 2. If you raise that value, more zones with little difference of intensity will be considered as similar. Unless you have very specialized sets of pictures, you probably don't want to change this. AUTOCROP
By default, featureless borders of the original image are ignored. The size of each border depends on the sum of absolute values of differences between adjacent pixels, relative to the total sum. That feature can be disabled with puzzle_set_autocrop(0), any other value will enable it. puzzle_set_contrast_barrier_for_cropping() changes the tolerance. The default value is 5. Less shaves less, more shaves more. puzzle_set_max_cropping_ratio() : this is a safe-guard against unwanted excessive auto-cropping. The default (0.25) means that no more than 25% of the total width (or height) will ever be shaved. RETURN VALUE
Functions return 0 on success, and -1 if something went wrong. AUTHORS
Frank DENIS libpuzzle at pureftpd dot org SEE ALSO
libpuzzle(3), puzzle-diff(8) 2012-03-28 debian::manpages::puzzle_set(3)

Check Out this Related Man Page

PCOMPOS(1)						      General Commands Manual							PCOMPOS(1)

pcompos - composite RADIANCE pictures. SYNOPSIS
pcompos [ -h ][ -x xres ][ -y yres ][ -b r g b ][ -lh h ][ -la ] [ -t min1 ][ +t max1 ][ -l lab ][ =SS ] pic1 x1 y1 .. or pcompos [ -a ncols ][ -s spacing ][ -o x0 y0 ][ options ] pic1 pic2 .. DESCRIPTION
Pcompos arranges and composites RADIANCE pictures and sends the result to the standard output. Each input picture must be accompanied by an anchor point (unless the -a option is used, see below). This anchor point is the usually position of the picture's left lower corner in the final output, but can be changed for individual pictures with an =SS option, where S is one of '-', '+' or '0', indicating the minimum, maximum or center of the image, respectively. (For example, =+- would indicate the anchor is relative to the right lower corner, and =-0 would indicate the anchor is relative to the center of the left edge.) Negative anchor coordinates result in the input being cropped at the origin. By default, the size of the output picture will be just large enough to encompass all the input files. By specifying a smaller dimension using the -x and -y options, input files can be cropped at the upper boundary. Specifying a larger dimension produces a border. The -b option specifies a background color to appear wherever input files do not cover. The default value is black (0 0 0). The -h option may be used to reduce the information header size, which can grow disproportionately after multiple runs of pcompos and/or pcomb(1). If input files overlap, later pictures will overwrite earlier ones. By default, input files are copied unconditionally within the output boundaries. The -t option specifies a lower threshold intensity under which input pixels will not be copied to the output. The +t option specifies an upper threshold. These options are useful for cutting around irregular boundaries in the input. The -l option can be used to specify a label for a specific picture, which will be given a height determined by the -lh option (default 24 pixels) and placed in the upper left corner of the picture. This label is generated by the program psign(1). The -la option instructs pcompos to label each picture automatically by its name. This is particularly useful in conjunction with the -a option for producing a catalog of images (see example below). The -l option may still be used to override the default label for a picture. The -a option can be used to automatically compute anchor points that place successive pictures next to each other in ncols columns. The ordering will place the first picture in the lower left corner, the next just to the right of it, and so on for ncols pictures. Then, the next row up repeats the pattern until all the input pictures have been added to the output. If the pictures are of different size, pcompos will end up leaving some background areas in the output picture. There will also be an unfinished row at the top if the number of pictures is not evenly divided by ncols. The -s N option will cause each image to be separated by at least N pixels. The -o x0 y0 option specifies a nonzero anchor point for the bottom left image. The standard input can be specified with a hyphen ('-'). A command that produces a RADIANCE picture can be given in place of a file by preceeding it with an exclamation point ('!'). EXAMPLE
To put a copyright label at the bottom of a picture: psign Copyright 1987 | pcompos inp.hdr 0 0 +t .5 - 384 64 > out.hdr To make a catalog of images separated by white 10-pixel borders: pcompos -la -a 4 -s 10 -b 1 1 1 dog*.hdr > alldogs.hdr NOTES
Since there is a limit to the number of open files and processes, large collections of images must be created in stages. Even if the sys- tem limit on open files is large, pcompos places an artificial limit of 1024 on the number of open files and/or processes. AUTHOR
Greg Ward SEE ALSO
getinfo(1), pcomb(1), pfilt(1), psign(1), rpict(1) RADIANCE
12/18/97 PCOMPOS(1)
Man Page

Featured Tech Videos