public GeometricCalibrator(GeometricCalibrator.Settings settings, MarkerDetector.Settings detectorSettings, MarkedPlane markedPlane, ProjectiveDevice projectiveDevice) { base.\u002Ector(); GeometricCalibrator geometricCalibrator1 = this; this.allObjectMarkers = new LinkedList(); this.allImageMarkers = new LinkedList(); this.tempImage = (object) null; this.lastDetectedMarkers = (Marker[]) null; GeometricCalibrator geometricCalibrator2 = this; throw new NoClassDefFoundError("com.googlecode.javacv.cpp.opencv_core$CvMat"); }
/** * Report the facets of this Simplex. * Each facet is a set of vertices. * @return an Iterable for the facets of this Simplex */ public List facets() { List theFacets = new java.util.LinkedList(); for (Iterator it = this.iterator(); it.hasNext(); ) { Object v = it.next(); Set facet = new HashSet(this); facet.remove(v); theFacets.add(facet); } return theFacets; }
/** * Report the facets of this Simplex. * Each facet is a set of vertices. * @return an Iterable for the facets of this Simplex */ public List facets() { List theFacets = new java.util.LinkedList(); for (Iterator it = this.iterator(); it.hasNext();) { Object v = it.next(); Set facet = new HashSet(this); facet.remove(v); theFacets.add(facet); } return(theFacets); }
/** * Place a new point site into the DT. * @param site the new Pnt * @return set of all new triangles created */ public Set delaunayPlace(Pnt site) { Set newTriangles = new HashSet(); Set oldTriangles = new HashSet(); Set doneSet = new HashSet(); LinkedList waitingQ = new LinkedList(); // Locate containing triangle if (debug) Console.WriteLine("Locate"); Simplex triangle = locate(site); // Give up if no containing triangle or if site is already in DT var triangle_null = triangle == null; if (triangle_null || triangle.contains(site)) return newTriangles; // Find Delaunay cavity (those triangles with site in their circumcircles) if (debug) Console.WriteLine("Cavity"); waitingQ.add(triangle); while (!waitingQ.isEmpty()) { triangle = (Simplex) waitingQ.removeFirst(); if (site.vsCircumcircle((Pnt[]) triangle.toArray(new Pnt[0])) == 1) continue; oldTriangles.add(triangle); Iterator it = this.neighbors(triangle).iterator(); for (; it.hasNext();) { Simplex tri = (Simplex) it.next(); if (doneSet.contains(tri)) continue; doneSet.add(tri); waitingQ.add(tri); } } // Create the new triangles if (debug) Console.WriteLine("Create"); for (Iterator it = Simplex.boundary(oldTriangles).iterator(); it.hasNext();) { Set facet = (Set) it.next(); facet.add(site); newTriangles.add(new Simplex(facet)); } // Replace old triangles with new triangles if (debug) Console.WriteLine("Update"); this.update(oldTriangles, newTriangles); // Update mostRecent triangle if (!newTriangles.isEmpty()) mostRecent = (Simplex) newTriangles.iterator().next(); return newTriangles; }
public virtual void run() { if (Loader.loadedLibraries.isEmpty()) return; IOException ioException; try { LinkedList linkedList = new LinkedList(); linkedList.add((object) new StringBuilder().append(System.getProperty("java.home")).append("/bin/java").toString()); linkedList.add((object) "-classpath"); linkedList.add((object) System.getProperty("java.class.path")); linkedList.add((object) ((Class) ClassLiteral<Loader>.Value).getName()); linkedList.addAll(Loader.loadedLibraries.values()); new ProcessBuilder((List) linkedList).start(); return; } catch (IOException ex) { int num = 1; ioException = (IOException) ByteCodeHelper.MapException<IOException>((Exception) ex, (ByteCodeHelper.MapFlags) num); } Throwable.instancehelper_printStackTrace((Exception) ioException); }
public DashboardPanel(DashboardFrame frame, ITable table) { base.\u002Ector(); DashboardPanel dashboardPanel = this; this.backPane = new JPanel(); this.elements = new LinkedList(); this.fields = (Map) new HashMap(); this.hiddenFields = (Set) new HashSet(); this.editable = false; this.listener = new DashboardPanel.RobotListener(this, (DashboardPanel.\u0031) null); this.subsystems = new ArrayList(); this.frame = frame; this.table = table; this.glassPane = new GlassPane(frame, this); ((Container) this).add((Component) this.glassPane); ((Container) this).add((Component) this.backPane); ((Container) this.backPane).setLayout((LayoutManager) new DashboardPanel.DashboardLayout(this, (DashboardPanel.\u0031) null)); ((Component) this.backPane).setFocusable(true); ((Container) this).setLayout((LayoutManager) new DashboardPanel.DashboardLayout(this, (DashboardPanel.\u0031) null)); this.setEditable(this.editable); table.addTableListener((ITableListener) this.listener, true); table.addSubTableListener((ITableListener) this.listener); }
public virtual double[] calibrate(bool useCenters, bool calibrateCameras, int cameraAtOrigin) { int num1 = calibrateCameras ? 1 : 0; int num2 = useCenters ? 1 : 0; GeometricCalibrator geometricCalibrator = this.cameraCalibrators[cameraAtOrigin]; if (num1 != 0) { for (int index = 0; index < this.cameraCalibrators.Length; ++index) { this.cameraCalibrators[index].calibrate(num2 != 0); if (this.cameraCalibrators[index] != geometricCalibrator) geometricCalibrator.calibrateStereo(num2 != 0, this.cameraCalibrators[index]); } } LinkedList allObjectMarkers1 = this.projectorCalibrator.getAllObjectMarkers(); LinkedList allImageMarkers1 = new LinkedList(); LinkedList allObjectMarkers2 = new LinkedList(); LinkedList allObjectMarkers3 = new LinkedList(); Iterator iterator = ((AbstractSequentialList) allObjectMarkers1).iterator(); Iterator[] iteratorArray = new Iterator[this.cameraCalibrators.Length]; for (int index = 0; index < this.cameraCalibrators.Length; ++index) iteratorArray[index] = ((AbstractSequentialList) this.allImagedBoardMarkers[index]).iterator(); while (iterator.hasNext()) { int index1 = 0; if (index1 < this.cameraCalibrators.Length) { double num3 = this.settings.prewarpUpdateErrorMax * (double) (this.cameraCalibrators[index1].getProjectiveDevice().imageWidth + this.cameraCalibrators[index1].getProjectiveDevice().imageHeight) / 2.0; Marker[] markerArray1 = (Marker[]) iteratorArray[index1].next(); Marker[] markerArray2 = (Marker[]) iterator.next(); Marker[] markerArray3 = new Marker[markerArray1.Length]; Marker[] markerArray4 = new Marker[markerArray2.Length]; for (int index2 = 0; index2 < markerArray1.Length; ++index2) { Marker[] markerArray5 = markerArray3; int num4 = index2; Marker marker1 = markerArray1[index2].clone(); int index3 = num4; Marker[] markerArray6 = markerArray5; Marker marker2 = marker1; markerArray6[index3] = marker1; Marker marker3 = marker2; marker3.corners = this.cameraCalibrators[index1].getProjectiveDevice().undistort(marker3.corners); } for (int index2 = 0; index2 < markerArray2.Length; ++index2) { Marker[] markerArray5 = markerArray4; int num4 = index2; Marker marker1 = markerArray2[index2].clone(); int index3 = num4; Marker[] markerArray6 = markerArray5; Marker marker2 = marker1; markerArray6[index3] = marker1; Marker marker3 = marker2; marker3.corners = this.cameraCalibrators[index1].getProjectiveDevice().undistort(marker3.corners); } MarkedPlane markedPlane = this.boardPlane; object obj = this.boardWarp; throw new NoClassDefFoundError("[Lcom.googlecode.javacv.cpp.opencv_core$CvMat;"); } } this.projectorCalibrator.setAllObjectMarkers(allObjectMarkers2); double[] numArray1 = this.projectorCalibrator.calibrate(num2 != 0); LinkedList allObjectMarkers4 = geometricCalibrator.getAllObjectMarkers(); LinkedList allImageMarkers2 = geometricCalibrator.getAllImageMarkers(); geometricCalibrator.setAllObjectMarkers(allObjectMarkers3); geometricCalibrator.setAllImageMarkers(allImageMarkers1); double[] numArray2 = geometricCalibrator.calibrateStereo(num2 != 0, this.projectorCalibrator); this.projectorCalibrator.setAllObjectMarkers(allObjectMarkers1); geometricCalibrator.setAllObjectMarkers(allObjectMarkers4); geometricCalibrator.setAllImageMarkers(allImageMarkers2); double[] numArray3 = new double[4]; int index4 = 0; double num5 = numArray1[0]; numArray3[index4] = num5; int index5 = 1; double num6 = numArray1[1]; numArray3[index5] = num6; int index6 = 2; double num7 = numArray2[0]; numArray3[index6] = num7; int index7 = 3; double num8 = numArray2[1]; numArray3[index7] = num8; return numArray3; }
public virtual void setAllImageMarkers(LinkedList allImageMarkers) { this.allImageMarkers = allImageMarkers; }
public virtual void setAllObjectMarkers(LinkedList allObjectMarkers) { this.allObjectMarkers = allObjectMarkers; }
private void doMethods([In] Class obj0) { Properties properties = (Properties) obj0.getAnnotation((Class) ClassLiteral<Properties>.Value); int num1 = 0; if (properties != null) { Platform[] platformArray = properties.value(); int length = platformArray.Length; for (int index = 0; index < length; ++index) { if (this.checkPlatform(platformArray[index])) num1 = 1; } } else if (this.checkPlatform((Platform) obj0.getAnnotation((Class) ClassLiteral<Platform>.Value))) num1 = 1; if (num1 == 0) return; this.generatedSomethingUseful = true; LinkedList linkedList = (LinkedList) this.members.get((object) obj0); if ((!obj0.isAnnotationPresent((Class) ClassLiteral<Opaque>.Value) || obj0 == ClassLiteral<Pointer>.Value) && (!((Class) ClassLiteral<FunctionPointer>.Value).isAssignableFrom(obj0) && !obj0.isAnnotationPresent((Class) ClassLiteral<NoOffset>.Value))) { if (linkedList == null) this.members.put((object) obj0, (object) (linkedList = new LinkedList())); if (!linkedList.contains((object) "sizeof")) linkedList.add((object) "sizeof"); } Class[] declaredClasses = obj0.getDeclaredClasses(Generator.__\u003CGetCallerID\u003E()); for (int index = 0; index < declaredClasses.Length; ++index) { if (((Class) ClassLiteral<Pointer>.Value).isAssignableFrom(declaredClasses[index]) || ((Class) ClassLiteral<Pointer.Deallocator>.Value).isAssignableFrom(declaredClasses[index])) this.doMethods(declaredClasses[index]); } Method[] declaredMethods = obj0.getDeclaredMethods(Generator.__\u003CGetCallerID\u003E()); bool[] flagArray1 = new bool[declaredMethods.Length]; Method method = this.doFunctionDefinitions(obj0, flagArray1); for (int index1 = 0; index1 < declaredMethods.Length; ++index1) { if (this.checkPlatform((Platform) declaredMethods[index1].getAnnotation((Class) ClassLiteral<Platform>.Value))) { Generator.MethodInformation methodInformation = Generator.getMethodInformation(declaredMethods[index1]); if (methodInformation != null) { string str1 = new StringBuilder().append(Generator.mangle(obj0.getName())).append("_").append(Generator.mangle(methodInformation.name)).toString(); if ((methodInformation.memberGetter || methodInformation.memberSetter) && (!methodInformation.noOffset && linkedList != null) && (!Modifier.isStatic(methodInformation.modifiers) && !linkedList.contains((object) methodInformation.memberName))) linkedList.add((object) methodInformation.memberName); if (flagArray1[index1]) this.doCallback(obj0, method, str1); [email protected](new StringBuilder().append("JNIEXPORT ").append(Generator.getJNITypeName(methodInformation.returnType)).append(" JNICALL Java_").append(str1).toString()); if (methodInformation.overloaded) [email protected](new StringBuilder().append("__").append(Generator.mangle(Generator.getSignature(methodInformation.parameterTypes))).toString()); if (Modifier.isStatic(methodInformation.modifiers)) [email protected]("(JNIEnv *e, jclass c"); else [email protected]("(JNIEnv *e, jobject o"); for (int index2 = 0; index2 < methodInformation.parameterTypes.Length; ++index2) [email protected](new StringBuilder().append(", ").append(Generator.getJNITypeName(methodInformation.parameterTypes[index2])).append(" p").append(index2).toString()); [email protected](") {"); if (flagArray1[index1]) { this.doCallbackAllocator(obj0, method, str1); } else { if (!Modifier.isStatic(methodInformation.modifiers) && !methodInformation.allocator && (!methodInformation.arrayAllocator && !methodInformation.deallocator)) { string cppTypeName = Generator.getCPPTypeName(obj0); string str2 = !methodInformation.bufferGetter || !String.instancehelper_equals("void*", (object) cppTypeName) ? cppTypeName : "char*"; [email protected](new StringBuilder().append(" ").append(str2).append(" pointer = (").append(str2).append(")").append("jlong_to_ptr(e->GetLongField(o, JavaCPP_addressFieldID));").toString()); [email protected](" if (JavaCPP_checkNull(e, (uintptr_t)pointer)) {"); [email protected](new StringBuilder().append(" return").append(methodInformation.returnType != Void.TYPE ? " 0;" : ";").toString()); [email protected](" }"); if (!obj0.isAnnotationPresent((Class) ClassLiteral<Opaque>.Value) || methodInformation.bufferGetter) { [email protected](" jint position = e->GetIntField(o, JavaCPP_positionFieldID);"); if (((Class) ClassLiteral<FunctionPointer>.Value).isAssignableFrom(obj0)) [email protected](new StringBuilder().append(" pointer = position == 0 ? pointer : (").append(str2).append(")((uintptr_t)pointer + position);").toString()); else [email protected](" pointer += position;"); } } bool[] flagArray2 = new bool[methodInformation.parameterTypes.Length]; bool[] flagArray3 = new bool[methodInformation.parameterTypes.Length]; this.doParametersBefore(methodInformation, flagArray2, flagArray3); string str3 = this.doReturnBefore(obj0, methodInformation); int num2 = this.doMainOperation(obj0, methodInformation, str3, flagArray2) ? 1 : 0; this.doReturnAfter(obj0, methodInformation, num2 != 0); this.doParametersAfter(methodInformation, num2 != 0, flagArray3); if (methodInformation.returnType != Void.TYPE) [email protected](" return r;"); [email protected]("}"); } } } } [email protected](); }