eu.planets_project.services.java_se.image
Class JavaImageIOCompare

java.lang.Object
  extended by eu.planets_project.services.java_se.image.JavaImageIOCompare
All Implemented Interfaces:
Compare, PlanetsService

@MTOM
@StreamingAttachment(parseEagerly=true,
                     memoryThreshold=10485760L)
public class JavaImageIOCompare
extends Object
implements Compare

The purpose of this is to implement a number of image comparison metrics for quality. These include PSNR, MSE. http://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio

Author:
AnJackson

Field Summary
static String NAME
          Service name
static URI PSNR_URI
          The PSNR property definition
 
Fields inherited from interface eu.planets_project.services.compare.Compare
QNAME
 
Constructor Summary
JavaImageIOCompare()
           
 
Method Summary
static PropertyComparison buildPsnrProperty(double psnr)
           
 CompareResult compare(DigitalObject first, DigitalObject second, List<Parameter> config)
           
 List<Parameter> convert(DigitalObject configFile)
          Convert a tool-specific configuration file to the generic format of a list of properties.
 ServiceDescription describe()
          A method that can be used to recover a rich service description, and thus populate a service registry.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
Service name

See Also:
Constant Field Values

PSNR_URI

public static final URI PSNR_URI
The PSNR property definition

Constructor Detail

JavaImageIOCompare

public JavaImageIOCompare()
Method Detail

buildPsnrProperty

public static PropertyComparison buildPsnrProperty(double psnr)

compare

public CompareResult compare(DigitalObject first,
                             DigitalObject second,
                             List<Parameter> config)
Specified by:
compare in interface Compare
Parameters:
first - The first of the two digital objects to compare
second - The second of the two digital objects to compare
config - A configuration parameter list
Returns:
A list of result properties, the result of comparing the given digital object, wrapped in a result object

convert

public List<Parameter> convert(DigitalObject configFile)
Description copied from interface: Compare
Convert a tool-specific configuration file to the generic format of a list of properties. Use this method to pass your configuration file to Compare.compare(DigitalObject, DigitalObject, List).

Specified by:
convert in interface Compare
Parameters:
configFile - The tool-specific configuration file
Returns:
A list of parameters containing the configuration values

describe

public ServiceDescription describe()
Description copied from interface: PlanetsService
A method that can be used to recover a rich service description, and thus populate a service registry.

Specified by:
describe in interface PlanetsService
Returns:
A ServiceDescription object that describes this service, to aid service discovery.

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException


Copyright © 2013 Open Planets Foundation. All Rights Reserved.