GeneratePnPObservation { public void targetSquare(double length) { double r = length/2; marker.clear(); marker.add(new Point3D_F64(-r, -r, 0)); marker.add(new Point3D_F64(r, -r, 0)); marker.add(new Point3D_F64(r, r, 0)); marker.add(new Point3D_F64(-r, r, 0)); } GeneratePnPObservation(double hfov, int width, int height); void initialize( double stdevPixel, String path ); void targetSquare(double length); void generateUniformImageDiscreteDistances(DiscreteRange range, double maxTilt, int trialsPerSet); void generateUniformImageDiscreteAngles(DiscreteRange angles, double distance, int trialsPerSet); void saveSimulation(List<Point3D_F64> corners,
                               List<Se3_F64> BodyToCameras, List<List<Point2D_F64>> observations,
                               long randomSeed,
                               PrintStream out); double getHfov(); int getImageWidth(); int getImageHeight(); double getStdevPixel(); static void main(String[] args);  }
@Test public void targetSquare() { GeneratePnPObservation generator = new GeneratePnPObservation(60,640,480); double l = .4; generator.targetSquare(l); assertEquals(4,generator.marker.size()); for (int i = 0,j=3; i < 4; j=i,i++) { assertEquals(0, generator.marker.get(i).z , UtilEjml.TEST_F64); assertEquals(l,generator.marker.get(i).distance(generator.marker.get(j)), UtilEjml.TEST_F64); } }