Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
display(1)
Edit
PageHistory
Diff
Info
LikePages
display !!!display NAME SYNOPSIS DESCRIPTION EXAMPLES OPTIONS MOUSE BUTTONS COMMAND WIDGET KEYBOARD ACCELERATORS X RESOURCES IMAGE LOADING VISUAL IMAGE DIRECTORY IMAGE CUTTING IMAGE COPYING IMAGE PASTING IMAGE CROPPING IMAGE CHOPPING IMAGE ROTATION IMAGE SEGMENTATION IMAGE ANNOTATION IMAGE COMPOSITING COLOR EDITING MATTE EDITING IMAGE DRAWING REGION OF INTEREST IMAGE PANNING USER PREFERENCES ENVIRONMENT ACKNOWLEDGEMENTS SEE ALSO COPYRIGHT AUTHORS ---- !!NAME display - display an image on any workstation running X !!SYNOPSIS __display [[__ ''options'' __...]__ ''file'' __[[__''options''__...]__''file'' !!DESCRIPTION Display is a machine architecture independent image processing and display program. It can display an image on any workstation screen running an X server. __Display__ can read and write __many__ of the more popular image formats (e.g. __JPEG__, __TIFF__, __PNM__, __Photo CD__, etc.). With __display__, you can perform these functions on an image: o load an image from a file o display the next image o display the former image o display a sequence of images as a slide show o write the image to a file o print the image to a ''!PostScript'' printer o delete the image file o create a Visual Image Directory o select the image to display by its thumbnail rather than name o undo last image transformation o copy a region of the image o paste a region to the image o restore the image to its original size o refresh the image o half the image size o double the image size o resize the image o crop the image o cut the image o flop image in the horizontal direction o flip image in the vertical direction o rotate the image 90 degrees clockwise o rotate the image 90 degrees counter-clockwise o rotate the image o shear the image o roll the image o trim the image edges o invert the colors of the image o vary the color brightness o vary the color saturation o vary the image hue o gamma correct the image o sharpen the image contrast o dull the image contrast o perform histogram equalization on the image o perform histogram normalization on the image o negate the image colors o convert the image to grayscale o set the maximum number of unique colors in the image o reduce the speckles within an image o eliminate peak noise from an image o detect edges within the image o emboss an image o segment the image by color o simulate an oil painting o simulate a charcoal drawing o annotate the image with text o draw on the image o edit an image pixel color o edit the image matte information o composite an image with another o add a border to the image o surround image with an ornamental border o apply image processing techniques to a region of interest o display information about the image o zoom a portion of the image o show a histogram of the image o display image to background of a window o set user preferences o display information about this program o discard all images and exit program o change the level of magnification o display images specified by a World Wide Web (WWW) uniform resource locator (URL) !!EXAMPLES To scale an image of a cockatoo to exactly 640 pixels in width and 480 pixels in height and position the window at location (200,200), use: display -geometry 640x480+200+200! cockatoo.miff To display an image of a cockatoo without a border centered on a backdrop, use: display +borderwidth -backdrop cockatoo.miff To tile a slate texture onto the root window, use: display -size 1280x1024 -window root slate.png To display a visual image directory of all your JPEG images, use: display 'vid:*.jpg' To display a MAP image that is 640 pixels in width and 480 pixels in height with 256 colors, use: display -size 640x480+256 cockatoo.map To display an image of a cockatoo specified with a __World Wide Web (WWW)__ uniform resource locator __(URL)__, use: display ftp://wizards.dupont.com/images/cockatoo.jpg To display histogram of an image, use: convert file.jpg HISTOGRAM:- | display - !!OPTIONS Options are processed in command line order. Any option you specify on the command line remains in effect until it is explicitly changed by specifying the option again with a different effect. For example to display three images, the first with 32 colors, the second with an unlimited number of colors, and the third with only 16 colors, use: display -colors 32 cockatoo.miff -noop duck.miff -colors 16 macaw.miff __Display__ options can appear on the command line or in your X resources file. See ''X(1)''. Options on the command line supersede values specified in your X resources file. For a more detailed description of each option, see ''imagemagick(1)''. __-backdrop__ '''' display the image centered on a backdrop. __-background__ '''' the background color __-border__ '''' surround the image with a border of color __-bordercolor__ '''' the border color __-borderwidth__ '''' the border width __-cache__ '''' megabytes of memory available to the pixel cache __-colormap__ '''' define the colormap type __-colors__ '''' preferred number of colors in the image __-colorspace__ '''' the type of colorspace __-comment__ '''' annotate an image with a comment __-compress__ '''' the type of image compression __-contrast__ enhance or reduce the image contrast __-crop__ '''' preferred size and location of the cropped image __-debug__ enable debug printout __-delay__ '' '' display the next image after pausing __-density__ '''' vertical and horizontal resolution in pixels of the image __-depth__ '''' depth of the image __-despeckle__ reduce the speckles within an image __-display__ '''' specifies the X server to contact __-dispose__ '''' GIF disposal method __-dither__ apply Floyd/Steinberg error diffusion to the image __-edge__ '''' detect edges within an image __-endian__ '''' specify endianness (MSB or LSB) of output image __-enhance__ apply a digital filter to enhance a noisy image __-filter__ '''' use this type of filter when resizing an image __-flip__ create a __-flop__ create a __-font__ '''' use this font when annotating the image with text __-foreground__ '''' define the foreground color __-frame__ '' '' surround the image with an ornamental border __-gamma__ '''' level of gamma correction __-geometry__ '' '' preferred size and location of the Image window. __-help__ print usage instructions __-iconGeometry__ '''' specify the icon geometry __-iconic__ iconic animation __-immutable__ make image immutable __-interlace__ '''' the type of interlacing scheme __-label__ '''' assign a label to an image __-magnify__ '''' magnify the image __-map__ '''' display image using this type. __-matte__ store matte channel if the image has one __-mattecolor__ '''' specify the matte color __-monochrome__ transform the image to black and white __-name__ name an image __-negate__ replace every pixel with its complementary color __-noop__ NOOP (no option) __-page__ '''' size and location of an image canvas __-quality__ '''' JPEG/MIFF/PNG compression level __-raise__ '''' lighten or darken image edges __-remote__ perform a remote operation __-roll__ ''{+-}'' roll an image vertically or horizontally __-rotate__ '''' apply Paeth image rotation to the image __-sample__ '''' scale image with pixel sampling __-sampling_factor__ '''' sampling factors used by JPEG encoder. __-scenes__ '''' range of image scene numbers to read __-segment__ '' '' segment an image __-shared_memory__ use shared memory __-sharpen__ '''' sharpen the image __-size__ '''' width and height of the image __-text_font__ '''' font for writing fixed-width text __-texture__ '''' name of texture to tile onto the image background __-title__ '''' assign title to displayed image [[''animate, display, montage''] __-treedepth__ '''' tree depth for the color reduction algorithm __-trim__ trim an image __-update__ '''' detect when image file is modified and redisplay. __-use_pixmap__ use the pixmap __-verbose__ print detailed information about the image __-visual__ '''' animate images using this X visual type __-window__ '''' make image the background of a window __-window_group__ specify the window group __-write__ '''' write the image to a file [[''display''] For a more detailed description of each option, see ''!ImageMagick(1)''. !!MOUSE BUTTONS The effects of each button press is described below. Three buttons are required. If you have a two button mouse, button 1 and 3 are returned. Press __ALT__ and button 3 to simulate button 2. __1__ Press this button to map or unmap the Command widget . See the next section for more information about the Command widget. __2__ Press and drag to define a region of the image to magnify. __3__ Press and drag to choose from a select set of __display(1)__ commands. This button behaves differently if the image being displayed is a visual image directory. Choose a particular tile of the directory and press this button and drag to select a command from a pop-up menu. Choose from these menu items: Open Next Former Delete Update If you choose __Open__, the image represented by the tile is displayed. To return to the visual image directory, choose __Next__ from the Command widget (refer to Command Widget). __Next__ and __Former__ moves to the next or former image respectively. Choose __Delete__ to delete a particular image tile. Finally, choose __Update__ to synchronize all the image tiles with their respective images. See montage and miff for more details. !!COMMAND WIDGET The Command widget lists a number of sub-menus and commands. They are __File__ Open... Next Former Select... Save... Print... Delete... Canvas... Visual Directory... Quit __Edit__ Undo Redo Cut Copy Paste __View__ Half Size Original Size Double Size Resize... Apply Refresh Restore __Transform__ Crop Chop Flop Flip Rotate Right Rotate Left Rotate... Shear... Roll... Trim Edges __Enhance__ Hue... Saturation... Brightness... Gamma... Spiff... Dull Equalize Normalize Negate GRAYscale Quantize... __Effects__ Despeckle Emboss Reduce Noise Add Noise Sharpen... Blur... Threshold... Edge Detect... Spread... Shade... Raise... Segment... __F/X__ Solarize... Swirl... Implode... Wave... Oil Paint... Charcoal Draw... __Image Edit__ Annotate... Draw... Color... Matte... Composite... Add Border... Add Frame... Comment... Launch... Region of Interest... __Miscellany__ Image Info Zoom Image Show Preview... Show Histogram Show Matte Background... Slide Show Preferences... __Help__ Overview Browse Documentation About Display Menu items with a indented triangle have a sub-menu. They are represented above as the indented items. To access a sub-menu item, move the pointer to the appropriate menu and press button 1 and drag. When you find the desired sub-menu item, release the button and the command is executed. Move the pointer away from the sub-menu if you decide not to execute a particular command. !!KEYBOARD ACCELERATORS Accelerators are one or two key presses that effect a particular command. The keyboard accelerators that __display__ understands is: Ctl+O Press to load an image from a file. space Press to display the next image. If the image is a multi-paged document such as a ''!PostScript'' document, you can skip ahead several pages by preceding this command with a number. For example to display the fourth page beyond the current page, press 4space. backspace Press to display the former image. If the image is a multi-paged document such as a ''!PostScript'' document, you can skip behind several pages by preceding this command with a number. For example to display the fourth page preceding the current page, press 4n. Ctl-S Press to save the image to a file. Ctl-P Press to print the image to a ''!PostScript'' printer. Ctl-D Press to delete an image file. Ctl-N Press to create a blank canvas. Ctl-Q Press to discard all images and exit program. Ctl+Z Press to undo last image transformation. Ctl+R Press to redo last image transformation. Ctl-X Press to cut a region of the image. Ctl-C Press to copy a region of the image. Ctl-V Press to paste a region to the image. '' Use the arrow keys to move the image one pixel up, down, left, or right within the magnify window. Be sure to first map the magnify window by pressing button 2. Press ALT and one of the arrow keys to trim off one pixel from any side of the image. !!X RESOURCES __Display__ options can appear on the command line or in your X resource file. Options on the command line supersede values specified in your X resource file. See ''X(1)'' for more information on X resources. Most __display__ options have a corresponding X resource. In addition, __display__ uses the following X resources: __background__ ''(class Background)'' Specifies the preferred color to use for the Image window background. The default is #ccc. __borderColor__ ''(class !BorderColor)'' Specifies the preferred color to use for the Image window border. The default is #ccc. __borderWidth__ ''(class !BorderWidth)'' Specifies the width in pixels of the image window border. The default is 2. __browseCommand__ ''(class browseCommand)'' Specifies the name of the preferred browser when displaying !ImageMagick documentation. The default is netscape %s. __confirmExit__ ''(class !ConfirmExit)'' __Display__ pops up a dialog box to confirm exiting the program when exiting the program. Set this resource to False to exit without a confirmation. __displayGamma__ ''(class !DisplayGamma)'' Specifies the gamma of the X server. You can apply separate gamma values to the red, green, and blue channels of the image with a gamma value list delineated with slashes (i.e. 1.7/2.3/1.2). The default is 2.2. __displayWarnings__ ''(class !DisplayWarnings)'' __Display__ pops up a dialog box whenever a warning message occurs. Set this resource to False to ignore warning messages. __font__ ''(class !FontList)'' Specifies the name of the preferred font to use in normal formatted text. The default is 14 point Helvetica. __font[[1-9]__ ''(class Font[[1-9])'' Specifies the name of the preferred font to use when annotating the image window with text. The default fonts are fixed, variable, 5x8, 6x10, 7x13bold, 8x13bold, 9x15bold, 10x20, and 12x24. __foreground__ ''(class Foreground)'' Specifies the preferred color to use for text within the image window. The default is black. __gammaCorrect__ ''(class gammaCorrect)'' This resource, if true, will lighten or darken an image of known gamma to match the gamma of the display (see resource __displayGamma__). The default is True. __geometry__ ''(class Geometry)'' Specifies the preferred size and position of the image window. It is not necessarily obeyed by all window managers. Offsets, if present, are handled in ''X(1)'' style. A negative x offset is measured from the right edge of the screen to the right edge of the icon, and a negative y offset is measured from the bottom edge of the screen to the bottom edge of the icon. __iconGeometry__ ''(class !IconGeometry)'' Specifies the preferred size and position of the application when iconified. It is not necessarily obeyed by all window managers. Offsets, if present, are handled in the same manner as in class Geometry. __iconic__ ''(class Iconic)'' This resource indicates that you would prefer that the application's windows initially not be visible as if the windows had be immediately iconified by you. Window managers may choose not to honor the application's request. __magnify__ ''(class Magnify)'' specifies an integral factor by which the image should be enlarged. The default is 3. This value only affects the magnification window which is invoked with button number 3 after the image is displayed. __matteColor__ ''(class !MatteColor)'' Specify the color of windows. It is used for the backgrounds of windows, menus, and notices. A 3D effect is achieved by using highlight and shadow colors derived from this color. Default value: #697B8F. __name__ ''(class Name)'' This resource specifies the name under which resources for the application should be found. This resource is useful in shell aliases to distinguish between invocations of an application, without resorting to creating links to alter the executable file name. The default is the application name. __pen[[1-9]__ ''(class Pen[[1-9])'' Specifies the color of the preferred font to use when annotating the image window with text. The default colors are black, blue, green, cyan, gray, red, magenta, yellow, and white. __printCommand__ ''(class !PrintCommand)'' This command is executed whenever Print is issued. In general, it is the command to print ''!PostScript'' to your printer. Default value: lp -c -s %i. __sharedMemory__ ''(class !SharedMemory)'' This resource specifies whether display should attempt use shared memory for pixmaps. !ImageMagick must be compiled with shared memory support, and the display must support the MIT-SHM extension. Otherwise, this resource is ignored. The default is True. __textFont__ ''(class textFont)'' Specifies the name of the preferred font to use in fixed (typewriter style) formatted text. The default is 14 point Courier. __title__ ''(class Title)'' This resource specifies the title to be used for the image window. This information is sometimes used by a window manager to provide a header identifying the window. The default is the image file name. __undoCache__ ''(class !UndoCache)'' Specifies, in mega-bytes, the amount of memory in the undo edit cache. Each time you modify the image it is saved in the undo edit cache as long as memory is available. You can subsequently ''undo'' one or more of these transformations. The default is 16 Megabytes. __usePixmap__ ''(class !UsePixmap)'' Images are maintained as a XImage by default. Set this resource to True to utilize a server Pixmap instead. This option is useful if your image exceeds the dimensions of your server screen and you intend to pan the image. Panning is much faster with Pixmaps than with a XImage. Pixmaps are considered a precious resource, use them with discretion. To set the geometry of the Magnify or Pan or window, use the geometry resource. For example, to set the Pan window geometry to 256x256, use: display.pan.geometry: 256x256 !!IMAGE LOADING To select an image to display, choose __Open__ of the __File__ sub-menu from the Command widget. A file browser is displayed. To choose a particular image file, move the pointer to the filename and press any button. The filename is copied to the text window. Next, press __Open__ or press the __RETURN__ key. Alternatively, you can type the image file name directly into the text window. To descend directories, choose a directory name and press the button twice quickly. A scrollbar allows a large list of filenames to be moved through the viewing area if it exceeds the size of the list area. You can trim the list of file names by using shell globbing characters. For example, type *.jpg to list only files that end with .jpg. To select your image from the X server screen instead of from a file, Choose __Grab__ of the __Open__ widget. !!VISUAL IMAGE DIRECTORY To create a Visual Image Directory, choose Visual Directory of the __File__ sub-menu from the Command widget . A file browser is displayed. To create a Visual Image Directory from all the images in the current directory, press __Directory__ or press the __RETURN key__. Alternatively, you can select a set of image names by using shell globbing characters. For example, type *.jpg to include only files that end with .jpg. To descend directories, choose a directory name and press the button twice quickly. A scrollbar allows a large list of filenames to be moved through the viewing area if it exceeds the size of the list area. After you select a set of files, they are turned into thumbnails and tiled onto a single image. Now move the pointer to a particular thumbnail and press __button 3__ and drag. Finally, select Open. The image represented by the thumbnail is displayed at its full size. Choose __Next__ from the __File__ sub-menu of the Command widget to return to the Visual Image Directory. !!IMAGE CUTTING Note that cut information for image window is not retained for colormapped X server visuals (e.g. ''!StaticColor'', ''!StaticColor'', ''GRAYScale'', ''!PseudoColor''). Correct cutting behavior may require a ''!TrueColor'' or ''!DirectColor'' visual or a ''Standard Colormap''. To begin, press choose __Cut__ of the __Edit__ sub-menu from the Command widget. Alternatively, press __F3__ in the image window. A small window appears showing the location of the cursor in the image window. You are now in cut mode. In cut mode, the Command widget has these options: __Help Dismiss__ To define a cut region, press button 1 and drag. The cut region is defined by a highlighted rectangle that expands or contracts as it follows the pointer. Once you are satisfied with the cut region, release the button. You are now in rectify mode. In rectify mode, the Command widget has these options: __Cut Help Dismiss__ You can make adjustments by moving the pointer to one of the cut rectangle corners, pressing a button, and dragging. Finally, press Cut to commit your copy region. To exit without cutting the image, press Dismiss. !!IMAGE COPYING To begin, press choose __Copy__ of the __Edit__ sub-menu from the Command widget. Alternatively, press __F4__ in the image window. A small window appears showing the location of the cursor in the image window. You are now in copy mode. In copy mode, the Command widget has these options: Help Dismiss To define a copy region, press button 1 and drag. The copy region is defined by a highlighted rectangle that expands or contracts as it follows the pointer. Once you are satisfied with the copy region, release the button. You are now in rectify mode. In rectify mode, the Command widget has these options: Copy Help Dismiss You can make adjustments by moving the pointer to one of the copy rectangle corners, pressing a button, and dragging. Finally, press Copy to commit your copy region. To exit without copying the image, press Dismiss. !!IMAGE PASTING To begin, press choose __Paste__ of the __Edit__ sub-menu from the Command widget. Alternatively, press __F5__ in the image window. A small window appears showing the location of the cursor in the image window. You are now in Paste mode. To exit immediately, press Dismiss. In Paste mode, the Command widget has these options: __Operators__ over in out atop xor plus minus add subtract difference multiply bumpmap replace __Help Dismiss__ Choose a composite operation from the __Operators__ sub-menu of the Command widget. How each operator behaves is described below. ''image window'' is the image currently displayed on your X server and ''image'' is the image obtained with the File Browser widget. __over__ The result is the union of the two image shapes, with ''image'' obscuring ''image window'' in the region of overlap. __in__ The result is simply ''image'' cut by the shape of ''image window''. None of the image data of image window is in the result. __out__ The resulting image is ''image'' with the shape of ''image window'' cut out. __atop__ The result is the same shape as ''image window'', with ''image'' obscuring ''image window'' where the image shapes overlap. Note this differs from over because the portion of image outside ''image window'''s shape does not appear in the result. __xor__ The result is the image data from both ''image'' and ''image window'' that is outside the overlap region. The overlap region is blank. __plus__ The result is just the sum of the image data. Output values are cropped to 255 (no overflow). This operation is independent of the matte channels. __minus__ The result of ''image'' - ''image window'', with underflow cropped to zero. The matte channel is ignored (set to 255, full coverage). __add__ The result of ''image'' + ''image window'', with overflow wrapping around (mod 256). __subtract__ The result of ''image'' - ''image window'', with underflow wrapping around (mod 256). The add and subtract operators can be used to perform reversible transformations. __difference__ The result of abs(''image'' - ''image window''). This is useful for comparing two very similar images. __multiply__ The result of ''image'' * ''image window''. This is useful for the creation of drop-shadows. __bumpmap__ The result of ''image window'' shaded by ''window''. __replace__ The resulting image is ''image window'' replaced with ''image''. Here the matte information is ignored. The image compositor requires a matte, or alpha channel in the image for some operations. This extra channel usually defines a mask which represents a sort of a cookie-cutter for the image. This is the case when matte is 255 (full coverage) for pixels inside the shape, zero outside, and between zero and 255 on the boundary. If image does not have a matte channel, it is initialized with 0 for any pixel matching in color to pixel location (0,0), otherwise 255. See Matte Editing for a method of defining a matte channel. Note that matte information for image window is not retained for colormapped X server visuals (e.g. ''!StaticColor, !StaticColor, !GrayScale, !PseudoColor''). Correct compositing behavior may require a ''!TrueColor'' or ''!DirectColor'' visual or a ''Standard Colormap''. Choosing a composite operator is optional. The default operator is replace. However, you must choose a location to composite your image and press button 1. Press and hold the button before releasing and an outline of the image will appear to help you identify your location. The actual colors of the pasted image is saved. However, the color that appears in image window may be different. For example, on a monochrome screen image window will appear black or white even though your pasted image may have many colors. If the image is saved to a file it is written with the correct colors. To assure the correct colors are saved in the final image, any ''!PseudoClass'' image is promoted to ''!DirectClass''. To force a ''!PseudoClass'' image to remain ''!PseudoClass'', use __-colors__. !!IMAGE CROPPING To begin, press choose __Crop__ of the __Transform__ submenu from the Command widget. Alternatively, press [[ in the image window. A small window appears showing the location of the cursor in the image window. You are now in crop mode. In crop mode, the Command widget has these options: __Help Dismiss__ To define a cropping region, press button 1 and drag. The cropping region is defined by a highlighted rectangle that expands or contracts as it follows the pointer. Once you are satisfied with the cropping region, release the button. You are now in rectify mode. In rectify mode, the Command widget has these options: __Crop Help Dismiss__ You can make adjustments by moving the pointer to one of the cropping rectangle corners, pressing a button, and dragging. Finally, press Crop to commit your cropping region. To exit without cropping the image, press Dismiss. !!IMAGE CHOPPING An image is chopped interactively. There is no command line argument to chop an image. To begin, choose __Chop__ of the __Transform__ sub-menu from the Command widget. Alternatively, press ] in the Image window. You are now in __Chop__ mode. To exit immediately, press __Dismiss__. In Chop mode, the Command widget has these options: __Direction__ horizontal vertical __Help Dismiss__ If the you choose the horizontal direction (this is the default), the area of the image between the two horizontal endpoints of the chop line is removed. Otherwise, the area of the image between the two vertical endpoints of the chop line is removed. Select a location within the image window to begin your chop, press and hold any button. Next, move the pointer to another location in the image. As you move a line will connect the initial location and the pointer. When you release the button, the area within the image to chop is determined by which direction you choose from the Command widget. To cancel the image chopping, move the pointer back to the starting point of the line and release the button. !!IMAGE ROTATION Press the / key to rotate the image 90 degrees or \ to rotate -90 degrees. To interactively choose the degree of rotation, choose __Rotate...__ of the __Transform__ submenu from the Command Widget. Alternatively, press * in the image window. A small horizontal line is drawn next to the pointer. You are now in rotate mode. To exit immediately, press Dismiss. In rotate mode, the Command widget has these options: __Pixel Color__ black blue cyan green gray red magenta yellow white Browser... __Direction__ horizontal vertical __Crop__ false true __Sharpen__ false true __Help Dismiss__ Choose a background color from the Pixel Color sub-menu. Additional background colors can be specified with the color browser. You can change the menu colors by setting the X resources pen1 through pen9. If you choose the color browser and press __Grab__, you can select the background color by moving the pointer to the desired color on the screen and press any button. Choose a point in the image window and press this button and hold. Next, move the pointer to another location in the image. As you move a line connects the initial location and the pointer. When you release the button, the degree of image rotation is determined by the slope of the line you just drew. The slope is relative to the direction you choose from the Direction sub-menu of the Command widget. To cancel the image rotation, move the pointer back to the starting point of the line and release the button. !!IMAGE SEGMENTATION Choose __Effects-__ to segment an image by analyzing the histograms of the color components and identifying units that are homogeneous with the fuzzy c-means technique. The scale-space filter analyzes the histograms of the three color components of the image and identifies a set of classes. The extents of each class is used to coarsely segment the image with thresholding. The color associated with each class is determined by the mean color of all pixels within the extents of a particular class. Finally, any unclassified pixels are assigned to the closest class with the fuzzy c-means technique. The fuzzy c-Means algorithm can be summarized as follows: Build a histogram, one for each color component of the image. For each histogram, successively apply the scale-space filter and build an interval tree of zero crossings in the second derivative at each scale. Analyze this scale-space The fingerprint defines intervals on the axis of the histogram. Each interval contains either a minima or a maxima in the original signal. If each color component lies within the maxima interval, that pixel is considered Any pixel that fails to be classified in the above thresholding pass is classified using the fuzzy c-Means technique. It is assigned to one of the classes discovered in the histogram analysis phase. The fuzzy c-Means technique attempts to cluster a pixel by finding the local minima of the generalized within group sum of squared error objective function. A pixel is assigned to the closest class of which the fuzzy membership has a maximum value. For additional information see: Young Won Lim, Sang Uk Lee'', ''On The Color Image Segmentation Algorithm Based on the Thresholding and the Fuzzy c-Means Techniques__ __ !!IMAGE ANNOTATION An image is annotated interactively. There is no command line argument to annotate an image. To begin, choose __Annotate__ of the __Image Edit__ sub-menu from the Command widget. Alternatively, press a in the image window. A small window appears showing the location of the cursor in the image window. You are now in annotate mode. To exit immediately, press Dismiss. In annotate mode, the Command widget has these options: __Font Name__ fixed variable 5x8 6x10 7x13bold 8x13bold 9x15bold 10x20 12x24 Browser... __Font Color__ black blue cyan green gray red magenta yellow white transparent Browser... __Box Color__ black blue cyan green gray red magenta yellow white transparent Browser... __Rotate Text__ -90 -45 -30 0 30 45 90 180 Dialog... __Help__ __Dismiss__ Choose a font name from the __Font Name__ sub-menu. Additional font names can be specified with the font browser. You can change the menu names by setting the X resources font1 through font9. Choose a font color from the __Font Color__ sub-menu. Additional font colors can be specified with the color browser. You can change the menu colors by setting the X resources pen1 through pen9. If you select the color browser and press __Grab__, you can choose the font color by moving the pointer to the desired color on the screen and press any button. If you choose to rotate the text, choose __Rotate Text__ from the menu and select an angle. Typically you will only want to rotate one line of text at a time. Depending on the angle you choose, subsequent lines may end up overwriting each other. Choosing a font and its color is optional. The default font is fixed and the default color is black. However, you must choose a location to begin entering text and press a button. An underscore character will appear at the location of the pointer. The cursor changes to a pencil to indicate you are in text mode. To exit immediately, press Dismiss. In text mode, any key presses will display the character at the location of the underscore and advance the underscore cursor. Enter your text and once completed press Apply to finish your image annotation. To correct errors press __BACK SPACE__. To delete an entire line of text, press __DELETE__. Any text that exceeds the boundaries of the image window is automatically continued onto the next line. The actual color you request for the font is saved in the image. However, the color that appears in your Image window may be different. For example, on a monochrome screen the text will appear black or white even if you choose the color red as the font color. However, the image saved to a file with __-write__ is written with red lettering. To assure the correct color text in the final image, any ''!PseudoClass'' image is promoted to ''!DirectClass'' (see miff(5)). To force a ''!PseudoClass'' image to remain ''!PseudoClass'', use __-colors__. !!IMAGE COMPOSITING An image composite is created interactively. __There is no command line argument to composite an image__. To begin, choose __Composite__ of the __Image Edit__ from the Command widget. Alternatively, press x in the Image window. First a popup window is displayed requesting you to enter an image name. Press __Composite__, __Grab__ or type a file name. Press __Cancel__ if you choose not to create a composite image. When you choose __Grab__, move the pointer to the desired window and press any button. If the __Composite__ image does not have any matte information, you are informed and the file browser is displayed again. Enter the name of a mask image. The image is typically grayscale and the same size as the composite image. If the image is not grayscale, it is converted to grayscale and the resulting intensities are used as matte information. A small window appears showing the location of the cursor in the image window. You are now in composite mode. To exit immediately, press Dismiss. In composite mode, the Command widget has these options: __Operators__ over in out atop xor plus minus add subtract difference bumpmap replace __Blend__ __Displace__ __Help__ __Dismiss__ Choose a composite operation from the Operators sub-menu of the Command widget. How each operator behaves is described below. image window is the image currently displayed on your X server and image is the image obtained __over__ The result is the union of the two image shapes, with ''image'' obscuring ''image window'' in the region of overlap. __in__ The result is simply ''image'' cut by the shape of ''image window''. None of the image data of image window is in the result. __out__ The resulting image is ''image'' with the shape of ''image window'' cut out. __atop__ The result is the same shape as ''image window'', with ''image'' obscuring ''image window'' where the image shapes overlap. Note this differs from over because the portion of image outside ''image window'''s shape does not appear in the result. __xor__ The result is the image data from both ''image'' and ''image window'' that is outside the overlap region. The overlap region is blank. __plus__ The result is just the sum of the image data. Output values are cropped to 255 (no overflow). This operation is independent of the matte channels. __minus__ The result of ''image'' - ''image window'', with underflow cropped to zero. The matte channel is ignored (set to 255, full coverage). __add__ The result of ''image'' + ''image window'', with overflow wrapping around (mod 256). __subtract__ The result of ''image'' - ''image window'', with underflow wrapping around (mod 256). The add and subtract operators can be used to perform reversible transformations. __difference__ The result of abs(''image'' - ''image window''). This is useful for comparing two very similar images. __bumpmap__ The result of ''image window'' shaded by ''window''. __replace__ The resulting image is ''image window'' replaced with ''image''. Here the matte information is ignored. The image compositor requires a matte, or alpha channel in the image for some operations. This extra channel usually defines a mask which represents a sort of a cookie-cutter for the image. This is the case when matte is 255 (full coverage) for pixels inside the shape, zero outside, and between zero and 255 on the boundary. If image does not have a matte channel, it is initialized with 0 for any pixel matching in color to pixel location (0,0), otherwise 255. See Matte Editing for a method of defining a matte channel. If you choose __blend__, the composite operator becomes __over__. The image matte channel percent transparency is initialized to factor. The image window is initialized to (100-factor). Where factor is the value you specify in the Dialog widget. __Displace__ shifts the image pixels as defined by a displacement map. With this option, ''image'' is used as a displacement map. Black, within the displacement map, is a maximum positive displacement. White is a maximum negative displacement and middle gray is neutral. The displacement is scaled to determine the pixel shift. By default, the displacement applies in both the horizontal and vertical directions. However, if you specify ''mask'', ''image'' is the horizontal X displacement and ''mask'' the vertical Y displacement. Note that matte information for image window is not retained for colormapped X server visuals (e.g. ''!StaticColor, !StaticColor, !GrayScale, !PseudoColor''). Correct compositing behavior may require a ''!TrueColor'' or ''!DirectColor'' visual or a ''Standard Colormap''. Choosing a composite operator is optional. The default operator is replace. However, you must choose a location to composite your image and press button 1. Press and hold the button before releasing and an outline of the image will appear to help you identify your location. The actual colors of the composite image is saved. However, the color that appears in image window may be different. For example, on a monochrome screen Image window will appear black or white even though your composited image may have many colors. If the image is saved to a file it is written with the correct colors. To assure the correct colors are saved in the final image, any !PseudoClass image is promoted to ''!DirectClass'' (see miff). To force a ''!PseudoClass'' image to remain ''!PseudoClass'', use __-colors__. !!COLOR EDITING Changing the the color of a set of pixels is performed interactively. There is no command line argument to edit a pixel. To begin, choose __Color__ from the __Image Edit__ submenu of the Command widget. Alternatively, press c in the image window. A small window appears showing the location of the cursor in the image window. You are now in color edit mode. To exit immediately, press __Dismiss__. In color edit mode, the __Command widget__ has these options: __Method__ point replace floodfill reset __Pixel Color__ black blue cyan green gray red magenta yellow white Browser... __Border Color__ black blue cyan green gray red magenta yellow white Browser... __Fuzz__ 0 2 4 8 16 Dialog... __Undo__ __Help__ __Dismiss__ Choose a color editing method from the __Method__ sub-menu of the Command widget. The __point method__ recolors any pixel selected with the pointer unless the button is released. The __replace method__ recolors any pixel that matches the color of the pixel you select with a button press. __Floodfill__ recolors any pixel that matches the color of the pixel you select with a button press and is a neighbor. Whereas __filltoborder__ changes the matte value of any neighbor pixel that is not the border color. Finally __reset__ changes the entire image to the designated color. Next, choose a pixel color from the __Pixel Color__ sub-menu. Additional pixel colors can be specified with the color browser. You can change the menu colors by setting the X resources pen1 through pen9. Now press button 1 to select a pixel within the Image window to change its color. Additional pixels may be recolored as prescribed by the method you choose. additional pixels by increasing the Delta value. If the __Magnify widget__ is mapped, it can be helpful in positioning your pointer within the image (refer to button 2). Alternatively you can select a pixel to recolor from within the __Magnify widget__. Move the pointer to the __Magnify widget__ and position the pixel with the cursor control keys. Finally, press a button to recolor the selected pixel (or pixels). The actual color you request for the pixels is saved in the image. However, the color that appears in your Image window may be different. For example, on a monochrome screen the pixel will appear black or white even if you choose the color red as the pixel color. However, the image saved to a file with -write is written with red pixels. To assure the correct color text in the final image, any ''!PseudoClass'' image is promoted to ''!DirectClass'' To force a ''!PseudoClass'' image to remain ''!PseudoClass'', use __-colors__. !!MATTE EDITING Matte information within an image is useful for some operations such as image compositing. This extra channel usually defines a mask which represents a sort of a cookie-cutter for the image. This is the case when matte is 255 (full coverage) for pixels inside the shape, zero outside, and between zero and 255 on the boundary. Setting the matte information in an image is done interactively. There is no command line argument to edit a pixel. To begin, and choose __Matte__ of the __Image Edit__ sub-menu from the Command widget. Alternatively, press m in the image window. A small window appears showing the location of the cursor in the image window. You are now in matte edit mode. To exit immediately, press Dismiss. In matte edit mode, the Command widget has these options: __Method__ point replace floodfill reset __Border Color__ black blue cyan green gray red magenta yellow white Browser... __Fuzz__ 0 2 4 8 16 Dialog... __Matte__ __Undo__ __Help__ __Dismiss__ Choose a matte editing method from the __Method__ sub-menu of the Command widget. The __point method__ changes the matte value of the any pixel selected with the pointer until the button is released. The __replace method__ changes the matte value of any pixel that matches the color of the pixel you select with a button press. __Floodfill__ changes the matte value of any pixel that matches the color of the pixel you select with a button press and is a neighbor. Whereas __filltoborder__ recolors any neighbor pixel that is not the border color. Finally __reset__ changes the entire image to the designated matte value. Choose __Matte Value__ and a dialog appears requesting a matte value. Enter a value between __0 and 255__. This value is assigned as the matte value of the selected pixel or pixels. Now, press any button to select a pixel within the Image window to change its matte value. You can change the matte value of additional pixels by increasing the Delta value. The Delta value is first added then subtracted from the red, green, and blue of the target color. Any pixels within the range also have their matte value updated. If the __Magnify widget__ is mapped, it can be helpful in positioning your pointer within the image (refer to button 2). Alternatively you can select a pixel to change the matte value from within the __Magnify widget__. Move the pointer to the __Magnify widget__ and position the pixel with the cursor control keys. Finally, press a button to change the matte value of the selected pixel (or pixels). Matte information is only valid in a ''!DirectClass image''. Therefore, any ''!PseudoClass'' image is promoted to ''!DirectClass''. Note that matte information for ''!PseudoClass'' is not retained for colormapped X server visuals (e.g. ''!StaticColor, !StaticColor, !GrayScale, !PseudoColor'') unless you immediately save your image to a file (refer to Write). Correct matte editing behavior may require a ''!TrueColor'' or ''!DirectColor'' visual or a ''Standard Colormap''. !!IMAGE DRAWING An image is drawn upon interactively. __There is no command line argument to draw on an image__. To begin, choose __Draw__ of the Image __Edit__ sub-menu from the Command widget. Alternatively, press d in the image window. The cursor changes to a crosshair to indicate you are in draw mode. To exit immediately, press Dismiss. In draw mode, the Command widget has these options: __Primitive__ point line rectangle fill rectangle circle fill circle ellipse fill ellipse polygon fill polygon __Color__ black blue cyan green gray red magenta yellow white transparent Browser... __Stipple__ Brick Diagonal Scales Vertical Wavy Translucent Opaque Open... __Width__ 1 2 4 8 16 Dialog... __Undo__ __Help__ __Dismiss__ Choose a drawing primitive from the __Primitive__ sub-menu. Next, choose a color from the __Color__ sub-menu. Additional colors can be specified with the color browser. You can change the menu colors by setting the X resources pen1 through pen9. The transparent color updates the image matte channel and is useful for image compositing. If you choose the color browser and press __Grab__, you can select the primitive color by moving the pointer to the desired color on the screen and press any button. The transparent color updates the image matte channel and is useful for image compositing. Choose a stipple, if appropriate, from the __Stipple__ sub-menu. Additional stipples can be specified with the file browser. Stipples obtained from the file browser must be on disk in the X11 bitmap format. Choose a line width, if appropriate, from the __Width__ sub-menu. To choose a specific width select the __Dialog__ widget. Choose a point in the image window and press button 1 and hold. Next, move the pointer to another location in the image. As you move, a line connects the initial location and the pointer. When you release the button, the image is updated with the primitive you just drew. For polygons, the image is updated when you press and release the button without moving the pointer. To cancel image drawing, move the pointer back to the starting point of the line and release the button. !!REGION OF INTEREST To begin, press choose Region of Interest of the Pixel Transform sub-menu from the Command widget. Alternatively, press R in the image window. A small window appears showing the location of the cursor in the image window. You are now in region of interest mode. In region of interest mode, the Command widget has these options: __Help__ __Dismiss__ To define a region of interest, press button 1 and drag. The region of interest is defined by a highlighted rectangle that expands or contracts as it follows the pointer. Once you are satisfied with the region of interest, release the button. You are now in apply mode. In apply mode the Command widget has these options: __File__ Save... Print... __Edit__ Undo Redo __Transform__ Flip Flop Rotate Right Rotate Left __Enhance__ Hue... Saturation... Brightness... Gamma... Spiff Dull Equalize Normalize Negate GRAYscale Quantize... __Effects__ Despeckle Emboss Reduce Noise Add Noise Sharpen... Blur... Threshold... Edge Detect... Spread... Shade... Raise... Segment... __F/X__ Solarize... Swirl... Implode... Wave... Oil Paint Charcoal Draw... __Miscellany__ Image Info Zoom Image Show Preview... Show Histogram Show Matte __Help__ __Dismiss__ You can make adjustments to the region of interest by moving the pointer to one of the rectangle corners, pressing a button, and dragging. Finally, choose an image processing technique from the Command widget. You can choose more than one image processing technique to apply to an area. Alternatively, you can move the region of interest before applying another image processing technique. To exit, press Dismiss. !!IMAGE PANNING When an image exceeds the width or height of the X server screen, display maps a small panning icon. The rectangle within the panning icon shows the area that is currently displayed in the the image window. To pan about the image, press any button and drag the pointer within the panning icon. The pan rectangle moves with the pointer and the image window is updated to reflect the location of the rectangle within the panning icon. When you have selected the area of the image you wish to view, release the button. Use the arrow keys to pan the image one pixel up, down, left, or right within the image window. The panning icon is withdrawn if the image becomes smaller than the dimensions of the X server screen. !!USER PREFERENCES Preferences affect the default behavior of __display(1)__. The preferences are either true or false and are stored in your home directory as .displayrc: __display image centered on a backdrop____ This backdrop covers the entire workstation screen and is useful for hiding other X window activity while viewing the image. The color of the backdrop is specified as the background color. Refer to X Resources for details. __confirm on program exit____ Ask for a confirmation before exiting the __display(1)__ program. __correct image for display gamma____ If the image has a known gamma, the gamma is corrected to match that of the X server (see the X Resource __displayGamma__). __apply Floyd/Steinberg error diffusion to image____ The basic strategy of dithering is to trade intensity resolution for spatial resolution by averaging the intensities of several neighboring pixels. Images which suffer from severe contouring when reducing colors can be improved with this preference. __use a shared colormap for colormapped X visuals____ This option only applies when the default X server visual is ''!PseudoColor'' or ''GRAYScale''. Refer to __-visual__ for more details. By default, a shared colormap is allocated. The image shares colors with other X clients. Some image colors could be approximated, therefore your image may look very different than intended. Otherwise the image colors appear exactly as they are defined. However, other clients may go technicolor when the image colormap is installed. __display images as an X server pixmap____ Images are maintained as a XImage by default. Set this resource to True to utilize a server Pixmap instead. This option is useful if your image exceeds the dimensions of your server screen and you intend to pan the image. Panning is much faster with Pixmaps than with a XImage. Pixmaps are considered a precious resource, use them with discretion. !!ENVIRONMENT __DISPLAY__ To get the default host, display number, and screen. !!ACKNOWLEDGEMENTS The __MIT X Consortium__ for making network transparent graphics a reality. ''Peder Langlo'', __Hewlett Packard__, Norway, made hundreds of suggestions and bug reports. Without Peder, __!ImageMagick__ would not be nearly as useful as it is today. ''Rod Bogart'' and ''John W. Peterson'', __University of Utah__. Image compositing is loosely based on rlecomp of the Utah Raster Toolkit. ''Michael Halle'', __Spatial Imaging Group at MIT__, for the initial implementation of Alan Paeth's image rotation algorithm. ''David Pensak'', __!ImageMagick Studio__, for providing a computing environment that made this program possible. ''Paul Raveling'', __USC Information Sciences Institute__. The spatial subdivision color reduction algorithm is based on his Img software. !!SEE ALSO animate(1), composite(1), conjure(1), convert(1), identify(1), !ImageMagick(1), import(1), mogrify(1), montage(1) !!COPYRIGHT __Copyright (C) 2002 !ImageMagick Studio__ __Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files ( __ __The above copyright notice and this permission notice shall be included in all copies or substantial portions of !ImageMagick.__ __The software is provided __ __Except as contained in this notice, the name of the !ImageMagick Studio LLC shall not be used in advertising or otherwise to promote the sale, use or other dealings in !ImageMagick without prior written authorization from the !ImageMagick Studio.__ !!AUTHORS ''John Cristy, !ImageMagick Studio LLC, Glenn Randers-Pehrson, !ImageMagick Studio LLC.'' ----
10 pages link to
display(1)
:
identify(1)
ImageMagick(1)
animate(1)
import(1)
composite(1)
conjure(1)
convert(1)
mogrify(1)
montage(1)
Man1d
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.