| hafton | plot | hafton |
hafton -- draw a half tone picture of an image
hafton image
Task hafton draws a half tone picture of an IRAF image, where varying intensities in the image are represented by areas of varying darkness on the plot. Six different mapping functions are available; the desired mapping function is selected with the mapping_function string. The types of mapping are:
linear exponential - emphasizes high intensity values. logarithmic - emphasizes low intensity values. sinusoidal - emphasizes mid-range values. arcsine - extreme values emphasized at the expense of mid-range. crtpict - linear mapping centered on median intensity. The slope of the function is modified by \fBcontrast\fR.To speed up the plotting, the resolution of the input image can be decreased to xres by yres . When preserve = yes, hafton automatically reduces the image in both directions by the same factor, which is the larger of [ncolumns / xres or nlines / yres]. If the aspect ratio is not being preserved, the x and y dimensions are independently reduced to the specified resolution. No reduction is done if xres and yres = 0, if the input image is an image section, or if the image is smaller than xres by yres .
If the device viewport is not set by the user, hafton automatically sets a viewport centered on the output device. The default value of fill=no means the viewport will be adjusted so that equal numbers of image pixels in x and y will occupy equal lengths when plotted. That is, when fill=no , a unity aspect ratio is enforced, and square images are represented as square plots regardless of the device aspect ratio. On devices with non square full device viewports (e.g., the vt640), a square image will appear extended when fill=yes .
1. Image "crab.6563" is plotted in negative contrast, with linear mapping between the minimum and maximum image pixel.
cl> hafton crab.6563 contrast=-1
2. The image is plotted in negative contrast using the same mapping function as used by the crtpict task. The resulting plot is in negative contrast.
cl> hafton crab.6563 mapping_fun=crt contrast =-0.25
To produce a hafton plot on the terminal takes just under 9 cpu minutes. If the output device is the imagen or versatec (or another nspp device) the total cp time is about an hour.
A large number of plotter instructions ( > 100,000 polylines) is generated per frame for square images.