RegJP2000 Version 2.0

Bob Courtney

Geological Survey of Canada

Natural Resources Canada

Bob.courtney@nrcan.gc.ca

 

January 20, 2012


Table of Contents

 

RegJP2000 Version 2.0. 1

Table of Contents. 2

Introduction. 3

Intellectual and Property Rights. 5

Installation. 7

Removal 7

Operation. 8

Startup. 8

Main Window.. 8

Zoom.. 12

Graphics Tool Bar 13

Zoom Box Window.. 14

Current Point 15

Register The Image. 16

Register => Define Horizontal Registration Lines. 16

Register => Define Vertical  Registration Lines. 29

Register => Define Vertical  Time Shifts. 37

Generating a SEGY file. 41

Imaging the SEGY Data. 46

SGYJP2. 47

SGYJPViewer 48

Creating Psuedo Bipolar Traces. 49

 

 


 

Introduction

 

RegJP2000 is a Windows XP program that is used to register scanned seismic and sidescan sections stored in JPEG2000 format and  project them into SEGY format for subsequent processing. The use of JPEG2000 makes the handling of very large images very quick and easy.

 

Image sizes in excess of 6000 x 300,000  pixels can be handled on most desktop PC’s (100 ft rolls of scanned analog section).

 

These SEGY files are often subsequently converted into SEGY-encoded JPEG2000 format. These SEGY-encoded JPEG 2000 files can viewed simply as a grayscale image in most commonly available JPEG 2000 viewers (e.g., Adobe Photoshop, LizardTech,  Corel draw, etc.) .  However, these files contain much more; they contain all the trace information derived from the SEGY header data encoded as XML and stored directly in the file. This information can be recovered and reconverted back into the original SEGY. An enhanced viewer that uses these extended capabilities is available through the GSC.

 

RegJP2000 represents the major component of a process ( scan ->convert/QC->register)  to convert analog sections into internet-ready, geographically-registered data objects as shown in the lower part of the following diagram.

 

 

 

The attempt here is to implement  a database- and internet-ready  framework that will allow researchers and others to easily exchange and archive both sonar data and their interpretations.   Our experience has suggested, that at least for single channel high-resolution seismic and sidescan data, scientists much prefer working with these JPEG2000-based digital sections rather than with the original paper sections.

 

JPEG2000 encoding of seismic and sidescan offers the capability to encode SEGY data efficiently (typical compression of 10:1 though to 40:1), offer quick evaluation of data quality through off-the-shelf image viewing technology and, importantly, afford a framework for embedding value-added interpretations to accompany the data. These files may contain 100,000’s of traces efficiently without undue allocation of system resources.

 

The adoption of a standard, open structure framework for storage allows this work to be leveraged by other technologies developed for dissemination of imagery stored in JPEG 2000, such as image servers and similar types of technologies. For example, the development of the JPIP internet transport mechanism for efficient transfer of JPEG 2000 data over serial communication lines holds great promise for interactive viewing and manipulation of these large data objects over standard TCP/IP connections.

 

One of the notable advantages of this approach is the multiresolution or multiscale nature of the JPEG 2000 storage framework. In storing the data in a multi-resolution form,  near-optimal images of these data can be displayed as one zooms in and out with very little effort and very little load on computer resources. This feature makes the onscreen representation of the seismic data  very similar to what one would see viewing a printed seismic section, with the added advantage of course that these data and the related interpretations are geographically registered.

 

JPEG2000 uses an efficient entropy –based MQ bitstream encoder for data storage. Therefore white space compresses very efficiently (as it has no entropy). This feature allows us to store seismic data zero-padded for trace delay changes, yielding seamless imagery which would be prohibitive in size in an uncompressed form. On the conversion of JPEG2000 files back to SEGY, these zero-padded section are removed,  recovering the original trace delayed form.

 

 

 

 

 

Intellectual and Property Rights

 

This program is the intellectual property of the Government of Canada. All rights to modify and distribute this software are retained by the Government of Canada.

 

"Intellectual Property" means all rights in respect of Confidential Information, any know‑how, inventions and improvements related to Confidential Information, including without limitation, patents, copyrights, trade secrets, trade‑marks, registered industrial designs, any applications for same and all rights therein.

 

"Confidential Information" means any information of a scientific or technical nature disclosed to, generated or acquired by the user in the course of carrying out the activities defined in this Agreement, whether oral or recorded in any form or medium and whether or not protectable by copyright.

 

