From 6b866767ecc71111662dccc2ecc656eda183f19e Mon Sep 17 00:00:00 2001 From: Frida Tveit Date: Fri, 6 Jan 2017 17:43:04 +0000 Subject: [PATCH] Issue #41: Removed unneeded uses of 'this' in CarSnapshot. --- .../javaanpr/imageanalysis/CarSnapshot.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/net/sf/javaanpr/imageanalysis/CarSnapshot.java b/src/main/java/net/sf/javaanpr/imageanalysis/CarSnapshot.java index 10189ee..871288a 100644 --- a/src/main/java/net/sf/javaanpr/imageanalysis/CarSnapshot.java +++ b/src/main/java/net/sf/javaanpr/imageanalysis/CarSnapshot.java @@ -50,22 +50,22 @@ public CarSnapshot(InputStream is) throws IOException { } public BufferedImage renderGraph() { - this.computeGraph(); - return this.graphHandle.renderVertically(100, this.getHeight()); + computeGraph(); + return graphHandle.renderVertically(100, getHeight()); } private Vector computeGraph() { - if (this.graphHandle != null) { - return this.graphHandle.peaks; + if (graphHandle != null) { + return graphHandle.peaks; } BufferedImage imageCopy = duplicateBufferedImage(getImage()); - this.verticalEdgeBi(imageCopy); + verticalEdgeBi(imageCopy); Photo.thresholding(imageCopy); - this.graphHandle = this.histogram(imageCopy); - this.graphHandle.rankFilter(CarSnapshot.carsnapshot_graphrankfilter); - this.graphHandle.applyProbabilityDistributor(CarSnapshot.distributor); - this.graphHandle.findPeaks(CarSnapshot.numberOfCandidates); // sort by height - return this.graphHandle.peaks; + graphHandle = histogram(imageCopy); + graphHandle.rankFilter(CarSnapshot.carsnapshot_graphrankfilter); + graphHandle.applyProbabilityDistributor(CarSnapshot.distributor); + graphHandle.findPeaks(CarSnapshot.numberOfCandidates); // sort by height + return graphHandle.peaks; } /** @@ -75,7 +75,7 @@ private Vector computeGraph() { */ public Vector getBands() { Vector out = new Vector(); - Vector peaks = this.computeGraph(); + Vector peaks = computeGraph(); for (int i = 0; i < peaks.size(); i++) { // Cut from the original image of the plate and save to a vector. // ATTENTION: Cutting from original,