Oracle8i Administrator's Reference Release 2 (8.1.6) for Sun SPARC Solaris A77184-01 |
|
The following documents provide in-depth information about the Oracle options available in Oracle8i Release 2 (8.1.6):
Oracle8i interMedia includes the following components:
There are no demos for Text in Oracle8i. However, interMedia Text now includes code samples. Point your browser at the following URL:
$ORACLE_HOME/ctx/sample/api/index.html
Oracle8i interMedia includes a number of scripts and sample programs in the following directories:
$ORACLE_HOME/
ord/aud/demo/$ORACLE_HOME/ord/img/demo/
$ORACLE_HOME/ord/vid/demo/
The audio scripts consist of the following files:
auddemo.sql
- audio demonstration that shows features of the audio object including:
fplugins.sql
and fpluginb.sql
described in the next two list items and in Oracle8i interMedia Audio, Image, and Video User's Guide and Reference on how to extend interMedia Audio to support a new audio data format
fplugins.sql
- demo format plug-in specification that you can use as a guideline to write any format plug-in you want to support.
fpluginb.sql
- demo format plug-in body that you can use as a guideline to write any format plug-in you want to support.
See the README.txt
file in the $ORACLE_HOME/ord/aud/demo
directory for requirements and instructions on running this SQL demo.
Once you have installed Oracle8i interMedia Image, you can run the Oracle8i interMedia Image demonstration program. This program can also be used as a test to confirm successful installation.
This section contains the steps required to build and run the interMedia image demo.
The interMedia Image demo files are located in $ORACLE_HOME/ord/img/demo
, where $ORACLE_HOME
is the ORACLE_HOME directory.
% svrmgrl SVRMGRL> connect internal; SVRMGRL> create user SCOTT identified by tiger; SVRMGRL> grant connect,resource to SCOTT;
$ORACLE_HOME
is the $ORACLE_HOME
directory.
% svrmgrl SVRMGRL> connect internal; SVRMGRL> create or replace directory imgdemodir as `$ORACLE_HOME/ord/img/ demo';
SVRMGRL> grant read on directory imgdemodir to public with grant option;
imgdemo
program.
% cd $ORACLE_HOME/ord/img/demo % make -f demo_ordimg.mk imgdemo
The imgdemo
file is a sample program that shows how Oracle8i interMedia Image can be used from within a program. The demo is written in C and uses OCI (Oracle Call Interface) to access the database and exercise Oracle8i interMedia Image.
The program operates on imgdemo.dat
, which is a bitmap (BMP) image in the demo directory. Optionally, you can supply an image file name on the command line, provided the file resides in the same directory as the demo. In either case, once the image has been manipulated by Oracle8i interMedia Image, the resulting image is written to the file imgdemo.out
and can then be viewed with common rendering tools that you supply.
When the demo is run, it deletes and re-creates a table named IMGDEMOTAB in the SCOTT/TIGER schema of the default database. This table is used to hold the demo data. Once the table is created, a reference to the image file is inserted into the table. The data is then loaded into the table and converted to JFIF using the
processCopy( ) method of ORDImage.
The image properties are extracted within the database using the setProperties( ) method. An UPDATE command is issued after the setProperties( ) invocation. This is required because the setProperties( ) invocation has only updated a local copy of the type attributes.
Next, the Oracle8i interMedia Image process( ) method is used to cut and scale the image within the database. This is followed by an update that commits the change. The program cuts a portion of the image 100 pixels wide by 100 pixels high starting from pixel location (100,100). This sub-image is scaled to twice its original size and the resulting image is written to a file named imgdemo.out
in the current directory.
Execute the demo by typing imgdemo
on the command line. Optionally, you can use a different image in the demo by first copying the file to the directory in which the demo resides and then specifying its file name on the command line as an argument to imgdemo
.
Use the following command:
$ imgdemo optional-image-filename
The demo displays a number of messages describing its progress, along with any errors encountered if something was not set up correctly. Expect to see the following messages:
Dropping table IMGDEMOTAB... Creating and populating table IMGDEMOTAB... Loading data into cartridge... Modifying image characteristics... Writing image to file imgdemo.out... Disconnecting from database... Logged off and detached from server. Demo completed successfully.
If the program encounters any errors, it is likely that either Oracle8i interMedia software has not been installed correctly or the database has not been started. If the program completes successfully, the original image and the resultant image, which has undergone the cutting and scaling described earlier, can be viewed with common image rendering tools.
The Video scripts consist of the following files:
viddemo.sql
- video demo that shows features of the video object including:
fplugins.sql
and fpluginb.sql
described in the next two list items and in Oracle8i interMedia Audio, Image, and Video User's Guide and Reference on how to extend interMedia Video to support a new video data format
fplugins.sql
- demo format plug-in specification that you can use as a guideline to write any format plug-in you want to support
fpluginb.sql
- demo format plug-in body that you can use as a guideline to write any format plug-in you want to support
See the README.txt
file in the $ORACLE_HOME
/ord/vid/demo directory for requirements and instructions on how to run this SQL demo.
A Java demo has been provided to help you learn to use both the audio and video client-side Java classes so you can build your own applications. In these two demos, the audio and video object is instantiated at the client side and a number of accessor methods are invoked. The audio Java demo files are located in the ORACLE_HOME/ord/aud/demo
directory and the video Java demo files are located in the $ORACLE_HOME/ord/vid/de
mo directory. See the README.txt
file in each directory for requirements and instructions on how to run each respective Java demo.
The MediaAnnotator program is not contained on the Oracle8i interMedia CD. It (along with other free Oracle software) can be found at the following URL:
http://www.oracle.com/products/free_software/
Oracle8i interMedia Locator includes a number of scripts that you can modify and run.
Sample Oracle8i interMedia Locator scripts are available in the following directory after you install this product:
$ORACLE_HOME/md/demo/geocoder
These scripts consist of the following files:
geohttp.sql
This file contains two parts. One part is for running a geocode function in interactive mode and the other is for running the geocode function in batch mode.
See Example 1 in "GEOCODE1 Function (with lastline field)"in the Oracle8i interMedia Locator User's Guide and Reference for a listing of this part of the file.
You must update the setup tables in the nh_cs.sql
file before you run the geohttp.sql
in batch mode. See the Oracle8i interMedia Locator User's Guide and Reference for Example 2 in "GEOCODE1 Function (with lastline field)"or Example 3 in "GEOCODE1 Function (with lastline field)"for a listing of this part of the file.
geoindex.sql
This file contains:
cust_table
table where the spatial information is stored. For a listing of this file, see the example in
geolocate.sql
This file contains a routine that dynamically creates a geometry of interest and then queries against the NH_COMPUTER_STORES table to find out how many stores are within a 10-mile radius of the office. For a listing of this file, see Example 2 in "LOCATOR_WITHIN_DISTANCE" Oracle8i interMedia Locator User's Guide and Reference.
For this release, two components of Oracle8i interMedia, the Clipboard and Web Agent, are not available on the Oracle8i media. You can download the components from the Oracle Technology Network web site:
http://technet.oracle.com
Choose products, then go to interMedia to find the interMedia free software downloads.
The documentation, which includes README
files and the manual Using Oracle8i interMedia with the Web, is included in the download.
Table 6-1 shows the demos included with Oracle8i Time Series. This table includes a description of each demo and the default directory in which its files are installed.
The demo directory can be found at $ORACLE_HOME/ord/ts
..
The README.txt
file in the demo directory introduces the demos. Also, the directory for each demo contains a README.txt
file with a more detailed description of that demo.
A sample program is included with Visual Information Retrieval. The sample program demonstrates how to load two images into the database, generate their signatures, and then compare their signatures using a weighted similarity function.
This program uses two data files, virdemo1.dat
and virdemo2.dat
, as its input. No other input or parameters are required.
The following assumptions are made:
virdemo1.dat
and virdemo2.dat
are valid image files that reside in the VIRDEMODIR directory and the user has read/write access to the directory.
There are two ways to run the sample program: using the included sample images, or using your own images.
Example 6-2 runs the sample program using the included image files. The images are compared using equal attribute weights:
% virdemo Image 1 and 2 have a similarity score of 0.0
Example 6-3 shows how to specify your own images on the command line. The images must reside in the $ORACLE_HOME/ord/vir/demo
directory.
% virdemoimage1
image2
global_color
local_color
texture
structure
You must specify all six parameters, the 2 file names and 4 attribute weights (ranging from 0.0 to 1.0) in this sample program. Note that when using the VIRScore( ) operator in your own applications, it is only necessary to provide at least one attribute weight.
The VIRDEMODIR directory provides several other sample image files to demonstrate the effects of emphasizing the different visual attributes. You can use an image viewer (such as xv) to display the images, and then compare them using the sample program, experimenting with different weights.
The reader should refer to $ORACLE_HOME/md/demo/readme.txt
to find more information.
|
![]() Copyright © 1999 Oracle Corporation. All Rights Reserved. |
|