Skip to content

Commit c92fc62

Browse files
committed
Renamed method names in PlateHorizontalGraph to be camel case. Remove unnecessary this. statements.
1 parent d0f675a commit c92fc62

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/main/java/net/sf/javaanpr/imageanalysis/PlateHorizontalGraph.java

+14-14
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,24 @@ public class PlateHorizontalGraph extends Graph {
2626
Configurator.getConfigurator().getIntProperty("platehorizontalgraph_detectionType");
2727

2828
public float derivation(int index1, int index2) {
29-
return this.yValues.elementAt(index1) - this.yValues.elementAt(index2);
29+
return yValues.elementAt(index1) - yValues.elementAt(index2);
3030
}
3131

3232
public Vector<Peak> findPeak() {
3333
if (PlateHorizontalGraph.horizontalDetectionType == 1) {
34-
return this.findPeak_edgedetection();
34+
return findPeakEdgedetection();
3535
}
36-
return this.findPeak_derivative();
36+
return findPeakDerivative();
3737
}
3838

39-
public Vector<Peak> findPeak_derivative() {
39+
public Vector<Peak> findPeakDerivative() {
4040
int a = 2;
41-
int b = this.yValues.size() - 1 - 2;
42-
float maxVal = this.getMaxValue();
43-
while ((-this.derivation(a, a + 4) < (maxVal * 0.2)) && (a < (this.yValues.size() - 2 - 2 - 4))) {
41+
int b = yValues.size() - 1 - 2;
42+
float maxVal = getMaxValue();
43+
while ((-derivation(a, a + 4) < (maxVal * 0.2)) && (a < (yValues.size() - 2 - 2 - 4))) {
4444
a++;
4545
}
46-
while ((this.derivation(b - 4, b) < (maxVal * 0.2)) && (b > (a + 2))) {
46+
while ((derivation(b - 4, b) < (maxVal * 0.2)) && (b > (a + 2))) {
4747
b--;
4848
}
4949
Vector<Peak> outPeaks = new Vector<Peak>();
@@ -52,19 +52,19 @@ public Vector<Peak> findPeak_derivative() {
5252
return outPeaks;
5353
}
5454

55-
public Vector<Peak> findPeak_edgedetection() {
56-
float average = this.getAverageValue();
55+
public Vector<Peak> findPeakEdgedetection() {
56+
float average = getAverageValue();
5757
int a = 0;
58-
int b = this.yValues.size() - 1;
59-
while (this.yValues.elementAt(a) < average) {
58+
int b = yValues.size() - 1;
59+
while (yValues.elementAt(a) < average) {
6060
a++;
6161
}
62-
while (this.yValues.elementAt(b) < average) {
62+
while (yValues.elementAt(b) < average) {
6363
b--;
6464
}
6565
Vector<Peak> outPeaks = new Vector<Peak>();
6666
a = Math.max(a - 5, 0);
67-
b = Math.min(b + 5, this.yValues.size());
67+
b = Math.min(b + 5, yValues.size());
6868
outPeaks.add(new Peak(a, b));
6969
super.peaks = outPeaks;
7070
return outPeaks;

0 commit comments

Comments
 (0)