Commit 1c64d3c2 authored by Rohan  Kumar's avatar Rohan Kumar
Browse files

stuff

parent 322702bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <exec.mainClass>top.BackendJava</exec.mainClass>
        <exec.mainClass>object_detection.ObjectDetector</exec.mainClass>
    </properties>

    <build>
+2 −2
Original line number Diff line number Diff line
@@ -61,8 +61,8 @@ public class ObjectDetector {
        System.out.println(objSet);
        System.out.println("====> Finished Object Mapping");

        MongoDBInteraction mdbi = new MongoDBInteraction();
        mdbi.updateObjectSet(5, objSet);
        //MongoDBInteraction mdbi = new MongoDBInteraction();
        //mdbi.updateObjectSet(5, objSet);
    }

    /**
+8 −2
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ public class ObjectSet {
        }

        // in this line, if the reps are 20% similar, assume this is the same set.
        return (count) > (Math.max(r1.length, r2.length)*0.1);
        return (count) > (Math.max(r1.length, r2.length)*0.2);
    }

    /**
@@ -184,6 +184,12 @@ public class ObjectSet {
     */
    @Override
    public String toString(){
        return "ObjectSet of : " + this.objects.size() + " objects";
        StringBuilder res = new StringBuilder("ObjectSet of : " + this.objects.size() + " objects:");

        for(PointSet p : this.objects){
            res.append(p).append("\n");
        }

        return res.toString();
    }
}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ public class Point {
            return false;
        }
        Point p = (Point) o;
        return Point.equals(this, p, (float) 2);
        return Point.equals(this, p, (float) 6);
    }

    @Override
+3 −0
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@ public class PointSet {
    Set<Point> pset;
    Point[] reps;

    Point centroid;

    final int IDX;

    /**
@@ -21,6 +23,7 @@ public class PointSet {

        // add every point blankly to pointset
        pset.addAll(Arrays.asList(pp));
        centroid = new Point(0,0,0, null);
        reps = new Point[NUM_REPS];
        IDX = id;
    }
Loading