Image files comparison using histograms and profiles V1.0
Created: 2011-11-22 12:29:08
Last updated: 2011-11-23 13:47:20
This workflow extracts histogram and profile features from image file applying image processing command line tool. Necessary configuration files are stored on Github (https://github.com/openplanets/scape/tree/master/pc-qa-toolwrapper). As a template for creation of image workflows was used xa-toolwrapper project from Sven Schlarb (https://github.com/openplanets/scape/tree/master/xa-toolwrapper). This workflow provides WSDL web service that wraps command line tool with tho options ‘extractFeatures’ and ‘compare’. The ‘extractFeatures’ option expects an URL to the image file as parameter. The output is an XML file with histogram data. Having two XML features files and passing their URLs to 'compare' option we will get comparison result in XML format. Comparison result comprises different characteristics provided with value between 0 and 1. 0 means that images are similar and 1 means they are different. Also the workflow provides output of processing log, return code (0 if successful).
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (0)
Titles (0)
Descriptions (0)
Dependencies (0)
Inputs (2)
Name |
Description |
input |
This is an input for extract features tool, that expects image file and generates XML output file
|
input2 |
This is an second input for extract features tool, that expects image file and generates XML output file. The extract features tools are the same tools that run in parallel.
|
Processors (8)
Name |
Type |
Description |
Nested_workflow |
workflow |
|
compareResponse |
xmlsplitter |
|
compareRequest |
xmlsplitter |
|
compareResponse_return |
xmlsplitter |
|
return_result |
xmlsplitter |
|
Read_Text_File |
localworker |
ScriptBufferedReader getReader (String fileUrl, String encoding) throws IOException {
InputStreamReader reader;
try {
if (encoding == null) {
reader = new FileReader(fileUrl);
} else {
reader = new InputStreamReader(new FileInputStream(fileUrl),encoding);
}
}
catch (FileNotFoundException e) {
// try a real URL instead
URL url = new URL(fileUrl);
if (encoding == null) {
reader = new InputStreamReader (url.openStream());
} else {
reader = new InputStreamReader (url.openStream(), encoding);
}
}
return new BufferedReader(reader);
}
StringBuffer sb = new StringBuffer(4000);
if (encoding == void) {
encoding = null;
}
BufferedReader in = getReader(fileurl, encoding);
String str;
String lineEnding = System.getProperty("line.separator");
while ((str = in.readLine()) != null) {
sb.append(str);
sb.append(lineEnding);
}
in.close();
filecontents = sb.toString();
|
Nested_workflow_2 |
workflow |
|
compare |
wsdl |
Wsdlhttp://fue.onb.ac.at/wscapeservices/scape-extractfeatures10-service/Extractfeatures10.wsdlWsdl Operationcompare |
Outputs (3)
Name |
Description |
output3 |
|
compare_log |
|
compare_result_filecontents |
|
Datalinks (12)
Source |
Sink |
input |
Nested_workflow:input |
compare:compareResponse |
compareResponse:input |
Nested_workflow:output |
compareRequest:input1 |
Nested_workflow_2:output |
compareRequest:input2 |
compareResponse:return |
compareResponse_return:input |
compareResponse_return:result |
return_result:input |
return_result:output |
Read_Text_File:fileurl |
input2 |
Nested_workflow_2:input |
compareRequest:output |
compare:compareRequest |
return_result:output |
output3 |
return_result:log |
compare_log |
Read_Text_File:filecontents |
compare_result_filecontents |
Uploader
License
All versions of this Workflow are
licensed under:
Version 2 (latest)
(of 2)
Credits (1)
(People/Groups)
Attributions (0)
(Workflows/Files)
None
Shared with Groups (2)
Featured In Packs (0)
None
Log in to add to one of your Packs
Attributed By (0)
(Workflows/Files)
None
Favourited By (0)
No one
Statistics
Other workflows that use similar services
(0)
There are no workflows in myExperiment that use similar services to this Workflow.
Comments (0)
No comments yet
Log in to make a comment