We allow this program to be redistributed freely in its original form. However, please send me an email if you have a copy – I’ll ensure you get on a mailing list for upgrades.

 

Contact the author, Bob Courtney, Natural Resources Canada,  1 Challenger Drive , Dartmouth Nova Scotia B2Y 4A2 , to obtain the most recent version.

 

Unfortunately we have limited capacity to support needs of outside users. We do however encourage joint research agreements to extend this framework.

 

The RegJP2000 distribution package may be freely distributed as it contains no proprietary code. It does utilize Kakadu (www.kakadusoftware.com) , GSL (http://www.network-theory.com/gsl/)   and TChart ( www.steema.com) libraries which are distributed in compliance with each of their respective licensing agreements.

 

The product will undoubtedly evolve over time so it is prudent to contact the author to obtain the most recent version. Since this product is free, sometimes one must wait until time is available to address bugs, etc.


Installation

 

We recommend that you download three separate programs if you wish to convert TIFF or PNM scanned files into JPEG2000 images for registration;

 

SectionJP2 - This tool is used to convert large PPM or TIFF files into JPEG2000 format. Hopefully it is simple enough to operate without much help.

 

Download at : ftp://ftp.nrcan.gc.ca/gsc/courtney/SectionJp2/SectionJP2.zip

 

 

QCJP2  - This tool is used to quality control JPEG2000 scanned sections. In addition, this application may be used to rotate, flip sections, tone balance sections, and export to BMP format at reduced scales

 

 

Download at : 
 
ftp://ftp.nrcan.gc.ca/gsc/courtney/QCJP2/qcjp2.zip
 
 
 
RegJP2000 :  This program can be used to register and project scanned JPEG2000 images into SEGY format.
 
Download Program  at : ftp://ftp.nrcan.gc.ca/gsc/courtney/RegJP2000/RegJP2000.zip
 
Download a Sample Scanned Image in JPEG2000 format :
ftp://ftp.nrcan.gc.ca/gsc/courtney/RegJP2000/2001043_H_220_1804.jp22
 
 
 

 

 

 

Removal

 

To remove the package, choose Control Panel from the Windows Start Menu. Double click on  Add or Remove Programs.

 

Note : It is necessary to manually remove an existing package before a newer version can be installed.


Operating Basics

 

This help file covers only the operation of the RegJP2000 program. Eventually help files will be written for SectopnJP2 and QCJP2,  but the use of these programs is very simple.

 

Startup

 

Download a sample scanned JPEG2000 file from ftp://ftp.nrcan.gc.ca/gsc/courtney/RegJP2000/2001043_H_220_1804.jp22
or 

ftp://ftp.nrcan.gc.ca/gsc/courtney/RegJP2000/83030_H_EXT_290_1740.jp2

 

Make sure that the scanned image  file is writeable. If it is not then the program cannot store registration data within the image.

 

Run RegJP20000 by double-clicking on the desktop icon or by choosing the program from the Start=> All Programs=>NRCan=>RegJP2000  menu selection.

 

Choose the desired file using the File=>Open menu seletion in the Main Window. Again, ensure that the target file has both read and write permission set so that the registration data may be appended to the input file.

 

 

Three widows, the Main, the Zoom and the Expedition windows,  will appear ( Fig 2)

 

Main Window

 

Fig2 – Opening a JPEG2000 scan for the first time

 

 

Manually type the expedition id, or choose one from the pull-down list. Type in the year of the expedition. These expedition ids are free-form strings and should be fairly open in format. At the GSC, we try to restrict the expedition ids to the standard nomenclature used in our ED (Expedition)  database.

 

 By default, it is assume that the horizontal axis of the scanned section is referenced by GMT/Universal  time. In some instances, the horizontal axis will be trace number or fix number. Choose the appropriate format with the radio buttons.

 

Note :  We have extensively  tested only  time-referenced sections. If you are registering trace number-referenced sections and you encounter problems, get in contact with me.

 

Fig 3 – Input expedition code and year

 

When you have finished, click “Hide” to de-clutter the work space. This window can be viewed and edited at any time by choosing the Register=>View Cruise Parameters menu option in the main window.

 


 

Fig 4 – Main window

 

The main window initially shows the whole scanned image. Axes dimensions are given in pixels, so in the image above, the paper section length is roughly   100,000/300 = 333  inches ( 8.5 meters)  Typically at the GSC we scan our sections at 300 dpi on a continuous feed Xerox scanner which scan  section lengths in excess of 30 m (100 ft) in a few minutes .

 

It should be noted that this preview of the scanned image is usually under-sampled and, therefore may not be very appealing.  In Fig 4, over 90,000 pixels of the original image  in the x-axis have been squeezed into  around 1000 pixels for display. You can clearly observe that the section did not feed completely straight into the scanner as the section tends to drift off towards the  bottom of the frame on  the right-hand side.

 

The aspect ratio of the image is usually distorted. The aspect ratio can be changed by dragging on the bottom of the window box to resize the image, e.g.,

 

Fig 5– Main window resize

 

Note that the zoom window area (the red box ) should be square at a 1:1 aspect ratio and, thus, may be used as a guide if desired.

 

Zoom

 

One can zoom into the main window image by clicking the left mouse button on the upper left-hand corner of the desired area on the display area of the main window and dragging out a “rubber band” box towards the lower right-hand corner of the box.

 

 

Fig 6– Main window zoom in

 

 

Zoom out  to the original bounds by clicking with left mouse button on the lower right hand corner and pulling a box towards the upper left hand corner.

 

The view can be panned by depressing the right mouse button on the image and dragging this position to change  the new desired view limits.

 

Graphics Tool Bar

 

The graphics display in this program is provided using the  Steema TeeChart .NET library. This library makes available a graphics tool bar that allow manipulation of the graphed area displayed on the page. With this toolbar, almost every aspect of the displayed graphic can be adjusted. It is outside the scope of this document to fully describe this functionality; check the Steema website for more extensive information.

 

Fig 7 Graphics Tool Bar

 

Edit Chart

 

Clicking on this icon brings up the exhaustively extensive TeeChart Editor :

Fig.8 TeeChart Editor

 

Almost all aspects of the displayed image  can be adjusted using this tool. Explore and have fun.

 

Print Graphic

 

Use this button to send a snapshot of the displayed image to the printer.

 

Copy Image to Clipboard

 

Copy the graphic image to the Windows clipboard. Useful for imported into word processors, etc.

 

Save Graphic

 

Save the graphic to a file.

 

 

 

Zoom Box Window

 

The red rectangle shows the area displayed in the zoom box window (ZBW).  The zoom box image is always displayed at a 1:1 aspect ratio but the scale may be changed by pressing the zoom in and zoom out buttons located in the ZBW. The viewing area can be adjusted by pulling on the corners of the window box.

 

 

Fig. 5 – The zoom box

 

Current Point

 

The current point is shown by a red "+" marker in both the zoom box window and the main window.

 

The current point may be moved in three ways :

 

(1)  Single  click  on the desired location in the main window. The zoomed image will be redrawn to centre on this newly chosen location.

 

(2) Double click within the zoom box window. The zoomed box image will be redrawn centered on this new location. The red box on the main window will be redrawn.

 

(3) Click on the point in the zoom box window, holding your left mouse button down. The mouse pointer will change from an arrow to a hand  when it close enough to the point for this operation. Drag the point to a new location. The current point location will be updated but the zoom box window will not be redrawn.

 

 

 

Register The Image

 

In order to register the scanned image, we need to establish three sets of information that will determined the projection, or transformation, of the image space ( pixel coordinates)  into trace space ( trace number versus two way travel time). This process is conducted through the "Register" pull-down menu locate near the top of the main window.

 

Register => Define Horizontal Registration Lines

 

Choose this menu item in order to define horizontal lines that define the vertical two way travel time transformation in the image:

 

 

These lines will run from left  to right on the image. At least two horizontal lines are needed to define the transformation.

 

You will use both the main window and the zoom box window in this step.

 

Click on the start of the top-most two-way travel time in the image in the main window :

 

Main Window

 

Note the current point location in the zoom box window ( zoom in or out as needed):

 

 

Drag the current point onto the two-way time line on the image :

 

 

Press "Add Point" in the zoom box window or use the hot key "a" to add a point to the current edit line and a green dot will appear :

 

 

The green dot can be dragged around to adjust its position if necessary  in the same manner as for the current point ( red + ).

 

Go to the opposite end of the scan on the main window and click on the topmost line :

 

 

Adjust the position of the point if necessary in the zoom box and add the point to the current edit line by pressing "Add Point" in the zoom box window ( or use the hot key "a")

 

A line connecting the two point will be drawn:

 

 

Click on the midpoint of this line to check whether the line lies along the scanned image along its entire length :

 

 

Add another point at the midpoint

 

and check the midpoints of the two new segments to the right and to the left. Add more points if necessary along the entire time line in order to adequately approximate the variable skew  in the scanned image with piecewise linear segments:

 

Save this current edit line by entering the value of the two-way travel time in milliseconds in the Horizontal Registration Lines window and then pressing the "Add Active Line" button:

 

 

The Main Window Display will be updated  where the green edit symbols and green line are replace by an cyan line with  a triangle symbol marker. The active edit line will be cleared from the zoom box window.

 

 

A second ( or third, etc)  two-way travel time line can be created in the same way as was used for the first line.

 

Alternatively, a clone of the first line can be created and shifted downwards in the image to create the next line. Double-click on the entry of the first line in the list box of the Horizontal Registration Line Window. A green edit line with green symbols will appear underneath in saved edit line. Use the Shift Line button to shift the edit line downwards in the image. The size and direction of the shift is controlled by the value in numeric up/down box next to the button.

 

 

Continue shifting the line until it is close to the desired position.

 

Change the size and sign of the increment to fine tune the placement of the shifted line.

 

 

Use the zoom box window to get a close look at the adjustment.

 

Check each of the nodal points in shifted line in the zoom box

 

 

 and drag them using the mouse cursor to the desired location if needed.

 

 

More points can be added to this second line if necessary and points can be deleted using the "Del Point" button.

 

The entire line can be cleared at anytime and the user can start over creating a new line at this point by pressing the Clear Line button.

 

 

Update the value of the two-way time for this line in the Horizontal Box Window and press the "Add Active Line" button.

 

 

 

To edit one of these lines, double click on the entry and change the two-way time value if desired. Use the zoom box to add, delete or move nodal point positions. Press Update when edits have been completed.

 

The order in which the lines are entered does not matter. At least two horizontal registration lines are needed to project the scanned data.

 

Save Your Work

 

At any point the registration information can be saved to the file using the menu command File=>Save. The registration data are saved in a XML box embedded to the input image.

 

Register => Define Vertical  Registration Lines

 

Choose this menu option to bring up the Vertical  Registration Lines (VRL) window in which the horizontal axis transformation ( survey time or trace number) is determined.

 

 

Use the zoom rubber-band mode in the main window to stretch out the section so that survey time annotation can be identified.

 

 

Click on the annotation or time marking on the section and adjust the zoom window magnification so the annotation is clearly visible :

 

 

Enter the time ( or trace number ) in the VRL window

 

 

As with the horizontal time lines in the previous section, add  points to the vertical time line as needed to define the curvature or distortion of the line. If the line is not curved or distorted, only one point is needed.

 

 

Save the edit line by pressing the "Add Line" button in the VRL window

 

 

A red, triangle-symbolized line should appear in the main window and the green active edit line will disappear.

 

 

Vertical time lines should be chosen spaced closer than an interval 8000 pixels apart, so in this example the annotation near pixel number 14,000 is used next

 

 

 

Either manually enter new points  for the next registration line. Alternatively clone the first line by double clicking the first entry in the VRL listbox and by using the shift line function to adjust its position. Update the time in the survey line entry boxes and then save the line using the "Add Line" button.

 

 

Use the right mouse button in the main window to pan the image to the right if necessary.

 

If the vertical timelines are too widely spaced apart , an error message will be indicated  in the VRL listbox. The vertical time lines must be spaced within 8000 pixels Simply add another time line between the offending members.

 

 

When the entire section has be registered, it is time to move to the next task. Dismiss the VRL window.

 

 

Breaks in The Record

 

It has been often observed that breaks occur in the scanned section where the recording has been turned off for some period of time. In this instance, it is probably better to make a second copy ( third, or fourth as the case maybe) of the original scanned image file and to register each of these broken sections independently.

 

At one time I had planned to implement the capacity to do multiple segments within one image file, but time limitations dictate to take the simpler route. Just remember to re-label the copied sections ( e.g., section.jp2 becomes section_segment2.jp2)  so that the output SEGY file of the second segment does not overwrite the output from the first segment.

 

Register => Define Vertical  Time Shifts

 

Often high resolution seismic data has to be shifted or time delayed in order that the relevant part of the record remains on the printing surface of the graphic recorder. Sometime this delay is annotated on the printed section and often it is not. The Vertical Time Shift (VTS) window is used to estimate these time shifts from the printed record.

 

 

Use the rubber band zoom mode in the main window  and choose a section of the scanned record where a time delay had been applied to the printed record. Resize the main window so that the delay is clearly visible.

 

Press the "Centre" button to move the delay picker tool onto the centre of the Main Window.

 

Grab the upper point of the tool and pull the point so that the horizontal left line of the tool aligns with the seabed on the left of the delay change.

 

Pull on the point connected to the right horizontal tool line so that the right horizontal line is at the top of the seabed on the right side of the section and the vertical line of the tool is located at the horizontal position of the time delay change.

 

 

At anytime either left or right points may be readjusted.

 

Save the point by clicking on the "Save" point in the VTS window

 

 

 

By default the delay has been rounded to the closest 25 msec increment. It is likely that the field operators used times delays of a fixed amount. The rounding interval can be changed at any time by using the numeric entry.

 

 

The saved time delay is colour-coded with a blue triangle for the left side of  delay and an orange triangle for the right hand side of the delay.

 

After completing the time delay measurements, your main window will look something like this :

 

 

Save your work as you have completed the registration process.

 

 

Generating a SEGY file

 

Use the "To SEGY" menu button to evoke the Export to SEGY (ETS) window. It is in this window that we  interpolate the scanned data to generate a 16 bit SEGY file. Note that this interpolated SEGY data will contain superfluous energy from all the grid lines and annotations but it will still prove useful for mapping purposes. The spectral content of this data will as well be somewhat compromised since the scanned records had been half wave rectified during printing.

 

 

The top information in the ETS window gives the bounding limits of the scanned data that lies between the topmost and bottommost horizontal registration lines and the leftmost and rightmost vertical registration lines.

 

By default, these limits are used in projecting the scanned image to SEGY format but these limits may be extended using linear extrapolation. In our working example, the limits have been extended so that the entire two-way time of the section is projected and the survey time starts and ends on the even hour.

 

 

The next item to adjust is the shot interval and the samples per trace. Since scanned data are interpolated to generate trace data, any  shot interval can be chosen  even one less that the two-way time of the recording window if desired.

 

The samples per trace should be set to sufficiently define variations of the recorded trace. A value of 4096 is recommended

 

If the scanned image displays sidescan data, push the Yes radio pushbutton. In this case, encode the two way travel times in the same way as was used for the siesmic data, i.e., 0 time line a the top of the image and the appropriate value for the bottom of the trace in msec.

 

 

A static delay time can be add to all the traces to account using the bottom most entry box.

 

Press the Convert button to start the conversion :

 

 

The graph at the bottom will display the 16 bit shot amplitudes extracted from scanned image. The process progresses in blocks - each block corresponding to the data residing between each adjacent pair of vertical reference lines.

 

The program will have generated a SEGY file in the same directory as the input scan ; in the working example the file name is 83030_H_EXT_290_1740.sgy.

 

Imaging the SEGY Data

 

SGYJP2

 

The SEGY file can be compressed into the SGYJP2 format developed at NRCan (ftp://ftp.nrcan.gc.ca/gsc/courtney/SegyJp2/SegyJp2.zip) .  The SGYJP2 format is convenient as it is highly compressed, can be viewed with a multiresolution approach and can be used to generated SEGY data at any time. The suite of tools based on this technology can be found at ftp://ftp.nrcan.gc.ca/gsc/courtney/index.html. See the website for more information on these tools.

 

 

Choose half-wave rectification since the original scanned data is already in this format and specify the desired compression ratio.

 

 

 

SGYJPViewer

 

Use the SEGYJPViewer (ftp://ftp.nrcan.gc.ca/gsc/courtney/SegyJp2Viewer/SegyJp2_Viewer.zip) to view this new compressed file. The converted image is now displayed corrected for time delays

 

 

Use the Palette tool to adjust the grey level mapping. Zoom in and inspect the converted file.

 

 

 

You can check the registration at this point by clicking on a printed grid line. The status line located above the image will display the interpolated SEGY .trace time

Creating Pseudo Bipolar Traces

 

The following procedure is admittedly, at worst, a  cheat and, at best, a rough approximation. A full waveform representation of the image can be creating by filtering the data in SGYJP2.Obviously energy from the printed grid lines and the annotation will be present in these sections.