public void setTo( GrowQueue_F32 original ) { resize(original.size); System.arraycopy(original.data, 0, data, 0, size()); }
public void setTo( GrowQueue_F32 original ) { resize(original.size); System.arraycopy(original.data, 0, data, 0, size()); }
@Override public void addCloud(List<Point3D_F64> cloud) { GrowQueue_F32 fcloud = new GrowQueue_F32(); fcloud.resize(cloud.size()*3); int fidx = 0; for (int i = 0; i < cloud.size(); i++) { Point3D_F64 p = cloud.get(i); fcloud.data[fidx++]=(float)p.x; fcloud.data[fidx++]=(float)p.y; fcloud.data[fidx++]=(float)p.z; } Platform.runLater(()->panel.addCloud(fcloud)); }
/** * Predeclares all memory required and sets data structures to their initial values */ protected void initialize(T input , GrayS32 output ) { this.graph = output; final int N = input.width*input.height; regionSize.resize(N); threshold.resize(N); for( int i = 0; i < N; i++ ) { regionSize.data[i] = 1; threshold.data[i] = K; graph.data[i] = i; // assign a unique label to each pixel since they are all their own region initially } edges.reset(); edgesNotMatched.reset(); }
/** * Precompute the portion of the equation which only concerns the undistorted location of each point on the * grid even the current undistorted location of each control point. */ public void fixateUndistorted() { if( controls.size() < 2 ) throw new RuntimeException("Not enough control points specified. Found "+controls.size()); for (int row = 0; row < gridRows; row++) { for (int col = 0; col < gridCols; col++) { Cache cache = getGrid(row,col); cache.weights.resize(controls.size); cache.A.resize(controls.size); cache.A_s.resize(controls.size()); float v_x = col; float v_y = row; computeWeights(cache, v_x, v_y); computeAverageP(cache); model.computeCache(cache, v_x, v_y); } } }