...
 
Commits (2)
......@@ -3,7 +3,7 @@ println "ICY_HOME=${System.env.ICY_HOME}"
apply plugin: 'java-library'
apply plugin: 'eclipse'
version = '1.0.0'
version = '1.0.1'
configurations {
extraLibs // configuration that holds jars to include in the jar
......
......@@ -86,7 +86,6 @@ public class ExtractSurfFeatures extends EzPlug implements Block, EzStoppable {
protected void execute() {
Sequence sequence = sequenceVar.getValue(true);
BufferedImage image = sequence.getFirstImage();
sequence = null;
double hessianThreshold = hessianThresholdVar.getValue(true);
SurfFeatureCalculator featureCalculator = new SurfFeatureCalculator();
......@@ -113,6 +112,11 @@ public class ExtractSurfFeatures extends EzPlug implements Block, EzStoppable {
keyPointDescriptorsVar.setValue(featureCalculator.getDescriptors());
} else {
Sequence result = new Sequence(featureCalculator.getGrayImage());
result.setName(sequence.getName() + "_SURF");
result.setPixelSizeX(sequence.getPixelSizeX());
result.setPixelSizeY(sequence.getPixelSizeY());
result.setPositionX(sequence.getPositionX());
result.setPositionY(sequence.getPositionY());
for (KeyPoint keyPoint : featureCalculator.getKeyPoints()) {
ROI2DEllipse roi = new ROI2DEllipse(keyPoint.getX() - keyPoint.getScale(),
keyPoint.getY() - keyPoint.getScale(), keyPoint.getX() + keyPoint.getScale(),
......
......@@ -43,6 +43,8 @@ public class MatchSurfFeatures extends EzPlug implements Block, EzStoppable {
private long startTime;
private long endTime;
private Sequence sequence1;
private Sequence sequence2;
private SurfFeatureCalculator featureCalculator1;
private SurfFeatureCalculator featureCalculator2;
private SurfMatcher matcher;
......@@ -123,8 +125,10 @@ public class MatchSurfFeatures extends EzPlug implements Block, EzStoppable {
@Override
protected void execute() {
BufferedImage image1 = varSequence1.getValue(true).getFirstImage();
BufferedImage image2 = varSequence2.getValue(true).getFirstImage();
sequence1 = varSequence1.getValue(true);
sequence2 = varSequence2.getValue(true);
BufferedImage image1 = sequence1.getFirstImage();
BufferedImage image2 = sequence2.getFirstImage();
double hessianThreshold = varHessianThreshold.getValue();
int matchNumberLimit = varMatchNumberLimit.getValue();
int ransacMaxNumIterations = varRansacMaxNumIterations.getValue();
......@@ -222,10 +226,21 @@ public class MatchSurfFeatures extends EzPlug implements Block, EzStoppable {
private void showResultSequences() {
Sequence s1 = new Sequence(featureCalculator1.getGrayImage());
Sequence s2 = new Sequence(featureCalculator2.getGrayImage());
s1.setName(sequence1.getName() + "_SURF");
s1.setPixelSizeX(sequence1.getPixelSizeX());
s1.setPixelSizeY(sequence1.getPixelSizeY());
s1.setPositionX(sequence1.getPositionX());
s1.setPositionY(sequence1.getPositionY());
s1.addROIs(matchesSequence1, false);
s2.addROIs(matchesSequence2, false);
addSequence(s1);
Sequence s2 = new Sequence(featureCalculator2.getGrayImage());
s2.setName(sequence2.getName() + "_SURF");
s2.setPixelSizeX(sequence2.getPixelSizeX());
s2.setPixelSizeY(sequence2.getPixelSizeY());
s2.setPositionX(sequence2.getPositionX());
s2.setPositionY(sequence2.getPositionY());
s2.addROIs(matchesSequence2, false);
addSequence(s2);
}
......