4.1 Introduction

/bf VIPS reference documentation is in the process of switching to gtkdoc. Half-done manuals are distributed with VIPS, and they should be all done by the next version.

In the meantime, this old and slightly outdated chapter has been left unchanged from the previous version.

This chapter introduces the functions available in the VIPS image processing library. For detailed information on particular functions, refer to the UNIX on-line manual pages. Enter (for example):

example% man im_abs

for information on the function im_abs().

All the comand-line vips operations will print help text too. For example:

example% vips im_extract  
usage: vips im_extract input output  
  left top width height band  
where:  
        input is of type "image"  
        output is of type "image"  
        left is of type "integer"  
        top is of type "integer"  
        width is of type "integer"  
        height is of type "integer"  
        band is of type "integer"  
extract area/band, from package  
  "conversion"  
flags: (PIO function)  
  (coordinate transformer)  
  (area operation)  
  (result can be cached)  
vips: error calling function  
im_run_command: too few arguments

Once you have found a function you need to use, you can call it from a C program (see §2.1), you can call it from C++ or Python (see §1.1), you can call it from the nip2 ((see the nip Manual), or SIAM graphical user-interfaces, or you can run it from the UNIX command line with the vips program. For example:

$ vips im_vips2tiff cam.v t1.tif none  
$ vips im_tiff2vips t1.tif t2.v.v 0  
$ vips im_equal cam.v t2.v t3.v  
$ vips im_min t3.v  
255

VIPS may have been set up at your site with a set of links which call the vips program for you. You may also be able to type:

$ im_vips2tiff cam.v t1.tif none  
$ im_tiff2vips t1.tif t2.v.v 0  
$ im_equal cam.v t2.v t3.v  
$ im_min t3.v

There are a few VIPS programs which you cannot run with vips, either because their arguments are a very strange, or because they are complete mini-applications (like vips2dj). These programs are listed in table 4.1, see the man pages for full details.




Name Description


binfile Read RAW image
debugim Print an image pixel by pixel
edvips Change fields in a VIPS header
header Print fields from a VIPS header
printlines Print an image a line at a time
vips VIPS universal main program
vips-7.14 VIPS wrapper script
find_mosaic Analyse a set of images for overlaps
mergeup Join a set of images together
cooc_features Calculate features of a co-occurence matrix
cooc Calculate a co-occurence matrix
glds_features Calculate features of a grey-level distribution matrix
glds Calculate a grey-level distribution matrix
simcontr Demonstrate simultaneous contrast
sines Generate a sinusoidal test pattern
spatres Generate a spatial resolution test pattern
squares Generate some squares
batch_crop Crop a lot of images
batch_image_convertFile format convert a lot of images
batch_rubber_sheet Warp a lot of images
light_correct Correct a set of images for shading errors
mitsub Format a VIPS image for output to a Mitsubishi 3600
shrink_width Shrink to a specific width
vdump VIPS to mono Postscript
vips2dj VIPS to high-quality colour Postscript



Table 4.1: Miscellaneous programs