home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
hensa
/
graphics
/
image_1
/
!Image
/
Docs
/
P11
< prev
next >
Wrap
Text File
|
1994-08-18
|
7KB
|
160 lines
Image Merge Operations
----------------------
Image allows the user to merge two images in a variety of ways. The only
requirement is that the images are the same size (to merge different sized
pictures, see 'Insert' below). The merge banks control window contains
a number of merge operations, simply select the operation required, any
operation value, check the source and destination banks are correctly set
(see the section on Image Banks for details) and press the 'OK' icon.
Image Operations available are :
OR images - result is the OR of both inputs
AND images - result is the AND of both inputs
EOR images - result is the exclusive OR of both inputs
+ - result is the sum of both inputs
- - result is the difference between the two inputs
< - result is boolean <
> - result is boolean >
= - result is boolean =
Ratio - See below
Emboss - See below
Max - Result is the max of the inputs
Min - Result is the min of the inputs
1:1 - Result is the dithering of both inputs
Over - 2nd image is placed over 1st input
Under - 2nd image is placed under 1st input
Mask Operations available are :
Add - Add to mask
Sub - Subtract from mask
Make - Make new mask
EOR - EOR mask
Note: Areas of the 1st image that are masked out will remain untouched,
whereas areas of the 2nd image masked out will be ignored (ie the 1st image
is preserved).
Note: The above is not true for the 'Under' merge, where unmasked areas
of the 2nd image are placed over (ie. replace) masked areas of the 1st image.
This is the only case where masked areas are not preserved.
Ratio
-----
The ratio option takes a parameter (value from 0 to 100) which is used as a
percentage as follows :
result = value * input1 / 100 + (1-value) * input2 / 100
Emboss
------
The Emboss operation is used as part of the embossing process. It too takes a
value, the value is a number from 0 to 255. The operation then occurs as
follows: any pixel in input image 1 who's intensity is greater than or equal
to the value makes an output pixel white, otherwise a pixel in input image 2
who's intensity is above value produces a black output pixel - all other
output pixels are grey.
The Emboss operation can also take an optional second parameter, which defines
the colour to use instead of middle grey (as above). To supply a second
parameter simply place a ',' after the first parameter, and follow this by
a colour number (0 to 15) as given in the 'colour window'. Giving a value of
-1 makes the operation mask out all the areas which would have otherwise have
been made mid grey.
For more details on making an Emboss see the section entitled 'Emboss'
Mask Operations
---------------
A mask prevents parts of an image from being altered by most operations
within Image. The 4 mask operations specified above use a second image to
define where to add/subtract/etc the mask areas. Each of these operations
takes a value parameter, this being an intensity level (0-255). Any areas in
the 2nd image with an intensity greater or equal to that will cause that area
to be added/subtracted/etc to the mask.
Insert Picture
--------------
To insert a smaller picture inside a larger picture you need to use the
'Insert' operation, controlled by the icons in the top right of the window.
This window contains two writable icons which should contain the coordinates
in the main (larger) picture to place the top left of the inserted picture.
This coordinate can be entered in four ways, first by simply entering the
coordinate in the icons. Second is to click the mouse pointer over the point
you wish to use in the display window (make sure you are not currently in a
'Paint' operation) and this pixel's coordinates are entered into the icon to
the right of these icons. Pressing the icon marked with an arrow copy the
coordinate of the last mouse click to the coordinate icons. The third method
is to click (and hold) the icon marked 'Box'. When you do this the mouse
pointer will disappear, and inside the display window will appear a dragable
box which is the size of the insert picture (the picture in the 2nd input
bank). Move this box into the correct position and release the mouse pointer,
the coordinate icons will be filled in to place the picture at the position
specified.
The final method is similar to the previous method except that instead of
just having an outline box you get an outline representation of the image to
be inserted. This method is operated by selecting (hand holding the mouse
button down) the icon called 'Outline'. When you select this icon an outline
of the insert image will be created (this may take a few seconds for a large
picture). When you release the mouse button the coordinates will be entered
accordingly. The outline is created using the same system as the 'Outline'
option in the kernel control window. To the right of the 'Outline' icon is a
writable icon for entering a threshold value (see 'kernel control' for
details of this value).
THE OUTLINE OPTION IS MISSING FROM THIS DEMONSTRATION VERSION
To insert the picture you then only need to set the insert operation (eg. OR,
Ratio, Over, etc) and press the 'Insert' icon.
Note: When inserting one picture into another, the '2nd' image bank must
contain the smaller picture, and it must be inserted such that it lies
completely within the larger picture.
Radial Merge
------------
The 'Radial' merge is similar to the 'Ratio' merge except that the ratio
varies according to the distance from a specified point. With this merge you
need to set up a number of values. First is the point to use to measure
distances from and can be entered into the icons, or made to be the
coordinate of the last mouse click in the display window by pressing the
arrow icon to the right of the coordinate icons.
The next two values define the range of the ratios used in the merge. This is
defined by two values, a start percentage and an end percentage. The start
percentage must be lower than the end, but otherwise any values between 0 and
100 are valid. The first value defines the percentage to be used for the 2nd
picture at the coordinate specified above (the first picture gets 100 minus
this value). Thus a value of '0' will make the point specified above be 100%
from the first picture.
The next value that needs to be established is the 'Radius'. This defines the
area over which the ratio merge takes place. Any areas outside this radius
will be treated as if they were at the edge of the area as far as ratios are
concerned. In fact you can enter two values into this icon (separated by a
comma), if you do the second value is treated as a multiplier for the Y
distance from the centre of the merge (this allows you to produce merges
based on an ellipse rather than a circle). A second value between 0 and 1
will cause a vertical ellipse, a value greater than 1 a horizontal ellipse.
The option marked 'Linear' affects the merge operation be, when set, causing
the movement between the ratio range to be linear; when not set the movement
is a curve which means that the progression along the range starts off
slowly, speeding up as it goes.