|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fhg.igd.semoa.service.AbstractService
cbr.service.PictureCentral
Manages a picture index and supports content based image retrieval on the index based on color coherence vectors. The index updates are atomic, in other words either an update transaction succeeds or it fails completely and the index keeps the state it had before the beginning of the transaction. Multiple concurrent reads are supported; writers are blocked until readers finished. While a writer is writing no readers are allowed.
This class is backed by a PicsStore
and
a ResourceStoreDelegate
.
CCV
,
FeatureExtractor
,
PicsIndex
,
PicsFinder
Field Summary | |
static String |
NAME_IDX
The name of the index file. |
static String |
NAME_THUMBS
The name of the directory in which thumbnails are kept. |
static String |
NAME_TMP
The name of the temporary index file. |
private PicsStore |
store_
The PicsStore that is used to manage
the index. |
Fields inherited from class de.fhg.igd.semoa.service.AbstractService |
REV_POSTFIX, REV_PREFIX |
Constructor Summary | |
PictureCentral()
Creates an instance. |
|
PictureCentral(PicsStore store)
Creates an instance which uses the given PicsStore in order to manage the index. |
Method Summary | |
String |
author()
Returns the name of the author of the service. |
void |
delete(Iterator entries)
Deletes the given picture entries
from the picture index. |
PictureEntry[] |
find(FeatureVector v,
float threshold,
int max)
Matches the given feature vector against the ones of the known Pictures and returns the picture entries of at most max pictures that have a
normalised distance less than the given threshold to
the query vector. |
PictureEntry[] |
find(Image im,
float threshold,
int max)
Matches the given image against the stored images and returnes the entries of the max most
similar pictures known. |
String |
info()
Returns the informative string which should describe the service's essence in a sentence. |
void |
put(Iterator entries)
Inserts the given picture entries
into the existing index. |
String |
revision()
Returns the revision number of this class as a string. |
void |
setIndexStore(File ifolder)
Initializes this instance. |
Methods inherited from class de.fhg.igd.semoa.service.AbstractService |
checkDependencies, dependencies, docs, doPrivileged, doPrivileged, getACC, getEnvironment, majorVersion, minorVersion, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String NAME_IDX
public static final String NAME_TMP
public static final String NAME_THUMBS
private PicsStore store_
PicsStore
that is used to manage
the index.
Constructor Detail |
public PictureCentral()
public PictureCentral(PicsStore store)
PicsStore
in order to manage the index. The
PicsStore
must have been initialised correctly
before calling this constructor.
store
- The PicsStore to use for managing the index.Method Detail |
public String author()
AbstractService
author
in interface Service
author
in class AbstractService
public String revision()
AbstractService
majorVersion()
, minorVersion
based on the assumption that this method returns a
revision string as generated by rcs(1) for the template
"$Revision: 1.7 $/$Date: 2007-08-08 04:41:53 +0200 (Wed, 08 Aug 2007) $".
revision
in class AbstractService
public String info()
AbstractService
info
in interface Service
info
in class AbstractService
public void setIndexStore(File ifolder) throws IOException
ifolder
- The folder in which the index is kept.
IOException
- if an I/O error occurs during
initialisation.public PictureEntry[] find(Image im, float threshold, int max) throws IOException
max
most
similar pictures known. All returned picture entries
represent pictures that have a distance from the query
picture that is less than the given threshold. The
threshold is normalised in the range [0.0,1.0] where 0
denotes identity (of feature vectors) and 1 denotes
infinite distance.
find
in interface PicsFinder
im
- The query image.threshold
- The maximum distance retrieved pictures
are allowed to have from the query image.max
- The maximum number of hits to return.
NullPointerException
- if the given picture
is null
.
IOException
public PictureEntry[] find(FeatureVector v, float threshold, int max) throws IOException
max
pictures that have a
normalised distance less than the given threshold to
the query vector. If the feature vector is not of a
supported type then an exception is thrown.
find
in interface PicsFinder
v
- The feature vector to match known picture
entries against.threshold
- The maximum distance a picture in
the result set is allowed to have from the query
vector.
UnsupportedAlgorithmException
- if the given
feature vector cannot be mapped to the supported
ones.
IOException
public void put(Iterator entries) throws IOException
picture entries
into the existing index. The distance value is ignored
but all other fields should be provided.
put
in interface PicsIndex
entries
- The iterator that iterates over the
picture entries
that shall be
inserted into the index.
IOException
public void delete(Iterator entries) throws IOException
picture entries
from the picture index. Only the name and URL fields
of the pictures to be removed need to be present in
the entries.
delete
in interface PicsIndex
entries
- The iterator that iterates over the
picture entries
that shall be
deleted from the index.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |