public DdaManagerGeneralPoint(EasyGeneralFeatureDetector<I, D> detector, DescribeRegionPoint<I, Desc> describe, double scale) { this.detector = detector; this.describe = describe; this.scale = scale; descriptors = UtilFeature.createQueue(describe,100); }
/** * Adjusts the descriptor. This adds lighting invariance and reduces the affects of none-affine changes * in lighting. * * 1) Apply L2 normalization * 2) Clip using max descriptor value * 3) Apply L2 normalization again */ public static void normalizeDescriptor(TupleDesc_F64 descriptor , double maxDescriptorElementValue ) { // normalize descriptor to unit length UtilFeature.normalizeL2(descriptor); // clip the values for (int i = 0; i < descriptor.size(); i++) { double value = descriptor.value[i]; if( value > maxDescriptorElementValue ) { descriptor.value[i] = maxDescriptorElementValue; } } // normalize again UtilFeature.normalizeL2(descriptor); }
public DisparityCalculation(DetectDescribePoint<GrayF32, Desc> detDesc, AssociateDescription<Desc> associate , CameraPinholeRadial intrinsic ) { this.detDesc = detDesc; this.associate = associate; this.intrinsic = intrinsic; listSrc = UtilFeature.createQueue(detDesc, 10); listDst = UtilFeature.createQueue(detDesc, 10); }
/** * <p> * Computes the SURF descriptor for the specified interest point. If the feature * goes outside of the image border (including convolution kernels) then null is returned. * </p> * * @param x Location of interest point. * @param y Location of interest point. * @param angle The angle the feature is pointing at in radians. * @param scale Scale of the interest point. Null is returned if the feature goes outside the image border. * @param ret storage for the feature. Must have 64 values. */ public void describe(double x, double y, double angle, double scale, BrightFeature ret) { describe(x, y, angle, scale, (TupleDesc_F64) ret); // normalize feature vector to have an Euclidean length of 1 // adds light invariance UtilFeature.normalizeL2(ret); // Laplacian's sign ret.white = computeLaplaceSign((int)(x+0.5),(int)(y+0.5), scale); }
public AssociationProcessing( DetectDescribePoint<GrayF32,Desc> detDesc , AssociateDescription<Desc> associate ) { super(ImageType.single(GrayF32.class)); this.detDesc = detDesc; this.associate = associate; listSrc = UtilFeature.createQueue(detDesc,10); listDst = UtilFeature.createQueue(detDesc,10); }
public void describe(double x, double y, double angle, double scale, BrightFeature desc) { int featureIndex = 0; for( int band = 0; band < ii.getNumBands(); band++ ) { describe.setImage(ii.getBand(band)); describe.describe(x,y, angle, scale, bandDesc); System.arraycopy(bandDesc.value,0,desc.value,featureIndex,bandDesc.size()); featureIndex += bandDesc.size(); } UtilFeature.normalizeL2(desc); describe.setImage(grayII); desc.white = describe.computeLaplaceSign((int)(x+0.5),(int)(y+0.5),scale); }
public DetectDescribeMultiFusion(DetectorInterestPointMulti<T> detector, OrientationImage<T> orientation, DescribeRegionPoint<T, TD> describe) { this.detector = detector; this.orientation = orientation; this.describe = describe; info = new SetInfo[ detector.getNumberOfSets() ]; for( int i = 0; i < info.length; i++ ) { info[i] = new SetInfo<>(); info[i].descriptors = UtilFeature.createQueue(describe,10); } }
public DdaManagerGeneralPoint(EasyGeneralFeatureDetector<I, D> detector, DescribeRegionPoint<I, Desc> describe, double scale) { this.detector = detector; this.describe = describe; this.scale = scale; numSets = detector.getDetector().isDetectMinimums() ? 1 : 0; numSets += detector.getDetector().isDetectMaximums() ? 1 : 0; descriptors = UtilFeature.createQueue(describe,100); }
private void processImage() { final List<Point2D_F64> leftPts = new ArrayList<>(); final List<Point2D_F64> rightPts = new ArrayList<>(); FastQueue<TupleDesc> leftDesc = UtilFeature.createQueue(describe, 10); FastQueue<TupleDesc> rightDesc = UtilFeature.createQueue(describe,10);
public DemoThreeViewStereoApp(List<PathLabel> examples) { super(true, false, examples, ImageType.single(GrayU8.class)); // remove some unused items from the menu bar. This app is an exception JMenu fileMenu = menuBar.getMenu(0); fileMenu.remove(1); fileMenu.remove(1); detDesc = FactoryDetectDescribe.surfStable( new ConfigFastHessian( 0, 4, 1000, 1, 9, 4, 2), null,null, GrayU8.class); for (int i = 0; i < 3; i++) { locations[i] = new FastQueue<>(Point2D_F64.class,true); features[i] = UtilFeature.createQueue(detDesc,100); dimensions[i] = new ImageDimension(); } rectifiedPanel.setImages(visualRect1,visualRect2); guiDisparity.setImage(visualDisparity); gui.setLayout(new BorderLayout()); updateVisibleGui(); add(BorderLayout.WEST, controls); add(BorderLayout.CENTER, gui); setPreferredSize(new Dimension(800,600)); }