home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
clipart
/
merge-it.zip
/
TUTOR.TXT
< prev
next >
Wrap
Text File
|
1991-05-25
|
21KB
|
355 lines
TUTOR FOR MERGEIT
We will use the image files eschrB1.pcx, eschrB2.pcx and the initial values
file eschrB.ini. Start the program from the directory where it is located,
with the command=> mergeit /eschrB.ini
Sequence of program operations:
a) Read initial values file, read beginning of lst image.
b) Check disk space for required space for output file.
c) Analyze top edge of first image for black reference blocks
c) Calculate image cutting values, check against first image size available.
d) Analyze top edge of second image for black reference blocks
e) Calculate image cutting values, check against second image size available.
f) Determine RAM space required to rotate image when merging.
If space is available, prompt user if they want to rotate and merge.
If not enough RAM is available, prompt user if they want to cut the
image shorter,use diskspace to store intermediate image file, or
not rotate at all before merging.
The popular Escher print we will use for the tutorial was scanned in at 200DPI
with the print in the landscape orientation. The right half was scanned first,
as is the convention for MergeIt. Normally we would merge the scans together
without rotation, but for tutorial purposes, we'll work with it both ways.
When rotated, the right side of the image will be on top, the top of the print
will be on the left side. To do an unrotated trim tutorial, answer "N" until
you are prompted to approve of an unrotated merge.
You will probably find it helpful to print out the two pcx image files to
get oriented to how MergeIt works before doing the trimming. Normally you
would have the original hardcopy image to refer to.
Simple audio feedback is given during the user trim process while viewing the
merged image region:
A simple beep indicates the start of a trim operation
(typically the insert/delete) which requires more input to finish.
A double beep indicates the end of a trim operation/command.
A triple beep, after a <cr> indicates the end of user trimming and either
the redisplay of the current viewed region or a continuation of the merge
process to the next merge image section.
A single, low pitched beep indicates an error, perhaps a trim limit has been
reached.
Rotated Image User Trim Tutorial
(The phrase "Nx" where N is a number means do the operation N times,
i.e. 3x= do it 3 times.)
The right most 100 lines of the unrotated image will be shown as the top of
the rotated image. The most useful trim at this point might be to add/delete a
few lines from the top of the image. Press cursor up key 3x, a double beep
will follow each entry (indicating a complete user operation). Press "enter"
(<cr>) to see the effect on the image. Wait for a single beep which signals
the end of image redisplay process. To accept the new image without further
change, and continue the merge process, press <cr>.
The screen will revert to text mode, describing the merge process: how
many lines must be merged in total and how many are in this current scanned
image section.
When a multiple of 128 lines are finished, this will be displayed until the
final (left most) 100 lines of this scanned image section are reached. If
you press <cr> at this time, when the next 128 lines are finished, the process
will pause and a short menu will be displayed. You may quit the program or
continue the process at this time.
Finally, the screen will return to a graphic mode and the last 100 lines of
the image will be shown. This display process ends with a single beep as
before. At this point you have 2 useful operations: trim the bottom edge up or
down, or change the view region to a more critical section.
Press the down cursor key 4x (2 beeps with each entry). Press <cr> to see
additional 4 image lines at merge boundary. You may repeat this 11x more,
after that you will hear a lower pitched, longer beep when you press the
down key, this signifies the edge of available image to view and merge.
You may note that the last lines shown the image masked off by a paper guide
when scanned. Press the up cursor key 10x to remove most of the extra image
lines, then press <cr> to see modifications.
(We'll leave a few extra lines here for tutorial purposes.)
To finally accept the viewed image, press <cr> without making any more
changes.
A small merge edge marker will appear in the center of the screen, denoting
the boundary between this and the next scanned section. A few seconds will
pass while the next image section is processed. Soon the right most 100
vertical lines (before rotation) of the next image section will be shown
as the top 100 lines of the rotated image.
The right view clearly shows the redundant image at the merge. At this
point we can ONLY trim the new image, i.e. only the image below the marker.
Press the up key 8x to move the image up. Press <cr> to see the modification.
The left view shows a small left-right misalignment (in a curved line about 1
1/2" in from the left edge (on a 14"screen) ). We could shift the whole image
left or right with the left/right cursor keys but instead lets delete a few
dots (in the lower image) to the left of the misaligned curved line. Select
the delete operation by pressing the delete key (1 beep will follow). A line
marker will appear below the image, on the right side. Use the home key to
move the marker 1/8 of the width of the whole image line to the right. Since
there is immediate visual feedback thru the motion of the marker, no audio
feedback is given. Note that the marker stays in the center when the choosen
line spot is between the two views. Press the home key a total of 6x, until
the marker is at the left edge. Note that a 7th press of the home key sounds a
low beep- you've reached the limit of the image line. Press the space bar 9x
to move the marker 72 pixels to the right (8 pixels at a time). The actual
deletion will occur at the left edge of the marker. Press the '+' key 2x, (a
single beep will follow each entry). This will delete 2 dots. Finally press
<cr> to make one more deletion and end the deletion operation (a double beep
will sound).
Press <cr> again to see the effects of the modications (a triple beep will
sound).
The right view isn't aligned so well. We could insert a few dots in the
center region of the merge, but for tutorial purposes, lets shift the whole
image right 2 dots by pressing the right cursor key 2x (A double beep follows
each entry).
Press <cr> to see modifications.
We could delete one dot to the left of the curved line in the left view (same
line that was misaligned before). Instead, lets shift the viewed section on
the left first. Press Alt-V (alter view), 1 beep will sound. Choose the left
view region by pressing the home key, 1 beep will sound. Choose to move it
left with the home key again (2 beeps-operation is finished).
Press <cr> to see the new region.
We can now see that the left edge is misaligned, we can shift the whole image
left 5 dots by pressing the left cursor key 5x (2 beeps after each entry).
Press <cr> to see effect.
To improve the left curved line, we can insert 2 dots to the left of it.
Press the insert key (1 beep). The line marker will appear. Press the home
key 6x to move the marker to the left of the curved line (no beep-marker
motion is indicator). Then press the space bar 9x to shift the marker to the
right. Press '+' key to insert 1 dot at this location (1 beep). Press <cr> to
insert a second dot and end input process. Before viewing effect, lets insert
3 dots on the left side of the right view. Press insert key again, press
home 2x. Finally press '+' 2x to insert 2 dots and then a <cr> to insert a
third dot and end operation.
View the modifications with a <cr>.
Lets change the right view before continuing the merge process. Press
Alt-V (1 beep will sound). Choose the right view by pressing the End key
(1 beep). Move it to the right by pressing the End key again (2 beeps).
Press <cr> to see the new region.
Note that if you tried to repeat this shift again on the right side you would
hear a single low pitch beep when you hit the End key the second time since
you are at the right limit of the merged image.
Press <cr> to accept the image and continue the merge process.
The screen will revert to text mode again and messages about the merge process
will be displayed The final screen is the left edge of the second image (the
bottom edge of the rotated image). The views are of the opposite corners,
which is the result of what we selected before. While there are no more images
to merge with this edge, you may trim this edge up/down with the up/down
cursor keys. The limit in the down direction depends on how the image was
scanned and cut; there may be up to 16 extra lines. In this case, there are 13
extra lines.
If you attempt to press the down key more than this a single low beep will
signal the end of the image available to work with. After making any
changes and viewing the modifications, a <cr> without additional trimming will
signal the finishing of the merge process and return you to DOS.
UnRotated User Trim Tutorial
There is only one merge region which is shown on the right half of the
screen. The left side of the screen only shows the left edge of the image
which is not trimable. With a three or more piece merge process, two merge
regions are shown at a time, both trimable.
The first 200 lines of the merged image is shown.
Note the small region marker which looks somewhat like: "__..." The solid
side points to the merge region and indicates the image to the right of the
merge is currently selected for trimming.
This region is a little high. Press the down cursor key 5x, a double beep
will follow each entry. Press <cr> to see the shifted region and merge (a
triple beep indicates the trimming process is over- the merge process will
either continue or the current viewed region will be redone).
When the modified image is fully displayed, a single beep will sound,
prompting you be more input. We overcompensated in our shift according to the
top black/white border so press the up cursor key 1x (but do NOT press <cr>
yet). Note that the region to the right of the merge is lower than the left by
2 or 3 lines in the center portion. We can delete 2 lines above this region
and below the top border. Press the delete key (1 beep will follow). A small
marker will appear in the center of the screen, on the last image line. We can
move this line marker up/down 8 lines at a time with the page up/ down keys.
You may move the marker 1 line down with the space bar. Since the marker
visually moves, no audio feedback is given.
Press the page up key 16x. To delete at the marker (in the region selected by
the region marker below-currently under the right region), press the '+' key
(1 beep will follow). To delete another line and end this deletion operation,
press the <cr> (2 beeps will found to indicate the end of this operation).
Press <cr> again to see the modifications (3 beeps will follow).
After hearing 1 beep which signals the end of the redisplay process,
press <cr> to accept the image and continue merging.
The next 200 lines will be displayed.
The image to the left of the merge is a little below the image on the right.
We could add a few lines on the right side, but for practice let us delete
2 lines in the left image. First select that image by pressing the home key
1x. The region marker will move to the left side of the merge (followed by a
double beep). Then start the delete operation by pressing the delete key (1
beep will follow) and a small line marker will appear at the bottom of
the viewed image, at the center of the screen. The line marker can be moved
up/down 8 lines at a time with the page up/dwn keys. Press the page up key
22x, followed by a '+' to delete 1 line (1 beep). Then press <cr> to delete a
second line and end the delete operation (2 beeps).
To see the effects of this operation, press <cr> (3 beeps-trimming input
ended, image redisplayed).
When the display is finished, a single beep will sound and the region marker
will appear below the right side of the merge. For practice, lets insert a
line in the right image, where the region marker is already. Press the insert
key (1 beep and the line marker will appear). Move the line marker up by
pressing the page up key 23x. Press <cr> to insert one line and end the insert
operation (2 beeps).
Press <cr> to see the modification (3 beeps).
To accept this merge region and continue the process, press <cr> (3 beeps).
The next 200 lines will be displayed. While this region looks OK as is, since
this is a tutotial, lets modify it anyway by moving the image on the right
into the merge with the left cursor key. Press this key 4x (2 beeps with each
entry).
Press <cr> to see the modified image.
Perhaps the return to the beginning image view surprised you? Since you moved
the whole right image left, the whole merged image file had to be rebuilt.
To accept this merged region, press <cr>.
After the second display is finished, press <cr> to accept this region and
return to the region we were at before.
Lets undo the previous operation, move the right image away from the merge.
Press the right cursor key 4x (2 beeps with each entry). This time, to speed
up the rebuild process and avoid viewing the previous images, enter 'B'
(build the image again w/o view until the current image) (2 beeps will
follow).
Then press <cr> to do the rebuilding and redisplay the current merge
section.
The screen will revert to text mode and the building of the previous
400 lines will begin. Progress of the merge will be displayed by messages
every 128 and 200 lines. Then the screen will return to graphics and the
current modified merge region will be displayed.
To see a list of commands appropriate to the trimming commands available while
viewing a merged region, enter any simple character key (i.e. "?", "h", etc.,
NOT F3, Cursor keys,etc.).
If you do so now, 12 help lines will be shown, (1 beep will
follow-indicating there are more help lines to be shown). Press another
character key to see the remaining 6 lines of help, (2 beeps will
follow-indicating the end of this operation). If the necessary help files
are not available, a special low pitched double beep will sound.
To continue the merge process and see the next region, press <cr>.
The larger egg shape image needs to have the merged regions closer together.
Lets move the left image into the merge. First select this region with the
home key, the region marker will move to the left side of the merge (2 beeps).
Press the right cursor key 3x to move this image. Press "B" to rebuild the
merged image more quickly.
Press <cr> to initiate this rebuilding.
While you're waiting for the rebuilding, perhaps you realize it is expedient
to do any whole scanned image motion early on in the merge process. If the
original image scanning is done with a rigid left guide edge, whole scanned
section motion is seldom required after the initial displayed 200 lines.
Typically, only line insert/delete trimming is required.
The modified merge looks better, lets finally improve it by deleting a line in
the image on the right. Press the delete key (1 beep). Press page up 7x to
move the line marker up. Press the space bar 1x to see the marker move down
one line. Press '+' 1x to delete 1 line. Press <cr> to delete a second line
and end this process.
Press <cr> to redisplay this image.
To accept this merged region and continue the merge process without more
viewing, press 'G' (2 beeps will follow) and then <cr>.
The screen will revert to the text mode again. The size of the merged image
file will be shown in additon to how much has already been done. The
progress of the merge will be displayed with messages when every 128 and
200 lines are merged.
Examining Reference Block Image Analysis
This is an optional part of the tutorial, hopefully you won't need to peek
into the details of image analysis for determining the black reference
blocks. If you are curious, then make a copy of the initial values file
"EschrB.Ini" to "EschrBB.Ini" (or whatever name you want). Then edit it
with an ascii text editor, changing the 3rd number on the 4th line from
0 to 1000. This will cause each image line that is analyzed for reference
block determination to be displayed for 1000 millisecs (1 second).
Restart MergeIt with the new initial values file.
Once a line's analysis is displayed, pressing <cr> will hold this display.
Otherwise the next line will be shown after a pause of 1000 millisecs. Restart
the merge program with the edited initial values file. As soon as the first
line analysis is shown, press <cr> to hold this screen.
At the top of the screen is the index of the line being shown and the label
for the following 5 lines of image information: Left Side. To determine the
location of the reference blocks, about 1.5" of the image line is analyzed
starting at the left and right edges. These 5 lines display each image dot as
a 0 (=black) or 1 (=white). They are arranged with 70 values/line divided into
groups of 10 separated by ",". The inverse video dot values indicates the
beginning and end of the reference block as determined by the program for that
line. (Note that both line indices and dot indices start at 0).
Below this line data is a summary of reference block information. "Left
Blk Ht/Bot=" refers to the height of the left reference block at this point in
the analysis and the line index of the bottom of the reference block. At this
point, the height of the block is only 1 and no bottom has been reached
(index=0). Similar information is displayed for the right reference block.
The next couple of lines display the dot indices on this line for the
reference block start dots and the block width in dots. Note that for both the
left and right blocks, the start dot is for the block's left side.
The last line is a help line for user input:
<cr>: the analysis will simply continue.
"F" : the line by line display will continue but will pause for 1/4 of the
present pause time.
"S" : the line by line display will continue but will pause for 4x the
present pause time.
"B" : the line by line display will be terminated, only the summary of analysis
for each image will be shown.
Continue viewing the line analysis until line index 31.
This line determines the bottom of the left reference block. The black line
segment is too short. Note that the left block bottom is now shown to be
at line index 30 (the previous line). The start and width dot information
for the left block on this line is replaced with the phrase "L Blk defined".
In the continuing line analysis for the right reference block, no more
analysis will be done on the left reference block.
Continue viewing the line analysis until line index 36.
This line determines the bottom of the right reference block. Line analysis
will stop at this point.
A summary of the analysis will follow, showing 15 lines of reference block
information at a time. The dot indices for edge and width will be listed for
the left and right reference blocks. Press <cr> to see the next 15 lines of
information. The main thing to look for is the stable reference block location
and size for each line. The last line or two may be off
After all lines are shown, average values for these dot indices will be
displayed.
Finally, calculated image cut parameters will be listed, again by dot indices,
for the X and Y dimensions.
For each dimension, the cut indices are listed first, separated by "..".
The last value is the size of the original scanned image. If a calculated
cut parameter is beyond the image size, it will be flagged with a large value
typically >60000.
The last line is a help line for user input. Similar to above, you have the
choice of faster (F), slower (S), or continue (<cr>).
Press <cr> and as soon as a line's analysis appears, press <cr> again. Then
press "B" to bypass continued line by line displays. Only the final summary
will be shown. To not do the actual image merging, answer the questions about
how to merge with "N".